Skip to content

Instantly share code, notes, and snippets.

@vanderlin
Last active December 18, 2015 10:38
Show Gist options
  • Save vanderlin/5769562 to your computer and use it in GitHub Desktop.
Save vanderlin/5769562 to your computer and use it in GitHub Desktop.
static void getOpenGLCapabilities() {
printf("Getting OpenGL Capabilities\n");
// number of textures
GLint ntex;
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &ntex);
printf("Num Textures: %i\n", ntex);
// do we have point sprites
if(glewIsSupported("GL_VERSION_1_4 GL_ARB_point_sprite")) {
printf("Point Sprites Enabled\n");
}
#ifdef TARGET_WIN32
if (WGLEW_ARB_pbuffer) {
printf("WGLEW pbuffers Enabled\n");
}
#endif
// can we use vbo?
if (glewIsSupported("GL_ARB_vertex_buffer_object")) {
printf("VBO enabled\n");
}
// do we use shaders
if(glewIsSupported("GL_ARB_vertex_shader")) {
printf("Shaders are enabled\n");
}
printf("\n\n----- DONE Getting OpenGL Capabilities -----\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment