Top Description Inners Fields Constructors Methods
org.lwjgl.opengl

public Class WGL

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*, org.lwjgl.system.windows.*

Native bindings to WGL functionality.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
WGL.Functions

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

Field Summary

Modifier and TypeField and Description
public static final int
WGL_FONT_LINES

UseFontOutlines format.

public static final int
WGL_FONT_POLYGONS

UseFontOutlines format.

public static final int
WGL_SWAP_MAIN_PLANE

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY1

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY10

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY11

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY12

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY13

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY14

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY15

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY2

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY3

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY4

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY5

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY6

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY7

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY8

SwapLayerBuffers flags.

public static final int
WGL_SWAP_OVERLAY9

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY1

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY10

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY11

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY12

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY13

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY14

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY15

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY2

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY3

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY4

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY5

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY6

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY7

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY8

SwapLayerBuffers flags.

public static final int
WGL_SWAP_UNDERLAY9

SwapLayerBuffers flags.

Constructor Summary

AccessConstructor and Description
protected
WGL()

Method Summary

Modifier and TypeMethod and Description
public static native int
nwglCopyContext(long src, long dst, int mask, long __functionAddress)

Unsafe version of: CopyContext

public static native long
nwglCreateContext(long hdc, long __functionAddress)

Unsafe version of: CreateContext

public static native long
nwglCreateLayerContext(long hdc, int layerPlane, long __functionAddress)

Unsafe version of: CreateLayerContext

public static native int
nwglDeleteContext(long context, long __functionAddress)

Unsafe version of: DeleteContext

public static native long
nwglGetCurrentContext(long __functionAddress)

Unsafe version of: GetCurrentContext

public static native long
nwglGetCurrentDC(long __functionAddress)

Unsafe version of: GetCurrentDC

public static native long
nwglGetProcAddress(long proc, long __functionAddress)

Unsafe version of: GetProcAddress

public static long
nwglGetProcAddress(long proc)

Unsafe version of: GetProcAddress

public static native int
nwglMakeCurrent(long hdc, long hglrc, long __functionAddress)

Unsafe version of: MakeCurrent

public static native int
nwglShareLists(long hglrc1, long hglrc2, long __functionAddress)

Unsafe version of: ShareLists

public static boolean
wglCopyContext(long
the source OpenGL rendering context whose state information is to be copied
src
,
long
the destination OpenGL rendering context to which state information is to be copied
dst
,
int
which groups of the src rendering state are to be copied to dst. It contains the bitwise-OR of the same symbolic names that are passed to the PushAttrib function. You can use ALL_ATTRIB_BITS to copy all the rendering state information.
mask
)

Copies selected groups of rendering states from one OpenGL rendering context to another.

public static long
wglCreateContext(long
handle to a device context for which the function creates a suitable OpenGL rendering context
hdc
)

Creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by device.

public static long
wglCreateLayerContext(long
the device context for a new rendering context
hdc
,
int
the layer plane to which you want to bind a rendering context. The value 0 identifies the main plane. Positive values of layerPlace identify 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 the reserved member of the PIXELFORMATDESCRIPTOR structure.
layerPlane
)

Creates a new OpenGL rendering context for drawing to a specified layer plane on a device context.

public static boolean
wglDeleteContext(long
handle to an OpenGL rendering context that the function will delete
context
)

Deletes a specified OpenGL rendering context.

public static long
wglGetCurrentContext()

Obtains a handle to the current OpenGL rendering context of the calling thread.

public static long
wglGetCurrentDC()

Obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread.

public static long
wglGetProcAddress(ByteBuffer
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.
proc
)

Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

public static long
wglGetProcAddress(CharSequence
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.
proc
)

Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

public static boolean
wglMakeCurrent(long
handle to a device context. Subsequent OpenGL calls made by the calling thread are drawn on the device identified by dc.
hdc
,
long
handle to an OpenGL rendering context that the function sets as the calling thread's rendering context. If context is NULL, 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, hdc is ignored.
hglrc
)

Makes a specified OpenGL rendering context the calling thread's current rendering context.

public static boolean
wglShareLists(long
the OpenGL rendering context with which to share display lists.
hglrc1
,
long
the OpenGL rendering context to share display lists with hglrc1. The hglrc2 parameter should not contain any existing display lists when wglShareLists is called.
hglrc2
)

