2003-07-06 15:01:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#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;
|
|
|
|
}
|
2003-07-06 20:03:33 +00:00
|
|
|
#ifdef _WIN32
|
2003-07-06 15:01:13 +00:00
|
|
|
f = fopen("glewinfo.txt", "w");
|
|
|
|
if (f == NULL) f = stdout;
|
2003-07-06 20:03:33 +00:00
|
|
|
#else
|
|
|
|
f = stdout;
|
|
|
|
#endif
|
2003-07-06 15:01:13 +00:00
|
|
|
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;
|
|
|
|
}
|