Top Description Inners Fields Constructors Methods
org.lwjgl.opengl

public Class GLX

extends Object
Class Inheritance
Known Direct Subclasses
org.lwjgl.opengl.GLX11
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*, org.lwjgl.system.linux.*

Native bindings to GLX.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
GLX.Functions

Contains the function pointers loaded from GL.getFunctionProvider().

Field Summary

Modifier and TypeField and Description
public static final int
GLX_ACCUM_ALPHA_SIZE

Names for attributes to GetConfig.

public static final int
GLX_ACCUM_BLUE_SIZE

Names for attributes to GetConfig.

public static final int
GLX_ACCUM_GREEN_SIZE

Names for attributes to GetConfig.

public static final int
GLX_ACCUM_RED_SIZE

Names for attributes to GetConfig.

public static final int
GLX_ALPHA_SIZE

Names for attributes to GetConfig.

public static final int
GLX_AUX_BUFFERS

Names for attributes to GetConfig.

public static final int
GLX_BAD_ATTRIBUTE

Error return values from GetConfig.

public static final int
GLX_BAD_CONTEXT

Error return values from GetConfig.

public static final int
GLX_BAD_ENUM

Error return values from GetConfig.

public static final int
GLX_BAD_SCREEN

Error return values from GetConfig.

public static final int
GLX_BAD_VALUE

Error return values from GetConfig.

public static final int
GLX_BAD_VISUAL

Error return values from GetConfig.

public static final int
GLX_BLUE_SIZE

Names for attributes to GetConfig.

public static final int
GLX_BUFFER_SIZE

Names for attributes to GetConfig.

public static final int
GLX_DEPTH_SIZE

Names for attributes to GetConfig.

public static final int
GLX_DOUBLEBUFFER

Names for attributes to GetConfig.

public static final int
GLX_GREEN_SIZE

Names for attributes to GetConfig.

public static final int
GLX_LEVEL

Names for attributes to GetConfig.

public static final int
GLX_NO_EXTENSION

Error return values from GetConfig.

public static final int
GLX_RED_SIZE

Names for attributes to GetConfig.

public static final int
GLX_RGBA

Names for attributes to GetConfig.

public static final int
GLX_STENCIL_SIZE

Names for attributes to GetConfig.

public static final int
GLX_STEREO

Names for attributes to GetConfig.

public static final int
GLX_USE_GL

Names for attributes to GetConfig.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
GLXBadPixmap

Errors.

public static final int
public static final int
GLXBadWindow

Errors.

public static final int

Constructor Summary

AccessConstructor and Description
protected
GLX()

Method Summary

Modifier and TypeMethod and Description
public static XVisualInfo

Returns:

a pointer to an XVisualInfo structure describing the visual that best matches the specified attributes. If no matching visual exists, NULL is returned.
glXChooseVisual
(long
the connection to the X server
display
,
int
the screen number
screen
,
IntBuffer
a list of attributes terminated with None
attrib_list
)

Finds a visual that matches the client’s specified attributes.

public static XVisualInfo
glXChooseVisual(long display, int screen, int[] attrib_list)

Array version of: ChooseVisual

public static void
glXCopyContext(long
the connection to the X server
display
,
long
the source GLXContext
source
,
long
the destination GLXContext
dest
,
long
indicates which groups of state variables are to be copied; it contains the bitwise OR of the symbolic names for the attribute groups
mask
)

Copies OpenGL rendering state from one context to another.

public static long
glXCreateContext(long
the connection to the X server
display
,
XVisualInfo
a pointer to an XVisualInfo structure
visual
,
long
the GLXContext to share objects with
share_list
,
boolean
whether direct rendering is requested
direct
)

Creates an OpenGL context.

public static long
glXCreateGLXPixmap(long
the connection to the X server
display
,
XVisualInfo
a pointer to a XVisualInfo structure
visual
,
long
the Pixmap
pixmap
)

Creates a GLXPixmap from a Pixmap.

public static void
glXDestroyContext(long
the connection to the X server
display
,
long
the GLXContext to destroy
ctx
)

Destroys an OpenGL context.

