The attributes supported are described in the following extensions:
Use of this class is optional. If an OpenGL context is created without passing an instance of this class (or ARB_create_context is not supported), the old context creation code will be used. Support for debug and forward compatible mobes is not guaranteed by the OpenGL implementation. Developers may encounter debug contexts being the same as non-debug contexts or forward compatible contexts having support for deprecated functionality.
If the CONTEXT_FORWARD_COMPATIBLE_BIT_ARB flag is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0
specification), even if the driver exposes the corresponding entry points.
This extension is not supported on MacOS X. However, in order to enable the GL 3.2 context on MacOS X 10.7 or newer, an instance of this class must be passed
to LWJGL. The only valid configuration is ContextAttribs(3, 2, CONTEXT_CORE_PROFILE_BIT_ARB), anything else will be ignored.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private int | |
| private int | |
| private int | |
| private int | |
| public static final int | |
| private int | |
| private int | |
| public static final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ContextAttribs(int majorVersion, int minorVersion)
Creates a ContextAttribs instance for the given OpenGL version. |
| public | ContextAttribs(int
the major OpenGL version majorVersion, int the minor OpenGL version minorVersion, int the context profile mask. One of: profileMask)CONTEXT_CORE_PROFILE_BIT_ARB, CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, CONTEXT_ES2_PROFILE_BIT_EXTCreates a new ContextAttribs instance with the given attributes. |
| public | ContextAttribs(int
the major OpenGL version majorVersion, int the minor OpenGL version minorVersion, int the context profile mask. One of: profileMask, int CONTEXT_CORE_PROFILE_BIT_ARB, CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, CONTEXT_ES2_PROFILE_BIT_EXTthe context flags, a bitfield value. One or more of: contextFlags)CONTEXT_DEBUG_BIT_ARB, CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, CONTEXT_ROBUST_ACCESS_BIT_ARB, CONTEXT_RESET_ISOLATION_BIT_ARBCreates a new ContextAttribs instance with the given attributes. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv IntBuffer | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| private boolean | |
| private boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isLoseContextOnReset()
Deprecated
use
Returns true if the getContextResetNotificationStrategy instead
CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB has been set to LOSE_CONTEXT_ON_RESET_ARB.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private ContextAttribs | |
| private ContextAttribs | |
| public String | |
| public ContextAttribs | Returns: the new ContextAttribsthe context release behavior. One of: behavior)CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB, CONTEXT_RELEASE_BEHAVIOR_NONE_ARBReturns a ContextAttribs instance with |
| public ContextAttribs | withContextResetIsolation(boolean contextResetIsolation)
Returns a new |
| public ContextAttribs | withDebug(boolean debug)
Returns a new |
| public ContextAttribs | withForwardCompatible(boolean forwardCompatible)
Returns a new |
| public ContextAttribs | withLayer(int layerPlane)
Returns a new |
| public ContextAttribs | Returns: the new ContextAttribsthe context reset notification strategy loseContextOnReset)
Deprecated
use
Returns a ContextAttribs instance with withResetNotificationStrategy instead
CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB set to LOSE_CONTEXT_ON_RESET_ARB if the parameter is
true or to NO_RESET_NOTIFICATION_ARB if the parameter is false.
|
| public ContextAttribs | withProfileCompatibility(boolean profileCompatibility)
Returns a new |
| public ContextAttribs | withProfileCore(boolean profileCore)
Returns a new |
| public ContextAttribs | withProfileES(boolean profileES)
Returns a new |
| public ContextAttribs | Returns: the new ContextAttribsthe context reset notification strategy. One of: strategy)NO_RESET_NOTIFICATION_ARB, LOSE_CONTEXT_ON_RESET_ARBReturns a ContextAttribs instance with |
| public ContextAttribs | withRobustAccess(boolean robustAccess)
Returns a new |
| CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB | |
| CONTEXT_CORE_PROFILE_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_CORE_PROFILE_BIT_ARB | |
| CONTEXT_DEBUG_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_DEBUG_BIT_ARB | |
| CONTEXT_ES2_PROFILE_BIT_EXT | back to summary |
|---|---|
| public static final int CONTEXT_ES2_PROFILE_BIT_EXT | |
| CONTEXT_FLAGS_ARB | back to summary |
|---|---|
| public static final int CONTEXT_FLAGS_ARB | |
| CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | |
| CONTEXT_LAYER_PLANE_ARB | back to summary |
|---|---|
| public static final int CONTEXT_LAYER_PLANE_ARB | |
| CONTEXT_MAJOR_VERSION_ARB | back to summary |
|---|---|
| public static final int CONTEXT_MAJOR_VERSION_ARB | |
| CONTEXT_MINOR_VERSION_ARB | back to summary |
|---|---|
| public static final int CONTEXT_MINOR_VERSION_ARB | |
| CONTEXT_PROFILE_MASK_ARB | back to summary |
|---|---|
| public static final int CONTEXT_PROFILE_MASK_ARB | |
| CONTEXT_RELEASE_BEHABIOR_ARB | back to summary |
|---|---|
| public static final int CONTEXT_RELEASE_BEHABIOR_ARB | |
| CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB | back to summary |
|---|---|
| public static final int CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB | |
| CONTEXT_RELEASE_BEHAVIOR_NONE_ARB | back to summary |
|---|---|
| public static final int CONTEXT_RELEASE_BEHAVIOR_NONE_ARB | |
| CONTEXT_RESET_ISOLATION_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_RESET_ISOLATION_BIT_ARB | |
| CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB | back to summary |
|---|---|
| public static final int CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB | |
| CONTEXT_ROBUST_ACCESS_BIT_ARB | back to summary |
|---|---|
| public static final int CONTEXT_ROBUST_ACCESS_BIT_ARB | |
| contextFlags | back to summary |
|---|---|
| private int contextFlags | |
| contextReleaseBehavior | back to summary |
|---|---|
| private int contextReleaseBehavior | |
| contextResetNotificationStrategy | back to summary |
|---|---|
| private int contextResetNotificationStrategy | |
| layerPlane | back to summary |
|---|---|
| private int layerPlane | |
| LOSE_CONTEXT_ON_RESET_ARB | back to summary |
|---|---|
| public static final int LOSE_CONTEXT_ON_RESET_ARB | |
| majorVersion | back to summary |
|---|---|
| private int majorVersion | |
| minorVersion | back to summary |
|---|---|
| private int minorVersion | |
| NO_RESET_NOTIFICATION_ARB | back to summary |
|---|---|
| public static final int NO_RESET_NOTIFICATION_ARB | |
| profileMask | back to summary |
|---|---|
| private int profileMask | |
| ContextAttribs | back to summary |
|---|---|
| public ContextAttribs() Creates the default ContextAttribs instance. No special attributes will be used when creating the OpenGL context. | |
| ContextAttribs | back to summary |
|---|---|
| public ContextAttribs(int majorVersion, int minorVersion) Creates a ContextAttribs instance for the given OpenGL version. | |
| ContextAttribs | back to summary |
|---|---|
| public ContextAttribs(int majorVersion, int minorVersion, int profileMask) Creates a new ContextAttribs instance with the given attributes.
| |
| ContextAttribs | back to summary |
|---|---|
| public ContextAttribs(int majorVersion, int minorVersion, int profileMask, int contextFlags) Creates a new ContextAttribs instance with the given attributes.
| |
| ContextAttribs | back to summary |
|---|---|
| private ContextAttribs(ContextAttribs other) | |
| getAttribList | back to summary |
|---|---|
| pack-priv IntBuffer getAttribList() | |
| getContextFlags | back to summary |
|---|---|
| public int getContextFlags() Returns the | |
| getContextReleaseBehavior | back to summary |
|---|---|
| public int getContextReleaseBehavior() Returns the | |
| getContextResetNotificationStrategy | back to summary |
|---|---|
| public int getContextResetNotificationStrategy() Returns the | |
| getLayerPlane | back to summary |
|---|---|
| public int getLayerPlane() Returns the | |
| getMajorVersion | back to summary |
|---|---|
| public int getMajorVersion() Returns the | |
| getMinorVersion | back to summary |
|---|---|
| public int getMinorVersion() Returns the | |
| getProfileMask | back to summary |
|---|---|
| public int getProfileMask() Returns the | |
| hasFlag | back to summary |
|---|---|
| private boolean hasFlag(int flag) | |
| hasMask | back to summary |
|---|---|
| private boolean hasMask(int mask) | |
| isContextResetIsolation | back to summary |
|---|---|
| public boolean isContextResetIsolation() Returns true if the | |
| isDebug | back to summary |
|---|---|
| public boolean isDebug() Returns true if the | |
| isForwardCompatible | back to summary |
|---|---|
| public boolean isForwardCompatible() Returns true if the | |
| isLoseContextOnReset | back to summary |
|---|---|
| public boolean isLoseContextOnReset()
Deprecated use Returns true if the | |
| isProfileCompatibility | back to summary |
|---|---|
| public boolean isProfileCompatibility() Returns true if the | |
| isProfileCore | back to summary |
|---|---|
| public boolean isProfileCore() Returns true if the | |
| isProfileES | back to summary |
|---|---|
| public boolean isProfileES() Returns true if the | |
| isRobustAccess | back to summary |
|---|---|
| public boolean isRobustAccess() Returns true if the | |
| toggleFlag | back to summary |
|---|---|
| private ContextAttribs toggleFlag(int flag, boolean value) | |
| toggleMask | back to summary |
|---|---|
| private ContextAttribs toggleMask(int mask, boolean value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| withContextReleaseBehavior | back to summary |
|---|---|
| public ContextAttribs withContextReleaseBehavior(int behavior) Returns a ContextAttribs instance with
| |
| withContextResetIsolation | back to summary |
|---|---|
| public ContextAttribs withContextResetIsolation(boolean contextResetIsolation) Returns a new | |
| withDebug | back to summary |
|---|---|
| public ContextAttribs withDebug(boolean debug) Returns a new | |
| withForwardCompatible | back to summary |
|---|---|
| public ContextAttribs withForwardCompatible(boolean forwardCompatible) Returns a new | |
| withLayer | back to summary |
|---|---|
| public ContextAttribs withLayer(int layerPlane) Returns a new | |
| withLoseContextOnReset | back to summary |
|---|---|
| public ContextAttribs withLoseContextOnReset(boolean loseContextOnReset)
Deprecated use Returns a ContextAttribs instance with
| |
| withProfileCompatibility | back to summary |
|---|---|
| public ContextAttribs withProfileCompatibility(boolean profileCompatibility) Returns a new | |
| withProfileCore | back to summary |
|---|---|
| public ContextAttribs withProfileCore(boolean profileCore) Returns a new | |
| withProfileES | back to summary |
|---|---|
| public ContextAttribs withProfileES(boolean profileES) Returns a new | |
| withResetNotificationStrategy | back to summary |
|---|---|
| public ContextAttribs withResetNotificationStrategy(int strategy) Returns a ContextAttribs instance with
| |
| withRobustAccess | back to summary |
|---|---|
| public ContextAttribs withRobustAccess(boolean robustAccess) Returns a new | |