Top Description Fields Constructors Methods
org.lwjgl.opengles

public final Class EGL

extends Object
Class Inheritance
Imports
org.lwjgl.BufferChecks, .LWJGLException, .MemoryUtil, .PointerBuffer, java.nio.IntBuffer

EGL wrapper class.

Field Summary

Modifier and TypeField and Description
public static final int
EGL_ALPHA_MASK_SIZE

Config attributes

public static final int
EGL_ALPHA_SIZE

Config attributes

public static final int
EGL_BACK_BUFFER

EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets

public static final int
EGL_BAD_ACCESS

Errors / GetError return values

public static final int
EGL_BAD_ALLOC

Errors / GetError return values

public static final int
EGL_BAD_ATTRIBUTE

Errors / GetError return values

public static final int
EGL_BAD_CONFIG

Errors / GetError return values

public static final int
EGL_BAD_CONTEXT

Errors / GetError return values

public static final int
EGL_BAD_CURRENT_SURFACE

Errors / GetError return values

public static final int
EGL_BAD_DISPLAY

Errors / GetError return values

public static final int
EGL_BAD_MATCH

Errors / GetError return values

public static final int
EGL_BAD_NATIVE_PIXMAP

Errors / GetError return values

public static final int
EGL_BAD_NATIVE_WINDOW

Errors / GetError return values

public static final int
EGL_BAD_PARAMETER

Errors / GetError return values

public static final int
EGL_BAD_SURFACE

Errors / GetError return values

public static final int
EGL_BIND_TO_TEXTURE_RGB

Config attributes

public static final int
EGL_BIND_TO_TEXTURE_RGBA

Config attributes

public static final int
EGL_BLUE_SIZE

Config attributes

public static final int
EGL_BUFFER_DESTROYED

Back buffer swap behaviors

public static final int
EGL_BUFFER_PRESERVED

Back buffer swap behaviors

public static final int
EGL_BUFFER_SIZE

Config attributes

public static final int
EGL_CLIENT_APIS

QueryString targets

public static final int
EGL_COLOR_BUFFER_TYPE

Config attributes

public static final int
EGL_CONFIG_CAVEAT

Config attributes

public static final int
EGL_CONFIG_ID

Config attributes

public static final int
EGL_CONFORMANT

Config attributes

public static final int
EGL_CONTEXT_CLIENT_TYPE

QueryContext targets

public static final int
EGL_CONTEXT_CLIENT_VERSION

CreateContext attributes

public static final int
EGL_CONTEXT_LOST

Errors / GetError return values

pack-priv static final int
EGL_CORE_NATIVE_ENGINE

WaitNative engines

public static final int
EGL_DEFAULT_DISPLAY

Out-of-band handle values

public static final int
EGL_DEPTH_SIZE

Config attributes

public static final int
EGL_DISPLAY_SCALING

Constant scale factor by which fractional display resolutions & aspect ratio are scaled when queried as integer values.

public static final int
EGL_DONT_CARE

Out-of-band attribute value

public static final int
EGL_DRAW

GetCurrentSurface targets

public static final int
EGL_EXTENSIONS

QueryString targets

public static final int
EGL_FALSE

EGL aliases

public static final int
EGL_GREEN_SIZE

Config attributes

public static final int
EGL_HEIGHT

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_HORIZONTAL_RESOLUTION

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_LARGEST_PBUFFER

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_LEVEL

Config attributes

public static final int
EGL_LUMINANCE_BUFFER

Config attribute values

public static final int
EGL_LUMINANCE_SIZE

Config attributes

public static final int
EGL_MATCH_NATIVE_PIXMAP

Config attributes

public static final int
EGL_MAX_PBUFFER_HEIGHT

Config attributes

public static final int
EGL_MAX_PBUFFER_PIXELS

Config attributes

public static final int
EGL_MAX_PBUFFER_WIDTH

Config attributes

public static final int
EGL_MAX_SWAP_INTERVAL

Config attributes

public static final int
EGL_MIN_SWAP_INTERVAL

Config attributes

public static final int
EGL_MIPMAP_LEVEL

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_MIPMAP_TEXTURE

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_MULTISAMPLE_RESOLVE

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_MULTISAMPLE_RESOLVE_BOX

Multisample resolution behaviors

public static final int
EGL_MULTISAMPLE_RESOLVE_BOX_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_MULTISAMPLE_RESOLVE_DEFAULT

Multisample resolution behaviors

public static final int
EGL_NATIVE_RENDERABLE

Config attributes

public static final int
EGL_NATIVE_VISUAL_ID

Config attributes

public static final int
EGL_NATIVE_VISUAL_TYPE

Config attributes

public static final int
EGL_NO_CONTEXT

Out-of-band handle values

public static final int
EGL_NO_DISPLAY

Out-of-band handle values

public static final int
EGL_NO_SURFACE

Out-of-band handle values

public static final int
EGL_NO_TEXTURE

More config attribute values, for EGL_TEXTURE_FORMAT

public static final int
EGL_NON_CONFORMANT_CONFIG

Config attribute values

public static final int
EGL_NONE

Config attributes

public static final int
EGL_NOT_INITIALIZED

Errors / GetError return values

public static final int
EGL_OPENGL_API

BindAPI/QueryAPI targets

public static final int
EGL_OPENGL_BIT

EGL_RENDERABLE_TYPE mask bits

public static final int
EGL_OPENGL_ES2_BIT

EGL_RENDERABLE_TYPE mask bits

public static final int
EGL_OPENGL_ES_API

BindAPI/QueryAPI targets

public static final int
EGL_OPENGL_ES_BIT

EGL_RENDERABLE_TYPE mask bits

public static final int
EGL_OPENVG_API

BindAPI/QueryAPI targets

public static final int
EGL_OPENVG_BIT

EGL_RENDERABLE_TYPE mask bits

pack-priv static final int
EGL_OPENVG_IMAGE

CreatePbufferFromClientBuffer buffer types

public static final int
EGL_PBUFFER_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_PIXEL_ASPECT_RATIO

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_PIXMAP_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_READ

GetCurrentSurface targets

public static final int
EGL_RED_SIZE

Config attributes

public static final int
EGL_RENDER_BUFFER

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_RENDERABLE_TYPE

Config attributes

public static final int
EGL_RGB_BUFFER

Config attribute values

public static final int
EGL_SAMPLE_BUFFERS

Config attributes

public static final int
EGL_SAMPLES

Config attributes

public static final int
EGL_SINGLE_BUFFER

EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets

public static final int
EGL_SLOW_CONFIG

Config attribute values

public static final int
EGL_STENCIL_SIZE

Config attributes

public static final int
EGL_SUCCESS

Errors / GetError return values

public static final int
EGL_SURFACE_TYPE

Config attributes

public static final int
EGL_SWAP_BEHAVIOR

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_SWAP_BEHAVIOR_PRESERVED_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_TEXTURE_2D

More config attribute values, for EGL_TEXTURE_FORMAT

public static final int
EGL_TEXTURE_FORMAT

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_TEXTURE_RGB

More config attribute values, for EGL_TEXTURE_FORMAT

public static final int
EGL_TEXTURE_RGBA

More config attribute values, for EGL_TEXTURE_FORMAT

public static final int
EGL_TEXTURE_TARGET

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_TRANSPARENT_BLUE_VALUE

Config attributes

public static final int
EGL_TRANSPARENT_GREEN_VALUE

Config attributes

public static final int
EGL_TRANSPARENT_RED_VALUE

Config attributes

public static final int
EGL_TRANSPARENT_RGB

Config attribute values

public static final int
EGL_TRANSPARENT_TYPE

Config attributes

public static final int
EGL_TRUE

EGL aliases

public static final int
EGL_UNKNOWN

Unknown display resolution/aspect ratio

public static final int
EGL_VENDOR

QueryString targets

public static final int
EGL_VERSION

QueryString targets

public static final int
EGL_VERTICAL_RESOLUTION

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_VG_ALPHA_FORMAT

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_VG_ALPHA_FORMAT_NONPRE

OpenVG alpha formats

public static final int
EGL_VG_ALPHA_FORMAT_PRE

OpenVG alpha formats

public static final int
EGL_VG_ALPHA_FORMAT_PRE_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_VG_COLORSPACE

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_VG_COLORSPACE_LINEAR

OpenVG color spaces

public static final int
EGL_VG_COLORSPACE_LINEAR_BIT

EGL_SURFACE_TYPE mask bits

public static final int
EGL_VG_COLORSPACE_sRGB

OpenVG color spaces

public static final int
EGL_WIDTH

QuerySurface / SurfaceAttrib / CreatePbufferSurface targets

public static final int
EGL_WINDOW_BIT

EGL_SURFACE_TYPE mask bits

Constructor Summary

AccessConstructor and Description
private
EGL()

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
public static native boolean

Returns:

