[Cogl] [PATCH 3/8] tweak: Support retrieving depth textures from framebuffers

Robert Bragg robert at sixbynine.org
Thu Sep 6 09:29:31 PDT 2012


From: Robert Bragg <robert at linux.intel.com>

Avoid using _COGL_GET_CONTEXT which we're trying to phase out.

TODO: fold this patch into original
---
 cogl/cogl-framebuffer.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index ad67915..7297b83 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -2029,8 +2029,7 @@ cogl_framebuffer_enable_depth_texture (CoglFramebuffer *framebuffer,
                                        CoglBool         enabled)
 {
   CoglOffscreen *offscreen;
-
-  _COGL_GET_CONTEXT (ctx, NO_RETVAL);
+  CoglContext *ctx = framebuffer->context;
 
   _COGL_RETURN_IF_FAIL (!framebuffer->allocated);
   _COGL_RETURN_IF_FAIL (cogl_is_offscreen (framebuffer));
-- 
1.7.7.6



More information about the Cogl mailing list