FBO extensions provide same functionality before GL 2.0. Those
extensions are aliased to core functions in dispatch which allows same
code to work in both cases.

Signed-off-by: Pauli Nieminen <[email protected]>
---
 tests/util/piglit-framework.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/tests/util/piglit-framework.c b/tests/util/piglit-framework.c
index 0ddfa14..b5dbebe 100644
--- a/tests/util/piglit-framework.c
+++ b/tests/util/piglit-framework.c
@@ -176,11 +176,11 @@ piglit_framework_fbo_init()
        piglit_framework_fbo_glx_init();
 
        glewInit();
-#ifdef USE_OPENGL
 
-       if (piglit_get_gl_version() < 20)
+       if (piglit_get_gl_version() < 20 &&
+                       
!piglit_is_extension_supported("GL_ARB_framebuffer_object") &&
+                       
!piglit_is_extension_supported("GL_OES_framebuffer_object"))
                return false;
-#endif
 
        glGenFramebuffers(1, &piglit_winsys_fbo);
        glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
@@ -199,11 +199,7 @@ piglit_framework_fbo_init()
        if (piglit_window_mode & (GLUT_DEPTH | GLUT_STENCIL)) {
                GLenum depth_stencil;
 
-#ifdef USE_OPENGL
                depth_stencil = GL_DEPTH_STENCIL;
-#else
-               depth_stencil = GL_DEPTH_STENCIL_OES;
-#endif
 
                glGenTextures(1, &depth);
                glBindTexture(GL_TEXTURE_2D, depth);
-- 
1.7.5.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to