public static void
glXDestroyGLXPixmap(long
the connection to the X server
display
,
long
the GLXPixmap to destroy.
pixmap
)

Destroys a GLXPixmap.

public static int
glXGetConfig(long
the connection to the X server
display
,
XVisualInfo
a pointer to an XVisualInfo structure
visual
,
int
the attribute to query
attribute
,
IntBuffer
returns the attribute value
value
)

Returns a description of an OpenGL attribute exported by a Visual.

public static int
glXGetConfig(long display, XVisualInfo visual, int attribute, int[] value)

Array version of: GetConfig

public static long
glXGetCurrentContext()

Returns the GLXContext that is current in the current thread.

public static long
glXGetCurrentDrawable()

Returns the XID of the current drawable used for rendering.

public static boolean
glXIsDirect(long
the connection to the X server
display
,
long
the GLXContext to query
ctx
)

Determines if an OpenGL rendering context is direct.

public static boolean
glXMakeCurrent(long
the connection to the X server
display
,
long
the draw GLXdrawable
draw
,
long
the GLXContext to make current
ctx
)

Makes a context current in the current thread

public static boolean
glXQueryExtension(long
the connection to the X server
display
,
IntBuffer
returns the value of the first error code
error_base
,
IntBuffer
returns the value of the first event code
event_base
)

Ascertains if the GLX extension is defined for an X server.

public static boolean
glXQueryExtension(long display, int[] error_base, int[] event_base)

Array version of: QueryExtension

public static boolean
glXQueryVersion(long
the connection to the X server
display
,
IntBuffer
returns the major version
major
,
IntBuffer
returns the minor version
minor
)

Queries the GLX version supported.

public static boolean
glXQueryVersion(long display, int[] major, int[] minor)

Array version of: QueryVersion

public static void
glXSwapBuffers(long
the connection to the X server
display
,
long
a double buffered GLXDrawable
draw
)

For drawables that are double buffered, makes the contexts of the back buffer potentially visible (i.e., become the contents of the front buffer).

public static void
glXUseXFont(long
the font to use
font
,
int
the first glyph in the font to use
first
,
int
the number of display lists to define
count
,
int
the base list number
list_base
)

Provides a shortcut for using X fonts.

public static void
glXWaitGL()

Prevents X requests from executing until any outstanding OpenGL rendering is done.

public static void
glXWaitX()

Prevents the OpenGL command sequence from executing until any outstanding X requests are completed.

public static long
nglXChooseVisual(long display, int screen, long attrib_list)

Unsafe version of: ChooseVisual

public static long
nglXCreateContext(long display, long visual, long share_list, int direct)

Unsafe version of: CreateContext

public static long
nglXCreateGLXPixmap(long display, long visual, long pixmap)

Unsafe version of: CreateGLXPixmap

public static int
nglXGetConfig(long display, long visual, int attribute, long value)

Unsafe version of: GetConfig

public static int
nglXQueryExtension(long display, long error_base, long event_base)

Unsafe version of: QueryExtension

public static int
nglXQueryVersion(long display, long major, long minor)

Unsafe version of: QueryVersion

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GLX_ACCUM_ALPHA_SIZEback to summary
public static final int GLX_ACCUM_ALPHA_SIZE

Names for attributes to GetConfig.

GLX_ACCUM_BLUE_SIZEback to summary
public static final int GLX_ACCUM_BLUE_SIZE

Names for attributes to GetConfig.

GLX_ACCUM_GREEN_SIZEback to summary
public static final int GLX_ACCUM_GREEN_SIZE

Names for attributes to GetConfig.

GLX_ACCUM_RED_SIZEback to summary
public static final int GLX_ACCUM_RED_SIZE

Names for attributes to GetConfig.

GLX_ALPHA_SIZEback to summary
public static final int GLX_ALPHA_SIZE

Names for attributes to GetConfig.

GLX_AUX_BUFFERSback to summary
public static final int GLX_AUX_BUFFERS

Names for attributes to GetConfig.

