From 5441440f4790e972ac2f8dd81e61adc5c98c8e58 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 2 Dec 2009 21:54:22 +0000 Subject: [PATCH] cogl: Use #ifdef GL around GL_TEXTURE_RECTANGLE_ARB Commit 558b17ee1e added support for rectangle textures to the framebuffer code. Under GLES there is no GL_TEXTURE_RECTANGLE_ARB definition so this was breaking the build. The rest of Cogl uses ifdef's around that constant so we should do the same here. --- cogl/cogl-framebuffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index 5ba0616e3..585b67663 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -265,8 +265,11 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle) if (!cogl_texture_get_gl_texture (texhandle, &tex_gl_handle, &tex_gl_target)) return COGL_INVALID_HANDLE; - if (tex_gl_target != GL_TEXTURE_2D && - tex_gl_target != GL_TEXTURE_RECTANGLE_ARB) + if (tex_gl_target != GL_TEXTURE_2D +#ifdef HAVE_COGL_GL + && tex_gl_target != GL_TEXTURE_RECTANGLE_ARB +#endif + ) return COGL_INVALID_HANDLE; /* Create a renderbuffer for stenciling */