org.lwjgl.opengl
Class ContextAttribs
java.lang.Object
org.lwjgl.opengl.ContextAttribs
public final class ContextAttribs
- extends java.lang.Object
This class represents the context attributes passed to CreateContextAttribs of the ARB_create_context and
ARB_create_context_profile extensions.
These attributes can be used to indicate at context creation which OpenGL interface will be used. This includes the
OpenGL version, the layer plane on which rendering takes place and also optional debug and forward combatibility modes.
(read the ARB_create_context spec for details)
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 forwardCompatible
attribute is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0 specification). This
means that developers can start working on cleaning up their applications without an OpenGL 3.0 complaint driver.
- Author:
- spasi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ContextAttribs
public ContextAttribs()
ContextAttribs
public ContextAttribs(int majorVersion,
int minorVersion)
getMajorVersion
public int getMajorVersion()
getMinorVersion
public int getMinorVersion()
getLayerPlane
public int getLayerPlane()
isDebug
public boolean isDebug()
isForwardCompatible
public boolean isForwardCompatible()
isProfileCore
public boolean isProfileCore()
isProfileCompatibility
public boolean isProfileCompatibility()
isProfileES
public boolean isProfileES()
withLayer
public ContextAttribs withLayer(int layerPlane)
withDebug
public ContextAttribs withDebug(boolean debug)
withForwardCompatible
public ContextAttribs withForwardCompatible(boolean forwardCompatible)
withProfileCore
public ContextAttribs withProfileCore(boolean profileCore)
withProfileCompatibility
public ContextAttribs withProfileCompatibility(boolean profileCompatibility)
withProfileES
public ContextAttribs withProfileES(boolean profileES)
withLoseContextOnReset
public ContextAttribs withLoseContextOnReset(boolean loseContextOnReset)
- Returns a ContextAttribs instance with CONTEXT_RESET_NOTIFICATION_STRATEGY set
to LOSE_CONTEXT_ON_RESET if the parameter is true or to NO_RESET_NOTIFICATION
if the parameter is false.
- Parameters:
loseContextOnReset
-
- Returns:
- the new ContextAttribs
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2002-2009 lwjgl.org. All Rights Reserved.