eglCreateContext
- create a new EGL rendering context
EGLContext eglCreateContext(EGLDisplay display, EGLConfig config, EGLContext share_context, 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 rendering context.
share_context
Specifies the EGL rendering context with which to share texture objects. EGL_NO_CONTEXT
indicates that no sharing is to take place.
attrib_list
Specifies attributes.
eglCreateContext
creates an EGL rendering context and returns its handle. This context can be used to render into an EGL drawing surface. If eglCreateContext
fails to create a rendering context, EGL_NO_CONTEXT
is returned.
If share_context
is not EGL_NO_CONTEXT
, then all texture objects except object 0, are shared by context share_context
and by the newly created context. An arbitrary number of rendering contexts can share a single texture object space. However, all rendering contexts that share a single texture object space must themselves exist in the same address space. Two rendering contexts share an address space if both are owned by a single process.
A process is a single execution environment, implemented in a single address space, consisting of one or more threads.
A thread is one of a set of subprocesses that share a single address space, but maintain separate program counters, stack spaces, and other related global data. A thread is the only member of its subprocess group is equivalent to a process.
EGL_NO_CONTEXT
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_CONTEXT
is generated if share_context
is not an EGL rendering context and is not EGL_NO_CONTEXT
.
EGL_BAD_ATTRIBUTE
is generated if attrib_list
contains an invalid context attribute or if an attribute is not recognized or out of range.
EGL_BAD_ALLOC
is generated if there are not enough resources to allocate the new context.
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/.
eglDestroyContext
, eglChooseConfig
, eglGetConfigs
, eglMakeCurrent