Cogl.GLES2Context¶
- Subclasses:
None
Methods¶
- Inherited:
class |
|
|
Virtual Methods¶
None
Fields¶
None
Class Details¶
- class Cogl.GLES2Context¶
- Bases:
- Abstract:
No
Represents an OpenGLES 2.0 api context used as a sandbox for OpenGLES 2.0 state. This is comparable to an EGLContext for those who have used OpenGLES 2.0 with EGL before.
New in version 1.12.
- classmethod new(ctx)¶
- Parameters:
ctx (
Cogl.Context
) – ACogl.Context
- Raises:
- Returns:
A newly allocated
Cogl.GLES2Context
orNone
if there was an error and error will be updated in that case.- Return type:
Allocates a new OpenGLES 2.0 context that can be used to render to #CoglOffscreen framebuffers (Rendering to
Cogl.Onscreen
framebuffers is not currently supported).To actually access the OpenGLES 2.0 api itself you need to use
Cogl.GLES2Context.get_vtable
(). You should not try to directly link to and use the symbols provided by the a system OpenGLES 2.0 driver.Once you have allocated an OpenGLES 2.0 context you can make it current using
Cogl.push_gles2_context
(). For those familiar with using the EGL api, this serves a similar purpose to eglMakeCurrent.Before using this api applications can check for OpenGLES 2.0 api support by checking for
Cogl.FeatureID.OGL_FEATURE_ID_GLES2_CONTEXT
support withCogl.has_feature
(). This function will returnFalse
and return anCogl.GLES2ContextError.UNSUPPORTED
error if the feature isn’t available.New in version 2.0.
- get_vtable()¶
- Returns:
A pointer to a
Cogl.GLES2Vtable
providing pointers to functions for the full OpenGLES 2.0 api.- Return type:
Queries the OpenGLES 2.0 api function pointers that should be used for rendering with the given self.
You should not try to directly link to and use the symbols provided by any system OpenGLES 2.0 driver.
New in version 2.0.