Name

eglQuerySurface - return EGL surface information

C Specification

EGLBoolean eglQuerySurface(EGLDisplay display,
    EGLSurface surface,
    EGLint attribute,
    EGLint * value)

Parameters

display

Specifies the EGL display connection.

surface

Specifies the EGL surface to query.

attribute

Specifies the EGL surface attribute to be returned.

value

Returns the requested value.

Description

eglQuerySurface returns in value the value of attribute for surface. attribute can be one of the following:

EGL_CONFIG_ID

Returns the ID of the EGL frame buffer configuration with respect to which the surface was created.

EGL_WIDTH

Returns the width of the surface in pixels.

EGL_HEIGHT

Returns the height of the surface in pixels.

EGL_LARGEST_PBUFFER

Returns the same attribute value specified when the surface was created with eglCreatePbufferSurface. For a window or pixmap surface, value is not modified.

EGL_TEXTURE_FORMAT

Returns format of texture. Possible values are EGL_NO_TEXTURE, EGL_TEXTURE_RGB, and EGL_TEXTURE_RGBA.

EGL_TEXTURE_TARGET

Returns type of texture. Possible values are EGL_NO_TEXTURE, or EGL_TEXTURE_2D.

EGL_MIPMAP_TEXTURE

Returns EGL_TRUE if texture has mipmaps, EGL_FALSE otherwise.

EGL_MIPMAP_LEVEL

Returns which level of the mipmap to render to, if texture has mipmaps.

Notes

Querying EGL_TEXTURE_FORMAT, EGL_TEXTURE_TARGET, EGL_MIPMAP_TEXTURE, or EGL_MIPMAP_LEVEL for a non-pbuffer surface is not an error, but value is not modified.

Errors

EGL_FALSE is returned on failure, EGL_TRUE otherwise. value is not modified when EGL_FALSE is returned.

EGL_BAD_DISPLAY is generated if display is not an EGL display connection.

EGL_NOT_INITIALIZED is generated if display has not been initialized.

EGL_BAD_SURFACE is generated if surface is not an EGL surface.

EGL_BAD_ATTRIBUTE is generated if attribute is not a valid surface attribute.

Copyright

Copyright © 2003-2004 Silicon Graphics, Inc.

This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.

See Also

eglCreatePbufferSurface, eglCreatePixmapSurface, eglCreateWindowSurface, eglSurfaceAttrib