Enables multiple OpenGL rendering contexts to share a single display-list space.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

WGL_FONT_LINESback to summary
public static final int WGL_FONT_LINES

UseFontOutlines format.

WGL_FONT_POLYGONSback to summary
public static final int WGL_FONT_POLYGONS

UseFontOutlines format.

WGL_SWAP_MAIN_PLANEback to summary
public static final int WGL_SWAP_MAIN_PLANE

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY1back to summary
public static final int WGL_SWAP_OVERLAY1

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY10back to summary
public static final int WGL_SWAP_OVERLAY10

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY11back to summary
public static final int WGL_SWAP_OVERLAY11

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY12back to summary
public static final int WGL_SWAP_OVERLAY12

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY13back to summary
public static final int WGL_SWAP_OVERLAY13

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY14back to summary
public static final int WGL_SWAP_OVERLAY14

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY15back to summary
public static final int WGL_SWAP_OVERLAY15

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY2back to summary
public static final int WGL_SWAP_OVERLAY2

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY3back to summary
public static final int WGL_SWAP_OVERLAY3

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY4back to summary
public static final int WGL_SWAP_OVERLAY4

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY5back to summary
public static final int WGL_SWAP_OVERLAY5

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY6back to summary
public static final int WGL_SWAP_OVERLAY6

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY7back to summary
public static final int WGL_SWAP_OVERLAY7

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY8back to summary
public static final int WGL_SWAP_OVERLAY8

SwapLayerBuffers flags.

WGL_SWAP_OVERLAY9back to summary
public static final int WGL_SWAP_OVERLAY9

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY1back to summary
public static final int WGL_SWAP_UNDERLAY1

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY10back to summary
public static final int WGL_SWAP_UNDERLAY10

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY11back to summary
public static final int WGL_SWAP_UNDERLAY11

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY12back to summary
public static final int WGL_SWAP_UNDERLAY12

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY13back to summary
public static final int WGL_SWAP_UNDERLAY13

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY14back to summary
public static final int WGL_SWAP_UNDERLAY14

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY15back to summary
public static final int WGL_SWAP_UNDERLAY15

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY2back to summary
public static final int WGL_SWAP_UNDERLAY2

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY3back to summary
public static final int WGL_SWAP_UNDERLAY3

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY4back to summary
public static final int WGL_SWAP_UNDERLAY4

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY5back to summary
public static final int WGL_SWAP_UNDERLAY5

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY6back to summary
public static final int WGL_SWAP_UNDERLAY6

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY7back to summary
public static final int WGL_SWAP_UNDERLAY7

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY8back to summary
public static final int WGL_SWAP_UNDERLAY8

SwapLayerBuffers flags.

WGL_SWAP_UNDERLAY9back to summary
public static final int WGL_SWAP_UNDERLAY9

SwapLayerBuffers flags.

Constructor Detail

WGLback to summary
protected WGL()

Method Detail

nwglCopyContextback to summary
public static native int nwglCopyContext(long src, long dst, int mask, long __functionAddress)

Unsafe version of: CopyContext

nwglCreateContextback to summary
public static native long nwglCreateContext(long hdc, long __functionAddress)

Unsafe version of: CreateContext

nwglCreateLayerContextback to summary
public static native long nwglCreateLayerContext(long hdc, int layerPlane, long __functionAddress)

Unsafe version of: CreateLayerContext

nwglDeleteContextback to summary
public static native int nwglDeleteContext(long context, long __functionAddress)

Unsafe version of: DeleteContext

nwglGetCurrentContextback to summary
public static native long nwglGetCurrentContext(long __functionAddress)

Unsafe version of: GetCurrentContext

nwglGetCurrentDCback to summary
public static native long nwglGetCurrentDC(long __functionAddress)

Unsafe version of: GetCurrentDC

nwglGetProcAddressback to summary
public static native long nwglGetProcAddress(long proc, long __functionAddress)

Unsafe version of: GetProcAddress

nwglGetProcAddressback to summary
public static long nwglGetProcAddress(long proc)

Unsafe version of: GetProcAddress

nwglMakeCurrentback to summary
public static native int nwglMakeCurrent(long hdc, long hglrc, long __functionAddress)

Unsafe version of: MakeCurrent

