From 5283a3fb25b2667501eb782fb461c981200a65ef Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 Oct 2009 16:22:03 -0600 Subject: [PATCH] progs/trivial: check if GL_ARB_occlusion_query is supported --- progs/trivial/tri-query.c | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- 2.30.2