Class GLXARBCreateContext
- java.lang.Object
-
- org.lwjgl.opengl.GLXARBCreateContext
-
public class GLXARBCreateContext extends java.lang.ObjectNative bindings to the GLX_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. These extensions add a new context creation routine with attributes specifying the GL version and context properties requested for the context, and additionally add an attribute specifying the GL profile requested for a context of OpenGL 3.2 or later. It also allows making an OpenGL 3.0 or later context current without providing a default framebuffer.
Requires
GLX 1.4.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGLX_CONTEXT_DEBUG_BIT_ARBAccepted as bits in the attribute value forCONTEXT_FLAGS_ARBinattrib_list.static intGLX_CONTEXT_FLAGS_ARBAccepted as an attribute name inattrib_list.static intGLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARBAccepted as bits in the attribute value forCONTEXT_FLAGS_ARBinattrib_list.static intGLX_CONTEXT_MAJOR_VERSION_ARB
GLX_CONTEXT_MINOR_VERSION_ARBAccepted as an attribute name inattrib_list.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static longglXCreateContextAttribsARB(long display, long config, long share_context, int direct, int[] attrib_list)Array version of:CreateContextAttribsARBstatic longglXCreateContextAttribsARB(long display, long config, long share_context, int direct, java.nio.IntBuffer attrib_list)Creates an OpenGL rendering context.
-
-
-
Field Detail
-
GLX_CONTEXT_MAJOR_VERSION_ARB, GLX_CONTEXT_MINOR_VERSION_ARB, GLX_CONTEXT_FLAGS_ARB
Accepted as an attribute name inattrib_list.
-
GLX_CONTEXT_DEBUG_BIT_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
Accepted as bits in the attribute value forCONTEXT_FLAGS_ARBinattrib_list.
-
-
Method Detail
-
glXCreateContextAttribsARB
public static long glXCreateContextAttribsARB(long display, long config, long share_context, int direct, java.nio.IntBuffer attrib_list)Creates an OpenGL rendering context.If
glXCreateContextAttribsARBsucceeds, it initializes the context to the initial state defined by the OpenGL specification, and returns a handle to it. This handle can be used to render to any GLX surface (window, pixmap, or pbuffer) compatible withconfig, subject to constraints imposed by the OpenGL API version of the context.If
share_contextis notNULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared byshare_context, all other contextsshare_contextalready shares with, and the newly created context. An arbitrary number ofGLXContextscan share data in this fashion. The server context state for all sharing contexts must exist in a single address space.- Parameters:
display- the connection to the X serverconfig- theGLXFBConfigshare_context- if notNULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared byshare_context, all other contextsshare_contextalready shares with, and the newly created context. An arbitrary number of GLXContexts can share data in this fashion. The server context state for all sharing contexts must exist in a single address space.direct- direct rendering is requested ifdirectisTrue, and indirect rendering ifdirectisFalse. IfdirectisTrue, the implementation may nonetheless create an indirect rendering context if any of the following conditions hold:- The implementation does not support direct rendering.
displayis not a local X server.- Implementation-dependent limits on the number of direct rendering contexts that can be supported simultaneously are exceeded.
Use
IsDirectto determine whether or not a request for a direct rendering context succeeded.attrib_list- an optional list of attributes for the context, terminated withNone
-
glXCreateContextAttribsARB
public static long glXCreateContextAttribsARB(long display, long config, long share_context, int direct, int[] attrib_list)Array version of:CreateContextAttribsARB
-
-