egl.h File Reference

EGL_VERSION_1_0

EGL_VERSION_1_1

EGL_VERSION_1_2

EGL_VERSION_1_3

EGL_VERSION_1_4

EGL_FALSE

EGL_TRUE

EGL_DONT_CARE

EGL_SUCCESS

EGL_NOT_INITIALIZED

EGL_BAD_ACCESS

EGL_BAD_ALLOC

EGL_BAD_ATTRIBUTE

EGL_BAD_CONFIG

EGL_BAD_CONTEXT

EGL_BAD_CURRENT_SURFACE

EGL_BAD_DISPLAY

EGL_BAD_MATCH

EGL_BAD_NATIVE_PIXMAP

EGL_BAD_NATIVE_WINDOW

EGL_BAD_PARAMETER

EGL_BAD_SURFACE

EGL_CONTEXT_LOST

EGL_BUFFER_SIZE

EGL_ALPHA_SIZE

EGL_BLUE_SIZE

EGL_GREEN_SIZE

EGL_RED_SIZE

EGL_DEPTH_SIZE

EGL_STENCIL_SIZE

EGL_CONFIG_CAVEAT

EGL_CONFIG_ID

EGL_LEVEL

EGL_MAX_PBUFFER_HEIGHT

EGL_MAX_PBUFFER_PIXELS

EGL_MAX_PBUFFER_WIDTH

EGL_NATIVE_RENDERABLE

EGL_NATIVE_VISUAL_ID

EGL_NATIVE_VISUAL_TYPE

EGL_PRESERVED_RESOURCES

EGL_SAMPLES

EGL_SAMPLE_BUFFERS

EGL_SURFACE_TYPE

EGL_TRANSPARENT_TYPE

EGL_TRANSPARENT_BLUE_VALUE

EGL_TRANSPARENT_GREEN_VALUE

EGL_TRANSPARENT_RED_VALUE

EGL_NONE

EGL_BIND_TO_TEXTURE_RGB

EGL_BIND_TO_TEXTURE_RGBA

EGL_MIN_SWAP_INTERVAL

EGL_MAX_SWAP_INTERVAL

EGL_LUMINANCE_SIZE

EGL_ALPHA_MASK_SIZE

EGL_COLOR_BUFFER_TYPE

EGL_RENDERABLE_TYPE

EGL_MATCH_NATIVE_PIXMAP

EGL_CONFORMANT

EGL_SLOW_CONFIG

EGL_NON_CONFORMANT_CONFIG

EGL_TRANSPARENT_RGB

EGL_RGB_BUFFER

EGL_LUMINANCE_BUFFER

EGL_NO_TEXTURE

EGL_TEXTURE_RGB

EGL_TEXTURE_RGBA

EGL_TEXTURE_2D

EGL_PBUFFER_BIT

EGL_PIXMAP_BIT

EGL_WINDOW_BIT

EGL_VG_COLORSPACE_LINEAR_BIT

EGL_VG_ALPHA_FORMAT_PRE_BIT

EGL_MULTISAMPLE_RESOLVE_BOX_BIT

EGL_SWAP_BEHAVIOR_PRESERVED_BIT

EGL_OPENGL_ES_BIT

EGL_OPENVG_BIT

EGL_OPENGL_ES2_BIT

EGL_OPENGL_BIT

EGL_VENDOR

EGL_VERSION

EGL_EXTENSIONS

EGL_CLIENT_APIS

EGL_HEIGHT

EGL_WIDTH

EGL_LARGEST_PBUFFER

EGL_TEXTURE_FORMAT

EGL_TEXTURE_TARGET

EGL_MIPMAP_TEXTURE

EGL_MIPMAP_LEVEL

EGL_RENDER_BUFFER

EGL_VG_COLORSPACE

EGL_VG_ALPHA_FORMAT

EGL_HORIZONTAL_RESOLUTION

EGL_VERTICAL_RESOLUTION

EGL_PIXEL_ASPECT_RATIO

EGL_SWAP_BEHAVIOR

EGL_MULTISAMPLE_RESOLVE

EGL_BACK_BUFFER

EGL_SINGLE_BUFFER

EGL_VG_COLORSPACE_sRGB

EGL_VG_COLORSPACE_LINEAR

EGL_VG_ALPHA_FORMAT_NONPRE

EGL_VG_ALPHA_FORMAT_PRE

EGL_DISPLAY_SCALING

EGL_UNKNOWN

EGL_BUFFER_PRESERVED

EGL_BUFFER_DESTROYED

EGL_OPENVG_IMAGE

EGL_CONTEXT_CLIENT_TYPE

EGL_CONTEXT_CLIENT_VERSION

EGL_MULTISAMPLE_RESOLVE_DEFAULT

