mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-29 18:07:08 +00:00
36 lines
889 B
C
36 lines
889 B
C
|
}
|
||
|
|
||
|
#endif /* _WIN32 */
|
||
|
|
||
|
/* ------------------------------------------------------------------------ */
|
||
|
|
||
|
int main (int argc, char** argv)
|
||
|
{
|
||
|
GLuint err;
|
||
|
glutInit(&argc, argv);
|
||
|
glutCreateWindow("GLEW Extension Info");
|
||
|
glewExperimental = GL_TRUE;
|
||
|
err = glewInit();
|
||
|
if (GLEW_OK != err)
|
||
|
{
|
||
|
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
|
||
|
return 1;
|
||
|
}
|
||
|
f = fopen("glewinfo.txt", "w");
|
||
|
if (f == NULL) f = stdout;
|
||
|
fprintf(f, "---------------------------\n");
|
||
|
fprintf(f, " GLEW Extension Info\n");
|
||
|
fprintf(f, "---------------------------\n\n");
|
||
|
fprintf(f, "Running on a %s from %s\n",
|
||
|
glGetString(GL_RENDERER), glGetString(GL_VENDOR));
|
||
|
fprintf(f, "OpenGL version %s is supported\n", glGetString(GL_VERSION));
|
||
|
glewInfo();
|
||
|
#ifdef _WIN32
|
||
|
wglewInfo();
|
||
|
#else
|
||
|
glxewInfo();
|
||
|
#endif
|
||
|
if (f != stdout) fclose(f);
|
||
|
return 0;
|
||
|
}
|