mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-22 14:45:06 +00:00
Added major, minor, and micro version strings
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@519 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
3f734c5097
commit
2a3114f78f
@ -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 $@
|
||||
|
@ -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];
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user