Mesa (master): progs/trivial: check if GL_ARB_occlusion_query is supported
Alex Deucher
agd5f at kemper.freedesktop.org
Thu Oct 22 16:30:27 UTC 2009
Module: Mesa
Branch: master
Commit: 5283a3fb25b2667501eb782fb461c981200a65ef
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5283a3fb25b2667501eb782fb461c981200a65ef
Author: Brian Paul <brianp at vmware.com>
Date: Tue Oct 20 16:22:03 2009 -0600
progs/trivial: check if GL_ARB_occlusion_query is supported
---
progs/trivial/tri-query.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index 85e39df..94956a8 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));
More information about the mesa-commit
mailing list