[Piglit] [PATCH 14/14] util: Fix piglit_glutInit to initilialize GLUT with GL API
Chad Versace
chad.versace at linux.intel.com
Mon May 21 23:15:22 PDT 2012
If USE_WAFFLE, then piglit_glutInit must call glutInitAPIMask to choose
a GL API.
This patch replaces USE_EGLUT with USE_WAFFLE, because eglut is no longer
used.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/util/piglit-util.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index 6bde4af..ea51209 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -96,15 +96,17 @@ void piglit_glutInit(int argc, char **argv)
{
glutInit(&argc, argv);
-#if defined USE_EGLUT && defined USE_OPENGL
- glutInitAPIMask(GLUT_OPENGL_BIT);
-#elif defined USE_EGLUT && defined USE_OPENGL_ES1
- glutInitAPIMask(GLUT_OPENGL_ES1_BIT);
-#elif defined USE_EGLUT && defined USE_OPENGL_ES2
- glutInitAPIMask(GLUT_OPENGL_ES2_BIT);
-#elif defined USE_EGLUT
-# error
-#endif
+# if defined(USE_WAFFLE)
+# if defined(USE_OPENGL)
+ glutInitAPIMask(GLUT_OPENGL_BIT);
+# elif defined(USE_OPENGL_ES1)
+ glutInitAPIMask(GLUT_OPENGL_ES1_BIT);
+# elif defined(USE_OPENGL_ES2)
+ glutInitAPIMask(GLUT_OPENGL_ES2_BIT);
+# else
+# error
+# endif
+# endif
}
bool piglit_is_gles()
--
1.7.10.1
More information about the Piglit
mailing list