GLES2Context


Description:

public GLES2Context (Context ctx) throws Error

Allocates a new OpenGLES 2.0 context that can be used to render to CoglOffscreen framebuffers (Rendering to Onscreen framebuffers is not currently supported).

To actually access the OpenGLES 2.0 api itself you need to use cogl_gles2_context_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 push_gles2_context. For those familiar with using the EGL api, this serves a similar purpose to eglMakeCurrent.

<note>Before using this api applications can check for OpenGLES 2.0 api support by checking for cogl_feature_id_gles2_context support with has_feature. This function will return false and return an cogl_gles2_context_error_unsupported error if the feature isn't available.</note>

Parameters:

ctx

A Context

Returns:

A newly allocated GLES2Context or null if there was an error and throws will be updated in that case.