GLX_BAD_ATTRIBUTEback to summary
public static final int GLX_BAD_ATTRIBUTE

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BAD_CONTEXTback to summary
public static final int GLX_BAD_CONTEXT

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BAD_ENUMback to summary
public static final int GLX_BAD_ENUM

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BAD_SCREENback to summary
public static final int GLX_BAD_SCREEN

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BAD_VALUEback to summary
public static final int GLX_BAD_VALUE

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BAD_VISUALback to summary
public static final int GLX_BAD_VISUAL

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_BLUE_SIZEback to summary
public static final int GLX_BLUE_SIZE

Names for attributes to GetConfig.

GLX_BUFFER_SIZEback to summary
public static final int GLX_BUFFER_SIZE

Names for attributes to GetConfig.

GLX_DEPTH_SIZEback to summary
public static final int GLX_DEPTH_SIZE

Names for attributes to GetConfig.

GLX_DOUBLEBUFFERback to summary
public static final int GLX_DOUBLEBUFFER

Names for attributes to GetConfig.

GLX_GREEN_SIZEback to summary
public static final int GLX_GREEN_SIZE

Names for attributes to GetConfig.

GLX_LEVELback to summary
public static final int GLX_LEVEL

Names for attributes to GetConfig.

GLX_NO_EXTENSIONback to summary
public static final int GLX_NO_EXTENSION

Error return values from GetConfig. Success is indicated by a value of 0.

GLX_RED_SIZEback to summary
public static final int GLX_RED_SIZE

Names for attributes to GetConfig.

GLX_RGBAback to summary
public static final int GLX_RGBA

Names for attributes to GetConfig.

GLX_STENCIL_SIZEback to summary
public static final int GLX_STENCIL_SIZE

Names for attributes to GetConfig.

GLX_STEREOback to summary
public static final int GLX_STEREO

Names for attributes to GetConfig.

GLX_USE_GLback to summary
public static final int GLX_USE_GL

Names for attributes to GetConfig.

GLXBadContextback to summary
public static final int GLXBadContext

Errors.

GLXBadContextStateback to summary
public static final int GLXBadContextState

Errors.

GLXBadContextTagback to summary
public static final int GLXBadContextTag

Errors.

GLXBadCurrentDrawableback to summary
public static final int GLXBadCurrentDrawable

Errors.

GLXBadCurrentWindowback to summary
public static final int GLXBadCurrentWindow

Errors.

GLXBadDrawableback to summary
public static final int GLXBadDrawable

Errors.

GLXBadFBConfigback to summary
public static final int GLXBadFBConfig

Errors.

GLXBadLargeRequestback to summary
public static final int GLXBadLargeRequest

Errors.

GLXBadPbufferback to summary
public static final int GLXBadPbuffer

Errors.

GLXBadPixmapback to summary
public static final int GLXBadPixmap

Errors.

GLXBadRenderRequestback to summary
public static final int GLXBadRenderRequest

Errors.

GLXBadWindowback to summary
public static final int GLXBadWindow

Errors.

GLXUnsupportedPrivateRequestback to summary
public static final int GLXUnsupportedPrivateRequest

Errors.

Constructor Detail

GLXback to summary
protected GLX()

Method Detail

glXChooseVisualback to summary
public static XVisualInfo glXChooseVisual(long display, int screen, IntBuffer attrib_list)

Finds a visual that matches the client’s specified attributes.

Parameters
display:long

the connection to the X server

screen:int

the screen number

attrib_list:IntBuffer

a list of attributes terminated with None

Returns:XVisualInfo

a pointer to an XVisualInfo structure describing the visual that best matches the specified attributes. If no matching visual exists, NULL is returned.

Annotations
@Nullable
@NativeType:XVisualInfo *
glXChooseVisualback to summary
public static XVisualInfo glXChooseVisual(long display, int screen, int[] attrib_list)

Array version of: ChooseVisual

Annotations
@Nullable
@NativeType:XVisualInfo *
glXCopyContextback to summary
public static void glXCopyContext(long display, long source, long dest, long mask)

Copies OpenGL rendering state from one context to another.

Parameters
display:long

the connection to the X server

source:long

the source GLXContext

dest:long

the destination GLXContext

mask:long

indicates which groups of state variables are to be copied; it contains the bitwise OR of the symbolic names for the attribute groups

