progs/perf: added check for GL_ARB_framebuffer_object
authorBrian Paul <brianp@vmware.com>
Mon, 21 Dec 2009 20:48:58 +0000 (13:48 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 21 Dec 2009 20:49:25 +0000 (13:49 -0700)
progs/perf/genmipmap.c

index 4b7d6ad155b73b0cba0f113c3aa4c9dd61599ea3..20e2fa34107c398e2ea3cf4c45952dae710d8942 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <string.h>
+#include <stdio.h>
 #include "glmain.h"
 #include "common.h"
 
@@ -53,6 +54,11 @@ static const struct vertex vertices[1] = {
 void
 PerfInit(void)
 {
+   if (!PerfExtensionSupported("GL_ARB_framebuffer_object")) {
+      printf("Sorry, this test requires GL_ARB_framebuffer_object\n");
+      exit(1);
+   }
+
    /* setup VBO w/ vertex data */
    glGenBuffersARB(1, &VBO);
    glBindBufferARB(GL_ARRAY_BUFFER_ARB, VBO);