summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-03-12 14:30:22 +0000
committerKeith Whitwell <keithw@vmware.com>2009-03-12 14:30:49 +0000
commit1e074dcb7bce276d7caa5b0bdd0ce95f3313a2c1 (patch)
treeddcd52f3f961341225531e9cdfff5d29334a094c /progs
parent45b8e76b5ced9f9fddf2d41ce8c64d2f642a5786 (diff)
demos: use glGenerateMipmapEXT entrypoint in cubemap.c
glGenerateMipmap() is part of ARB_framebuffer_object, which many mesa drivers don't advertise. Add check for EXT_framebuffer_object.
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/cubemap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/progs/demos/cubemap.c b/progs/demos/cubemap.c
index b85a1282c8..41f99d0164 100644
--- a/progs/demos/cubemap.c
+++ b/progs/demos/cubemap.c
@@ -426,7 +426,7 @@ static void init_checkers( void )
GL_BGRA, GL_UNSIGNED_BYTE, image);
}
- glGenerateMipmap(GL_TEXTURE_CUBE_MAP_ARB);
+ glGenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB);
}
@@ -502,6 +502,13 @@ static void init( GLboolean useImageFiles )
printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
exit(0);
}
+
+ /* Needed for glGenerateMipmapEXT
+ */
+ if (!strstr(exten, "GL_EXT_framebuffer_object")) {
+ printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
+ exit(0);
+ }
}
printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));