summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-20 16:22:03 -0600
committerBrian Paul <[email protected]>2009-10-20 16:22:03 -0600
commit5283a3fb25b2667501eb782fb461c981200a65ef (patch)
treea341e0b2772bdf1bf6cf07f11b09c119b3cfee6e
parent4b2cf92ad9caa384869371534c1f2154625a755a (diff)
progs/trivial: check if GL_ARB_occlusion_query is supported
-rw-r--r--progs/trivial/tri-query.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index 85e39df2dfa..94956a86f33 100644
--- a/progs/trivial/tri-query.c
+++ b/progs/trivial/tri-query.c
@@ -39,6 +39,11 @@ GLenum doubleBuffer;
static void Init(void)
{
+ if (!glutExtensionSupported("GL_ARB_occlusion_query")) {
+ fprintf(stderr, "Sorry, this program requires GL_ARB_occlusion_query\n");
+ exit(1);
+ }
+
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));