Package org.lwjgl.opengl
Class WGLARBCreateContext
java.lang.Object
org.lwjgl.opengl.WGLARBCreateContext
Native bindings to the WGL_ARB_create_context extension.
With the advent of new versions of OpenGL which deprecate features and/or break backward compatibility with older versions, there is a need and desire to indicate at context creation which interface will be used. This extension add a new context creation routine with attributes specifying the GL version and context properties requested for the context.
Requires WGL_ARB_extensions_string
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
New errors returned byWinBase.GetLastError()
.static final int
Accepted as bits in the attribute value forCONTEXT_FLAGS_ARB
inattribList
.static final int
Accepted as an attribute name inattribList
.static final int
Accepted as bits in the attribute value forCONTEXT_FLAGS_ARB
inattribList
.static final int
Accepted as an attribute name inattribList
.static final int
Accepted as an attribute name inattribList
.static final int
Accepted as an attribute name inattribList
. -
Method Summary
Modifier and TypeMethodDescriptionstatic long
nwglCreateContextAttribsARB
(long hdc, long shareContext, long attribList) Unsafe version of:CreateContextAttribsARB
static long
wglCreateContextAttribsARB
(long hdc, long shareContext, int[] attribList) Array version of:CreateContextAttribsARB
static long
wglCreateContextAttribsARB
(long hdc, long shareContext, IntBuffer attribList) Creates an OpenGL context.
-
Field Details
-
WGL_CONTEXT_MAJOR_VERSION_ARB
public static final int WGL_CONTEXT_MAJOR_VERSION_ARBAccepted as an attribute name inattribList
.- See Also:
-
WGL_CONTEXT_MINOR_VERSION_ARB
public static final int WGL_CONTEXT_MINOR_VERSION_ARBAccepted as an attribute name inattribList
.- See Also:
-
WGL_CONTEXT_LAYER_PLANE_ARB
public static final int WGL_CONTEXT_LAYER_PLANE_ARBAccepted as an attribute name inattribList
.- See Also:
-
WGL_CONTEXT_FLAGS_ARB
public static final int WGL_CONTEXT_FLAGS_ARBAccepted as an attribute name inattribList
.- See Also:
-
WGL_CONTEXT_DEBUG_BIT_ARB
public static final int WGL_CONTEXT_DEBUG_BIT_ARBAccepted as bits in the attribute value forCONTEXT_FLAGS_ARB
inattribList
.- See Also:
-
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
public static final int WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARBAccepted as bits in the attribute value forCONTEXT_FLAGS_ARB
inattribList
.- See Also:
-
ERROR_INVALID_VERSION_ARB
public static final int ERROR_INVALID_VERSION_ARBNew errors returned byWinBase.GetLastError()
.- See Also:
-
-
Method Details
-
nwglCreateContextAttribsARB
public static long nwglCreateContextAttribsARB(long hdc, long shareContext, long attribList) Unsafe version of:CreateContextAttribsARB
-
wglCreateContextAttribsARB
public static long wglCreateContextAttribsARB(long hdc, long shareContext, @Nullable IntBuffer attribList) Creates an OpenGL context.If
shareContext
is notNULL
, then all shareable data (excluding OpenGL texture objects named 0) will be shared byshareContext
, all other contextsshareContext
already shares with, and the newly created context. An arbitrary number of contexts can share data in this fashion.- Parameters:
attribList
- a list of attributes for the context. The list consists of a sequence of <name, value> pairs terminated by the value 0. If an attribute is not specified inattribList
, then the default value is used instead. If an attribute is specified more than once, then the last value specified is used.
-
wglCreateContextAttribsARB
public static long wglCreateContextAttribsARB(long hdc, long shareContext, @Nullable int[] attribList) Array version of:CreateContextAttribsARB
-