nwglShareListsback to summary
public static native int nwglShareLists(long hglrc1, long hglrc2, long __functionAddress)

Unsafe version of: ShareLists

wglCopyContextback to summary
public static boolean wglCopyContext(long src, long dst, int mask)

Copies selected groups of rendering states from one OpenGL rendering context to another.

Parameters
src:long

the source OpenGL rendering context whose state information is to be copied

dst:long

the destination OpenGL rendering context to which state information is to be copied

mask:int

which groups of the src rendering state are to be copied to dst. It contains the bitwise-OR of the same symbolic names that are passed to the PushAttrib function. You can use ALL_ATTRIB_BITS to copy all the rendering state information.

Annotations
@NativeType:BOOL
wglCreateContextback to summary
public static long wglCreateContext(long hdc)

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
hdc:long

handle to a device context for which the function creates a suitable OpenGL rendering context

Annotations
@NativeType:HGLRC
wglCreateLayerContextback to summary
public static long wglCreateLayerContext(long hdc, int layerPlane)

Creates a new OpenGL rendering context for drawing to a specified layer plane on a device context.

Parameters
hdc:long

the device context for a new rendering context

layerPlane:int

the layer plane to which you want to bind a rendering context. The value 0 identifies the main plane. Positive values of layerPlace identify 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 the reserved member of the PIXELFORMATDESCRIPTOR structure.

Annotations
@NativeType:HGLRC
wglDeleteContextback to summary
public static boolean wglDeleteContext(long context)

Deletes a specified OpenGL rendering context.

Parameters
context:long

handle to an OpenGL rendering context that the function will delete

Annotations
@NativeType:BOOL
wglGetCurrentContextback to summary
public static long wglGetCurrentContext()

Obtains a handle to the current OpenGL rendering context of the calling thread.

Annotations
@NativeType:HGLRC
wglGetCurrentDCback to summary
public static long wglGetCurrentDC()

Obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread.

Annotations
@NativeType:HDC
wglGetProcAddressback to summary
public static long wglGetProcAddress(ByteBuffer proc)

Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

Parameters
proc:ByteBuffer

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.

Annotations
@NativeType:PROC
wglGetProcAddressback to summary
public static long wglGetProcAddress(CharSequence proc)

Returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

Parameters
proc:CharSequence

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.

Annotations
@NativeType:PROC
wglMakeCurrentback to summary
public static boolean wglMakeCurrent(long hdc, long hglrc)

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
hdc:long

handle to a device context. Subsequent OpenGL calls made by the calling thread are drawn on the device identified by dc.

hglrc:long

handle to an OpenGL rendering context that the function sets as the calling thread's rendering context. If context is NULL, 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, hdc is ignored.

Annotations
@NativeType:BOOL
wglShareListsback to summary
public static boolean wglShareLists(long hglrc1, long hglrc2)

Enables multiple OpenGL rendering contexts to share a single display-list space.

Parameters
hglrc1:long

the OpenGL rendering context with which to share display lists.

hglrc2:long

the OpenGL rendering context to share display lists with hglrc1. The hglrc2 parameter should not contain any existing display lists when wglShareLists is called.

Annotations
@NativeType:BOOL
org.lwjgl.opengl back to summary

public final Class WGL.Functions

extends Object
Class Inheritance

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

Field Summary

Modifier and TypeField and Description
public static final long
CopyContext

Function address.

public static final long
CreateContext

Function address.

public static final long
CreateLayerContext

Function address.

public static final long
DeleteContext

Function address.

public static final long
GetCurrentContext

Function address.

public static final long
GetCurrentDC

Function address.

public static final long
GetProcAddress

Function address.

public static final long
MakeCurrent

Function address.

public static final long
ShareLists

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CopyContextback to summary
public static final long CopyContext

Function address.

CreateContextback to summary
public static final long CreateContext

Function address.

CreateLayerContextback to summary
public static final long CreateLayerContext

Function address.

DeleteContextback to summary
public static final long DeleteContext

Function address.

GetCurrentContextback to summary
public static final long GetCurrentContext

Function address.

GetCurrentDCback to summary
public static final long GetCurrentDC

Function address.

GetProcAddressback to summary
public static final long GetProcAddress

Function address.

MakeCurrentback to summary
public static final long MakeCurrent

Function address.

ShareListsback to summary
public static final long ShareLists

Function address.

Constructor Detail

Functionsback to summary
private Functions()