true if the bind was successful, false if an EGL error occurs
eglBindAPI
(int
the API to bind
api
)

Binds the specified rendering API to the current thread.

pack-priv static EGLConfig[]

Returns:

the available EGLConfigs that satisfy the attribute list
eglChooseConfig
(EGLDisplay
the EGLDisplay
dpy
,
IntBuffer
the attribute list (may be null)
attrib_list
,
EGLConfig[]
the EGLConfigs array
configs
,
IntBuffer
the number of available EGLConfigs returned
num_config
)

Returns the available EGLConfigs on the speficied display that satisfy the specified list of attributes.

pack-priv static int

Returns:

the number of EGLConfigs available that satisft the attribute list
eglChooseConfigNum
(EGLDisplay
the EGLDisplay
dpy
,
IntBuffer
the attribute list (may be null)
attrib_list
)

Returns the number of EGLConfigs that are available on the specified display and match the speficied list of attributes.

pack-priv static EGLContext

Returns:

the created EGL context
eglCreateContext
(EGLDisplay
the EGL display
dpy
,
EGLConfig
the EGL config
config
,
EGLContext
the EGL context to share data with
share_context
,
IntBuffer
the attribute list (may be null)
attrib_list
)

Creates a new EGL context for the current rendering API.

pack-priv static EGLSurface

Returns:

the created EGL surface
eglCreatePbufferSurface
(EGLDisplay
the EGL display
dpy
,
EGLConfig
the EGL config
config
,
IntBuffer
an attribute list (may be null)
attrib_list
)

Creates an off-screen rendering surface on the specified EGL display.

pack-priv static EGLSurface

Returns:

the created EGL surface
eglCreateWindowSurface
(EGLDisplay
the EGL display
dpy
,
EGLConfig
the EGL config
config
,
long
the native window handle
win
,
IntBuffer
an attribute list (may be null)
attrib_list
)

Creates an on-screen rendering surface on the specified EGL display.

pack-priv static void
eglDestroyContext(EGLDisplay
the EGL display
dpy
,
EGLContext
the EGL context
ctx
)

Destroys a rendering context.

pack-priv static void
eglDestroySurface(EGLDisplay
the EGL display
dpy
,
EGLSurface
the EGL surface to destroy
surface
)

Destroys the specified EGL surface.

pack-priv static int
eglGetConfigAttrib(EGLDisplay
the EGL display
dpy
,
EGLConfig
the EGL config
config
,
int
the attribute
attribute
)

Returns the value of an EGL config attribute.

pack-priv static EGLConfig[]

Returns:

the available EGLConfigs
eglGetConfigs
(EGLDisplay
the EGLDisplay
dpy
,
EGLConfig[]
the EGLConfigs array
configs
,
IntBuffer
the number of available EGLConfigs returned
num_config
)

Returns the available EGLConfigs on the speficied display.

pack-priv static int

Returns:

the number of EGLConfigs available
eglGetConfigsNum
(EGLDisplay
the EGLDisplay
dpy
)

Returns the number of EGLConfigs that are available on the specified display.

public static EGLContext

Returns:

the current context
eglGetCurrentContext
()

Returns the current EGL context for the current rendering API.

public static EGLDisplay

Returns:

the current display
eglGetCurrentDisplay
()

Returns the EGL display associated with the current context.

public static EGLSurface

Returns:

the current surface
eglGetCurrentSurface
(int
the read or draw surface
readdraw
)

Returns the EGL surfaces used for rendering by the current context.

public static EGLDisplay

Returns:

the EGL Display
eglGetDisplay
(long
the handle to the native display.
display_id
)

Obtains an EGL display from the specified native display and initializes it.

public static native int
pack-priv static void
eglInitialize(EGLDisplay
the EGL display to initialize
dpy
,
IntBuffer
the EGL major and minor version will be returned in this buffer.
version
)

Initializes the specified EGL display.

public static boolean

Returns:

true if the EGL context is current
eglIsCurrentContext
(EGLContext
the EGL context
context
)

Returns true if the specified EGL context is the current context.

pack-priv static void
eglMakeCurrent(EGLDisplay
the EGL display
dpy
,
EGLSurface
the draw EGL surface
draw
,
EGLSurface
the read EGL surface
read
,
EGLContext
the EGL context to make current
ctx
)

Binds the specified context to the current thread and to the draw and read surfaces.

public static native int

Returns:

the rendering API bound to the current thread
eglQueryAPI
()

Returns the current rendering API.

