Package 

Class EGLBase


  • 
    public abstract class EGLBase
    
                        

    Helper class for creating and using EGL rendering context

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class EGLBase.IContext

      Holder class of the EGL rendering context

      public abstract class EGLBase.IConfig

      Holder class of EGL configuration

      public interface EGLBase.IEglSurface

      Drawing object that associated with EGL rendering context

    • Method Summary

      Modifier and Type Method Description
      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.
      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
      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
      static boolean isEGL14Supported()
      abstract void release() Destroy related resources
      abstract String queryString(int what) Query for string with GLES
      abstract int getGlVersion() Get version of GLES
      abstract EGLBase.IContext getContext() Get the EGL rendering context
      abstract EGLBase.IConfig getConfig() Get the EGL configuration
      abstract EGLBase.IEglSurface createFromSurface(Object nativeWindow) Create EglSurface from the specified Surface.
      abstract EGLBase.IEglSurface createOffscreen(int width, int height) Create off-screen EglSurface from the specified sizeReturn EglSurface that eglMakeCurrent method is already invoked
      abstract void makeDefault() Release assignment between the EGL rendering context and thread
      abstract void sync() Invoke eglWaitGL and eglWaitNativeeglWaitGL: Complete GL execution prior to subsequent native rendering calls.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 buffer
        stencilBits - If it is less than or equal to 0, no stencil buffer
      • release

         abstract void release()

        Destroy related resources

      • getGlVersion

         abstract int getGlVersion()

        Get version of GLES

      • 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