Class GLX
- Direct Known Subclasses:
GLX11
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Contains the function pointers loaded fromGL.getFunctionProvider()
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Error return values fromGetConfig
.static final int
Error return values fromGetConfig
.static final int
Error return values fromGetConfig
.static final int
Error return values fromGetConfig
.static final int
Error return values fromGetConfig
.static final int
Error return values fromGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Error return values fromGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Names for attributes toGetConfig
.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors.static final int
Errors. -
Method Summary
Modifier and TypeMethodDescriptionstatic XVisualInfo
glXChooseVisual
(long display, int screen, int[] attrib_list) Array version of:ChooseVisual
static XVisualInfo
glXChooseVisual
(long display, int screen, IntBuffer attrib_list) Finds a visual that matches the client’s specified attributes.static void
glXCopyContext
(long display, long source, long dest, long mask) Copies OpenGL rendering state from one context to another.static long
glXCreateContext
(long display, XVisualInfo visual, long share_list, boolean direct) Creates an OpenGL context.static long
glXCreateGLXPixmap
(long display, XVisualInfo visual, long pixmap) Creates a GLXPixmap from a Pixmap.static void
glXDestroyContext
(long display, long ctx) Destroys an OpenGL context.static void
glXDestroyGLXPixmap
(long display, long pixmap) Destroys a GLXPixmap.static int
glXGetConfig
(long display, XVisualInfo visual, int attribute, int[] value) Array version of:GetConfig
static int
glXGetConfig
(long display, XVisualInfo visual, int attribute, IntBuffer value) Returns a description of an OpenGL attribute exported by a Visual.static long
Returns the GLXContext that is current in the current thread.static long
Returns the XID of the current drawable used for rendering.static boolean
glXIsDirect
(long display, long ctx) Determines if an OpenGL rendering context is direct.static boolean
glXMakeCurrent
(long display, long draw, long ctx) Makes a context current in the current threadstatic boolean
glXQueryExtension
(long display, int[] error_base, int[] event_base) Array version of:QueryExtension
static boolean
glXQueryExtension
(long display, IntBuffer error_base, IntBuffer event_base) Ascertains if the GLX extension is defined for an X server.static boolean
glXQueryVersion
(long display, int[] major, int[] minor) Array version of:QueryVersion
static boolean
glXQueryVersion
(long display, IntBuffer major, IntBuffer minor) Queries the GLX version supported.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).static void
glXUseXFont
(long font, int first, int count, int list_base) Provides a shortcut for using X fonts.static void
Prevents X requests from executing until any outstanding OpenGL rendering is done.static void
glXWaitX()
Prevents the OpenGL command sequence from executing until any outstanding X requests are completed.static long
nglXChooseVisual
(long display, int screen, long attrib_list) Unsafe version of:ChooseVisual
static long
nglXCreateContext
(long display, long visual, long share_list, int direct) Unsafe version of:CreateContext
static long
nglXCreateGLXPixmap
(long display, long visual, long pixmap) Unsafe version of:CreateGLXPixmap
static int
nglXGetConfig
(long display, long visual, int attribute, long value) Unsafe version of:GetConfig
static int
nglXQueryExtension
(long display, long error_base, long event_base) Unsafe version of:QueryExtension
static int
nglXQueryVersion
(long display, long major, long minor) Unsafe version of:QueryVersion
-
Field Details
-
GLXBadContext
public static final int GLXBadContextErrors.- See Also:
-
GLXBadContextState
public static final int GLXBadContextStateErrors.- See Also:
-
GLXBadDrawable
public static final int GLXBadDrawableErrors.- See Also:
-
GLXBadPixmap
public static final int GLXBadPixmapErrors.- See Also:
-
GLXBadContextTag
public static final int GLXBadContextTagErrors.- See Also:
-
GLXBadCurrentWindow
public static final int GLXBadCurrentWindowErrors.- See Also:
-
GLXBadRenderRequest
public static final int GLXBadRenderRequestErrors.- See Also:
-
GLXBadLargeRequest
public static final int GLXBadLargeRequestErrors.- See Also:
-
GLXUnsupportedPrivateRequest
public static final int GLXUnsupportedPrivateRequestErrors.- See Also:
-
GLXBadFBConfig
public static final int GLXBadFBConfigErrors.- See Also:
-
GLXBadPbuffer
public static final int GLXBadPbufferErrors.- See Also:
-
GLXBadCurrentDrawable
public static final int GLXBadCurrentDrawableErrors.- See Also:
-
GLXBadWindow
public static final int GLXBadWindowErrors.- See Also:
-
GLX_USE_GL
public static final int GLX_USE_GLNames for attributes toGetConfig
.- See Also:
-
GLX_BUFFER_SIZE
public static final int GLX_BUFFER_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_LEVEL
public static final int GLX_LEVELNames for attributes toGetConfig
.- See Also:
-
GLX_RGBA
public static final int GLX_RGBANames for attributes toGetConfig
.- See Also:
-
GLX_DOUBLEBUFFER
public static final int GLX_DOUBLEBUFFERNames for attributes toGetConfig
.- See Also:
-
GLX_STEREO
public static final int GLX_STEREONames for attributes toGetConfig
.- See Also:
-
GLX_AUX_BUFFERS
public static final int GLX_AUX_BUFFERSNames for attributes toGetConfig
.- See Also:
-
GLX_RED_SIZE
public static final int GLX_RED_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_GREEN_SIZE
public static final int GLX_GREEN_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_BLUE_SIZE
public static final int GLX_BLUE_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_ALPHA_SIZE
public static final int GLX_ALPHA_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_DEPTH_SIZE
public static final int GLX_DEPTH_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_STENCIL_SIZE
public static final int GLX_STENCIL_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_ACCUM_RED_SIZE
public static final int GLX_ACCUM_RED_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_ACCUM_GREEN_SIZE
public static final int GLX_ACCUM_GREEN_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_ACCUM_BLUE_SIZE
public static final int GLX_ACCUM_BLUE_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_ACCUM_ALPHA_SIZE
public static final int GLX_ACCUM_ALPHA_SIZENames for attributes toGetConfig
.- See Also:
-
GLX_BAD_SCREEN
public static final int GLX_BAD_SCREENError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_BAD_ATTRIBUTE
public static final int GLX_BAD_ATTRIBUTEError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_NO_EXTENSION
public static final int GLX_NO_EXTENSIONError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_BAD_VISUAL
public static final int GLX_BAD_VISUALError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_BAD_CONTEXT
public static final int GLX_BAD_CONTEXTError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_BAD_VALUE
public static final int GLX_BAD_VALUEError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
GLX_BAD_ENUM
public static final int GLX_BAD_ENUMError return values fromGetConfig
. Success is indicated by a value of 0.- See Also:
-
-
Method Details
-
nglXQueryExtension
public static int nglXQueryExtension(long display, long error_base, long event_base) Unsafe version of:QueryExtension
-
glXQueryExtension
Ascertains if the GLX extension is defined for an X server.- Parameters:
display
- the connection to the X servererror_base
- returns the value of the first error codeevent_base
- returns the value of the first event code
-
nglXQueryVersion
public static int nglXQueryVersion(long display, long major, long minor) Unsafe version of:QueryVersion
-
glXQueryVersion
Queries the GLX version supported.- Parameters:
display
- the connection to the X servermajor
- returns the major versionminor
- returns the minor version
-
nglXGetConfig
public static int nglXGetConfig(long display, long visual, int attribute, long value) Unsafe version of:GetConfig
-
glXGetConfig
Returns a description of an OpenGL attribute exported by a Visual.- Parameters:
display
- the connection to the X servervisual
- a pointer to anXVisualInfo
structureattribute
- the attribute to queryvalue
- returns the attribute value
-
nglXChooseVisual
public static long nglXChooseVisual(long display, int screen, long attrib_list) Unsafe version of:ChooseVisual
-
glXChooseVisual
@Nullable public static XVisualInfo glXChooseVisual(long display, int screen, @Nullable IntBuffer attrib_list) Finds a visual that matches the client’s specified attributes.- Parameters:
display
- the connection to the X serverscreen
- the screen numberattrib_list
- a list of attributes terminated withNone
- Returns:
- a pointer to an
XVisualInfo
structure describing the visual that best matches the specified attributes. If no matching visual exists,NULL
is returned.
-
nglXCreateContext
public static long nglXCreateContext(long display, long visual, long share_list, int direct) Unsafe version of:CreateContext
-
glXCreateContext
public static long glXCreateContext(long display, XVisualInfo visual, long share_list, boolean direct) Creates an OpenGL context.- Parameters:
display
- the connection to the X servervisual
- a pointer to anXVisualInfo
structureshare_list
- the GLXContext to share objects withdirect
- whether direct rendering is requested
-
glXMakeCurrent
public static boolean glXMakeCurrent(long display, long draw, long ctx) Makes a context current in the current thread- Parameters:
display
- the connection to the X serverdraw
- the draw GLXdrawablectx
- the GLXContext to make current
-
glXCopyContext
public static void glXCopyContext(long display, long source, long dest, long mask) Copies OpenGL rendering state from one context to another.- Parameters:
display
- the connection to the X serversource
- the source GLXContextdest
- the destination GLXContextmask
- indicates which groups of state variables are to be copied; it contains the bitwise OR of the symbolic names for the attribute groups
-
glXIsDirect
public static boolean glXIsDirect(long display, long ctx) Determines if an OpenGL rendering context is direct.- Parameters:
display
- the connection to the X serverctx
- the GLXContext to query
-
glXDestroyContext
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 andctx
cannot subsequently be made current to any thread.- Parameters:
display
- the connection to the X serverctx
- the GLXContext to destroy
-
glXGetCurrentContext
public static long glXGetCurrentContext()Returns the GLXContext that is current in the current thread. -
glXGetCurrentDrawable
public static long glXGetCurrentDrawable()Returns the XID of the current drawable used for rendering. -
glXWaitGL
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 afterglXWaitGL
. While the same result can be achieved usingFinish
,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. -
glXWaitX
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 afterglXWaitX
. While the same result can be achieved usingXSync()
,glXWaitX
does not require a round trip to the server, and may therefore be more efficient. -
glXSwapBuffers
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
- the connection to the X serverdraw
- a double buffered GLXDrawable
-
glXUseXFont
public static void glXUseXFont(long font, int first, int count, int list_base) Provides a shortcut for using X fonts.- Parameters:
font
- the font to usefirst
- the first glyph in the font to usecount
- the number of display lists to definelist_base
- the base list number
-
nglXCreateGLXPixmap
public static long nglXCreateGLXPixmap(long display, long visual, long pixmap) Unsafe version of:CreateGLXPixmap
-
glXCreateGLXPixmap
Creates a GLXPixmap from a Pixmap.- Parameters:
display
- the connection to the X servervisual
- a pointer to aXVisualInfo
structurepixmap
- the Pixmap
-
glXDestroyGLXPixmap
public static void glXDestroyGLXPixmap(long display, long pixmap) Destroys a GLXPixmap.- Parameters:
display
- the connection to the X serverpixmap
- the GLXPixmap to destroy.
-
glXQueryExtension
public static boolean glXQueryExtension(long display, int[] error_base, int[] event_base) Array version of:QueryExtension
-
glXQueryVersion
public static boolean glXQueryVersion(long display, int[] major, int[] minor) Array version of:QueryVersion
-
glXGetConfig
Array version of:GetConfig
-
glXChooseVisual
@Nullable public static XVisualInfo glXChooseVisual(long display, int screen, @Nullable int[] attrib_list) Array version of:ChooseVisual
-