From ffd5c32209bc6784c554134dd8c61536191c1e29 Mon Sep 17 00:00:00 2001 From: Jammy Zhou Date: Tue, 21 Sep 2010 11:37:52 +0800 Subject: [PATCH] cogl-framebuffer.c: GL_DEPTH_STENCIL not supported in gles There is GL_INVALID_ENUM error for GL_DEPTH_STENCIL when call glRenderbufferStorage() with OpenGL ES backend. So enable this only for OpenGL backend. Signed-off-by: Robert Bragg --- clutter/cogl/cogl/cogl-framebuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clutter/cogl/cogl/cogl-framebuffer.c b/clutter/cogl/cogl/cogl-framebuffer.c index 7d3689b91..07b5b0199 100644 --- a/clutter/cogl/cogl/cogl-framebuffer.c +++ b/clutter/cogl/cogl/cogl-framebuffer.c @@ -479,7 +479,9 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle) if ((have_working_flags && try_creating_fbo (offscreen, flags, texhandle)) || +#ifdef HAVE_COGL_GL try_creating_fbo (offscreen, flags = _TRY_DEPTH_STENCIL, texhandle) || +#endif try_creating_fbo (offscreen, flags = _TRY_DEPTH | _TRY_STENCIL, texhandle) || try_creating_fbo (offscreen, flags = _TRY_STENCIL, texhandle) ||