summaryrefslogtreecommitdiffstats
path: root/progs/trivial/tri-query.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/trivial/tri-query.c')
-rw-r--r--progs/trivial/tri-query.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index 85e39df2dfa..8898f182c78 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));
@@ -67,7 +72,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();