Commit a2387951 authored by Brian Paul's avatar Brian Paul
Browse files

add compile-time checks for GL_ARB_ES2_compatibility

In case glew.h isn't up to date.
parent e972ecd8
......@@ -41,6 +41,7 @@ piglit_init(int argc, char **argv)
enum piglit_result
piglit_display(void)
{
#ifdef GL_ARB_ES2_compatibility
GLboolean pass = GL_TRUE;
float red[4] = {1.0, 0.0, 0.0, 0.0};
float green[4] = {0.0, 1.0, 0.0, 0.0};
......@@ -80,4 +81,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
#else
return PIGLIT_SKIP;
#endif /* GL_ARB_ES2_compatibility */
}
......@@ -47,6 +47,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
#ifdef GL_ARB_ES2_compatibility
GLboolean pass = GL_TRUE;
GLint status;
unsigned i;
......@@ -124,4 +125,7 @@ piglit_init(int argc, char **argv)
}
}
piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
#else
piglit_report_result(PIGLIT_SKIP);
#endif /* GL_ARB_ES2_compatibility */
}
......@@ -40,6 +40,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
#ifdef GL_ARB_ES2_compatibility
GLboolean pass = GL_TRUE;
GLint floats, vecs;
......@@ -85,4 +86,8 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAILURE);
else
piglit_report_result(PIGLIT_SUCCESS);
#else
piglit_report_result(PIGLIT_SKIP);
#endif /* GL_ARB_ES2_compatibility */
}
......@@ -39,6 +39,7 @@ int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE;
enum piglit_result
piglit_display(void)
{
#ifdef GL_ARB_ES2_compatibility
GLboolean pass = GL_TRUE;
float green[] = {0.0, 1.0, 0.0, 0.0};
float blue[] = {0.0, 0.0, 1.0, 0.0};
......@@ -86,11 +87,15 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
#else
return PIGLIT_SKIP;
#endif /* GL_ARB_ES2_compatibility */
}
void
piglit_init(int argc, char **argv)
{
#ifdef GL_ARB_ES2_compatibility
if (!GLEW_VERSION_2_0) {
printf("Requires OpenGL 2.0\n");
piglit_report_result(PIGLIT_SKIP);
......@@ -100,4 +105,5 @@ piglit_init(int argc, char **argv)
printf("Requires ARB_ES2_compatibility\n");
piglit_report_result(PIGLIT_SKIP);
}
#endif
}
......@@ -41,6 +41,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
#ifdef GL_ARB_ES2_compatibility
GLint shadercompiler;
if (!GLEW_VERSION_2_0) {
......@@ -59,4 +60,7 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAILURE);
else
piglit_report_result(PIGLIT_SUCCESS);
#else
piglit_report_result(PIGLIT_SKIP);
#endif
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment