Package org.lwjgl.opengl
Class WGL
java.lang.Object
org.lwjgl.opengl.WGL
Native bindings to WGL functionality.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded fromGL.getFunctionProvider(). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUseFontOutlines format.static final intUseFontOutlines format.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags.static final intSwapLayerBuffers flags. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnwglCopyContext(long _GetLastError, long src, long dst, int mask) Unsafe version of:CopyContextstatic intnwglCopyContext(long _GetLastError, long src, long dst, int mask, long __functionAddress) Unsafe version of:CopyContextstatic longnwglCreateContext(long _GetLastError, long hdc) Unsafe version of:CreateContextstatic longnwglCreateContext(long _GetLastError, long hdc, long __functionAddress) Unsafe version of:CreateContextstatic longnwglCreateLayerContext(long _GetLastError, long hdc, int layerPlane) Unsafe version of:CreateLayerContextstatic longnwglCreateLayerContext(long _GetLastError, long hdc, int layerPlane, long __functionAddress) Unsafe version of:CreateLayerContextstatic intnwglDeleteContext(long _GetLastError, long context) Unsafe version of:DeleteContextstatic intnwglDeleteContext(long _GetLastError, long context, long __functionAddress) Unsafe version of:DeleteContextstatic longnwglGetCurrentContext(long _GetLastError) Unsafe version of:GetCurrentContextstatic longnwglGetCurrentContext(long _GetLastError, long __functionAddress) Unsafe version of:GetCurrentContextstatic longnwglGetProcAddress(long _GetLastError, long proc) Unsafe version of:GetProcAddressstatic longnwglGetProcAddress(long _GetLastError, long proc, long __functionAddress) Unsafe version of:GetProcAddressstatic intnwglMakeCurrent(long _GetLastError, long hdc, long hglrc) Unsafe version of:MakeCurrentstatic intnwglMakeCurrent(long _GetLastError, long hdc, long hglrc, long __functionAddress) Unsafe version of:MakeCurrentstatic intnwglShareLists(long _GetLastError, long hglrc1, long hglrc2) Unsafe version of:ShareListsstatic intnwglShareLists(long _GetLastError, long hglrc1, long hglrc2, long __functionAddress) Unsafe version of:ShareListsstatic booleanwglCopyContext(@Nullable IntBuffer _GetLastError, long src, long dst, int mask) Copies selected groups of rendering states from one OpenGL rendering context to another.static longwglCreateContext(@Nullable IntBuffer _GetLastError, long hdc) Creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by device.static longwglCreateLayerContext(@Nullable IntBuffer _GetLastError, long hdc, int layerPlane) Creates a new OpenGL rendering context for drawing to a specified layer plane on a device context.static booleanwglDeleteContext(@Nullable IntBuffer _GetLastError, long context) Deletes a specified OpenGL rendering context.static longwglGetCurrentContext(@Nullable IntBuffer _GetLastError) Obtains a handle to the current OpenGL rendering context of the calling thread.static longObtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread.static longwglGetProcAddress(@Nullable IntBuffer _GetLastError, CharSequence proc) Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.static longwglGetProcAddress(@Nullable IntBuffer _GetLastError, ByteBuffer proc) Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.static booleanwglMakeCurrent(@Nullable IntBuffer _GetLastError, long hdc, long hglrc) Makes a specified OpenGL rendering context the calling thread's current rendering context.static booleanwglShareLists(@Nullable IntBuffer _GetLastError, long hglrc1, long hglrc2) Enables multiple OpenGL rendering contexts to share a single display-list space.
-
Field Details
-
WGL_FONT_LINES
public static final int WGL_FONT_LINESUseFontOutlines format.- See Also:
-
WGL_FONT_POLYGONS
public static final int WGL_FONT_POLYGONSUseFontOutlines format.- See Also:
-
WGL_SWAP_MAIN_PLANE
public static final int WGL_SWAP_MAIN_PLANESwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY1
public static final int WGL_SWAP_OVERLAY1SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY2
public static final int WGL_SWAP_OVERLAY2SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY3
public static final int WGL_SWAP_OVERLAY3SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY4
public static final int WGL_SWAP_OVERLAY4SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY5
public static final int WGL_SWAP_OVERLAY5SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY6
public static final int WGL_SWAP_OVERLAY6SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY7
public static final int WGL_SWAP_OVERLAY7SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY8
public static final int WGL_SWAP_OVERLAY8SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY9
public static final int WGL_SWAP_OVERLAY9SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY10
public static final int WGL_SWAP_OVERLAY10SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY11
public static final int WGL_SWAP_OVERLAY11SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY12
public static final int WGL_SWAP_OVERLAY12SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY13
public static final int WGL_SWAP_OVERLAY13SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY14
public static final int WGL_SWAP_OVERLAY14SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_OVERLAY15
public static final int WGL_SWAP_OVERLAY15SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY1
public static final int WGL_SWAP_UNDERLAY1SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY2
public static final int WGL_SWAP_UNDERLAY2SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY3
public static final int WGL_SWAP_UNDERLAY3SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY4
public static final int WGL_SWAP_UNDERLAY4SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY5
public static final int WGL_SWAP_UNDERLAY5SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY6
public static final int WGL_SWAP_UNDERLAY6SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY7
public static final int WGL_SWAP_UNDERLAY7SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY8
public static final int WGL_SWAP_UNDERLAY8SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY9
public static final int WGL_SWAP_UNDERLAY9SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY10
public static final int WGL_SWAP_UNDERLAY10SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY11
public static final int WGL_SWAP_UNDERLAY11SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY12
public static final int WGL_SWAP_UNDERLAY12SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY13
public static final int WGL_SWAP_UNDERLAY13SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY14
public static final int WGL_SWAP_UNDERLAY14SwapLayerBuffers flags.- See Also:
-
WGL_SWAP_UNDERLAY15
public static final int WGL_SWAP_UNDERLAY15SwapLayerBuffers flags.- See Also:
-
-
Method Details
-
nwglCreateContext
public static long nwglCreateContext(long _GetLastError, long hdc, long __functionAddress) Unsafe version of:CreateContext -
nwglCreateContext
public static long nwglCreateContext(long _GetLastError, long hdc) Unsafe version of:CreateContext -
wglCreateContext
Creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by device. The rendering context has the same pixel format as the device context.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledhdc- handle to a device context for which the function creates a suitable OpenGL rendering context
-
nwglCreateLayerContext
public static long nwglCreateLayerContext(long _GetLastError, long hdc, int layerPlane, long __functionAddress) Unsafe version of:CreateLayerContext -
nwglCreateLayerContext
public static long nwglCreateLayerContext(long _GetLastError, long hdc, int layerPlane) Unsafe version of:CreateLayerContext -
wglCreateLayerContext
public static long wglCreateLayerContext(@Nullable IntBuffer _GetLastError, long hdc, int layerPlane) Creates a new OpenGL rendering context for drawing to a specified layer plane on a device context.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledhdc- the device context for a new rendering contextlayerPlane- the layer plane to which you want to bind a rendering context. The value 0 identifies the main plane. Positive values oflayerPlaceidentify overlay planes, where 1 is the first overlay plane over the main plane, 2 is the second overlay plane over the first overlay plane, and so on. Negative values identify underlay planes, where 1 is the first underlay plane under the main plane, 2 is the second underlay plane under the first underlay plane, and so on. The number of overlay and underlay planes is given in thereservedmember of thePIXELFORMATDESCRIPTORstructure.
-
nwglCopyContext
public static int nwglCopyContext(long _GetLastError, long src, long dst, int mask, long __functionAddress) Unsafe version of:CopyContext -
nwglCopyContext
public static int nwglCopyContext(long _GetLastError, long src, long dst, int mask) Unsafe version of:CopyContext -
wglCopyContext
public static boolean wglCopyContext(@Nullable IntBuffer _GetLastError, long src, long dst, int mask) Copies selected groups of rendering states from one OpenGL rendering context to another.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledsrc- the source OpenGL rendering context whose state information is to be copieddst- the destination OpenGL rendering context to which state information is to be copiedmask- which groups of thesrcrendering state are to be copied todst. It contains the bitwise-OR of the same symbolic names that are passed to thePushAttribfunction. You can useALL_ATTRIB_BITSto copy all the rendering state information.
-
nwglDeleteContext
public static int nwglDeleteContext(long _GetLastError, long context, long __functionAddress) Unsafe version of:DeleteContext -
nwglDeleteContext
public static int nwglDeleteContext(long _GetLastError, long context) Unsafe version of:DeleteContext -
wglDeleteContext
Deletes a specified OpenGL rendering context.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledcontext- handle to an OpenGL rendering context that the function will delete
-
nwglGetCurrentContext
public static long nwglGetCurrentContext(long _GetLastError, long __functionAddress) Unsafe version of:GetCurrentContext -
nwglGetCurrentContext
public static long nwglGetCurrentContext(long _GetLastError) Unsafe version of:GetCurrentContext -
wglGetCurrentContext
Obtains a handle to the current OpenGL rendering context of the calling thread.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is called
-
wglGetCurrentDC
public static long wglGetCurrentDC()Obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread. -
nwglGetProcAddress
public static long nwglGetProcAddress(long _GetLastError, long proc, long __functionAddress) Unsafe version of:GetProcAddress -
nwglGetProcAddress
public static long nwglGetProcAddress(long _GetLastError, long proc) Unsafe version of:GetProcAddress -
wglGetProcAddress
Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledproc- points to a null-terminated string that is the name of the extension function. The name of the extension function must be identical to a corresponding function implemented by OpenGL.
-
wglGetProcAddress
Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledproc- points to a null-terminated string that is the name of the extension function. The name of the extension function must be identical to a corresponding function implemented by OpenGL.
-
nwglMakeCurrent
public static int nwglMakeCurrent(long _GetLastError, long hdc, long hglrc, long __functionAddress) Unsafe version of:MakeCurrent -
nwglMakeCurrent
public static int nwglMakeCurrent(long _GetLastError, long hdc, long hglrc) Unsafe version of:MakeCurrent -
wglMakeCurrent
Makes a specified OpenGL rendering context the calling thread's current rendering context. All subsequent OpenGL calls made by the thread are drawn on the device identified by device. You can also use MakeCurrent to change the calling thread's current rendering context so it's no longer current.- Parameters:
_GetLastError- optionally returns the result ofGetLastError()after this function is calledhdc- handle to a device context. Subsequent OpenGL calls made by the calling thread are drawn on the device identified bydc.hglrc- handle to an OpenGL rendering context that the function sets as the calling thread's rendering context. IfcontextisNULL, the function makes the calling thread's current rendering context no longer current, and releases the device context that is used by the rendering context. In this case,hdcis ignored.
-