Top Fields Constructors Methods
jogamp.opengl.egl

public Class EGLContext

extends GLContextImpl
Class Inheritance
Known Direct Subclasses
jogamp.opengl.egl.EGLExternalContext
Imports
java.nio.IntBuffer, java.util.Map, com.jogamp.nativewindow.AbstractGraphicsConfiguration, .AbstractGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable, .GLContext, .GLDrawableFactory, .GLException, .GLProfile, .GLRendererQuirks, jogamp.opengl.GLContextImpl, .GLDrawableImpl, .GLDynamicLookupHelper, jogamp.opengl.egl.EGLExtImpl, .EGLExtProcAddressTable, com.jogamp.common.ExceptionUtils, com.jogamp.common.nio.Buffers, com.jogamp.gluegen.runtime.ProcAddressTable, com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver, com.jogamp.nativewindow.egl.EGLGraphicsDevice, com.jogamp.opengl.egl.EGL, .EGLExt

Field Summary

Modifier and TypeField and Description
private static final int
private static final int[]
pack-priv static final int
pack-priv static final int
pack-priv static final int
private EGLExtImpl
private EGLExtProcAddressTable
Inherited from jogamp.opengl.GLContextImpl:
drawabledrawableReadextensionAvailabilityglmappedContextTypeObjectLockmappedExtensionAvailabilityCachemappedGLProcAddressmappedGLXProcAddress

Constructor Summary

AccessConstructor and Description
pack-priv
EGLContext(final GLDrawableImpl drawable, final GLContext shareWith)

Method Summary

Modifier and TypeMethod and Description
protected void
copyImpl(final GLContext source, final int mask)

Implements abstract jogamp.opengl.GLContextImpl.copyImpl.

protected long
createContextARBImpl(final long
the shared context or null
share
,
final boolean
flag if direct is requested
direct
,
final int
ARB_create_context related, see references below
ctp
,
final int
major number
reqMajor
,
final int
minor number
reqMinor
)

Implements abstract jogamp.opengl.GLContextImpl.createContextARBImpl.

Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
protected boolean
createImpl(final long
the shared context handle or 0
shareWithHandle
)

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Platform dependent entry point for context creation.
protected void
destroyContextARBImpl(final long _context)

Implements abstract jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Destroy the context created by createContextARBImpl.
protected void
private static native long
dispatch_eglGetProcAddress0(String procname, long procAddress)

Entry point to C language function: __EGLFuncPtr eglGetProcAddress(const char * procname) Part of EGL_VERSION_1_X

pack-priv static long
eglGetProcAddress(final long eglGetProcAddressHandle, final String procname)

pack-priv int
public final EGLExt
protected Map<String, String>
protected Map<String, String>
public static String
getGLProfile(final int major, final int minor, final int ctp)

Hides com.jogamp.opengl.GLContext.getGLProfile.

returns the highest GLProfile string regarding the implementation version and context profile bits.
protected static StringBuilder
protected static String
getGLVersion(final int major, final int minor, final int ctp, final String gl_version)

Hides com.jogamp.opengl.GLContext.getGLVersion.

protected final StringBuilder
pack-priv static final StringBuilder
public final ProcAddressTable
getPlatformExtProcAddressTable()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..
public Object
pack-priv static final boolean
isGLDesktop(final int ctxOptions)

pack-priv static final boolean
isGLES1(final int majorVersion, final int ctxOptions)

pack-priv static final boolean
isGLES2ES3(final int majorVersion, final int ctxOptions)

public final boolean
isGLReadDrawableAvailable()

Implements abstract com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Query whether using a distinguished read-drawable is supported.
protected void
protected void
protected static void
protected void
resetStates(final boolean
true if called for class initialization, otherwise false (re-init or destruction).
isInit
)

Overrides jogamp.opengl.GLContextImpl.resetStates.

protected static synchronized void
protected final Integer
protected static String
protected static String
protected final void
updateGLXProcAddressTable(final String
provides a fully qualified key of the context including device and GL profile
contextFQN
,
final GLDynamicLookupHelper dlh)

