From 04f2f79b2e1aca1785558365b3db9527c44163c0 Mon Sep 17 00:00:00 2001 From: ikits Date: Sun, 1 Feb 2004 22:10:42 +0000 Subject: [PATCH] fixed glxew problems git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@211 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/Makefile | 2 ++ auto/bin/fix_OML_sync_control.sh | 8 +++++--- auto/src/glew_post.h | 4 ++-- auto/src/glxew_post.h | 4 ++-- auto/src/wglew_post.h | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/auto/Makefile b/auto/Makefile index 4a585d4..345860f 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -1,3 +1,4 @@ + ## ## Copyright (C) 2004, 2003 Marcelo E. Magallon ## Copyright (C) 2004, 2003 Milan Ikits @@ -79,6 +80,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 $@ cat $(SRC)/glxew_post.h >> $@ $(BIN)/fix_OML_sync_control.sh $@ diff --git a/auto/bin/fix_OML_sync_control.sh b/auto/bin/fix_OML_sync_control.sh index 603d11e..966a5d7 100755 --- a/auto/bin/fix_OML_sync_control.sh +++ b/auto/bin/fix_OML_sync_control.sh @@ -6,7 +6,9 @@ ## General Public License Version 2 as published by the Free Software ## Foundation or, at your option, any later version. -perl -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /;' -pi.bak $1 -rm -f $1.bak -perl -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /;' -pi.bak $1 +perl -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /;' -pi $1 +perl -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /;' -pi $1 +perl -e 's/( PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;)/#ifdef GLX_OML_sync_control\n\1/' -pi $1 +perl -e 's/( PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;)/\1\n#endif/' -pi $1 +perl -e 's/( GLboolean __GLXEW_OML_sync_control;)/#ifdef GLX_OML_sync_control\n\1\n#endif/' -pi $1 rm -f $1.bak diff --git a/auto/src/glew_post.h b/auto/src/glew_post.h index 71ea982..0c5f169 100644 --- a/auto/src/glew_post.h +++ b/auto/src/glew_post.h @@ -12,9 +12,9 @@ /* API */ #ifdef GLEW_MX -# define GLEW_GET_CONTEXT(x) glewGetContext()->##x +# define GLEW_GET_CONTEXT(x) glewGetContext()->x #else -# define GLEW_GET_CONTEXT(x) glewDefaultContext->##x +# define GLEW_GET_CONTEXT(x) glewDefaultContext->x #endif /* GLEW_MX */ typedef struct GLEWContextStruct GLEWContext; diff --git a/auto/src/glxew_post.h b/auto/src/glxew_post.h index 074f8fc..ecbf8a0 100644 --- a/auto/src/glxew_post.h +++ b/auto/src/glxew_post.h @@ -5,9 +5,9 @@ GLEWAPI GLXEWContext* glxewDefaultContext; #ifdef GLEW_MX extern GLXEWContext* glxewGetContext(); -# define GLXEW_GET_CONTEXT(x) glxewGetContext()->##x +# define GLXEW_GET_CONTEXT(x) glxewGetContext()->x #else -# define GLXEW_GET_CONTEXT(x) glxewDefaultContext->##x +# define GLXEW_GET_CONTEXT(x) glxewDefaultContext->x #endif /* GLEW_MX */ extern GLenum glxewContextInit (GLXEWContext* ctx); diff --git a/auto/src/wglew_post.h b/auto/src/wglew_post.h index 7b28023..dc206d4 100644 --- a/auto/src/wglew_post.h +++ b/auto/src/wglew_post.h @@ -5,9 +5,9 @@ GLEWAPI WGLEWContext* wglewDefaultContext; #ifdef GLEW_MX extern WGLEWContext* wglewGetContext(); -# define WGLEW_GET_CONTEXT(x) wglewGetContext()->##x +# define WGLEW_GET_CONTEXT(x) wglewGetContext()->x #else -# define WGLEW_GET_CONTEXT(x) wglewDefaultContext->##x +# define WGLEW_GET_CONTEXT(x) wglewDefaultContext->x #endif /* GLEW_MX */ GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);