diff options
author | Keith Whitwell <[email protected]> | 2009-03-12 14:30:22 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-03-12 14:30:49 +0000 |
commit | 1e074dcb7bce276d7caa5b0bdd0ce95f3313a2c1 (patch) | |
tree | ddcd52f3f961341225531e9cdfff5d29334a094c /progs | |
parent | 45b8e76b5ced9f9fddf2d41ce8c64d2f642a5786 (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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/progs/demos/cubemap.c b/progs/demos/cubemap.c index b85a1282c86..41f99d0164d 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)); |