diff --git a/auto/Makefile b/auto/Makefile index 071b638..cbf1e92 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -210,6 +210,9 @@ $(S.DEST)/glew.c: $(EXT)/.dummy $(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@ cat $(SRC)/glew_str_tail.c >> $@ perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@ + perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@ perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@ perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@ $(BIN)/fix_OML_sync_control.sh $@ @@ -263,6 +266,9 @@ $(S.DEST)/glew_init.c: $(EXT)/.dummy echo -e "\n return GLEW_OK;\n}\n\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */\n" >> $@; cat $(SRC)/glew_init_tail.c >> $@ perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@ + perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@ perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@ perl -e "s/\(\(glBlendColor = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glBlendColor = /g" -pi $@ $(BIN)/fix_OML_sync_control.sh $@ diff --git a/auto/src/glew_init_tail.c b/auto/src/glew_init_tail.c index 2d5f2ee..678b91c 100644 --- a/auto/src/glew_init_tail.c +++ b/auto/src/glew_init_tail.c @@ -19,7 +19,10 @@ const GLubyte* glewGetString (GLenum name) static const GLubyte* _glewString[] = { (const GLubyte*)NULL, - (const GLubyte*)"GLEW_VERSION_STRING" + (const GLubyte*)"GLEW_VERSION_STRING", + (const GLubyte*)"GLEW_VERSION_MAJOR_STRING", + (const GLubyte*)"GLEW_VERSION_MINOR_STRING", + (const GLubyte*)"GLEW_VERSION_MICRO_STRING" }; const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1; return _glewString[(int)name > max_string ? 0 : (int)name]; diff --git a/auto/src/glew_tail.h b/auto/src/glew_tail.h index 9f9336a..f2f002e 100644 --- a/auto/src/glew_tail.h +++ b/auto/src/glew_tail.h @@ -9,6 +9,9 @@ /* string codes */ #define GLEW_VERSION 1 +#define GLEW_VERSION_MAJOR 2 +#define GLEW_VERSION_MINOR 3 +#define GLEW_VERSION_MICRO 4 /* API */ #ifdef GLEW_MX