public static void
eglQueryContext(EGLDisplay
the EGL display
dpy
,
EGLContext
the EGL context
ctx
,
int
the context attribute
attribute
,
IntBuffer
the attribute value will be returned here
value
)

Returns the value of the specified EGL context attribute in the value parameter.

public static String

Returns:

the description
eglQueryString
(EGLDisplay
the EGL display to query
dpy
,
int
the value to query
name
)

Returns a string describing some aspect of the EGL implementation running on the specified display.

public static void
eglQuerySurface(EGLDisplay
the EGL display
dpy
,
EGLSurface
the EGL surface
surface
,
int
the surface attribute
attribute
,
IntBuffer
the attribute value will be returned here
value
)

Returns the value of the specified EGL surface attribute in the value parameter.

public static void
eglReleaseCurrent(EGLDisplay
the EGL display
dpy
)

Releases the current context without assigning a new one.

pack-priv static native boolean

Returns:

true if thread state was released successfully, false is an EGL error occurs
eglReleaseThread
()

Returns EGL to its state at thread initialization.

pack-priv static void
eglSurfaceAttrib(EGLDisplay
the EGL display
dpy
,
EGLSurface
the EGL surface
surface
,
int
the attribute
attribute
,
int
the attribute value
value
)

Sets the specified EGL surface attribute to the specified value.

pack-priv static void
eglSwapBuffers(EGLDisplay
the EGL display
dpy
,
EGLSurface
the EGL back-buffered window surface
surface
)

Posts the color buffer to the window.

pack-priv static void
eglSwapInterval(EGLDisplay
the EGL display
dpy
,
int
the frame interval
interval
)

Specifies the minimum number of video frame periods per buffer swap for the window associated with the current context.

pack-priv static void
eglTerminate(EGLDisplay
the EGL display to terminate
dpy
)

Release the resources associated with the specified EGL display.

public static native boolean

Returns:

true if the wait was successful, false is an EGL error occurs
eglWaitClient
()

Prevents native rendering API functions from executing until any outstanding client API rendering affecting the same surface is complete.

public static native boolean

Returns:

true if the wait was successful, false if an EGL error occurs
eglWaitGL
()

This method does the equivalent of: EGLenum api = eglQueryAPI(); eglBindAPI(EGL_OPENGL_ES_API); eglWaitClient(); eglBindAPI(api);

public static native boolean

Returns:

true if the wait was successful, false if an EGL error occurs
eglWaitNative
(int
the native rendering engine
engine
)

Prevents a client API command sequence from executing until any outstanding native rendering affecting the same surface is complete.

private static EGLConfig
getEGLConfig(final EGLDisplay dpy, final IntBuffer attrib_list)

private static native boolean
neglChooseConfig(long dpy_ptr, long attrib_list, long configs, int config_size, long num_config)

private static native long
neglCreateContext(long dpy_ptr, long config_ptr, long share_context_ptr, long attrib_list)

private static native long
neglCreatePbufferSurface(long dpy_ptr, long config_ptr, long attrib_list)

private static native long
neglCreateWindowSurface(long dpy_ptr, long config_ptr, long win, long attrib_list)

private static native boolean
neglDestroyContext(long dpy_ptr, long ctx_ptr)

private static native boolean
neglDestroySurface(long dpy_ptr, long surface_ptr)

private static native boolean
neglGetConfigAttrib(long dpy_ptr, long config_ptr, int attribute, long value)

private static native boolean
neglGetConfigs(long dpy_ptr, long configs, int config_size, long num_config)

private static native long
private static native long
private static native long
neglGetCurrentSurface(int readdraw)

private static native long
neglGetDisplay(long display_id)

private static native boolean
neglInitialize(long dpy_ptr, long version)

private static native boolean
neglMakeCurrent(long dpy_ptr, long draw_ptr, long read_ptr, long ctx_ptr)

private static native boolean
neglQueryContext(long dpy_ptr, long ctx_ptr, int attribute, long value)

private static native String
neglQueryString(long dpy, int name)

private static native boolean
neglQuerySurface(long dpy_ptr, long surface_ptr, int attribute, long value)

private static native boolean
neglSurfaceAttrib(long dpy_ptr, long surface_ptr, int attribute, int value)

private static native boolean
neglSwapBuffers(long dpy_ptr, long surface_ptr)

private static native boolean
neglSwapInterval(long dpy_ptr, int interval)

private static native boolean
neglTerminate(long dpy_ptr)

pack-priv static void
throwEGLError(final String msg)

pack-priv static void
throwEGLError(String msg, final int error)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait