Package org.lwjgl.opengl
The OpenGL registry is a useful online resource that contains the OpenGL and OpenGL Shading Language specifications, as well as specifications of OpenGL extensions. The OpenGL Reference Pages is another convenient source of documentation.
The bindings of the core OpenGL functionality are contained in two distinct class hierarchies:
GL11..GL46
: all symbols of the Compatibility Profile are includedGL11C..GL46C
: only symbols of the Core Profile are included
Each of the above classes extends the class of the previous OpenGL version in the corresponding hierarchy.
The recommended way to write OpenGL applications with LWJGL is to statically import the class that corresponds to the minimum required OpenGL version.
This will expose all symbols up to that version. Additional functionality (later core versions or extensions) should be guarded with appropriate checks
using the GLCapabilities
instance of the OpenGL context.
The Compatibility Profile and Core Profile class hierarchies should not be mixed with static imports, as that would result in compilation ambiguities when resolving the symbols. Note that the Compatibility Profile hierarchy can be used with a Core Profile context (as long as no deprecated symbol is used) and the Core Profile hierarchy can be used with a Compatibility Profile context. The recommendation is to use the Compatibility Profile hierarchy only when deprecated functionality is required. In any other case, the Core Profile hierarchy should be preferred.
For example, an OpenGL application that requires OpenGL 3.3, must use modern OpenGL features only and needs the best possible performance:
- Should create a 3.3 Compatibility Profile context. A Core Profile context would have extra validation overhead.
- Should use the Core Profile hierarchy to avoid deprecated symbols. Auto-complete lists in an IDE will also be cleaner.
Resources
-
ClassDescriptionContains the function pointers loaded from
GL.getFunctionProvider()
.This class must be used before any OpenGL function is called.Callback function:GLDEBUGPROCAMD
Callback function:GLDEBUGPROCAMD
Callback function:GLDEBUGPROCARB
Callback function:GLDEBUGPROCARB
Callback function:GLDEBUGPROC
Callback function:GLDEBUGPROC
OpenGL utilities.Contains the function pointers loaded fromGL.getFunctionProvider()
.struct GLXStereoNotifyEventEXT { int type; unsigned long serial; Bool send_event; Display * display; int extension; int evtype; GLXDrawable window; Bool stereo_tree; }
An array ofGLXStereoNotifyEventEXT
structs.struct GPU_DEVICE { DWORD cb; CHAR DeviceName[32]; CHAR DeviceString[128]; DWORD Flags; {@link RECT RECT} rcVirtualScreen; }
An array ofGPU_DEVICE
structs.Contains the function pointers loaded fromGL.getFunctionProvider()
.