glXCreateContextback to summary
public static long glXCreateContext(long display, XVisualInfo visual, long share_list, boolean direct)

Creates an OpenGL context.

Parameters
display:long

the connection to the X server

visual:XVisualInfo

a pointer to an XVisualInfo structure

share_list:long

the GLXContext to share objects with

direct:boolean

whether direct rendering is requested

Annotations
@NativeType:GLXContext
glXCreateGLXPixmapback to summary
public static long glXCreateGLXPixmap(long display, XVisualInfo visual, long pixmap)

Creates a GLXPixmap from a Pixmap.

Parameters
display:long

the connection to the X server

visual:XVisualInfo

a pointer to a XVisualInfo structure

pixmap:long

the Pixmap

Annotations
@NativeType:GLXPixmap
glXDestroyContextback to summary
public static void glXDestroyContext(long display, long ctx)

Destroys an OpenGL context.

If ctx is still current to any thread, ctx is not destroyed until it is no longer current. In any event, the associated XID will be destroyed and ctx cannot subsequently be made current to any thread.

Parameters
display:long

the connection to the X server

ctx:long

the GLXContext to destroy

glXDestroyGLXPixmapback to summary
public static void glXDestroyGLXPixmap(long display, long pixmap)

Destroys a GLXPixmap.

Parameters
display:long

the connection to the X server

pixmap:long

the GLXPixmap to destroy.

glXGetConfigback to summary
public static int glXGetConfig(long display, XVisualInfo visual, int attribute, IntBuffer value)

Returns a description of an OpenGL attribute exported by a Visual.

Parameters
display:long

the connection to the X server

visual:XVisualInfo

a pointer to an XVisualInfo structure

attribute:int

the attribute to query

value:IntBuffer

returns the attribute value

glXGetConfigback to summary
public static int glXGetConfig(long display, XVisualInfo visual, int attribute, int[] value)

Array version of: GetConfig

glXGetCurrentContextback to summary
public static long glXGetCurrentContext()

Returns the GLXContext that is current in the current thread.

Annotations
@NativeType:GLXContext
glXGetCurrentDrawableback to summary
public static long glXGetCurrentDrawable()

Returns the XID of the current drawable used for rendering.

Annotations
@NativeType:GLXDrawable
glXIsDirectback to summary
public static boolean glXIsDirect(long display, long ctx)

Determines if an OpenGL rendering context is direct.

Parameters
display:long

the connection to the X server

ctx:long

the GLXContext to query

Annotations
@NativeType:Bool
glXMakeCurrentback to summary
public static boolean glXMakeCurrent(long display, long draw, long ctx)

Makes a context current in the current thread

Parameters
display:long

the connection to the X server

draw:long

the draw GLXdrawable

ctx:long

the GLXContext to make current

Annotations
@NativeType:Bool
glXQueryExtensionback to summary
public static boolean glXQueryExtension(long display, IntBuffer error_base, IntBuffer event_base)

Ascertains if the GLX extension is defined for an X server.

Parameters
display:long

the connection to the X server

error_base:IntBuffer

returns the value of the first error code

event_base:IntBuffer

returns the value of the first event code

Annotations
@NativeType:Bool
glXQueryExtensionback to summary
public static boolean glXQueryExtension(long display, int[] error_base, int[] event_base)

Array version of: QueryExtension

Annotations
@NativeType:Bool
glXQueryVersionback to summary
public static boolean glXQueryVersion(long display, IntBuffer major, IntBuffer minor)

Queries the GLX version supported.

Parameters
display:long

the connection to the X server

major:IntBuffer

returns the major version

minor:IntBuffer

returns the minor version

Annotations
@NativeType:Bool
glXQueryVersionback to summary
public static boolean glXQueryVersion(long display, int[] major, int[] minor)

Array version of: QueryVersion

Annotations
@NativeType:Bool
glXSwapBuffersback to summary
public static void glXSwapBuffers(long display, long draw)

For drawables that are double buffered, makes the contexts of the back buffer potentially visible (i.e., become the contents of the front buffer).

The contents of the back buffer then become undefined. This operation is a no-op if draw was created with a non-double-buffered GLXFBConfig, or if draw is a GLXPixmap.

