*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@220 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-02-02 02:30:43 +00:00
parent af4e79fedb
commit 0c642b2691
2 changed files with 10 additions and 5 deletions

View File

@ -7,6 +7,8 @@
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
GLuint err; GLuint err;
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
char* display = NULL; char* display = NULL;
int visual = -1; int visual = -1;
@ -14,13 +16,13 @@ int main (int argc, char** argv)
{ {
#if defined(_WIN32) #if defined(_WIN32)
fprintf(stderr, "Usage: glewinfo [-pf <id>]\n"); fprintf(stderr, "Usage: glewinfo [-pf <id>]\n");
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
fprintf(stderr, "Usage: glewinfo\n");
#else #else
fprintf(stderr, "Usage: glewinfo [-display <display>] [-visual <id>]\n"); fprintf(stderr, "Usage: glewinfo [-display <display>] [-visual <id>]\n");
#endif #endif
return 1; return 1;
} }
#endif
#if defined(_WIN32) #if defined(_WIN32)
if (GL_TRUE == glewCreateContext(&visual)) if (GL_TRUE == glewCreateContext(&visual))
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
@ -73,6 +75,7 @@ int main (int argc, char** argv)
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual) GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
{ {
int p = 0; int p = 0;
@ -86,7 +89,7 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
} }
else else
return GL_TRUE; return GL_TRUE;
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) #else
if (!strcmp(argv[p], "-display")) if (!strcmp(argv[p], "-display"))
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
@ -99,12 +102,11 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
} }
else else
return GL_TRUE; return GL_TRUE;
#else
return GL_TRUE;
#endif #endif
} }
return GL_FALSE; return GL_FALSE;
} }
#endif
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */

View File

@ -49,7 +49,10 @@ GLboolean glewCreateContext (const char* display, int* visual);
GLboolean glewCreateContext (); GLboolean glewCreateContext ();
#endif #endif
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual); GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual);
#endif
void glewDestroyContext (); void glewDestroyContext ();
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */