From d8f5c7135764578672f5918c7c7ab374d3bac7c9 Mon Sep 17 00:00:00 2001 From: ikits Date: Mon, 27 Oct 2003 02:34:05 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@152 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/bin/make_info.pl | 7 +++++-- auto/src/glew_pre.c | 18 +++++++++--------- auto/src/glewinfo_pre.c | 11 +++++------ auto/src/glxew_post.h | 2 -- auto/src/glxew_pre.h | 2 -- auto/src/wglew_post.h | 2 -- auto/src/wglew_pre.h | 2 -- 7 files changed, 19 insertions(+), 25 deletions(-) diff --git a/auto/bin/make_info.pl b/auto/bin/make_info.pl index 938c18d..3a04ca1 100755 --- a/auto/bin/make_info.pl +++ b/auto/bin/make_info.pl @@ -38,12 +38,15 @@ foreach my $ext (sort @extlist) { my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); my $extvar = $extname; - my $extvardef = $extname; $extvar =~ s/GL(X*)_/GL$1EW_/; + my $extpre = $extname; + $extpre =~ s/(GLX|GLW|GL).*/$1/; + $extpre = lc $extpre; make_separator($extname); print "#ifdef $extname\n\n"; - print "static void _glewInfo_$extname (void)\n{\n glewPrintExt(\"$extname\", $extvar);\n"; + print "static void _glewInfo_$extname (void)\n{\n"; + print " glewPrintExt(\"$extname\", $extvar, $extpre" . "ewGetExtension(\"$extname\"));\n"; output_decls($functions, \&make_pfn_info); print "}\n\n"; print "#endif /* $extname */\n\n"; diff --git a/auto/src/glew_pre.c b/auto/src/glew_pre.c index b6d7129..bacee21 100644 --- a/auto/src/glew_pre.c +++ b/auto/src/glew_pre.c @@ -30,19 +30,19 @@ */ #include -#ifdef _WIN32 -#include -#else -#include +#if defined(_WIN32) +# include +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) +# include #endif -#ifdef _WIN32 +#if defined(_WIN32) # define glewGetProcAddress(name) wglGetProcAddress(name) #else -# ifdef __APPLE__ +# if defined(__APPLE__) # define glewGetProcAddress(name) NSGLGetProcAddress(name) # else -# ifdef __sgi +# if defined(__sgi) # define glewGetProcAddress(name) dlGetProcAddress(name) # else /* __linux */ # define glewGetProcAddress(name) (*glXGetProcAddressARB)(name) @@ -50,7 +50,7 @@ # endif #endif -#ifdef __APPLE__ +#if defined(__APPLE__) #include #include #include @@ -71,7 +71,7 @@ static void* NSGLGetProcAddress (const char* name) } #endif /* __APPLE__ */ -#ifdef __sgi +#if defined(__sgi) #include #include #include diff --git a/auto/src/glewinfo_pre.c b/auto/src/glewinfo_pre.c index fc7126b..1c15a01 100644 --- a/auto/src/glewinfo_pre.c +++ b/auto/src/glewinfo_pre.c @@ -32,11 +32,10 @@ #include #include #include +#if defined(_WIN32) #include +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) #include - -#ifdef _WIN32 -#include #endif static FILE* f; @@ -46,12 +45,12 @@ void glewDestroyContext (); /* ------------------------------------------------------------------------- */ -static void glewPrintExt (const GLubyte* name, GLint defined) +static void glewPrintExt (const GLubyte* name, GLint def1, GLint def2) { unsigned int i; fprintf(f, "\n%s:", name); for (i=0; i<62-strlen((const char*)name); i++) fprintf(f, " "); - fprintf(f, "%s\n", defined ? "OK" : "MISSING"); + fprintf(f, "%s [%s]\n", def1 ? "OK" : "MISSING", def2 ? "OK" : "MISSING"); for (i=0; i #include #include diff --git a/auto/src/wglew_post.h b/auto/src/wglew_post.h index 34eb765..b1aedd7 100644 --- a/auto/src/wglew_post.h +++ b/auto/src/wglew_post.h @@ -8,6 +8,4 @@ GLEWAPI GLboolean wglewGetExtension (const GLubyte* name); #undef GLEWAPI -#endif /* _WIN32 */ - #endif /* __wglew_h__ */ diff --git a/auto/src/wglew_pre.h b/auto/src/wglew_pre.h index 90d9474..221e061 100644 --- a/auto/src/wglew_pre.h +++ b/auto/src/wglew_pre.h @@ -68,8 +68,6 @@ #define __wglext_h_ -#ifdef _WIN32 - #if !defined(APIENTRY) && !defined(__CYGWIN__) #define WIN32_LEAN_AND_MEAN 1 #include