Class EGL

java.lang.Object
org.lwjgl.opengles.EGL

public final class EGL extends Object
EGL wrapper class.
  • Field Details

    • EGL_FALSE

      public static final int EGL_FALSE
      EGL aliases
      See Also:
    • EGL_TRUE

      public static final int EGL_TRUE
      EGL aliases
      See Also:
    • EGL_DEFAULT_DISPLAY

      public static final int EGL_DEFAULT_DISPLAY
      Out-of-band handle values
      See Also:
    • EGL_NO_CONTEXT

      public static final int EGL_NO_CONTEXT
      Out-of-band handle values
      See Also:
    • EGL_NO_DISPLAY

      public static final int EGL_NO_DISPLAY
      Out-of-band handle values
      See Also:
    • EGL_NO_SURFACE

      public static final int EGL_NO_SURFACE
      Out-of-band handle values
      See Also:
    • EGL_DONT_CARE

      public static final int EGL_DONT_CARE
      Out-of-band attribute value
      See Also:
    • EGL_SUCCESS

      public static final int EGL_SUCCESS
      Errors / GetError return values
      See Also:
    • EGL_NOT_INITIALIZED

      public static final int EGL_NOT_INITIALIZED
      Errors / GetError return values
      See Also:
    • EGL_BAD_ACCESS

      public static final int EGL_BAD_ACCESS
      Errors / GetError return values
      See Also:
    • EGL_BAD_ALLOC

      public static final int EGL_BAD_ALLOC
      Errors / GetError return values
      See Also:
    • EGL_BAD_ATTRIBUTE

      public static final int EGL_BAD_ATTRIBUTE
      Errors / GetError return values
      See Also:
    • EGL_BAD_CONFIG

      public static final int EGL_BAD_CONFIG
      Errors / GetError return values
      See Also:
    • EGL_BAD_CONTEXT

      public static final int EGL_BAD_CONTEXT
      Errors / GetError return values
      See Also:
    • EGL_BAD_CURRENT_SURFACE

      public static final int EGL_BAD_CURRENT_SURFACE
      Errors / GetError return values
      See Also:
    • EGL_BAD_DISPLAY

      public static final int EGL_BAD_DISPLAY
      Errors / GetError return values
      See Also:
    • EGL_BAD_MATCH

      public static final int EGL_BAD_MATCH
      Errors / GetError return values
      See Also:
    • EGL_BAD_NATIVE_PIXMAP

      public static final int EGL_BAD_NATIVE_PIXMAP
      Errors / GetError return values
      See Also:
    • EGL_BAD_NATIVE_WINDOW

      public static final int EGL_BAD_NATIVE_WINDOW
      Errors / GetError return values
      See Also:
    • EGL_BAD_PARAMETER

      public static final int EGL_BAD_PARAMETER
      Errors / GetError return values
      See Also:
    • EGL_BAD_SURFACE

      public static final int EGL_BAD_SURFACE
      Errors / GetError return values
      See Also:
    • EGL_CONTEXT_LOST

      public static final int EGL_CONTEXT_LOST
      Errors / GetError return values
      See Also:
    • EGL_BUFFER_SIZE

      public static final int EGL_BUFFER_SIZE
      Config attributes
      See Also:
    • EGL_ALPHA_SIZE

      public static final int EGL_ALPHA_SIZE
      Config attributes
      See Also:
    • EGL_BLUE_SIZE

      public static final int EGL_BLUE_SIZE
      Config attributes
      See Also:
    • EGL_GREEN_SIZE

      public static final int EGL_GREEN_SIZE
      Config attributes
      See Also:
    • EGL_RED_SIZE

      public static final int EGL_RED_SIZE
      Config attributes
      See Also:
    • EGL_DEPTH_SIZE

      public static final int EGL_DEPTH_SIZE
      Config attributes
      See Also:
    • EGL_STENCIL_SIZE

      public static final int EGL_STENCIL_SIZE
      Config attributes
      See Also:
    • EGL_CONFIG_CAVEAT

      public static final int EGL_CONFIG_CAVEAT
      Config attributes
      See Also:
    • EGL_CONFIG_ID

      public static final int EGL_CONFIG_ID
      Config attributes
      See Also:
    • EGL_LEVEL

      public static final int EGL_LEVEL
      Config attributes
      See Also:
    • EGL_MAX_PBUFFER_HEIGHT

      public static final int EGL_MAX_PBUFFER_HEIGHT
      Config attributes
      See Also:
    • EGL_MAX_PBUFFER_PIXELS

      public static final int EGL_MAX_PBUFFER_PIXELS
      Config attributes
      See Also:
    • EGL_MAX_PBUFFER_WIDTH

      public static final int EGL_MAX_PBUFFER_WIDTH
      Config attributes
      See Also:
    • EGL_NATIVE_RENDERABLE

      public static final int EGL_NATIVE_RENDERABLE
      Config attributes
      See Also:
    • EGL_NATIVE_VISUAL_ID

      public static final int EGL_NATIVE_VISUAL_ID
      Config attributes
      See Also:
    • EGL_NATIVE_VISUAL_TYPE

      public static final int EGL_NATIVE_VISUAL_TYPE
      Config attributes
      See Also:
    • EGL_SAMPLES

      public static final int EGL_SAMPLES
      Config attributes
      See Also:
    • EGL_SAMPLE_BUFFERS

      public static final int EGL_SAMPLE_BUFFERS
      Config attributes
      See Also:
    • EGL_SURFACE_TYPE

      public static final int EGL_SURFACE_TYPE
      Config attributes
      See Also:
    • EGL_TRANSPARENT_TYPE

      public static final int EGL_TRANSPARENT_TYPE
      Config attributes
      See Also:
    • EGL_TRANSPARENT_BLUE_VALUE

      public static final int EGL_TRANSPARENT_BLUE_VALUE
      Config attributes
      See Also:
    • EGL_TRANSPARENT_GREEN_VALUE

      public static final int EGL_TRANSPARENT_GREEN_VALUE
      Config attributes
      See Also:
    • EGL_TRANSPARENT_RED_VALUE

      public static final int EGL_TRANSPARENT_RED_VALUE
      Config attributes
      See Also:
    • EGL_NONE

      public static final int EGL_NONE
      Config attributes
      See Also:
    • EGL_BIND_TO_TEXTURE_RGB

      public static final int EGL_BIND_TO_TEXTURE_RGB
      Config attributes
      See Also:
    • EGL_BIND_TO_TEXTURE_RGBA

      public static final int EGL_BIND_TO_TEXTURE_RGBA
      Config attributes
      See Also:
    • EGL_MIN_SWAP_INTERVAL

      public static final int EGL_MIN_SWAP_INTERVAL
      Config attributes
      See Also:
    • EGL_MAX_SWAP_INTERVAL

      public static final int EGL_MAX_SWAP_INTERVAL
      Config attributes
      See Also:
    • EGL_LUMINANCE_SIZE

      public static final int EGL_LUMINANCE_SIZE
      Config attributes
      See Also:
    • EGL_ALPHA_MASK_SIZE

      public static final int EGL_ALPHA_MASK_SIZE
      Config attributes
      See Also:
    • EGL_COLOR_BUFFER_TYPE

      public static final int EGL_COLOR_BUFFER_TYPE
      Config attributes
      See Also:
    • EGL_RENDERABLE_TYPE

      public static final int EGL_RENDERABLE_TYPE
      Config attributes
      See Also:
    • EGL_MATCH_NATIVE_PIXMAP

      public static final int EGL_MATCH_NATIVE_PIXMAP
      Config attributes
      See Also:
    • EGL_CONFORMANT

      public static final int EGL_CONFORMANT
      Config attributes
      See Also:
    • EGL_SLOW_CONFIG

      public static final int EGL_SLOW_CONFIG
      Config attribute values
      See Also:
    • EGL_NON_CONFORMANT_CONFIG

      public static final int EGL_NON_CONFORMANT_CONFIG
      Config attribute values
      See Also:
    • EGL_TRANSPARENT_RGB

      public static final int EGL_TRANSPARENT_RGB
      Config attribute values
      See Also:
    • EGL_RGB_BUFFER

      public static final int EGL_RGB_BUFFER
      Config attribute values
      See Also:
    • EGL_LUMINANCE_BUFFER

      public static final int EGL_LUMINANCE_BUFFER
      Config attribute values
      See Also:
    • EGL_NO_TEXTURE

      public static final int EGL_NO_TEXTURE
      More config attribute values, for EGL_TEXTURE_FORMAT
      See Also:
    • EGL_TEXTURE_RGB

      public static final int EGL_TEXTURE_RGB
      More config attribute values, for EGL_TEXTURE_FORMAT
      See Also:
    • EGL_TEXTURE_RGBA

      public static final int EGL_TEXTURE_RGBA
      More config attribute values, for EGL_TEXTURE_FORMAT
      See Also:
    • EGL_TEXTURE_2D

      public static final int EGL_TEXTURE_2D
      More config attribute values, for EGL_TEXTURE_FORMAT
      See Also:
    • EGL_PBUFFER_BIT

      public static final int EGL_PBUFFER_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_PIXMAP_BIT

      public static final int EGL_PIXMAP_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_WINDOW_BIT

      public static final int EGL_WINDOW_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_VG_COLORSPACE_LINEAR_BIT

      public static final int EGL_VG_COLORSPACE_LINEAR_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_VG_ALPHA_FORMAT_PRE_BIT

      public static final int EGL_VG_ALPHA_FORMAT_PRE_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_MULTISAMPLE_RESOLVE_BOX_BIT

      public static final int EGL_MULTISAMPLE_RESOLVE_BOX_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_SWAP_BEHAVIOR_PRESERVED_BIT

      public static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT
      EGL_SURFACE_TYPE mask bits
      See Also:
    • EGL_OPENGL_ES_BIT

      public static final int EGL_OPENGL_ES_BIT
      EGL_RENDERABLE_TYPE mask bits
      See Also:
    • EGL_OPENVG_BIT

      public static final int EGL_OPENVG_BIT
      EGL_RENDERABLE_TYPE mask bits
      See Also:
    • EGL_OPENGL_ES2_BIT

      public static final int EGL_OPENGL_ES2_BIT
      EGL_RENDERABLE_TYPE mask bits
      See Also:
    • EGL_OPENGL_BIT

      public static final int EGL_OPENGL_BIT
      EGL_RENDERABLE_TYPE mask bits
      See Also:
    • EGL_VENDOR

      public static final int EGL_VENDOR
      QueryString targets
      See Also:
    • EGL_VERSION

      public static final int EGL_VERSION
      QueryString targets
      See Also:
    • EGL_EXTENSIONS

      public static final int EGL_EXTENSIONS
      QueryString targets
      See Also:
    • EGL_CLIENT_APIS

      public static final int EGL_CLIENT_APIS
      QueryString targets
      See Also:
    • EGL_HEIGHT

      public static final int EGL_HEIGHT
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_WIDTH

      public static final int EGL_WIDTH
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_LARGEST_PBUFFER

      public static final int EGL_LARGEST_PBUFFER
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_TEXTURE_FORMAT

      public static final int EGL_TEXTURE_FORMAT
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_TEXTURE_TARGET

      public static final int EGL_TEXTURE_TARGET
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_MIPMAP_TEXTURE

      public static final int EGL_MIPMAP_TEXTURE
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_MIPMAP_LEVEL

      public static final int EGL_MIPMAP_LEVEL
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_RENDER_BUFFER

      public static final int EGL_RENDER_BUFFER
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_VG_COLORSPACE

      public static final int EGL_VG_COLORSPACE
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_VG_ALPHA_FORMAT

      public static final int EGL_VG_ALPHA_FORMAT
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_HORIZONTAL_RESOLUTION

      public static final int EGL_HORIZONTAL_RESOLUTION
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_VERTICAL_RESOLUTION

      public static final int EGL_VERTICAL_RESOLUTION
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_PIXEL_ASPECT_RATIO

      public static final int EGL_PIXEL_ASPECT_RATIO
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_SWAP_BEHAVIOR

      public static final int EGL_SWAP_BEHAVIOR
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_MULTISAMPLE_RESOLVE

      public static final int EGL_MULTISAMPLE_RESOLVE
      QuerySurface / SurfaceAttrib / CreatePbufferSurface targets
      See Also:
    • EGL_BACK_BUFFER

      public static final int EGL_BACK_BUFFER
      EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets
      See Also:
    • EGL_SINGLE_BUFFER

      public static final int EGL_SINGLE_BUFFER
      EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets
      See Also:
    • EGL_VG_COLORSPACE_sRGB

      public static final int EGL_VG_COLORSPACE_sRGB
      OpenVG color spaces
      See Also:
    • EGL_VG_COLORSPACE_LINEAR

      public static final int EGL_VG_COLORSPACE_LINEAR
      OpenVG color spaces
      See Also:
    • EGL_VG_ALPHA_FORMAT_NONPRE

      public static final int EGL_VG_ALPHA_FORMAT_NONPRE
      OpenVG alpha formats
      See Also:
    • EGL_VG_ALPHA_FORMAT_PRE

      public static final int EGL_VG_ALPHA_FORMAT_PRE
      OpenVG alpha formats
      See Also:
    • EGL_DISPLAY_SCALING

      public static final int EGL_DISPLAY_SCALING
      Constant scale factor by which fractional display resolutions invalid input: '&' aspect ratio are scaled when queried as integer values.
      See Also:
    • EGL_UNKNOWN

      public static final int EGL_UNKNOWN
      Unknown display resolution/aspect ratio
      See Also:
    • EGL_BUFFER_PRESERVED

      public static final int EGL_BUFFER_PRESERVED
      Back buffer swap behaviors
      See Also:
    • EGL_BUFFER_DESTROYED

      public static final int EGL_BUFFER_DESTROYED
      Back buffer swap behaviors
      See Also:
    • EGL_CONTEXT_CLIENT_TYPE

      public static final int EGL_CONTEXT_CLIENT_TYPE
      QueryContext targets
      See Also:
    • EGL_CONTEXT_CLIENT_VERSION

      public static final int EGL_CONTEXT_CLIENT_VERSION
      CreateContext attributes
      See Also:
    • EGL_MULTISAMPLE_RESOLVE_DEFAULT

      public static final int EGL_MULTISAMPLE_RESOLVE_DEFAULT
      Multisample resolution behaviors
      See Also:
    • EGL_MULTISAMPLE_RESOLVE_BOX

      public static final int EGL_MULTISAMPLE_RESOLVE_BOX
      Multisample resolution behaviors
      See Also:
    • EGL_OPENGL_ES_API

      public static final int EGL_OPENGL_ES_API
      BindAPI/QueryAPI targets
      See Also:
    • EGL_OPENVG_API

      public static final int EGL_OPENVG_API
      BindAPI/QueryAPI targets
      See Also:
    • EGL_OPENGL_API

      public static final int EGL_OPENGL_API
      BindAPI/QueryAPI targets
      See Also:
    • EGL_DRAW

      public static final int EGL_DRAW
      GetCurrentSurface targets
      See Also:
    • EGL_READ

      public static final int EGL_READ
      GetCurrentSurface targets
      See Also:
  • Method Details

    • eglGetError

      public static int eglGetError()
    • eglGetDisplay

      public static EGLDisplay eglGetDisplay(long display_id) throws LWJGLException
      Obtains an EGL display from the specified native display and initializes it.
      Parameters:
      display_id - the handle to the native display.
      Returns:
      the EGL Display
      Throws:
      LWJGLException - if no display is available or an EGL error occurs
    • eglQueryString

      public static String eglQueryString(EGLDisplay dpy, int name)
      Returns a string describing some aspect of the EGL implementation running on the specified display.
      Parameters:
      dpy - the EGL display to query
      name - the value to query
      Returns:
      the description
    • eglQuerySurface

      public static void eglQuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, IntBuffer value) throws LWJGLException
      Returns the value of the specified EGL surface attribute in the value parameter.
      Parameters:
      dpy - the EGL display
      surface - the EGL surface
      attribute - the surface attribute
      value - the attribute value will be returned here
      Throws:
      LWJGLException - if an EGL error occurs
    • eglBindAPI

      public static boolean eglBindAPI(int api)
      Binds the specified rendering API to the current thread.
      Parameters:
      api - the API to bind
      Returns:
      true if the bind was successful, false if an EGL error occurs
    • eglQueryAPI

      public static int eglQueryAPI()
      Returns the current rendering API.
      Returns:
      the rendering API bound to the current thread
    • eglReleaseCurrent

      public static void eglReleaseCurrent(EGLDisplay dpy) throws LWJGLException, PowerManagementEventException
      Releases the current context without assigning a new one.
      Parameters:
      dpy - the EGL display
      Throws:
      LWJGLException - if an EGL error occurs
      PowerManagementEventException - if an EGL power management event occurs
      See Also:
      • eglMakeCurrent(EGLDisplay, EGLSurface, EGLSurface, EGLContext)
    • eglGetCurrentContext

      public static EGLContext eglGetCurrentContext() throws LWJGLException
      Returns the current EGL context for the current rendering API. If there is no context current, null is returned.
      Returns:
      the current context
      Throws:
      LWJGLException - if an EGL error occurs
    • eglIsCurrentContext

      public static boolean eglIsCurrentContext(EGLContext context)
      Returns true if the specified EGL context is the current context. This method is faster than using #eglGetCurrentContext and comparing the two EGLContext objects.
      Parameters:
      context - the EGL context
      Returns:
      true if the EGL context is current
      See Also:
    • eglGetCurrentSurface

      public static EGLSurface eglGetCurrentSurface(int readdraw) throws LWJGLException
      Returns the EGL surfaces used for rendering by the current context. If there is no context current, null is returned.
      Parameters:
      readdraw - the read or draw surface
      Returns:
      the current surface
      Throws:
      LWJGLException - if an EGL error occurs
    • eglGetCurrentDisplay

      public static EGLDisplay eglGetCurrentDisplay() throws LWJGLException
      Returns the EGL display associated with the current context.
      Returns:
      the current display
      Throws:
      LWJGLException - if an EGL error occurs
    • eglQueryContext

      public static void eglQueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, IntBuffer value) throws LWJGLException
      Returns the value of the specified EGL context attribute in the value parameter.
      Parameters:
      dpy - the EGL display
      ctx - the EGL context
      attribute - the context attribute
      value - the attribute value will be returned here
      Throws:
      LWJGLException - if an EGL error occurs
    • eglWaitClient

      public static boolean eglWaitClient()
      Prevents native rendering API functions from executing until any outstanding client API rendering affecting the same surface is complete.
      Returns:
      true if the wait was successful, false is an EGL error occurs
    • eglWaitGL

      public static boolean eglWaitGL()
      This method does the equivalent of:
      EGLenum api = eglQueryAPI(); eglBindAPI(EGL_OPENGL_ES_API); eglWaitClient(); eglBindAPI(api);
      Returns:
      true if the wait was successful, false if an EGL error occurs
    • eglWaitNative

      public static boolean eglWaitNative(int engine)
      Prevents a client API command sequence from executing until any outstanding native rendering affecting the same surface is complete.
      Parameters:
      engine - the native rendering engine
      Returns:
      true if the wait was successful, false if an EGL error occurs