progs/trivial: check if GL_ARB_occlusion_query is supported

This commit is contained in:
Brian Paul 2009-10-20 16:22:03 -06:00
parent 4b2cf92ad9
commit 5283a3fb25
1 changed files with 5 additions and 0 deletions

View File

@ -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));