Top Description Fields Methods
com.sun.jna.platform.win32

public Interface OpenGL32

extends StdCallLibrary
Imports
com.sun.jna.Native, .Pointer, com.sun.jna.platform.win32.WinDef.HDC, com.sun.jna.win32.StdCallLibrary

opengl32.dll Interface.

Field Summary

Modifier and TypeField and Description
public static final OpenGL32
Inherited from com.sun.jna.win32.StdCallLibrary:
FUNCTION_MAPPERSTDCALL_CONVENTION

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The glGetString function returns a pointer to a static string describing some aspect of the current OpenGL connection.
glGetString
(int
One of the following symbolic constants.
name
)

The glGetString function returns a string describing the current OpenGL connection.

public WinDef.HGLRC

Returns:

handle to an OpenGL rendering context
wglCreateContext
(WinDef.HDC
Handle to a device context for which the function creates a suitable OpenGL rendering context.
windowDC
)

The wglCreateContext function creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by hdc.

public boolean

Returns:

true if successful
wglDeleteContext
(WinDef.HGLRC
Handle to an OpenGL rendering context that the function will delete.
hglrc
)

The wglDeleteContext function deletes a specified OpenGL rendering context.

public WinDef.HGLRC

Returns:

If the calling thread has a current OpenGL rendering context, wglGetCurrentContext returns a handle to that rendering context. Otherwise, the return value is NULL.
wglGetCurrentContext
()

The wglGetCurrentContext function obtains a handle to the current OpenGL rendering context of the calling thread.

public Pointer

Returns:

When the function succeeds, the return value is the address of the extension function.
wglGetProcAddress
(String
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.
lpszProc
)

The wglGetProcAddress function returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

public boolean

Returns:

true if successful
wglMakeCurrent
(WinDef.HDC
Handle to a device context. Subsequent OpenGL calls made by the calling thread are drawn on the device identified by hdc.
windowDC
,
WinDef.HGLRC
Handle to an OpenGL rendering context that the function sets as the calling thread's rendering context.
hglrc
)

The wglMakeCurrent function makes a specified OpenGL rendering context the calling thread's current rendering context.

Field Detail

INSTANCEback to summary
public static final OpenGL32 INSTANCE

Method Detail

glGetStringback to summary
public String glGetString(int name)

The glGetString function returns a string describing the current OpenGL connection.

Parameters
name:int

One of the following symbolic constants.

Returns:String

The glGetString function returns a pointer to a static string describing some aspect of the current OpenGL connection.

wglCreateContextback to summary
public WinDef.HGLRC wglCreateContext(WinDef.HDC windowDC)

The wglCreateContext function creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by hdc. The rendering context has the same pixel format as the device context.

Parameters
windowDC:WinDef.HDC

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

Returns:WinDef.HGLRC

handle to an OpenGL rendering context

wglDeleteContextback to summary
public boolean wglDeleteContext(WinDef.HGLRC hglrc)

The wglDeleteContext function deletes a specified OpenGL rendering context.

Parameters
hglrc:WinDef.HGLRC

Handle to an OpenGL rendering context that the function will delete.

Returns:boolean

true if successful

wglGetCurrentContextback to summary
public WinDef.HGLRC wglGetCurrentContext()

The wglGetCurrentContext function obtains a handle to the current OpenGL rendering context of the calling thread.

Returns:WinDef.HGLRC

If the calling thread has a current OpenGL rendering context, wglGetCurrentContext returns a handle to that rendering context. Otherwise, the return value is NULL.

wglGetProcAddressback to summary
public Pointer wglGetProcAddress(String lpszProc)

The wglGetProcAddress function returns the address of an OpenGL extension function for use with the current OpenGL rendering context.

Parameters
lpszProc:String

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.

Returns:Pointer

When the function succeeds, the return value is the address of the extension function.

wglMakeCurrentback to summary
public boolean wglMakeCurrent(WinDef.HDC windowDC, WinDef.HGLRC hglrc)

The wglMakeCurrent function 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 hdc.

Parameters
windowDC:WinDef.HDC

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

hglrc:WinDef.HGLRC

Handle to an OpenGL rendering context that the function sets as the calling thread's rendering context.

Returns:boolean

true if successful