1
0
Fork 0

Migrate to new cogl framebuffer framework

The 1.2 API for draw-buffers/framebuffers has changed a bit
since the code in mutter-texture-tower.c was written; adapt to
the changes.

https://bugzilla.gnome.org/show_bug.cgi?id=604200
This commit is contained in:
Nickolas Lloyd 2009-12-11 15:44:04 +00:00 committed by Owen W. Taylor
parent 86f8c1863e
commit b20cb36f5d

View file

@ -168,7 +168,7 @@ mutter_texture_tower_set_base_texture (MutterTextureTower *tower,
#if CLUTTER_CHECK_VERSION(1,1,3)
if (tower->fbos[i] != COGL_INVALID_HANDLE)
{
cogl_offscreen_unref (tower->fbos[i]);
cogl_handle_unref (tower->fbos[i]);
tower->fbos[i] = COGL_INVALID_HANDLE;
}
#else
@ -459,8 +459,7 @@ texture_tower_revalidate_fbo (MutterTextureTower *tower,
if (tower->fbos[level] == COGL_INVALID_HANDLE)
return FALSE;
cogl_push_draw_buffer ();
cogl_set_draw_buffer (COGL_OFFSCREEN_BUFFER, tower->fbos[level]);
cogl_push_framebuffer (tower->fbos[level]);
cogl_ortho (0, dest_texture_width, dest_texture_height, 0, -1., 1.);
@ -475,7 +474,7 @@ texture_tower_revalidate_fbo (MutterTextureTower *tower,
(2. * invalid->x2) / source_texture_width,
(2. * invalid->y2) / source_texture_height);
cogl_pop_draw_buffer ();
cogl_pop_framebuffer ();
return TRUE;
}