mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
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.
This commit is contained in:
parent
45b8e76b5c
commit
1e074dcb7b
1 changed files with 8 additions and 1 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue