framebuffer: Replace CoglHandle with CoglFramebuffer *

One more object converted to stop using CoglHandle re:a8c8cbee513
This commit is contained in:
Robert Bragg 2010-07-07 14:41:54 +01:00
parent 9b9e764dc1
commit 1dd174add3
7 changed files with 88 additions and 110 deletions

View File

@ -46,7 +46,7 @@ cogl_clip_push_window_rectangle (int x_offset,
int width, int width,
int height) int height)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
CoglHandle stack; CoglHandle stack;
@ -133,7 +133,7 @@ cogl_clip_push_rectangle (float x_1,
float x_2, float x_2,
float y_2) float y_2)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
CoglHandle stack; CoglHandle stack;
CoglMatrix modelview_matrix; CoglMatrix modelview_matrix;
@ -178,7 +178,7 @@ cogl_clip_push (float x_offset,
void void
cogl_clip_push_from_path_preserve (void) cogl_clip_push_from_path_preserve (void)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
CoglHandle stack; CoglHandle stack;
CoglMatrix modelview_matrix; CoglMatrix modelview_matrix;
@ -229,7 +229,7 @@ _cogl_clip_pop_real (CoglClipState *clip_state)
void void
cogl_clip_pop (void) cogl_clip_pop (void)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -292,7 +292,7 @@ _cogl_clip_stack_save_real (CoglClipState *clip_state)
void void
cogl_clip_stack_save (void) cogl_clip_stack_save (void)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -328,7 +328,7 @@ _cogl_clip_stack_restore_real (CoglClipState *clip_state)
void void
cogl_clip_stack_restore (void) cogl_clip_stack_restore (void)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -368,7 +368,7 @@ _cogl_clip_state_dirty (CoglClipState *clip_state)
CoglHandle CoglHandle
_cogl_get_clip_stack (void) _cogl_get_clip_stack (void)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
_COGL_GET_CONTEXT (ctx, COGL_INVALID_HANDLE); _COGL_GET_CONTEXT (ctx, COGL_INVALID_HANDLE);
@ -382,7 +382,7 @@ _cogl_get_clip_stack (void)
void void
_cogl_set_clip_stack (CoglHandle handle) _cogl_set_clip_stack (CoglHandle handle)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglClipState *clip_state; CoglClipState *clip_state;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);

View File

@ -33,9 +33,9 @@ typedef enum _CoglFramebufferType {
COGL_FRAMEBUFFER_TYPE_OFFSCREEN COGL_FRAMEBUFFER_TYPE_OFFSCREEN
} CoglFramebufferType; } CoglFramebufferType;
typedef struct struct _CoglFramebuffer
{ {
CoglHandleObject _parent; CoglObject _parent;
CoglFramebufferType type; CoglFramebufferType type;
int width; int width;
int height; int height;
@ -54,7 +54,7 @@ typedef struct
int blue_bits; int blue_bits;
int green_bits; int green_bits;
int alpha_bits; int alpha_bits;
} CoglFramebuffer; };
#define COGL_FRAMEBUFFER(X) ((CoglFramebuffer *)(X)) #define COGL_FRAMEBUFFER(X) ((CoglFramebuffer *)(X))
@ -79,40 +79,41 @@ void
_cogl_framebuffer_state_init (void); _cogl_framebuffer_state_init (void);
int int
_cogl_framebuffer_get_width (CoglHandle handle); _cogl_framebuffer_get_width (CoglFramebuffer *framebuffer);
int int
_cogl_framebuffer_get_height (CoglHandle handle); _cogl_framebuffer_get_height (CoglFramebuffer *framebuffer);
CoglClipState * CoglClipState *
_cogl_framebuffer_get_clip_state (CoglHandle handle); _cogl_framebuffer_get_clip_state (CoglFramebuffer *framebuffer);
void void
_cogl_framebuffer_set_viewport (CoglHandle handle, _cogl_framebuffer_set_viewport (CoglFramebuffer *framebuffer,
int x, int x,
int y, int y,
int width, int width,
int height); int height);
int int
_cogl_framebuffer_get_viewport_x (CoglHandle handle); _cogl_framebuffer_get_viewport_x (CoglFramebuffer *framebuffer);
int int
_cogl_framebuffer_get_viewport_y (CoglHandle handle); _cogl_framebuffer_get_viewport_y (CoglFramebuffer *framebuffer);
int int
_cogl_framebuffer_get_viewport_width (CoglHandle handle); _cogl_framebuffer_get_viewport_width (CoglFramebuffer *framebuffer);
int int
_cogl_framebuffer_get_viewport_height (CoglHandle handle); _cogl_framebuffer_get_viewport_height (CoglFramebuffer *framebuffer);
void void
_cogl_framebuffer_get_viewport4fv (CoglHandle handle, int *viewport); _cogl_framebuffer_get_viewport4fv (CoglFramebuffer *framebuffer,
int *viewport);
CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_modelview_stack (CoglHandle handle); _cogl_framebuffer_get_modelview_stack (CoglFramebuffer *framebuffer);
CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_projection_stack (CoglHandle handle); _cogl_framebuffer_get_projection_stack (CoglFramebuffer *framebuffer);
typedef enum _CoglFramebufferFlushFlags typedef enum _CoglFramebufferFlushFlags
{ {
@ -124,13 +125,13 @@ typedef enum _CoglFramebufferFlushFlags
} CoglFramebufferFlushFlags; } CoglFramebufferFlushFlags;
void void
_cogl_framebuffer_flush_state (CoglHandle handle, _cogl_framebuffer_flush_state (CoglFramebuffer *framebuffer,
CoglFramebufferFlushFlags flags); CoglFramebufferFlushFlags flags);
CoglHandle CoglHandle
_cogl_onscreen_new (void); _cogl_onscreen_new (void);
CoglHandle CoglFramebuffer *
_cogl_get_framebuffer (void); _cogl_get_framebuffer (void);
GSList * GSList *

View File

@ -29,6 +29,7 @@
#include "cogl-internal.h" #include "cogl-internal.h"
#include "cogl-context.h" #include "cogl-context.h"
#include "cogl-handle.h" #include "cogl-handle.h"
#include "cogl-object-private.h"
#include "cogl-util.h" #include "cogl-util.h"
#include "cogl-texture-private.h" #include "cogl-texture-private.h"
#include "cogl-framebuffer-private.h" #include "cogl-framebuffer-private.h"
@ -112,21 +113,21 @@ static void _cogl_framebuffer_free (CoglFramebuffer *framebuffer);
static void _cogl_onscreen_free (CoglOnscreen *onscreen); static void _cogl_onscreen_free (CoglOnscreen *onscreen);
static void _cogl_offscreen_free (CoglOffscreen *offscreen); static void _cogl_offscreen_free (CoglOffscreen *offscreen);
COGL_HANDLE_DEFINE (Onscreen, onscreen); COGL_OBJECT_DEFINE (Onscreen, onscreen);
COGL_HANDLE_DEFINE (Offscreen, offscreen); COGL_OBJECT_DEFINE (Offscreen, offscreen);
/* XXX: /* XXX:
* The CoglHandle macros don't support any form of inheritance, so for * The CoglObject macros don't support any form of inheritance, so for
* now we implement the CoglHandle support for the CoglFramebuffer * now we implement the CoglObject support for the CoglFramebuffer
* abstract class manually. * abstract class manually.
*/ */
gboolean gboolean
cogl_is_framebuffer (CoglHandle handle) cogl_is_framebuffer (void *object)
{ {
CoglHandleObject *obj = (CoglHandleObject *)handle; CoglHandleObject *obj = object;
if (handle == COGL_INVALID_HANDLE) if (obj == NULL)
return FALSE; return FALSE;
return obj->klass->type == _cogl_handle_onscreen_get_type () return obj->klass->type == _cogl_handle_onscreen_get_type ()
@ -169,36 +170,30 @@ _cogl_framebuffer_free (CoglFramebuffer *framebuffer)
} }
int int
_cogl_framebuffer_get_width (CoglHandle handle) _cogl_framebuffer_get_width (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->width; return framebuffer->width;
} }
int int
_cogl_framebuffer_get_height (CoglHandle handle) _cogl_framebuffer_get_height (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->height; return framebuffer->height;
} }
CoglClipState * CoglClipState *
_cogl_framebuffer_get_clip_state (CoglHandle handle) _cogl_framebuffer_get_clip_state (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return &framebuffer->clip_state; return &framebuffer->clip_state;
} }
void void
_cogl_framebuffer_set_viewport (CoglHandle handle, _cogl_framebuffer_set_viewport (CoglFramebuffer *framebuffer,
int x, int x,
int y, int y,
int width, int width,
int height) int height)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
if (framebuffer->viewport_x == x && if (framebuffer->viewport_x == x &&
@ -219,37 +214,32 @@ _cogl_framebuffer_set_viewport (CoglHandle handle,
} }
int int
_cogl_framebuffer_get_viewport_x (CoglHandle handle) _cogl_framebuffer_get_viewport_x (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->viewport_x; return framebuffer->viewport_x;
} }
int int
_cogl_framebuffer_get_viewport_y (CoglHandle handle) _cogl_framebuffer_get_viewport_y (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->viewport_y; return framebuffer->viewport_y;
} }
int int
_cogl_framebuffer_get_viewport_width (CoglHandle handle) _cogl_framebuffer_get_viewport_width (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->viewport_width; return framebuffer->viewport_width;
} }
int int
_cogl_framebuffer_get_viewport_height (CoglHandle handle) _cogl_framebuffer_get_viewport_height (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->viewport_height; return framebuffer->viewport_height;
} }
void void
_cogl_framebuffer_get_viewport4fv (CoglHandle handle, int *viewport) _cogl_framebuffer_get_viewport4fv (CoglFramebuffer *framebuffer, int *viewport)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
viewport[0] = framebuffer->viewport_x; viewport[0] = framebuffer->viewport_x;
viewport[1] = framebuffer->viewport_y; viewport[1] = framebuffer->viewport_y;
viewport[2] = framebuffer->viewport_width; viewport[2] = framebuffer->viewport_width;
@ -257,16 +247,14 @@ _cogl_framebuffer_get_viewport4fv (CoglHandle handle, int *viewport)
} }
CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_modelview_stack (CoglHandle handle) _cogl_framebuffer_get_modelview_stack (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->modelview_stack; return framebuffer->modelview_stack;
} }
CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_projection_stack (CoglHandle handle) _cogl_framebuffer_get_projection_stack (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (handle);
return framebuffer->projection_stack; return framebuffer->projection_stack;
} }
@ -501,7 +489,7 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
cogl_texture_get_width (texhandle), cogl_texture_get_width (texhandle),
cogl_texture_get_height (texhandle)); cogl_texture_get_height (texhandle));
return _cogl_offscreen_handle_new (offscreen); return _cogl_offscreen_object_new (offscreen);
} }
else else
{ {
@ -552,7 +540,7 @@ _cogl_onscreen_new (void)
0xdeadbeef, /* width */ 0xdeadbeef, /* width */
0xdeadbeef); /* height */ 0xdeadbeef); /* height */
return _cogl_onscreen_handle_new (onscreen); return _cogl_onscreen_object_new (onscreen);
} }
static void static void
@ -616,21 +604,21 @@ _cogl_free_framebuffer_stack (GSList *stack)
static void static void
_cogl_set_framebuffer_real (CoglFramebuffer *framebuffer) _cogl_set_framebuffer_real (CoglFramebuffer *framebuffer)
{ {
CoglHandle *entry; CoglFramebuffer **entry;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
cogl_flush (); cogl_flush ();
entry = &ctx->framebuffer_stack->data; entry = (CoglFramebuffer **)&ctx->framebuffer_stack->data;
ctx->dirty_bound_framebuffer = 1; ctx->dirty_bound_framebuffer = 1;
ctx->dirty_gl_viewport = 1; ctx->dirty_gl_viewport = 1;
if (framebuffer != COGL_INVALID_HANDLE) if (framebuffer != COGL_INVALID_HANDLE)
cogl_handle_ref (framebuffer); cogl_object_ref (framebuffer);
if (*entry != COGL_INVALID_HANDLE) if (*entry != COGL_INVALID_HANDLE)
cogl_handle_unref (*entry); cogl_object_unref (*entry);
*entry = framebuffer; *entry = framebuffer;
@ -644,12 +632,12 @@ _cogl_set_framebuffer_real (CoglFramebuffer *framebuffer)
} }
void void
cogl_set_framebuffer (CoglHandle handle) cogl_set_framebuffer (CoglFramebuffer *framebuffer)
{ {
g_return_if_fail (cogl_is_framebuffer (handle)); g_return_if_fail (cogl_is_framebuffer (framebuffer));
if (_cogl_get_framebuffer () != handle) if (_cogl_get_framebuffer () != framebuffer)
_cogl_set_framebuffer_real (COGL_FRAMEBUFFER (handle)); _cogl_set_framebuffer_real (framebuffer);
} }
/* XXX: deprecated API */ /* XXX: deprecated API */
@ -664,18 +652,18 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle handle)
cogl_set_framebuffer (handle); cogl_set_framebuffer (handle);
} }
CoglHandle CoglFramebuffer *
_cogl_get_framebuffer (void) _cogl_get_framebuffer (void)
{ {
_COGL_GET_CONTEXT (ctx, NULL); _COGL_GET_CONTEXT (ctx, NULL);
g_assert (ctx->framebuffer_stack); g_assert (ctx->framebuffer_stack);
return (CoglHandle)ctx->framebuffer_stack->data; return ctx->framebuffer_stack->data;
} }
void void
cogl_push_framebuffer (CoglHandle buffer) cogl_push_framebuffer (CoglFramebuffer *buffer)
{ {
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -700,8 +688,8 @@ cogl_push_draw_buffer (void)
void void
cogl_pop_framebuffer (void) cogl_pop_framebuffer (void)
{ {
CoglHandle to_pop; CoglFramebuffer *to_pop;
CoglHandle to_restore; CoglFramebuffer *to_restore;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -713,7 +701,7 @@ cogl_pop_framebuffer (void)
cogl_flush (); cogl_flush ();
cogl_handle_unref (to_pop); cogl_object_unref (to_pop);
ctx->framebuffer_stack = ctx->framebuffer_stack =
g_slist_remove_link (ctx->framebuffer_stack, g_slist_remove_link (ctx->framebuffer_stack,
ctx->framebuffer_stack); ctx->framebuffer_stack);
@ -733,15 +721,11 @@ cogl_pop_draw_buffer (void)
} }
void void
_cogl_framebuffer_flush_state (CoglHandle handle, _cogl_framebuffer_flush_state (CoglFramebuffer *framebuffer,
CoglFramebufferFlushFlags flags) CoglFramebufferFlushFlags flags)
{ {
CoglFramebuffer *framebuffer;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = COGL_FRAMEBUFFER (handle);
if (cogl_features_available (COGL_FEATURE_OFFSCREEN) && if (cogl_features_available (COGL_FEATURE_OFFSCREEN) &&
ctx->dirty_bound_framebuffer) ctx->dirty_bound_framebuffer)
{ {
@ -802,41 +786,34 @@ _cogl_framebuffer_flush_state (CoglHandle handle,
} }
int int
_cogl_framebuffer_get_red_bits (CoglHandle framebuffer) _cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *fb = COGL_FRAMEBUFFER (framebuffer); _cogl_framebuffer_init_bits (framebuffer);
_cogl_framebuffer_init_bits (fb); return framebuffer->red_bits;
return fb->red_bits;
} }
int int
_cogl_framebuffer_get_green_bits (CoglHandle framebuffer) _cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *fb = COGL_FRAMEBUFFER (framebuffer); _cogl_framebuffer_init_bits (framebuffer);
_cogl_framebuffer_init_bits (fb); return framebuffer->green_bits;
return fb->green_bits;
} }
int int
_cogl_framebuffer_get_blue_bits (CoglHandle framebuffer) _cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *fb = COGL_FRAMEBUFFER (framebuffer); _cogl_framebuffer_init_bits (framebuffer);
_cogl_framebuffer_init_bits (fb); return framebuffer->blue_bits;
return fb->blue_bits;
} }
int int
_cogl_framebuffer_get_alpha_bits (CoglHandle framebuffer) _cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer)
{ {
CoglFramebuffer *fb = COGL_FRAMEBUFFER (framebuffer); _cogl_framebuffer_init_bits (framebuffer);
_cogl_framebuffer_init_bits (fb); return framebuffer->alpha_bits;
return fb->alpha_bits;
} }

View File

@ -548,7 +548,7 @@ _cogl_journal_flush (void)
GLuint journal_vbo; GLuint journal_vbo;
gboolean vbo_fallback = gboolean vbo_fallback =
(cogl_get_features () & COGL_FEATURE_VBOS) ? FALSE : TRUE; (cogl_get_features () & COGL_FEATURE_VBOS) ? FALSE : TRUE;
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
CoglMatrixStack *modelview_stack; CoglMatrixStack *modelview_stack;
COGL_STATIC_TIMER (flush_timer, COGL_STATIC_TIMER (flush_timer,
"Mainloop", /* parent */ "Mainloop", /* parent */

View File

@ -953,7 +953,7 @@ _cogl_texture_draw_and_read (CoglHandle handle,
GLuint target_gl_type) GLuint target_gl_type)
{ {
int bpp; int bpp;
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
int viewport[4]; int viewport[4];
CoglBitmap alpha_bmp; CoglBitmap alpha_bmp;
CoglHandle prev_source; CoglHandle prev_source;

View File

@ -552,7 +552,7 @@ cogl_get_bitmasks (int *red,
int *blue, int *blue,
int *alpha) int *alpha)
{ {
CoglHandle framebuffer; CoglFramebuffer *framebuffer;
framebuffer = _cogl_get_framebuffer (); framebuffer = _cogl_get_framebuffer ();

View File

@ -65,6 +65,8 @@ G_BEGIN_DECLS
* General utility functions for COGL. * General utility functions for COGL.
*/ */
typedef struct _CoglFramebuffer CoglFramebuffer;
/** /**
* cogl_get_option_group: * cogl_get_option_group:
* *
@ -172,7 +174,7 @@ cogl_get_bitmasks (int *red,
* Since: 1.4 * Since: 1.4
*/ */
int int
_cogl_framebuffer_get_red_bits (CoglHandle framebuffer); _cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer);
/* /*
* _cogl_framebuffer_get_green_bits: * _cogl_framebuffer_get_green_bits:
@ -185,7 +187,7 @@ _cogl_framebuffer_get_red_bits (CoglHandle framebuffer);
* Since: 1.4 * Since: 1.4
*/ */
int int
_cogl_framebuffer_get_green_bits (CoglHandle framebuffer); _cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer);
/* /*
* _cogl_framebuffer_get_blue_bits: * _cogl_framebuffer_get_blue_bits:
@ -198,7 +200,7 @@ _cogl_framebuffer_get_green_bits (CoglHandle framebuffer);
* Since: 1.4 * Since: 1.4
*/ */
int int
_cogl_framebuffer_get_blue_bits (CoglHandle framebuffer); _cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer);
/* /*
* _cogl_framebuffer_get_alpha_bits: * _cogl_framebuffer_get_alpha_bits:
@ -211,7 +213,7 @@ _cogl_framebuffer_get_blue_bits (CoglHandle framebuffer);
* Since: 1.4 * Since: 1.4
*/ */
int int
_cogl_framebuffer_get_alpha_bits (CoglHandle framebuffer); _cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer);
/** /**
* cogl_perspective: * cogl_perspective:
@ -910,8 +912,7 @@ cogl_clip_stack_restore (void) G_GNUC_DEPRECATED;
/** /**
* cogl_set_framebuffer: * cogl_set_framebuffer:
* @buffer: The #CoglHandle of a Cogl framebuffer; either onscreen or * @buffer: A #CoglFramebuffer object, either onscreen or offscreen.
* offscreen.
* *
* This redirects all subsequent drawing to the specified framebuffer. This can * This redirects all subsequent drawing to the specified framebuffer. This can
* either be an offscreen buffer created with cogl_offscreen_new_to_texture () * either be an offscreen buffer created with cogl_offscreen_new_to_texture ()
@ -920,12 +921,11 @@ cogl_clip_stack_restore (void) G_GNUC_DEPRECATED;
* Since: 1.2 * Since: 1.2
*/ */
void void
cogl_set_framebuffer (CoglHandle buffer); cogl_set_framebuffer (CoglFramebuffer *buffer);
/** /**
* cogl_push_framebuffer: * cogl_push_framebuffer:
* @buffer: The #CoglHandle of a Cogl framebuffer; either onscreen or * @buffer: A #CoglFramebuffer object, either onscreen or offscreen.
* offscreen.
* *
* Redirects all subsequent drawing to the specified framebuffer. This can * Redirects all subsequent drawing to the specified framebuffer. This can
* either be an offscreen buffer created with cogl_offscreen_new_to_texture () * either be an offscreen buffer created with cogl_offscreen_new_to_texture ()
@ -979,7 +979,7 @@ cogl_set_framebuffer (CoglHandle buffer);
* *
* static void * static void
* my_init_framebuffer (ClutterStage *stage, * my_init_framebuffer (ClutterStage *stage,
* CoglHandle framebuffer, * CoglFramebuffer *framebuffer,
* unsigned int framebuffer_width, * unsigned int framebuffer_width,
* unsigned int framebuffer_height) * unsigned int framebuffer_height)
* { * {
@ -1002,7 +1002,7 @@ cogl_set_framebuffer (CoglHandle buffer);
* Since: 1.2 * Since: 1.2
*/ */
void void
cogl_push_framebuffer (CoglHandle buffer); cogl_push_framebuffer (CoglFramebuffer *buffer);
/** /**
* cogl_pop_framebuffer: * cogl_pop_framebuffer: