*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@233 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-02-19 07:49:16 +00:00
parent fecaa911f5
commit 7214d0be63
9 changed files with 19 additions and 13 deletions

View File

@ -49,7 +49,7 @@ foreach my $ext (sort @extlist)
if (keys %$functions) if (keys %$functions)
{ {
print "static GLboolean _glewInit_$extname (" . $type . print "static GLboolean _glewInit_$extname (" . $type .
"EWContext* ctx)\n{\n GLboolean r = GL_FALSE;\n"; "EW_CONTEXT_ARG_DEF)\n{\n GLboolean r = GL_FALSE;\n";
output_decls($functions, \&make_pfn_def_init); output_decls($functions, \&make_pfn_def_init);
print "\n return r;\n}\n"; print "\n return r;\n}\n";
} }

View File

@ -52,11 +52,11 @@ foreach my $ext (sort @extlist)
{ {
if ($extname =~ /WGL_.*/) if ($extname =~ /WGL_.*/)
{ {
print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(ctx);\n"; print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n";
} }
else else
{ {
print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(ctx);\n"; print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n";
} }
} }
print "#endif /* $extname */\n"; print "#endif /* $extname */\n";

View File

@ -54,7 +54,7 @@ GLboolean glewGetExtension (const char* name)
#ifndef GLEW_MX #ifndef GLEW_MX
static static
#endif #endif
GLenum glewContextInit (GLEWContext* ctx) GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF)
{ {
const GLubyte* s; const GLubyte* s;
GLuint i; GLuint i;

View File

@ -24,7 +24,7 @@ GLboolean glxewGetExtension (const char* name)
#ifndef GLEW_MX #ifndef GLEW_MX
static static
#endif #endif
GLenum glxewContextInit (GLXEWContext* ctx) GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF)
{ {
int major, minor; int major, minor;
/* initialize core GLX 1.2 */ /* initialize core GLX 1.2 */

View File

@ -39,11 +39,11 @@ GLboolean glewExperimental = GL_FALSE;
GLenum glewInit () GLenum glewInit ()
{ {
GLenum r; GLenum r;
if ( (r = glewContextInit(0)) ) return r; if ( (r = glewContextInit()) ) return r;
#if defined(_WIN32) #if defined(_WIN32)
return wglewContextInit(0); return wglewContextInit();
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */ #elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
return glxewContextInit(0); return glxewContextInit();
#else #else
return r; return r;
#endif /* _WIN32 */ #endif /* _WIN32 */

View File

@ -96,10 +96,15 @@ static void *dlGetProcAddress (const GLubyte* name)
#ifdef GLEW_MX #ifdef GLEW_MX
#define glewGetContext() ctx #define glewGetContext() ctx
#define GLEW_CONTEXT_ARG_DEF GLEWContext* ctx
#define WGLEW_CONTEXT_ARG_DEF WGLEWContext* ctx
#define GLXEW_CONTEXT_ARG_DEF GLXEWContext* ctx
#define GLEW_CONTEXT_ARG_VAR ctx
#else #else
#define GLEWContext void #define GLEW_CONTEXT_ARG_DEF void
#define WGLEWContext void #define WGLEW_CONTEXT_ARG_DEF void
#define GLXEWContext void #define GLXEW_CONTEXT_ARG_DEF void
#define GLEW_CONTEXT_ARG_VAR
#endif #endif
#if !defined(_WIN32) || !defined(GLEW_MX) #if !defined(_WIN32) || !defined(GLEW_MX)

View File

@ -118,7 +118,7 @@
#define WINGDIAPI __declspec(dllimport) #define WINGDIAPI __declspec(dllimport)
#endif #endif
/* <ctype.h> */ /* <ctype.h> */
#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(_WCHAR_T_DEFINED) #if !defined(__CYGWIN__) && !defined(_WCHAR_T_DEFINED)
# ifndef _WCHAR_T_DEFINED # ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t; typedef unsigned short wchar_t;
# define _WCHAR_T_DEFINED # define _WCHAR_T_DEFINED

View File

@ -34,7 +34,7 @@ GLboolean wglewGetExtension (const char* name)
#ifndef GLEW_MX #ifndef GLEW_MX
static static
#endif #endif
GLenum wglewContextInit (WGLEWContext* ctx) GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF)
{ {
GLboolean crippled; GLboolean crippled;
/* find wgl extension string query functions */ /* find wgl extension string query functions */

View File

@ -89,6 +89,7 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual)
if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat")) if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat"))
{ {
if (++p >= argc) return GL_TRUE; if (++p >= argc) return GL_TRUE;
*display = 0;
*visual = strtol(argv[p++], NULL, 0); *visual = strtol(argv[p++], NULL, 0);
} }
else else