From 055a3884a7b3e6846f55cb8a29cfd0cb75a991b2 Mon Sep 17 00:00:00 2001 From: ikits Date: Thu, 19 Feb 2004 09:43:14 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@237 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/Makefile | 2 +- auto/bin/make_init.pl | 2 +- auto/bin/make_list.pl | 4 ++-- auto/src/glew_gl.c | 2 +- auto/src/glew_glx.c | 4 ++-- auto/src/glew_pre.c | 29 +++++++++++++++++++++-------- auto/src/glew_wgl.c | 2 +- 7 files changed, 29 insertions(+), 16 deletions(-) diff --git a/auto/Makefile b/auto/Makefile index e6cc60c..d443a59 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -77,7 +77,7 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy $(BIN)/make_header.pl '' GLX $(CORE)/GLX_VERSION* >> $@ $(BIN)/make_header.pl '' GLX $(EXT)/GLX_* >> $@ $(BIN)/make_struct.pl GLX $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@ - perl -e 's/ GLboolean __GLXEW_VERSION_1_2;/ GLboolean __GLXEW_VERSION_1_0;\n GLboolean __GLXEW_VERSION_1_1;\n GLboolean __GLXEW_VERSION_1_2;/' -pi.bak $@ + perl -e 's/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi.bak $@ cat $(SRC)/glxew_post.h >> $@ $(BIN)/fix_OML_sync_control.sh $@ diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index fc00fff..14879b2 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -49,7 +49,7 @@ foreach my $ext (sort @extlist) if (keys %$functions) { print "static GLboolean _glewInit_$extname (" . $type . - "EW_CONTEXT_ARG_DEF)\n{\n GLboolean r = GL_FALSE;\n"; + "EW_CONTEXT_ARG_DEF_INIT)\n{\n GLboolean r = GL_FALSE;\n"; output_decls($functions, \&make_pfn_def_init); print "\n return r;\n}\n"; } diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index 1cfc589..f0237a4 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -52,11 +52,11 @@ foreach my $ext (sort @extlist) { if ($extname =~ /WGL_.*/) { - print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n"; + print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; } else { - print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR);\n"; + print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; } } print "#endif /* $extname */\n"; diff --git a/auto/src/glew_gl.c b/auto/src/glew_gl.c index 90fe723..4c956f9 100644 --- a/auto/src/glew_gl.c +++ b/auto/src/glew_gl.c @@ -54,7 +54,7 @@ GLboolean glewGetExtension (const char* name) #ifndef GLEW_MX static #endif -GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF) +GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) { const GLubyte* s; GLuint i; diff --git a/auto/src/glew_glx.c b/auto/src/glew_glx.c index 62db716..6a94928 100644 --- a/auto/src/glew_glx.c +++ b/auto/src/glew_glx.c @@ -24,11 +24,11 @@ GLboolean glxewGetExtension (const char* name) #ifndef GLEW_MX static #endif -GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF) +GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST) { int major, minor; /* initialize core GLX 1.2 */ - if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR)) return GLEW_ERROR_GLX_VERSION_11_ONLY; + if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT)) return GLEW_ERROR_GLX_VERSION_11_ONLY; /* initialize flags */ GLXEW_VERSION_1_0 = GL_FALSE; GLXEW_VERSION_1_1 = GL_FALSE; diff --git a/auto/src/glew_pre.c b/auto/src/glew_pre.c index dd018dc..384b228 100644 --- a/auto/src/glew_pre.c +++ b/auto/src/glew_pre.c @@ -98,15 +98,28 @@ static void *dlGetProcAddress (const GLubyte* name) #define glewGetContext() ctx #define wglewGetContext() ctx #define glxewGetContext() 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 +#ifdef _WIN32 +#define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx +#define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx +#define GLXEW_CONTEXT_ARG_DEF_INIT GLXEWContext* ctx +#define GLEW_CONTEXT_ARG_VAR_INIT ctx #else -#define GLEW_CONTEXT_ARG_DEF void -#define WGLEW_CONTEXT_ARG_DEF void -#define GLXEW_CONTEXT_ARG_DEF void -#define GLEW_CONTEXT_ARG_VAR +#define GLEW_CONTEXT_ARG_DEF_INIT void +#define WGLEW_CONTEXT_ARG_DEF_INIT void +#define GLXEW_CONTEXT_ARG_DEF_INIT void +#define GLEW_CONTEXT_ARG_VAR_INIT +#endif +#define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx +#define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx +#define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx +#else +#define GLEW_CONTEXT_ARG_DEF_INIT void +#define WGLEW_CONTEXT_ARG_DEF_INIT void +#define GLXEW_CONTEXT_ARG_DEF_INIT void +#define GLEW_CONTEXT_ARG_DEF_LIST void +#define WGLEW_CONTEXT_ARG_DEF_LIST void +#define GLXEW_CONTEXT_ARG_DEF_LIST void +#define GLEW_CONTEXT_ARG_VAR_INIT #endif #if !defined(_WIN32) || !defined(GLEW_MX) diff --git a/auto/src/glew_wgl.c b/auto/src/glew_wgl.c index 586e0a0..c5bb2bd 100644 --- a/auto/src/glew_wgl.c +++ b/auto/src/glew_wgl.c @@ -34,7 +34,7 @@ GLboolean wglewGetExtension (const char* name) #ifndef GLEW_MX static #endif -GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF) +GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST) { GLboolean crippled; /* find wgl extension string query functions */