eglCreateWindowSurface
- create a new EGL window surface
EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, NativeWindowType native_window, EGLint const * attrib_list)
display
Specifies the EGL display connection.
config
Specifies the EGL frame buffer configuration that defines the frame buffer resource available to the surface.
native_window
Specifies the native window.
attrib_list
Specifies window surface attributes. Must be NULL
or empty (first attribute is EGL_NONE
).
eglCreateWindowSurface
creates an EGL window surface and returns its handle. If eglCreateWindowSurface
fails to create a window surface, EGL_NO_SURFACE
is returned.
Any EGL rendering context that was created with respect to config
can be used to render into the surface. Use eglMakeCurrent
to attach an EGL rendering context to the surface.
Use eglQuerySurface
to retrieve the ID of config
.
Use eglDestroySurface
to destroy the surface.
EGL_NO_SURFACE
is returned if creation of the context fails.
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_CONFIG
is generated if config
is not an EGL frame buffer configuration.
EGL_BAD_NATIVE_WINDOW
may be generated if native_window
is not a valid native window.
EGL_BAD_ATTRIBUTE
is generated if attrib_list
contains an invalid window attribute or if an attribute value is not recognized or is out of range.
EGL_BAD_ALLOC
is generated if there are not enough resources to allocate the new surface.
EGL_BAD_MATCH
is generated if the attributes of native_window
do not correspond to config
or if config
does not support rendering to windows (the EGL_SURFACE_TYPE
attribute does not contain EGL_WINDOW_BIT
).
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/.
eglDestroySurface
, eglChooseConfig
, eglGetConfigs
, eglMakeCurrent
, eglQuerySurface