push_gles2_context


Description:

public Bool push_gles2_context (Context ctx, GLES2Context gles2_ctx, Framebuffer read_buffer, Framebuffer write_buffer) throws Error

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 CoglGLES2Vtable is only allowed between push_gles2_context and 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 throws.

Parameters:

ctx

A Context

gles2_ctx

A GLES2Context allocated with GLES2Context

read_buffer

A Framebuffer to access to read operations such as glReadPixels. (must be a CoglOffscreen framebuffer currently)

write_buffer

A 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 throws will be updated.


Namespace: Cogl
Package: doc