|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.opengl.GLContext
com.jogamp.opengl.impl.GLContextImpl
com.jogamp.opengl.impl.macosx.cgl.MacOSXCGLContext
public abstract class MacOSXCGLContext
Field Summary | |
---|---|
protected boolean |
isNSContext
|
Fields inherited from class com.jogamp.opengl.impl.GLContextImpl |
---|
currentSwapInterval, DEBUG, drawable, drawableRead, extensionAvailability, gl, lock, VERBOSE |
Fields inherited from class javax.media.opengl.GLContext |
---|
CONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT, contextHandle, CTX_IS_ARB_CREATED, CTX_OPTION_ANY, CTX_OPTION_DEBUG, CTX_OPTION_FORWARD, CTX_PROFILE_COMPAT, CTX_PROFILE_CORE, CTX_PROFILE_ES, ctxMajorVersion, ctxMinorVersion, ctxOptions, ctxVersionString, GL_VERSIONS, mappedVersionsAvailable, mappedVersionsAvailableLock, mappedVersionsAvailableSet |
Constructor Summary | |
---|---|
MacOSXCGLContext(GLDrawableImpl drawable,
GLContext shareWith)
|
|
MacOSXCGLContext(GLDrawableImpl drawable,
GLDrawableImpl drawableRead,
GLContext shareWith)
|
Method Summary | |
---|---|
void |
bindPbufferToTexture()
Pbuffer support; given that this is a GLContext associated with a pbuffer, binds this pbuffer to its texture target. |
protected void |
copyImpl(GLContext source,
int mask)
|
protected boolean |
create(boolean pbuffer,
boolean floatingPoint)
Creates and initializes an appropriate OpenGl Context (NS). |
protected long |
createContextARBImpl(long share,
boolean direct,
int ctp,
int major,
int minor)
Platform dependent but harmonized implementation of the ARB_create_context
mechanism to create a context.This method is called from GLContextImpl.createContextARB(long, boolean, int[], int[], int[]) .The implementation shall verify this context with a MakeContextCurrent call. |
protected void |
destroyContextARBImpl(long _context)
Destroy the context created by GLContextImpl.createContextARBImpl(long, boolean, int, int, int) . |
protected void |
destroyImpl()
|
CGLExt |
getCGLExt()
|
CGLExtProcAddressTable |
getCGLExtProcAddressTable()
|
protected Map |
getExtensionNameMap()
|
protected Map |
getFunctionNameMap()
|
int |
getOffscreenContextPixelDataType()
Only called for offscreen contexts; needed by glReadPixels |
int |
getOffscreenContextReadBuffer()
|
abstract int |
getOpenGLMode()
|
String |
getPlatformExtensionsString()
Returns a non-null (but possibly empty) string containing the space-separated list of available platform-dependent (e.g., WGL, GLX) extensions. |
com.jogamp.gluegen.runtime.ProcAddressTable |
getPlatformExtProcAddressTable()
Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, .. |
Object |
getPlatformGLExtensions()
|
ByteBuffer |
glAllocateMemoryNV(int arg0,
float arg1,
float arg2,
float arg3)
|
boolean |
isExtensionAvailable(String glExtensionName)
Returns true if the specified OpenGL extension can be successfully called using this GL context given the current host (OpenGL client) and display (OpenGL server) configuration. |
boolean |
isFunctionAvailable(String glFunctionName)
Returns true if the specified OpenGL core- or extension-function can be successfully called using this GL context given the current host (OpenGL client) and display (OpenGL server) configuration. |
protected boolean |
isNSContext()
|
protected void |
makeCurrentImpl(boolean newCreated)
|
boolean |
offscreenImageNeedsVerticalFlip()
On some platforms the mismatch between OpenGL's coordinate system (origin at bottom left) and the window system's coordinate system (origin at top left) necessitates a vertical flip of pixels read from offscreen contexts. |
protected void |
releaseImpl()
|
void |
releasePbufferFromTexture()
Pbuffer support; given that this is a GLContext associated with a pbuffer, releases this pbuffer from its texture target. |
abstract void |
setOpenGLMode(int mode)
|
protected void |
setSwapIntervalImpl(int interval)
|
protected void |
swapBuffers()
|
protected void |
updateGLProcAddressTable(int major,
int minor,
int ctp)
Updates the cache of which GL functions are available for calling through this context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean isNSContext
Constructor Detail |
---|
public MacOSXCGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead, GLContext shareWith)
public MacOSXCGLContext(GLDrawableImpl drawable, GLContext shareWith)
Method Detail |
---|
public Object getPlatformGLExtensions()
getPlatformGLExtensions
in class GLContextImpl
protected boolean isNSContext()
public CGLExt getCGLExt()
public final com.jogamp.gluegen.runtime.ProcAddressTable getPlatformExtProcAddressTable()
GLContextImpl
getPlatformExtProcAddressTable
in class GLContextImpl
public final CGLExtProcAddressTable getCGLExtProcAddressTable()
protected Map getFunctionNameMap()
getFunctionNameMap
in class GLContextImpl
protected Map getExtensionNameMap()
getExtensionNameMap
in class GLContextImpl
protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor)
GLContextImpl
ARB_create_context
mechanism to create a context.GLContextImpl.createContextARB(long, boolean, int[], int[], int[])
.MakeContextCurrent
call.
createContextARBImpl
in class GLContextImpl
share
- the shared context or nulldirect
- flag if direct is requestedctp
- ARB_create_context
related, see references belowmajor
- major numberminor
- minor number
GLContextImpl.makeCurrent()
,
GLContext.CTX_PROFILE_COMPAT
,
GLContext.CTX_OPTION_FORWARD
,
GLContext.CTX_OPTION_DEBUG
,
GLContextImpl.makeCurrentImpl(boolean)
,
#create
,
GLContextImpl.createContextARB(long, boolean, int[], int[], int[])
,
GLContextImpl.createContextARBImpl(long, boolean, int, int, int)
,
GLContextImpl.destroyContextARBImpl(long)
protected void destroyContextARBImpl(long _context)
GLContextImpl
GLContextImpl.createContextARBImpl(long, boolean, int, int, int)
.
destroyContextARBImpl
in class GLContextImpl
GLContextImpl.makeCurrent()
,
GLContextImpl.makeCurrentImpl(boolean)
,
#create
,
GLContextImpl.createContextARB(long, boolean, int[], int[], int[])
,
GLContextImpl.createContextARBImpl(long, boolean, int, int, int)
,
GLContextImpl.destroyContextARBImpl(long)
protected boolean create(boolean pbuffer, boolean floatingPoint)
makeCurrentImpl()
.
protected void makeCurrentImpl(boolean newCreated) throws GLException
makeCurrentImpl
in class GLContextImpl
GLException
protected void releaseImpl() throws GLException
releaseImpl
in class GLContextImpl
GLException
protected void destroyImpl() throws GLException
destroyImpl
in class GLContextImpl
GLException
protected void copyImpl(GLContext source, int mask) throws GLException
copyImpl
in class GLContextImpl
GLException
protected void updateGLProcAddressTable(int major, int minor, int ctp)
GLContextImpl
GLContextImpl.isFunctionAvailable(String)
for more information on
the definition of "available".
updateGLProcAddressTable
in class GLContextImpl
GLContextImpl.setContextVersion(int, int, int)
public String getPlatformExtensionsString()
GLContext
getPlatformExtensionsString
in class GLContextImpl
protected void swapBuffers()
protected void setSwapIntervalImpl(int interval)
setSwapIntervalImpl
in class GLContextImpl
public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
glAllocateMemoryNV
in class GLContextImpl
public boolean isFunctionAvailable(String glFunctionName)
GLContextImpl
GLBase.isFunctionAvailable(String)
for more details.
isFunctionAvailable
in class GLContextImpl
glFunctionName
- the name of the OpenGL function (e.g., use
"glPolygonOffsetEXT" or "glPolygonOffset" to check if the GL.glPolygonOffset(float,float)
is available).public boolean isExtensionAvailable(String glExtensionName)
GLContextImpl
GLBase.isExtensionAvailable(String)
for more details.
isExtensionAvailable
in class GLContextImpl
glExtensionName
- the name of the OpenGL extension (e.g.,
"GL_VERTEX_PROGRAM_ARB").public int getOffscreenContextPixelDataType()
GLContextImpl
getOffscreenContextPixelDataType
in class GLContextImpl
public int getOffscreenContextReadBuffer()
public boolean offscreenImageNeedsVerticalFlip()
GLContextImpl
offscreenImageNeedsVerticalFlip
in class GLContextImpl
public void bindPbufferToTexture()
GLContextImpl
bindPbufferToTexture
in class GLContextImpl
public void releasePbufferFromTexture()
GLContextImpl
releasePbufferFromTexture
in class GLContextImpl
public abstract void setOpenGLMode(int mode)
public abstract int getOpenGLMode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |