Cogl.push_gles2_context
function push_gles2_context(ctx: Cogl.Context, gles2_ctx: Cogl.GLES2Context, read_buffer: Cogl.Framebuffer, write_buffer: Cogl.Framebuffer): Cogl.Bool { // Gjs wrapper for cogl_push_gles2_context() }
Pushes the given gles2_ctx onto a stack associated with ctx so that the OpenGLES 2.0 api can be used instead of the Cogl rendering apis to read and write to the specified framebuffers.
Usage of the api available through a Cogl.GLES2Vtable is only allowed between Cogl.push_gles2_context and Cogl.pop_gles2_context calls.
If there is a runtime problem with switching over to the given gles2_ctx then this function will return false and return an error through @error.
Since 2.0
- ctx
- gles2_ctx
A Cogl.GLES2Context allocated with Cogl.GLES2Context.new
- read_buffer
A Cogl.Framebuffer to access to read operations such as glReadPixels. (must be a #CoglOffscreen framebuffer currently)
- write_buffer
A Cogl.Framebuffer to access for drawing operations such as glDrawArrays. (must be a #CoglOffscreen framebuffer currently)
- Returns
true if operation was successfull or false otherwise and @error will be updated.