The basic interface to OpenGL, providing access to core functionality up through the OpenGL 2.0 specification as well as all vendor extensions.
While the APIs for vendor extensions are unconditionally exposed, the underlying functions may not be present. The method {@link #isFunctionAvailable} should be used to query theavailability of any non-core function before it is used for the first time; for example, gl.isFunctionAvailable("glProgramStringARB")
. On certain platforms (Windows in particular), the most "core" functionality is only OpenGL 1.1, so in theory any routines first exposed in OpenGL 1.2, 1.3, and 1.4, 1.5, or 2.0 as well as vendor extensions should all be queried. Calling an unavailable function will cause a {@link GLException} to be raised.
gl.isExtensionAvailable("GL_ARB_vertex_program");
. However, in this case it is up to the end user to know which routines or functionality are associated with which OpenGL extensions. It may also be used to test for the availability of a particular version of OpenGL: for example, gl.isExtensionAvailable("GL_VERSION_1_5");
. Exceptions to the window system extension naming rules:
wglAllocateMemoryNV
/ glXAllocateMemoryNV
and associated routines. {@link #glAllocateMemoryNV} has been provided for window system-independentaccess to VAR. {@link #isFunctionAvailable} will translate an argumentof "glAllocateMemoryNV" or "glFreeMemoryNV" into the appropriate window system-specific name.
|
|
|
|