Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class GLXARBCreateContext

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Native 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

Modifier and TypeField and Description
public static final int
GLX_CONTEXT_DEBUG_BIT_ARB

Accepted as bits in the attribute value for CONTEXT_FLAGS_ARB in attrib_list.

public static final int
GLX_CONTEXT_FLAGS_ARB

Accepted as an attribute name in attrib_list.

public static final int
GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB

Accepted as bits in the attribute value for CONTEXT_FLAGS_ARB in attrib_list.

public static final int
GLX_CONTEXT_MAJOR_VERSION_ARB

Accepted as an attribute name in attrib_list.

public static final int
GLX_CONTEXT_MINOR_VERSION_ARB

Accepted as an attribute name in attrib_list.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
glXCreateContextAttribsARB(long
the connection to the X server
display
,
long
the GLXFBConfig
config
,
long
if not NULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared by share_context, all other contexts share_context already 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.
share_context
,
boolean
direct rendering is requested if direct is True, and indirect rendering if direct is False. If direct is True, the implementation may nonetheless create an indirect rendering context if any of the following conditions hold:
  • The implementation does not support direct rendering.
  • display is not a local X server.
  • Implementation-dependent limits on the number of direct rendering contexts that can be supported simultaneously are exceeded.

Use IsDirect to determine whether or not a request for a direct rendering context succeeded.

direct
,
IntBuffer
an optional list of attributes for the context, terminated with None
attrib_list
)

Creates an OpenGL rendering context.

public static long
glXCreateContextAttribsARB(long display, long config, long share_context, boolean direct, int[] attrib_list)

Array version of: CreateContextAttribsARB

public static long
nglXCreateContextAttribsARB(long display, long config, long share_context, int direct, long attrib_list)

Unsafe version of: CreateContextAttribsARB

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GLX_CONTEXT_DEBUG_BIT_ARBback to summary
public static final int GLX_CONTEXT_DEBUG_BIT_ARB

Accepted as bits in the attribute value for CONTEXT_FLAGS_ARB in attrib_list.

GLX_CONTEXT_FLAGS_ARBback to summary
public static final int GLX_CONTEXT_FLAGS_ARB

Accepted as an attribute name in attrib_list.

GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARBback to summary
public static final int GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB

Accepted as bits in the attribute value for CONTEXT_FLAGS_ARB in attrib_list.

GLX_CONTEXT_MAJOR_VERSION_ARBback to summary
public static final int GLX_CONTEXT_MAJOR_VERSION_ARB

Accepted as an attribute name in attrib_list.

GLX_CONTEXT_MINOR_VERSION_ARBback to summary
public static final int GLX_CONTEXT_MINOR_VERSION_ARB

Accepted as an attribute name in attrib_list.

Constructor Detail

GLXARBCreateContextback to summary
protected GLXARBCreateContext()

Method Detail

glXCreateContextAttribsARBback to summary
public static long glXCreateContextAttribsARB(long display, long config, long share_context, boolean direct, IntBuffer attrib_list)

Creates an OpenGL rendering context.

If glXCreateContextAttribsARB succeeds, 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 with config, subject to constraints imposed by the OpenGL API version of the context.

If share_context is not NULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared by share_context, all other contexts share_context already 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.

Parameters
display:long

the connection to the X server

config:long

the GLXFBConfig

share_context:long

if not NULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared by share_context, all other contexts share_context already 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:boolean

direct rendering is requested if direct is True, and indirect rendering if direct is False. If direct is True, the implementation may nonetheless create an indirect rendering context if any of the following conditions hold:

  • The implementation does not support direct rendering.
  • display is not a local X server.
  • Implementation-dependent limits on the number of direct rendering contexts that can be supported simultaneously are exceeded.

Use IsDirect to determine whether or not a request for a direct rendering context succeeded.

attrib_list:IntBuffer

an optional list of attributes for the context, terminated with None

Annotations
@NativeType:GLXContext
glXCreateContextAttribsARBback to summary
public static long glXCreateContextAttribsARB(long display, long config, long share_context, boolean direct, int[] attrib_list)

Array version of: CreateContextAttribsARB

Annotations
@NativeType:GLXContext
nglXCreateContextAttribsARBback to summary
public static long nglXCreateContextAttribsARB(long display, long config, long share_context, int direct, long attrib_list)

Unsafe version of: CreateContextAttribsARB