Implements abstract jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Updates the platform's 'GLX' function cache
Inherited from jogamp.opengl.GLContextImpl:
addGLDebugListenerassociateDrawablecontextMadeCurrentcopycreateContextARBdestroydrawableUpdatedNotifyenableGLDebugMessagegetBoundFramebuffergetBufferObjectTrackergetBufferStateTrackergetContextCreationFlagsgetContextFQNgetContextFQNgetCreateContextARBAvailStrgetCtxOptionsgetDefaultDrawFramebuffergetDefaultPixelDataFormatgetDefaultPixelDataTypegetDefaultReadBuffergetDefaultReadFramebuffergetDefaultVAOgetDrawableImplgetGLgetGLDebugMessageExtensiongetGLDrawablegetGLDynamicLookupHelpergetGLDynamicLookupHelpergetGLExtensionCountgetGLExtensionsStringgetGLProcAddressTablegetGLReadDrawablegetGLStateTrackergetLockCountgetPlatformExtensionCountgetPlatformExtensionsStringgetRootGLgetSwapIntervalglDebugMessageControlglDebugMessageControlglDebugMessageInserthasWaitersisCreateContextARBAvailisExtensionAvailableisExtensionCacheInitializedisFunctionAvailableisGLDebugMessageEnabledisGLDebugSynchronousisOwnerisSurfacelessmakeCurrentmakeCurrentmapAvailableGLVersionmapToRealGLExtensionNamemapToRealGLFunctionNamereleaseremoveGLDebugListenerresetProcAddressTablesetBoundFramebuffersetContextCreationFlagssetDefaultSwapIntervalsetGLsetGLDebugSynchronoussetGLDrawablesetGLFunctionAvailabilitysetGLReadDrawablesetSwapIntervalsetSwapIntervalNCshutdownImpl

Field Detail

ctx_attribs_idx_majorback to summary
private static final int ctx_attribs_idx_major
ctx_attribs_romback to summary
private static final int[] ctx_attribs_rom
CTX_PROFILE_COMPATback to summary
pack-priv static final int CTX_PROFILE_COMPAT

Hides com.jogamp.opengl.GLContext.CTX_PROFILE_COMPAT.

CTX_PROFILE_COREback to summary
pack-priv static final int CTX_PROFILE_CORE

Hides com.jogamp.opengl.GLContext.CTX_PROFILE_CORE.

CTX_PROFILE_ESback to summary
pack-priv static final int CTX_PROFILE_ES

Hides com.jogamp.opengl.GLContext.CTX_PROFILE_ES.

eglExtImplback to summary
private EGLExtImpl eglExtImpl
eglExtProcAddressTableback to summary
private EGLExtProcAddressTable eglExtProcAddressTable

Constructor Detail

EGLContextback to summary
pack-priv EGLContext(final GLDrawableImpl drawable, final GLContext shareWith)

Method Detail

copyImplback to summary
protected void copyImpl(final GLContext source, final int mask) throws GLException

Implements abstract jogamp.opengl.GLContextImpl.copyImpl.

Annotations
@Override
createContextARBImplback to summary
protected long createContextARBImpl(final long share, final boolean direct, final int ctp, final int reqMajor, final int reqMinor)

Implements abstract jogamp.opengl.GLContextImpl.createContextARBImpl.

Doc from jogamp.opengl.GLContextImpl.createContextARBImpl.

Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
This method is called from createContextARB, createImpl(long) .. makeCurrent() .
The implementation shall verify this context with a MakeContextCurrent call.
The implementation must leave the context current.

Parameters
share:long

the shared context or null

direct:boolean

flag if direct is requested

ctp:int

ARB_create_context related, see references below

reqMajor:int

major number

reqMinor:int

minor number

Returns:long

the valid and current context if successful, or null

Annotations
@Override
createImplback to summary
protected boolean createImpl(final long shareWithHandle) throws GLException

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Doc from jogamp.opengl.GLContextImpl.createImpl.

Platform dependent entry point for context creation.

This method is called from makeCurrentWithinLock() .. makeCurrent() .

The implementation shall verify this context with a MakeContextCurrent call.

The implementation must leave the context current.

Non fatal context creation failure via return false is currently implemented for: MacOSXCGLContext.

Parameters
shareWithHandle:long

the shared context handle or 0

Returns:boolean

true if successful. Method returns false if the context creation failed non fatally, hence it may be created at a later time. Otherwise method throws GLException.

Annotations
@Override
Exceptions
GLException:
if method fatally fails creating the context and no attempt shall be made at a later time.
destroyContextARBImplback to summary
protected void destroyContextARBImpl(final long _context)

Implements abstract jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Doc from jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Destroy the context created by createContextARBImpl.

Annotations
@Override
destroyImplback to summary
protected void destroyImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.destroyImpl.

Annotations
@Override
dispatch_eglGetProcAddress0back to summary
private static native long dispatch_eglGetProcAddress0(String procname, long procAddress)

Entry point to C language function: __EGLFuncPtr eglGetProcAddress(const char * procname)
Part of EGL_VERSION_1_X

