Offscreen Framebuffers

Offscreen Framebuffers — Fuctions for creating and manipulating offscreen framebuffers.

Synopsis

CoglHandle          cogl_offscreen_new_to_texture       (CoglTexture *texture);
gboolean            cogl_is_offscreen                   (CoglHandle handle);

Description

Cogl allows creating and operating on offscreen framebuffers.

Details

cogl_offscreen_new_to_texture ()

CoglHandle          cogl_offscreen_new_to_texture       (CoglTexture *texture);

This creates an offscreen buffer object using the given texture as the primary color buffer. It doesn't just initialize the contents of the offscreen buffer with the texture; they are tightly bound so that drawing to the offscreen buffer effectivly updates the contents of the given texture. You don't need to destroy the offscreen buffer before you can use the texture again.

Note: This does not work with sliced Cogl textures.

texture :

A CoglTexture pointer

Returns :

a CoglHandle for the new offscreen buffer or COGL_INVALID_HANDLE if it wasn't possible to create the buffer. [transfer full]

cogl_is_offscreen ()

gboolean            cogl_is_offscreen                   (CoglHandle handle);

Determines whether the given CoglHandle references an offscreen buffer object.

handle :

A CoglHandle for an offscreen buffer

Returns :

TRUE if the handle references an offscreen buffer, FALSE otherwise