-
public abstract class EGLBaseHelper class for creating and using EGL rendering context
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classEGLBase.IContextHolder class of the EGL rendering context
public abstract classEGLBase.IConfigHolder class of EGL configuration
public interfaceEGLBase.IEglSurfaceDrawing object that associated with EGL rendering context
-
Field Summary
Fields Modifier and Type Field Description public final static ObjectEGL_LOCKpublic final static intEGL_RECORDABLE_ANDROIDpublic final static intEGL_CONTEXT_CLIENT_VERSIONpublic final static intEGL_OPENGL_ES2_BITpublic final static intEGL_OPENGL_ES3_BIT_KHR
-
Method Summary
Modifier and Type Method Description static EGLBasecreateFrom(EGLBase.IContext sharedContext, boolean withDepthBuffer, boolean isRecordable)Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environmentmaxClientVersion=3, No stencil buffer. static EGLBasecreateFrom(EGLBase.IContext sharedContext, boolean withDepthBuffer, int stencilBits, boolean isRecordable)Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environmentmaxClientVersion=3 static EGLBasecreateFrom(EGLBase.IContext sharedContext, int maxClientVersion, boolean withDepthBuffer, int stencilBits, boolean isRecordable)Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environment static booleanisEGL14Supported()abstract voidrelease()Destroy related resources abstract StringqueryString(int what)Query for string with GLES abstract intgetGlVersion()Get version of GLES abstract EGLBase.IContextgetContext()Get the EGL rendering context abstract EGLBase.IConfiggetConfig()Get the EGL configuration abstract EGLBase.IEglSurfacecreateFromSurface(Object nativeWindow)Create EglSurface from the specified Surface. abstract EGLBase.IEglSurfacecreateOffscreen(int width, int height)Create off-screen EglSurface from the specified sizeReturn EglSurface that eglMakeCurrent method is already invoked abstract voidmakeDefault()Release assignment between the EGL rendering context and thread abstract voidsync()Invoke eglWaitGL and eglWaitNativeeglWaitGL: Complete GL execution prior to subsequent native rendering calls. -
-
Method Detail
-
createFrom
static EGLBase createFrom(EGLBase.IContext sharedContext, boolean withDepthBuffer, boolean isRecordable)
Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environmentmaxClientVersion=3, No stencil buffer.
-
createFrom
static EGLBase createFrom(EGLBase.IContext sharedContext, boolean withDepthBuffer, int stencilBits, boolean isRecordable)
Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environmentmaxClientVersion=3
-
createFrom
static EGLBase createFrom(EGLBase.IContext sharedContext, int maxClientVersion, boolean withDepthBuffer, int stencilBits, boolean isRecordable)
Egl helper method, create object of EGLBase10 or EGLBase14 depending on your environment
- Parameters:
withDepthBuffer- If true, use 16-bit depth buffer, if false, no depth bufferstencilBits- If it is less than or equal to 0, no stencil buffer
-
isEGL14Supported
static boolean isEGL14Supported()
-
release
abstract void release()
Destroy related resources
-
queryString
abstract String queryString(int what)
Query for string with GLES
-
getGlVersion
abstract int getGlVersion()
Get version of GLES
-
getContext
abstract EGLBase.IContext getContext()
Get the EGL rendering context
-
getConfig
abstract EGLBase.IConfig getConfig()
Get the EGL configuration
-
createFromSurface
abstract EGLBase.IEglSurface createFromSurface(Object nativeWindow)
Create EglSurface from the specified Surface.Return EglSurface that eglMakeCurrent method is already invoked
- Parameters:
nativeWindow- Surface/SurfaceTexture/SurfaceHolder
-
createOffscreen
abstract EGLBase.IEglSurface createOffscreen(int width, int height)
Create off-screen EglSurface from the specified sizeReturn EglSurface that eglMakeCurrent method is already invoked
- Parameters:
width- size of PBuffer offscreen (no less than 0)height- size of PBuffer offscreen (no less than 0)
-
makeDefault
abstract void makeDefault()
Release assignment between the EGL rendering context and thread
-
sync
abstract void sync()
Invoke eglWaitGL and eglWaitNative
eglWaitGL: Complete GL execution prior to subsequent native rendering calls. The same result can be achieved using glFinish.eglWaitNative: Complete native execution prior to subsequent GL rendering calls
-
-
-
-