eglGetProcAddressback to summary
pack-priv static long eglGetProcAddress(final long eglGetProcAddressHandle, final String procname)
getContextOptionsback to summary
pack-priv int getContextOptions()
getEGLExtback to summary
public final EGLExt getEGLExt()
getExtensionNameMapback to summary
protected Map<String, String> getExtensionNameMap()

Implements abstract jogamp.opengl.GLContextImpl.getExtensionNameMap.

Annotations
@Override
getFunctionNameMapback to summary
protected Map<String, String> getFunctionNameMap()

Implements abstract jogamp.opengl.GLContextImpl.getFunctionNameMap.

Annotations
@Override
getGLProfileback to summary
public static String getGLProfile(final int major, final int minor, final int ctp) throws GLException

Hides com.jogamp.opengl.GLContext.getGLProfile.

Doc from com.jogamp.opengl.GLContext.getGLProfile.

returns the highest GLProfile string regarding the implementation version and context profile bits.

Exceptions
GLException:
if version and context profile bits could not be mapped to a GLProfile
getGLProfileback to summary
protected static StringBuilder getGLProfile(final StringBuilder sb, final int ctp)

Hides com.jogamp.opengl.GLContext.getGLProfile.

getGLVersionback to summary
protected static String getGLVersion(final int major, final int minor, final int ctp, final String gl_version)

Hides com.jogamp.opengl.GLContext.getGLVersion.

getPlatformExtensionsStringImplback to summary
protected final StringBuilder getPlatformExtensionsStringImpl()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtensionsStringImpl.

Annotations
@Override
getPlatformExtensionsStringImplback to summary
pack-priv static final StringBuilder getPlatformExtensionsStringImpl(final EGLGraphicsDevice device)
getPlatformExtProcAddressTableback to summary
public final ProcAddressTable getPlatformExtProcAddressTable()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Doc from jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..

Annotations
@Override
getPlatformGLExtensionsback to summary
public Object getPlatformGLExtensions()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformGLExtensions.

Annotations
@Override
isGLDesktopback to summary
pack-priv static final boolean isGLDesktop(final int ctxOptions)
isGLES1back to summary
pack-priv static final boolean isGLES1(final int majorVersion, final int ctxOptions)
isGLES2ES3back to summary
pack-priv static final boolean isGLES2ES3(final int majorVersion, final int ctxOptions)
isGLReadDrawableAvailableback to summary
public final boolean isGLReadDrawableAvailable()

Implements abstract com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Doc from com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Query whether using a distinguished read-drawable is supported.

Returns:boolean

true if using a read-drawable is supported with your driver/OS, otherwise false.

Annotations
@Override
makeCurrentImplback to summary
protected void makeCurrentImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.makeCurrentImpl.

Annotations
@Override
releaseImplback to summary
protected void releaseImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.releaseImpl.

Annotations
@Override
remapAvailableGLVersionsback to summary
protected static void remapAvailableGLVersions(final AbstractGraphicsDevice fromDevice, final AbstractGraphicsDevice toDevice)

Hides jogamp.opengl.GLContextImpl.remapAvailableGLVersions.

resetStatesback to summary
protected void resetStates(final boolean isInit)

Overrides jogamp.opengl.GLContextImpl.resetStates.

Parameters
isInit:boolean

Doc from com.jogamp.opengl.GLContext.resetStates.

true if called for class initialization, otherwise false (re-init or destruction).

Annotations
@Override
setMappedGLVersionListenerback to summary
protected static synchronized void setMappedGLVersionListener(final GLContextImpl.MappedGLVersionListener mvl)

Hides jogamp.opengl.GLContextImpl.setMappedGLVersionListener.

setSwapIntervalImpl2back to summary
protected final Integer setSwapIntervalImpl2(final int interval)

Implements abstract jogamp.opengl.GLContextImpl.setSwapIntervalImpl2.

Annotations
@Override
toHexStringback to summary
protected static String toHexString(final int hex)

Hides com.jogamp.opengl.GLContext.toHexString.

toHexStringback to summary
protected static String toHexString(final long hex)

Hides com.jogamp.opengl.GLContext.toHexString.

updateGLXProcAddressTableback to summary
protected final void updateGLXProcAddressTable(final String contextFQN, final GLDynamicLookupHelper dlh)

Implements abstract jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Doc from jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Updates the platform's 'GLX' function cache

Parameters
contextFQN:String

provides a fully qualified key of the context including device and GL profile

dlh:GLDynamicLookupHelper

GLDynamicLookupHelper used to resetProcAddressTable(ProcAddressTable, GLDynamicLookupHelper) instance.

Annotations
@Override