|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.opengl.GLContext
public abstract class GLContext
Abstraction for an OpenGL rendering context. In order to perform OpenGL rendering, a context must be "made current" on the current thread. OpenGL rendering semantics specify that only one context may be current on the current thread at any given time, and also that a given context may be current on only one thread at any given time. Because components can be added to and removed from the component hierarchy at any time, it is possible that the underlying OpenGL context may need to be destroyed and recreated multiple times over the lifetime of a given component. This process is handled by the implementation, and the GLContext abstraction provides a stable object which clients can use to refer to a given context.
Field Summary | |
---|---|
protected long |
context
|
static int |
CONTEXT_CURRENT
Indicates that the context was made current during the last call to makeCurrent . |
static int |
CONTEXT_CURRENT_NEW
Indicates that a newly-created context was made current during the last call to makeCurrent . |
static int |
CONTEXT_NOT_CURRENT
Indicates that the context was not made current during the last call to makeCurrent . |
protected static int |
CTX_IS_ARB_CREATED
ARB_create_context related: created via ARB_create_context |
protected static int |
CTX_OPTION_ANY
ARB_create_context related: not flag forward compatible |
protected static int |
CTX_OPTION_DEBUG
ARB_create_context related: flag debug |
protected static int |
CTX_OPTION_FORWARD
ARB_create_context related: flag forward compatible |
protected static int |
CTX_PROFILE_COMPAT
ARB_create_context related: compatibility profile |
protected static int |
CTX_PROFILE_CORE
ARB_create_context related: core profile |
protected static int |
CTX_PROFILE_ES
ARB_create_context related: ES profile |
protected int |
ctxMajorVersion
|
protected int |
ctxMinorVersion
|
protected int |
ctxOptions
|
protected String |
ctxVersionString
|
static int[][] |
GL_VERSIONS
|
protected static com.jogamp.common.util.IntIntHashMap |
mappedVersionsAvailable
|
protected static Object |
mappedVersionsAvailableLock
|
protected static boolean |
mappedVersionsAvailableSet
|
Constructor Summary | |
---|---|
GLContext()
|
Method Summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
protected static int |
compose8bit(int one,
int two,
int three,
int four)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
protected static String |
composed8BitToString(int bits32,
boolean hex1,
boolean hex2,
boolean hex3,
boolean hex4)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract void |
copy(GLContext source,
int mask)
Copies selected groups of OpenGL state variables from the supplied source context into this one. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static boolean |
decrementGLVersion(int[] major,
int[] minor)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract void |
destroy()
Destroys this OpenGL context and frees its associated resources. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Object |
getAttachedObject(int name)
Returns the attached user object for the given name to this GLContext. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Object |
getAttachedObject(String name)
Returns the attached user object for the given name to this GLContext. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
protected static int |
getComposed8bit(int bits32,
int which)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static GLContext |
getCurrent()
Returns this thread current context. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static GL |
getCurrentGL()
Returns the GL object bound to this thread current context. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract GL |
getGL()
Returns the GL pipeline object for this GLContext. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract GLDrawable |
getGLDrawable()
Returns the GLDrawable to which this context may be used to draw. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract GLDrawable |
getGLDrawableRead()
Returns the GLDrawable from which this context may be used to read. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
String |
getGLVersion()
Returns a valid OpenGL version string, ie major.minor ([option]?[options,]*) - gl-version
options
old refers to the non ARB_create_context created context
new refers to the ARB_create_context created context
compatible profile
core profile
forward compatible
any refers to the non forward compatible context
ES refers to the GLES context variant
gl-version the GL_VERSION string
e.g.:
CONTEXT_NOT_CURRENTpublic static final int CONTEXT_NOT_CURRENT
CONTEXT_CURRENTpublic static final int CONTEXT_CURRENT
CONTEXT_CURRENT_NEWpublic static final int CONTEXT_CURRENT_NEW
contextprotected long context ctxMajorVersionprotected int ctxMajorVersion ctxMinorVersionprotected int ctxMinorVersion ctxOptionsprotected int ctxOptions ctxVersionStringprotected String ctxVersionString CTX_IS_ARB_CREATEDprotected static final int CTX_IS_ARB_CREATED
CTX_PROFILE_COMPATprotected static final int CTX_PROFILE_COMPAT
CTX_PROFILE_COREprotected static final int CTX_PROFILE_CORE
CTX_PROFILE_ESprotected static final int CTX_PROFILE_ES
CTX_OPTION_FORWARDprotected static final int CTX_OPTION_FORWARD
CTX_OPTION_ANYprotected static final int CTX_OPTION_ANY
CTX_OPTION_DEBUGprotected static final int CTX_OPTION_DEBUG
GL_VERSIONSpublic static final int[][] GL_VERSIONS mappedVersionsAvailableprotected static final com.jogamp.common.util.IntIntHashMap mappedVersionsAvailable mappedVersionsAvailableSetprotected static volatile boolean mappedVersionsAvailableSet mappedVersionsAvailableLockprotected static Object mappedVersionsAvailableLock
GLContextpublic GLContext()
getGLDrawablepublic abstract GLDrawable getGLDrawable()
setGLDrawableReadpublic abstract void setGLDrawableRead(GLDrawable read)
getGLDrawableReadpublic abstract GLDrawable getGLDrawableRead()
makeCurrentpublic abstract int makeCurrent() throws GLException
releasepublic abstract void release() throws GLException
copypublic abstract void copy(GLContext source, int mask) throws GLException
getCurrentGLpublic static GL getCurrentGL() throws GLException
getCurrentpublic static GLContext getCurrent()
isCurrentpublic final boolean isCurrent()
setCurrentprotected static void setCurrent(GLContext cur)
destroypublic abstract void destroy()
isSynchronizedpublic abstract boolean isSynchronized()
setSynchronizedpublic abstract void setSynchronized(boolean isSynchronized)
getGLpublic abstract GL getGL()
setGLpublic abstract GL setGL(GL gl)
getAttachedObjectpublic Object getAttachedObject(int name)
getAttachedObjectpublic Object getAttachedObject(String name)
putAttachedObjectpublic Object putAttachedObject(int name, Object obj)
putAttachedObjectpublic Object putAttachedObject(String name, Object obj)
toStringpublic final String toString() getPlatformExtensionsStringpublic abstract String getPlatformExtensionsString()
getGLVersionMajorpublic final int getGLVersionMajor() getGLVersionMinorpublic final int getGLVersionMinor() isGLCompatibilityProfilepublic final boolean isGLCompatibilityProfile() isGLCoreProfilepublic final boolean isGLCoreProfile() isGLEmbeddedProfilepublic final boolean isGLEmbeddedProfile() isGLForwardCompatiblepublic final boolean isGLForwardCompatible() isCreatedWithARBMethodpublic final boolean isCreatedWithARBMethod() getGLVersionpublic final String getGLVersion()
isGL4bcpublic final boolean isGL4bc() isGL4public final boolean isGL4() isGL3bcpublic final boolean isGL3bc() isGL3public final boolean isGL3() isGL2public final boolean isGL2() isGL2GL3public final boolean isGL2GL3() isGLES1public final boolean isGLES1() isGLES2public final boolean isGLES2() isGLESpublic final boolean isGLES() isGL2ES1public final boolean isGL2ES1() isGL2ES2public final boolean isGL2ES2() hasGLSLpublic final boolean hasGLSL() getMaxMajorpublic static final int getMaxMajor() getMaxMinorpublic static final int getMaxMinor(int major) isValidGLVersionpublic static final boolean isValidGLVersion(int major, int minor) decrementGLVersionpublic static final boolean decrementGLVersion(int[] major, int[] minor) getGLVersionAvailablepublic static final String getGLVersionAvailable(int major, int profile)
getGLVersionAvailablepublic static final boolean getGLVersionAvailable(int reqMajor, int reqProfile, int[] major, int[] minor, int[] ctp)
isGLVersionAvailablepublic static final boolean isGLVersionAvailable(int major, int profile)
isGL4bcAvailablepublic static final boolean isGL4bcAvailable() isGL4Availablepublic static final boolean isGL4Available() isGL3bcAvailablepublic static final boolean isGL3bcAvailable() isGL3Availablepublic static final boolean isGL3Available() isGL2Availablepublic static final boolean isGL2Available() getGLVersionpublic static String getGLVersion(int major, int minor, int ctp, String gl_version) mapVersionAvailableprotected static void mapVersionAvailable(int reqMajor, int profile, int resMajor, int resMinor, int resCtp)
compose8bitprotected static int compose8bit(int one, int two, int three, int four) getComposed8bitprotected static int getComposed8bit(int bits32, int which) composed8BitToStringprotected static String composed8BitToString(int bits32, boolean hex1, boolean hex2, boolean hex3, boolean hex4) toStringprotected static String toString(int val, boolean hex) toHexStringprotected static String toHexString(int hex) toHexStringprotected static String toHexString(long hex)
Copyright 2010 JogAmp Community. |