[Piglit] [PATCH 29/29] util: Support FBOs also with GLES1 and GL1
Pauli Nieminen
pauli.nieminen at linux.intel.com
Mon May 21 11:09:04 PDT 2012
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 <pauli.nieminen at linux.intel.com>
---
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
More information about the Piglit
mailing list