From c3af4c1b1571b05f67d48b90d9ea7313f3ca6003 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 2 Jun 2023 14:27:29 +0200 Subject: [PATCH] cogl/gl-framebuffer: Fail without QUERY_FRAMEBUFFER_BITS glGetIntegerv() with GL_RED_BITS/GL_GREEN_BITS/GL_BLUE_BITS/etc. is not supported with the GL core context, so there is no point in falling back to that without supporting COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS, as this will cause an GL error. Part-of: --- cogl/cogl/driver/gl/cogl-gl-framebuffer-back.c | 7 +------ cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cogl/cogl/driver/gl/cogl-gl-framebuffer-back.c b/cogl/cogl/driver/gl/cogl-gl-framebuffer-back.c index f6a17e8f0..0ccd23240 100644 --- a/cogl/cogl/driver/gl/cogl-gl-framebuffer-back.c +++ b/cogl/cogl/driver/gl/cogl-gl-framebuffer-back.c @@ -119,12 +119,7 @@ ensure_bits_initialized (CoglGlFramebufferBack *gl_framebuffer_back) else #endif /* HAVE_COGL_GL */ { - GE (ctx, glGetIntegerv (GL_RED_BITS, &bits->red)); - GE (ctx, glGetIntegerv (GL_GREEN_BITS, &bits->green)); - GE (ctx, glGetIntegerv (GL_BLUE_BITS, &bits->blue)); - GE (ctx, glGetIntegerv (GL_ALPHA_BITS, &bits->alpha)); - GE (ctx, glGetIntegerv (GL_DEPTH_BITS, &bits->depth)); - GE (ctx, glGetIntegerv (GL_STENCIL_BITS, &bits->stencil)); + return FALSE; } COGL_NOTE (FRAMEBUFFER, diff --git a/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c b/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c index 75a8b0c1f..524196207 100644 --- a/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c +++ b/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c @@ -129,12 +129,7 @@ ensure_bits_initialized (CoglGlFramebufferFbo *gl_framebuffer_fbo) else #endif /* HAVE_COGL_GL */ { - GE (ctx, glGetIntegerv (GL_RED_BITS, &bits->red)); - GE (ctx, glGetIntegerv (GL_GREEN_BITS, &bits->green)); - GE (ctx, glGetIntegerv (GL_BLUE_BITS, &bits->blue)); - GE (ctx, glGetIntegerv (GL_ALPHA_BITS, &bits->alpha)); - GE (ctx, glGetIntegerv (GL_DEPTH_BITS, &bits->depth)); - GE (ctx, glGetIntegerv (GL_STENCIL_BITS, &bits->stencil)); + return FALSE; } if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES) &&