Parameters
display:long

the connection to the X server

draw:long

a double buffered GLXDrawable

glXUseXFontback to summary
public static void glXUseXFont(long font, int first, int count, int list_base)

Provides a shortcut for using X fonts.

Parameters
font:long

the font to use

first:int

the first glyph in the font to use

count:int

the number of display lists to define

list_base:int

the base list number

glXWaitGLback to summary
public static void glXWaitGL()

Prevents X requests from executing until any outstanding OpenGL rendering is done.

OpenGL calls made prior to glXWaitGL are guaranteed to be executed before X rendering calls made after glXWaitGL. While the same result can be achieved using Finish, glXWaitGL does not require a round trip to the server, and is therefore more efficient in cases where the client and server are on separate machines.

glXWaitXback to summary
public static void glXWaitX()

Prevents the OpenGL command sequence from executing until any outstanding X requests are completed.

X rendering calls made prior to glXWaitX are guaranteed to be executed before OpenGL rendering calls made after glXWaitX. While the same result can be achieved using XSync(), glXWaitX does not require a round trip to the server, and may therefore be more efficient.

nglXChooseVisualback to summary
public static long nglXChooseVisual(long display, int screen, long attrib_list)

Unsafe version of: ChooseVisual

nglXCreateContextback to summary
public static long nglXCreateContext(long display, long visual, long share_list, int direct)

Unsafe version of: CreateContext

nglXCreateGLXPixmapback to summary
public static long nglXCreateGLXPixmap(long display, long visual, long pixmap)

Unsafe version of: CreateGLXPixmap

nglXGetConfigback to summary
public static int nglXGetConfig(long display, long visual, int attribute, long value)

Unsafe version of: GetConfig

nglXQueryExtensionback to summary
public static int nglXQueryExtension(long display, long error_base, long event_base)

Unsafe version of: QueryExtension

nglXQueryVersionback to summary
public static int nglXQueryVersion(long display, long major, long minor)

Unsafe version of: QueryVersion

org.lwjgl.opengl back to summary

public final Class GLX.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from GL.getFunctionProvider().

Field Summary

Modifier and TypeField and Description
public static final long
ChooseVisual

Function address.

public static final long
CopyContext

Function address.

public static final long
CreateContext

Function address.

public static final long
CreateGLXPixmap

Function address.

public static final long
DestroyContext

Function address.

public static final long
DestroyGLXPixmap

Function address.

public static final long
GetConfig

Function address.

public static final long
GetCurrentContext

Function address.

public static final long
GetCurrentDrawable

Function address.

public static final long
IsDirect

Function address.

public static final long
MakeCurrent

Function address.

public static final long
QueryExtension

Function address.

public static final long
QueryVersion

Function address.

public static final long
SwapBuffers

Function address.

public static final long
UseXFont

Function address.

public static final long
WaitGL

Function address.

public static final long
WaitX

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ChooseVisualback to summary
public static final long ChooseVisual

Function address.

CopyContextback to summary
public static final long CopyContext

Function address.

CreateContextback to summary
public static final long CreateContext

Function address.

CreateGLXPixmapback to summary
public static final long CreateGLXPixmap

Function address.

DestroyContextback to summary
public static final long DestroyContext

Function address.

DestroyGLXPixmapback to summary
public static final long DestroyGLXPixmap

Function address.

GetConfigback to summary
public static final long GetConfig

Function address.

GetCurrentContextback to summary
public static final long GetCurrentContext

Function address.

GetCurrentDrawableback to summary
public static final long GetCurrentDrawable

Function address.

IsDirectback to summary
public static final long IsDirect

Function address.

MakeCurrentback to summary
public static final long MakeCurrent

Function address.

QueryExtensionback to summary
public static final long QueryExtension

Function address.

QueryVersionback to summary
public static final long QueryVersion

Function address.

SwapBuffersback to summary
public static final long SwapBuffers

Function address.

UseXFontback to summary
public static final long UseXFont

Function address.

WaitGLback to summary
public static final long WaitGL

Function address.

WaitXback to summary
public static final long WaitX

Function address.

Constructor Detail

Functionsback to summary
private Functions()