EGL_MULTISAMPLE_RESOLVE_BOX

EGL_OPENGL_ES_API

EGL_OPENVG_API

EGL_OPENGL_API

EGL_DRAW

EGL_READ

EGL_CORE_NATIVE_ENGINE

EGL_COLORSPACE

EGL_ALPHA_FORMAT

EGL_COLORSPACE_sRGB

EGL_COLORSPACE_LINEAR

EGL_ALPHA_FORMAT_NONPRE

EGL_ALPHA_FORMAT_PRE

eglGetError ( void )

EGLAPI EGLint EGLAPIENTRYeglGetError(void)

Get the error message for the previous call to EGL.

Note:

This function returns only the error code of the previous call from the same thread to EGL and resets the error state for the current thread to EGL_SUCCESS.

Return Value
One of error tokens listed in egl.h

eglGetDisplay ( EGLNativeDisplayType )

EGLAPI EGLDisplay EGLAPIENTRYeglGetDisplay(EGLNativeDisplayTypedisplay_id)

Get a display handle.

Parameters
display_idDisplay ID.
Return Value
Returns a handle to the display (or EGL_NO_DISPLAY).

eglInitialize ( EGLDisplay, EGLint *, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglInitialize(EGLDisplaydpy,
EGLint *major,
EGLint *minor
)

Initialize EGL.

Parameters
dpyDisplay handle.
majorPointer to major version return value (may be NULL).
minorPointer to minor version return value (may be NULL).
Return Value
EGL_TRUE on success, EGL_FALSE otherwise

eglTerminate ( EGLDisplay )

EGLAPI EGLBoolean EGLAPIENTRYeglTerminate(EGLDisplaydpy)

Terminate EGL.

Parameters
dpyDisplay handle.
Return Value
Returns true on success, false otherwise.

eglQueryString ( EGLDisplay, EGLint )

EGLAPI const char *EGLAPIENTRYeglQueryString(EGLDisplaydpy,
EGLintname
)

Get a string.

Parameters
dpyDisplay handle.
nameName of string.
Return Value
Pointer to the queried string (or NULL in case of error).

eglGetConfigs ( EGLDisplay, EGLConfig *, EGLint, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglGetConfigs(EGLDisplaydpy,
EGLConfig *configs,
EGLintconfig_size,
EGLint *num_config
)

Get an array of config IDs.

Parameters
dpyDisplay handle.
configsPointer to returned config IDs (may be NULL).
config_sizeMaximum number of config IDs to return.
num_configPointer to number of valid config IDs in 'configs'.
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

eglChooseConfig ( EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglChooseConfig(EGLDisplaydpy,
const EGLint *attrib_list,
EGLConfig *configs,
EGLintconfig_size,
EGLint *num_config
)

Choose an array of config IDs.

Parameters
dpyDisplay handle.
attrib_listAttribute list.
configsArray of returned config IDs.
config_sizeMaximum number of config IDs to return.
num_configPointer to number of valid config IDs in 'configs'.
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

eglGetConfigAttrib ( EGLDisplay, EGLConfig, EGLint, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglGetConfigAttrib(EGLDisplaydpy,
EGLConfigconfig,
EGLintattribute,
EGLint *value
)

Gets a configuration attribute.

Parameters
dpyDisplay handle.
configConfig to use.
attributeAttribute to query.
valuePointer to returned value (may be NULL).
Return Value
Returns true if operations succeeds, false otherwise.

eglCreateWindowSurface ( EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint * )

EGLAPI EGLSurface EGLAPIENTRYeglCreateWindowSurface(EGLDisplaydpy,
EGLConfigconfig,
EGLNativeWindowTypewin,
const EGLint *attrib_list
)

Create a window surface.

Todo[sampo 26/May/05] attribList can contain one value: EGL_RENDER_BUFFER, which can be either EGL_SINGLE_BUFFER or EGL_BACK_BUFFER defaulting to the latter. OpenGL ES renders always in the back buffer whereas OpenVG must be able to do both

Parameters
dpyDisplay handle.
configConfiguration to use.
winNative window type.
attrib_listPointer to attribute list.
Return Value
Returns a handle to the created surface (or EGL_NO_SURFACE).

eglCreatePbufferSurface ( EGLDisplay, EGLConfig, const EGLint * )

EGLAPI EGLSurface EGLAPIENTRYeglCreatePbufferSurface(EGLDisplaydpy,
EGLConfigconfig,
const EGLint *attrib_list
)

Creates a PBuffer surface.

Parameters
dpyDisplay handle.
configconfig to use.
attrib_listList of attributes. (accepts none)
Return Value
Returns a handle to the created surface (or EGL_NO_SURFACE).

eglCreatePixmapSurface ( EGLDisplay, EGLConfig, EGLNativePixmapType, const EGLint * )

EGLAPI EGLSurface EGLAPIENTRYeglCreatePixmapSurface(EGLDisplaydpy,
EGLConfigconfig,
EGLNativePixmapTypepixmap,
const EGLint *attrib_list
)

Creates a pixmap surface.

Parameters
dpyDisplay handle.
configConfig handle.
pixmapNative pixmap surface.
attrib_listList of attributes.
Return Value
Returns a handle to the created surface (or EGL_NO_SURFACE).

eglDestroySurface ( EGLDisplay, EGLSurface )

EGLAPI EGLBoolean EGLAPIENTRYeglDestroySurface(EGLDisplaydpy,
EGLSurfacesurface
)

Destroy given surface.

Parameters
dpyDisplay handle.
surfaceSurface handle.
Return Value
EGL_TRUE on success, EGL_FALSE otherwise.

eglQuerySurface ( EGLDisplay, EGLSurface, EGLint, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglQuerySurface(EGLDisplaydpy,
EGLSurfacesurface,
EGLintattribute,
EGLint *value
)

Query a surface attribute.

Parameters
dpyDisplay handle.
surfaceSurface handle.
attributeAttribute to query.
valuePointer to returned value (may be NULL).
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

eglBindAPI ( EGLenum )

EGLAPI EGLBoolean EGLAPIENTRYeglBindAPI(EGLenumapi)

Bind a client API.

Parameters
apiEither EGL_OPENGL_ES_API or EGL_OPENVG_API.
Return Value
Returns TRUE upon success, FALSE otherwise.

eglQueryAPI ( void )

EGLAPI EGLenum EGLAPIENTRYeglQueryAPI(void)

Queries the bound client API.

Return Value
Returns the client API enum. Either ES, VG or NONE.

eglWaitClient ( void )

EGLAPI EGLBoolean EGLAPIENTRYeglWaitClient(void)

Wait a Client API renderer.

Todo[sampo 23/May/05] is there enough error checking?

Return Value
Returns true on success, false otherwise.

eglReleaseThread ( void )

EGLAPI EGLBoolean EGLAPIENTRYeglReleaseThread(void)

Release Thread specific state.

Return Value
EGL_TRUE on success.

eglCreatePbufferFromClientBuffer ( EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint * )

EGLAPI EGLSurface EGLAPIENTRYeglCreatePbufferFromClientBuffer(EGLDisplaydpy,
EGLenumbuftype,
EGLClientBufferbuffer,
EGLConfigconfig,
const EGLint *attrib_list
)

Creates a pbuffer from a given client buffer.

Parameters
dpyDisplay handle.
buftypeThe type of the client buffer. Only VGImage is supported currently
bufferThe client buffer
configConfig handle
attrib_listlist of attributes
Return Value
Returns a handle to the created surface (or EGL_NO_SURFACE).

eglSurfaceAttrib ( EGLDisplay, EGLSurface, EGLint, EGLint )

EGLAPI EGLBoolean EGLAPIENTRYeglSurfaceAttrib(EGLDisplaydpy,
EGLSurfacesurface,
EGLintattribute,
EGLintvalue
)

Sets an attribute of a surface.

Parameters
dpyDisplay handle.
surfaceSurface handle.
attributeThe attribute to be set.
valueThe value to set the attribute to.
Return Value
EGL_TRUE on success, EGL_FALSE otherwise.

eglBindTexImage ( EGLDisplay, EGLSurface, EGLint )

EGLAPI EGLBoolean EGLAPIENTRYeglBindTexImage(EGLDisplaydpy,
EGLSurfacesurface,
EGLintbuffer
)

Binds an EGL pixel buffer surface as an Open GLES texture.

Todo[sampo 25/May/05] Finish the comment box. Jaska?

Parameters
dpyDisplay handle.
surfaceSurface handle.
Return Value
Returns true on success, false otherwise.

eglReleaseTexImage ( EGLDisplay, EGLSurface, EGLint )

EGLAPI EGLBoolean EGLAPIENTRYeglReleaseTexImage(EGLDisplaydpy,
EGLSurfacesurface,
EGLintbuffer
)

Release a pixel buffer from an OpenGLES texture.

Todo[sampo 25/May/05] Finish the comment box. Jaska?

Parameters
dpyDisplay handle.
surfaceSurface handle.
Return Value
Returns true on success, false otherwise.

eglSwapInterval ( EGLDisplay, EGLint )

EGLAPI EGLBoolean EGLAPIENTRYeglSwapInterval(EGLDisplaydpy,
EGLintinterval
)

Specify the minimum number of video frame periods per buffer swap.

Todo[jasinb 20/Jul/04] Proper implementation.
Note:

This is a no-op, but a legal one, since we have defined the implementation specific boundaries (EGL_MIN/MAX_SWAP_INTERVAL) both to be 1.

Parameters
dpyDisplay handle.
intervalMinimum number of video frames
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise

eglCreateContext ( EGLDisplay, EGLConfig, EGLContext, const EGLint * )

EGLAPI EGLContext EGLAPIENTRYeglCreateContext(EGLDisplaydpy,
EGLConfigconfig,
EGLContextshare_context,
const EGLint *attrib_list
)

Create a context.

Parameters
dpyDisplay handle.
configConfiguration ID.
share_contextContext to share texture objects with. (currently unsupported)
attrib_listList of attributes.
Return Value
Returns a handle to the created context or EGL_NO_CONTEXT on failure.

eglDestroyContext ( EGLDisplay, EGLContext )

EGLAPI EGLBoolean EGLAPIENTRYeglDestroyContext(EGLDisplaydpy,
EGLContextctx
)

Destroy context.

Parameters
dpyDisplay handle.
ctxContext handle.
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

eglMakeCurrent ( EGLDisplay, EGLSurface, EGLSurface, EGLContext )

EGLAPI EGLBoolean EGLAPIENTRYeglMakeCurrent(EGLDisplaydpy,
EGLSurfacedraw,
EGLSurfaceread,
EGLContextctx
)

Set the current context and read/draw surfaces.

Parameters
dpyDisplay handle.
drawDraw surface handle.
readRead surface handle.
ctxContext handle.
Return Value
Returns true on success, false otherwise.

eglGetCurrentContext ( void )

EGLAPI EGLContext EGLAPIENTRYeglGetCurrentContext(void)

Get current render context.

Return Value
Returns the handle to current render context.

eglGetCurrentSurface ( EGLint )

EGLAPI EGLSurface EGLAPIENTRYeglGetCurrentSurface(EGLintreaddraw)

Get a render surface.

Parameters
readdrawwhich one of the read or draw surfaces to query
Return Value
Returns the handle to current rendering surface.

eglGetCurrentDisplay ( void )

EGLAPI EGLDisplay EGLAPIENTRYeglGetCurrentDisplay(void)

Get the currently active display.

Todo[teemu 15/Sep/05] Set current display on per thread basis

Return Value
Returns the currently active display.

eglQueryContext ( EGLDisplay, EGLContext, EGLint, EGLint * )

EGLAPI EGLBoolean EGLAPIENTRYeglQueryContext(EGLDisplaydpy,
EGLContextctx,
EGLintattribute,
EGLint *value
)

Query context parameter.

Parameters
dpyDisplay handle.
ctxContext handle.
attributeAttribute to query (must be EGL_CONFIG_ID for EGL 1.0-1,1 and additionally EGL_CONTEXT_CLIENT_TYPE for EGL 1.2 and EGL_CONTEXT_CLIENT_VERSION).
valuePointer to returned value.
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

eglWaitGL ( void )

EGLAPI EGLBoolean EGLAPIENTRYeglWaitGL(void)

Wait for the GL renderer.

Todo[jussi 25/May/05] add a call to glFinish?

Return Value
Returns true on success, false otherwise.

eglWaitNative ( EGLint )

EGLAPI EGLBoolean EGLAPIENTRYeglWaitNative(EGLintengine)

Wait a native engine.

Todo[jussi 25/May/05] implement this one?

Parameters
engineEngine identifier.
Return Value
Returns true on success, false otherwise.

eglSwapBuffers ( EGLDisplay, EGLSurface )

EGLAPI EGLBoolean EGLAPIENTRYeglSwapBuffers(EGLDisplaydpy,
EGLSurfacesurface
)

Swap back buffer to front.

Todo[petri 15/Oct/03] Super-sampling? [jussi 25/May/05] OpenVG allows dithering of higher bit depth surface to lower bit depth display. Makes sense when rendering to 1-bit displays. Add support for this one if we ever encounter them anymore.

Parameters
dpyDisplay handle.
surfaceSurface handle.
Return Value
Returns true on success, false otherwise.

eglCopyBuffers ( EGLDisplay, EGLSurface, EGLNativePixmapType )

EGLAPI EGLBoolean EGLAPIENTRYeglCopyBuffers(EGLDisplaydpy,
EGLSurfacesurface,
EGLNativePixmapTypetarget
)

Copy draw color buffer into native pixmap.

Parameters
dpyDisplay handle.
surfaceSurface handle to copy.
targetDestination pixmap for copy.
Return Value
Returns EGL_TRUE on success, EGL_FALSE otherwise.

EGLAPIENTRY

EGLAPI void(*)(...)EGLAPIENTRY