## Offscreen Framebuffers Offscreen Framebuffers — Functions for creating and manipulating offscreen framebuffers. |

## Synopsis

                        CoglOffscreen;
    CoglBool            cogl_is_offscreen                   (void *object);

    CoglOffscreen *     cogl_offscreen_new_to_texture       (CoglTexture *texture);

## Description

Cogl allows creating and operating on offscreen framebuffers.

## Details

### CoglOffscreen

    typedef struct _CoglOffscreen CoglOffscreen;

### cogl_is_offscreen ()

    CoglBool            cogl_is_offscreen                   (void *object);

Determines whether the given CoglObject references an offscreen framebuffer object.

`object` : | A pointer to a CoglObject
Returns : | `TRUE` if `object` is a CoglOffscreen framebuffer, `FALSE` otherwise

### cogl_offscreen_new_to_texture ()

    CoglOffscreen *     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 only works with low-level CoglTexture types such as CoglTexture2D, CoglTexture3D and CoglTextureRectangle, and not with meta-texture types such as CoglTexture2DSliced.

`texture` : | A CoglTexture pointer
Returns : | a newly instantiated CoglOffscreen framebuffer or `NULL` if it wasn't possible to create the buffer. [transfer full]