From f64f38f5bb69ad20ac7c077353cf5cdf28c067cb Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Wed, 4 Feb 2015 15:27:59 +0100 Subject: [PATCH 1/8] Load core function pointers before checking the extension string. For GL versions since 3.0 the glGetString() function is deprecated or removed, and the right way to query extensions is glGetStringi(), but that has to be loaded first. Also instead of searching the whole extension string n times lookup the known extensions in a static hash table. The hash table is built with the gperf utility. --- auto/Makefile | 15 ++++++++++++-- auto/bin/make_gperf.pl | 41 ++++++++++++++++++++++++++++++++++++++ auto/bin/make_list.pl | 5 ----- auto/src/glew_head.c | 14 +++++++++++++ auto/src/glew_init_gl.c | 9 ++------- auto/src/glew_init_glext.c | 23 +++++++++++++++++++++ auto/src/glew_init_glx.c | 16 +++++++++++++++ auto/src/glew_init_wgl.c | 16 +++++++++++++++ 8 files changed, 125 insertions(+), 14 deletions(-) create mode 100755 auto/bin/make_gperf.pl create mode 100644 auto/src/glew_init_glext.c diff --git a/auto/Makefile b/auto/Makefile index 91b68ed..70606d1 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -183,7 +183,16 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy perl -e "s/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/" -pi $@ cat $(SRC)/glxew_tail.h >> $@ -$(S.DEST)/glew.c: $(EXT)/.dummy +$(SRC)/glew.gperf: $(EXT)/.dummy + @echo "--------------------------------------------------------------------" + @echo "Creating glew.gperf" + @echo "--------------------------------------------------------------------" + $(BIN)/make_gperf.pl $(GL_EXT_SPEC) $(WGL_EXT_SPEC) $(GLX_EXT_SPEC) > $@ + +$(SRC)/glew_init_hash.c: $(SRC)/glew.gperf + gperf -m 10 --output-file=$@ $(SRC)/glew.gperf + +$(S.DEST)/glew.c: $(EXT)/.dummy $(SRC)/glew_init_hash.c @echo "--------------------------------------------------------------------" @echo "Creating glew.c" @echo "--------------------------------------------------------------------" @@ -200,8 +209,10 @@ $(S.DEST)/glew.c: $(EXT)/.dummy echo -e "\n#endif /* !GLEW_MX */\n" >> $@; $(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@ $(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@ + cat $(SRC)/glew_init_hash.c | grep -v '^#line' >> $@ cat $(SRC)/glew_init_gl.c >> $@ - $(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@ + $(BIN)/make_list.pl $(GL_CORE_SPEC) >> $@ + cat $(SRC)/glew_init_glext.c >> $@ $(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@ echo -e "\n return GLEW_OK;\n}\n" >> $@ echo -e "\n#if defined(_WIN32)" >> $@ diff --git a/auto/bin/make_gperf.pl b/auto/bin/make_gperf.pl new file mode 100755 index 0000000..8578f39 --- /dev/null +++ b/auto/bin/make_gperf.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl +## +## Copyright (C) 2002-2008, Marcelo E. Magallon +## Copyright (C) 2002-2008, Milan Ikits +## +## This program is distributed under the terms and conditions of the GNU +## General Public License Version 2 as published by the Free Software +## Foundation or, at your option, any later version. + +use strict; +use warnings; + +do 'bin/make.pl'; + +my @extlist = (); +my %extensions = (); + +our $type = shift; + +if (@ARGV) +{ + @extlist = @ARGV; + + print "%struct-type\n"; + print "%compare-lengths\n"; + print "%define initializer-suffix ,NULL\n"; + print "%7bit\n"; + print "struct initflag { const char *name; GLboolean *flag; };\n"; + print "%%\n"; + + foreach my $ext (sort @extlist) + { + my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext); + + my $extvar = $extname; + $extvar =~ s/GL(X*)_/GL$1EW_/; + my $prefix = $extvar; + $prefix =~ s/_.*//; + print $extname . ", " . $prefix . "_GET_REF(__" . $extvar . ")\n"; + } +} diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index 75dc060..ccbf0c3 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -44,11 +44,6 @@ if (@ARGV) print "#ifdef $extname\n"; - if (length($extstring)) - { - print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n"; - } - if (keys %$functions) { if ($extname =~ /WGL_.*/) diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index e945bcd..7d119c4 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -7,6 +7,7 @@ #endif #include /* For size_t */ +extern int memcmp(const void *, const void *, size_t); /* * Define glewGetContext and related helper macros. @@ -158,28 +159,41 @@ void* NSGLGetProcAddress (const GLubyte *name) */ #undef GLEW_GET_VAR +#undef GLEW_GET_REF #ifdef GLEW_MX # define GLEW_GET_VAR(x) (glewGetContext()->x) +# define GLEW_GET_REF(x) (&((GLEWContext *)0)->x) #else /* GLEW_MX */ # define GLEW_GET_VAR(x) (x) +# define GLEW_GET_REF(x) (&(x)) #endif /* GLEW_MX */ #ifdef WGLEW_GET_VAR # undef WGLEW_GET_VAR +# undef WGLEW_GET_REF # ifdef GLEW_MX # define WGLEW_GET_VAR(x) (wglewGetContext()->x) +# define WGLEW_GET_REF(x) (&((WGLEWContext *)0)->x) # else /* GLEW_MX */ # define WGLEW_GET_VAR(x) (x) +# define WGLEW_GET_REF(x) (&(x)) # endif /* GLEW_MX */ +#else +# define WGLEW_GET_REF(x) (NULL) #endif /* WGLEW_GET_VAR */ #ifdef GLXEW_GET_VAR # undef GLXEW_GET_VAR +# undef GLXEW_GET_REF # ifdef GLEW_MX # define GLXEW_GET_VAR(x) (glxewGetContext()->x) +# define GLXEW_GET_REF(x) (&((GLXEWContext *)0)->x) # else /* GLEW_MX */ # define GLXEW_GET_VAR(x) (x) +# define GLXEW_GET_REF(x) (&(x)) # endif /* GLEW_MX */ +#else +# define GLXEW_GET_REF(x) (NULL) #endif /* GLXEW_GET_VAR */ /* diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index c438792..27a38e9 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -23,6 +23,7 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) GLint major, minor; const GLubyte* extStart; const GLubyte* extEnd; + /* query opengl version */ s = glGetString(GL_VERSION); dot = _glewStrCLen(s, '.'); @@ -64,10 +65,4 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) GLEW_VERSION_1_1 = GLEW_VERSION_1_2 == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE; } - /* query opengl extensions string */ - extStart = glGetString(GL_EXTENSIONS); - if (extStart == 0) - extStart = (const GLubyte*)""; - extEnd = extStart + _glewStrLen(extStart); - - /* initialize extensions */ + /* initialize core functions */ diff --git a/auto/src/glew_init_glext.c b/auto/src/glew_init_glext.c new file mode 100644 index 0000000..103e551 --- /dev/null +++ b/auto/src/glew_init_glext.c @@ -0,0 +1,23 @@ + + /* query opengl extensions string */ + extStart = glGetString(GL_EXTENSIONS); + if (extStart == 0) + extStart = (const GLubyte*)""; + extEnd = extStart + _glewStrLen(extStart); + + while (extStart < extEnd) + { + GLuint len = _glewStrCLen(extStart, ' '); + struct initflag *ptr = in_word_set(extStart, len); + + if (ptr != NULL && ptr->flag != NULL) { +#ifdef GLEW_MX + *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; +#else + *ptr->flag = GL_TRUE; +#endif + } + extStart += len + 1; + } + + /* initialize extensions */ diff --git a/auto/src/glew_init_glx.c b/auto/src/glew_init_glx.c index b54cca3..6b4d7b7 100644 --- a/auto/src/glew_init_glx.c +++ b/auto/src/glew_init_glx.c @@ -54,4 +54,20 @@ GLenum glxewInit (GLXEW_CONTEXT_ARG_DEF_LIST) if (extStart == 0) extStart = (const GLubyte *)""; extEnd = extStart + _glewStrLen(extStart); + + while (extStart < extEnd) + { + GLuint len = _glewStrCLen(extStart, ' '); + struct initflag *ptr = in_word_set(extStart, len); + + if (ptr != NULL && ptr->flag != NULL) { +#ifdef GLEW_MX + *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; +#else + *ptr->flag = GL_TRUE; +#endif + } + extStart += len + 1; + } + /* initialize extensions */ diff --git a/auto/src/glew_init_wgl.c b/auto/src/glew_init_wgl.c index cc731fe..f8c5116 100644 --- a/auto/src/glew_init_wgl.c +++ b/auto/src/glew_init_wgl.c @@ -41,5 +41,21 @@ GLenum GLEWAPIENTRY wglewInit (WGLEW_CONTEXT_ARG_DEF_LIST) else extStart = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC()); extEnd = extStart + _glewStrLen(extStart); + + while (extStart < extEnd) + { + GLuint len = _glewStrCLen(extStart, ' '); + struct initflag *ptr = in_word_set(extStart, len); + + if (ptr != NULL && ptr->flag != NULL) { +#ifdef GLEW_MX + *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; +#else + *ptr->flag = GL_TRUE; +#endif + } + extStart += len + 1; + } + /* initialize extensions */ crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL; From a862219acbdd2f428b53b9c96d9f89033772a883 Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Wed, 4 Feb 2015 15:44:01 +0100 Subject: [PATCH 2/8] Get GL extension strings via glGetStringi() if GL version is >= 3.0. --- auto/src/glew_init_gl.c | 67 ++++++++++++++++++++++++++++---------- auto/src/glew_init_glext.c | 51 +++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 31 deletions(-) diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index 27a38e9..65080c9 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -1,14 +1,57 @@ /* ------------------------------------------------------------------------- */ +static +GLboolean glewGetVersion(GLint *major, GLint *minor) +{ + const GLubyte* s; + GLuint dot; + + s = glGetString(GL_VERSION); + dot = _glewStrCLen(s, '.'); + if (dot == 0) + return GL_FALSE; + + *major = s[dot-1]-'0'; + *minor = s[dot+1]-'0'; + + if (*minor < 0 || *minor > 9) + *minor = 0; + if (*major<0 || *major>9) + return GL_FALSE; + + return GL_TRUE; +} + GLboolean GLEWAPIENTRY glewGetExtension (const char* name) { + GLint major, minor; const GLubyte* start; const GLubyte* end; - start = (const GLubyte*)glGetString(GL_EXTENSIONS); - if (start == 0) + GLint numExts, ext; + + if (!glewGetVersion(&major, &minor)) return GL_FALSE; - end = start + _glewStrLen(start); - return _glewSearchExtension(name, start, end); + + if (major < 3) + { + start = (const GLubyte*)glGetString(GL_EXTENSIONS); + if (start == 0) + return GL_FALSE; + end = start + _glewStrLen(start); + return _glewSearchExtension(name, start, end); + } + else + { + glGetIntegerv(GL_NUM_EXTENSIONS, &numExts); + for (ext = 0; ext < numExts; ext++) + { + start = (const GLubyte *)glGetStringi(GL_EXTENSIONS, ext); + end = start + _glewStrLen(start); + if (_glewSearchExtension(name, start, end)) + return GL_TRUE; + } + return GL_FALSE; + } } /* ------------------------------------------------------------------------- */ @@ -18,27 +61,15 @@ static #endif GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) { - const GLubyte* s; - GLuint dot; GLint major, minor; const GLubyte* extStart; const GLubyte* extEnd; + GLint numExts, ext; /* query opengl version */ - s = glGetString(GL_VERSION); - dot = _glewStrCLen(s, '.'); - if (dot == 0) + if (!glewGetVersion(&major, &minor)) return GLEW_ERROR_NO_GL_VERSION; - major = s[dot-1]-'0'; - minor = s[dot+1]-'0'; - - if (minor < 0 || minor > 9) - minor = 0; - if (major<0 || major>9) - return GLEW_ERROR_NO_GL_VERSION; - - if (major == 1 && minor == 0) { return GLEW_ERROR_GL_VERSION_10_ONLY; diff --git a/auto/src/glew_init_glext.c b/auto/src/glew_init_glext.c index 103e551..938a0cc 100644 --- a/auto/src/glew_init_glext.c +++ b/auto/src/glew_init_glext.c @@ -1,23 +1,48 @@ - /* query opengl extensions string */ - extStart = glGetString(GL_EXTENSIONS); - if (extStart == 0) - extStart = (const GLubyte*)""; - extEnd = extStart + _glewStrLen(extStart); - - while (extStart < extEnd) + /* query opengl extensions string(s) */ + if(GLEW_VERSION_3_0) { - GLuint len = _glewStrCLen(extStart, ' '); - struct initflag *ptr = in_word_set(extStart, len); + GLuint len; + struct initflag *ptr; - if (ptr != NULL && ptr->flag != NULL) { + glGetIntegerv(GL_NUM_EXTENSIONS, &numExts); + for (ext = 0; ext < numExts; ext++) + { + extStart = glGetStringi(GL_EXTENSIONS, ext); + len = _glewStrLen(extStart); + ptr = in_word_set(extStart, len); + + if (ptr != NULL && ptr->flag != NULL) { #ifdef GLEW_MX - *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; + *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; #else - *ptr->flag = GL_TRUE; + *ptr->flag = GL_TRUE; #endif + } + extStart += len + 1; + } + } + else + { + extStart = glGetString(GL_EXTENSIONS); + if (extStart == 0) + extStart = (const GLubyte*)""; + extEnd = extStart + _glewStrLen(extStart); + + while (extStart < extEnd) + { + GLuint len = _glewStrCLen(extStart, ' '); + struct initflag *ptr = in_word_set(extStart, len); + + if (ptr != NULL && ptr->flag != NULL) { +#ifdef GLEW_MX + *(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE; +#else + *ptr->flag = GL_TRUE; +#endif + } + extStart += len + 1; } - extStart += len + 1; } /* initialize extensions */ From bb55cb4b314acf01df8e3ebe6707c0317bb362af Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Thu, 5 Feb 2015 09:32:21 +0100 Subject: [PATCH 3/8] Pass context profile mask and context flags to init functions. They will be needed to decide if GL functions are deprecated or removed. --- auto/bin/make_init.pl | 1 + auto/src/glew_head.c | 20 ++++++++++---------- auto/src/glew_init_gl.c | 9 +++++++++ auto/src/glew_init_glx.c | 2 ++ auto/src/glew_init_wgl.c | 2 ++ 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index 5e6200a..f437018 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -46,6 +46,7 @@ if (@ARGV) print "#ifdef $extname\n\n"; print "static GLboolean _glewInit_$extname (" . $type . "EW_CONTEXT_ARG_DEF_INIT)\n{\n GLboolean r = GL_FALSE;\n"; + print "#ifdef GLEW_MX\n (void)ctx;\n#endif\n (void)context_profile;\n (void)context_flags;\n"; output_decls($functions, \&make_pfn_def_init); print "\n return r;\n}\n\n"; print "#endif /* $extname */\n\n"; diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index 7d119c4..cb2dfe7 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -15,26 +15,26 @@ extern int memcmp(const void *, const void *, size_t); #ifdef GLEW_MX # define glewGetContext() ctx # ifdef _WIN32 -# define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx -# define GLEW_CONTEXT_ARG_VAR_INIT ctx +# define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx, GLint context_profile, GLint context_flags +# define GLEW_CONTEXT_ARG_VAR_INIT ctx, context_profile, context_flags # define wglewGetContext() ctx -# define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx +# define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx, GLint context_profile, GLint context_flags # define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx # else /* _WIN32 */ -# define GLEW_CONTEXT_ARG_DEF_INIT void -# define GLEW_CONTEXT_ARG_VAR_INIT +# define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext *ctx, GLint context_profile, GLint context_flags +# define GLEW_CONTEXT_ARG_VAR_INIT ctx, context_profile, context_flags # define glxewGetContext() ctx -# define GLXEW_CONTEXT_ARG_DEF_INIT void +# define GLXEW_CONTEXT_ARG_DEF_INIT GLXEWContext* ctx, GLint context_profile, GLint context_flags # define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx # endif /* _WIN32 */ # define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx #else /* GLEW_MX */ -# define GLEW_CONTEXT_ARG_DEF_INIT void -# define GLEW_CONTEXT_ARG_VAR_INIT +# define GLEW_CONTEXT_ARG_DEF_INIT GLint context_profile, GLint context_flags +# define GLEW_CONTEXT_ARG_VAR_INIT context_profile, context_flags # define GLEW_CONTEXT_ARG_DEF_LIST void -# define WGLEW_CONTEXT_ARG_DEF_INIT void +# define WGLEW_CONTEXT_ARG_DEF_INIT GLint context_profile, GLint context_flags # define WGLEW_CONTEXT_ARG_DEF_LIST void -# define GLXEW_CONTEXT_ARG_DEF_INIT void +# define GLXEW_CONTEXT_ARG_DEF_INIT GLint context_profile, GLint context_flags # define GLXEW_CONTEXT_ARG_DEF_LIST void #endif /* GLEW_MX */ diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index 65080c9..121a8c9 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -65,6 +65,8 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) const GLubyte* extStart; const GLubyte* extEnd; GLint numExts, ext; + GLint context_flags = 0; + GLint context_profile = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; /* query opengl version */ if (!glewGetVersion(&major, &minor)) @@ -96,4 +98,11 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) GLEW_VERSION_1_1 = GLEW_VERSION_1_2 == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE; } + if( GLEW_VERSION_3_0 ) + glGetIntegerv(GL_CONTEXT_FLAGS, &context_flags); + if( GLEW_VERSION_3_2 ) + glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &context_profile); + else if( GLEW_VERSION_3_1 && !glewGetExtension("GL_ARB_compatibility")) + context_profile = GL_CONTEXT_CORE_PROFILE_BIT; + /* initialize core functions */ diff --git a/auto/src/glew_init_glx.c b/auto/src/glew_init_glx.c index 6b4d7b7..93f7045 100644 --- a/auto/src/glew_init_glx.c +++ b/auto/src/glew_init_glx.c @@ -21,6 +21,8 @@ GLenum glxewInit (GLXEW_CONTEXT_ARG_DEF_LIST) int major, minor; const GLubyte* extStart; const GLubyte* extEnd; + GLint context_profile = 0, context_flags = 0; + /* initialize core GLX 1.2 */ if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT)) return GLEW_ERROR_GLX_VERSION_11_ONLY; /* initialize flags */ diff --git a/auto/src/glew_init_wgl.c b/auto/src/glew_init_wgl.c index f8c5116..fa8f1a0 100644 --- a/auto/src/glew_init_wgl.c +++ b/auto/src/glew_init_wgl.c @@ -29,6 +29,8 @@ GLenum GLEWAPIENTRY wglewInit (WGLEW_CONTEXT_ARG_DEF_LIST) GLboolean crippled; const GLubyte* extStart; const GLubyte* extEnd; + GLint context_profile = 0, context_flags = 0; + /* find wgl extension string query functions */ _wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB"); _wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT"); From b569f7c965142fc30b71740567537115f657dd87 Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Thu, 5 Feb 2015 09:53:34 +0100 Subject: [PATCH 4/8] Add optional deleter expression to GL function definitions. The expression follows the function definition separated by a ~ character, and is a simple boolean expression built with operators && and || from the elementary expressions "core" "forward" or a GL version number like "3.2". Parentheses are not supported, && binds stronger than || and may be ommited, i.e. "3.2 core" is equivalent to "3.2 && core". --- auto/bin/make.pl | 5 ++- auto/bin/make_def_fun.pl | 9 +++++ auto/bin/make_header.pl | 75 +++++++++++++++++++++++++++++++++++-- auto/bin/make_init.pl | 33 +++++++++++++++- auto/bin/make_struct_fun.pl | 9 +++++ 5 files changed, 125 insertions(+), 6 deletions(-) diff --git a/auto/bin/make.pl b/auto/bin/make.pl index 1bd5d40..b227adb 100755 --- a/auto/bin/make.pl +++ b/auto/bin/make.pl @@ -9,7 +9,7 @@ my %regex = ( extname => qr/^[A-Z][A-Za-z0-9_]+$/, exturl => qr/^http.+$/, - function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i, + function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)\s*(~.*)?$/i, token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+|[A-Z][A-Z0-9_]*)$/, type => qr/^typedef\s+(.+)$/, exact => qr/.*;$/, @@ -119,10 +119,11 @@ sub parse_ext($) } elsif (/$regex{function}/) { - my ($return, $name, $parms) = ($1, $2, $3); + my ($return, $name, $parms, $deleted) = ($1, $2, $3, $4); $functions{$name} = { rtype => $return, parms => $parms, + deleted => $deleted, }; } else { print STDERR "'$_' matched no regex.\n"; diff --git a/auto/bin/make_def_fun.pl b/auto/bin/make_def_fun.pl index 40e67d5..c7ddb0c 100755 --- a/auto/bin/make_def_fun.pl +++ b/auto/bin/make_def_fun.pl @@ -12,9 +12,18 @@ use warnings; do 'bin/make.pl'; +our %defined = (); + # function pointer declaration sub make_pfn_decl($%) { + our %defined; + + if( $defined{$_[0]} ) # avoid duplicate definitions + { + return ""; + } + $defined{$_[0]} = 1; return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;"; } diff --git a/auto/bin/make_header.pl b/auto/bin/make_header.pl index 934ef77..886e7b7 100755 --- a/auto/bin/make_header.pl +++ b/auto/bin/make_header.pl @@ -24,20 +24,89 @@ sub make_type($$) return "@_;" } +sub make_condition($) +{ + my $condition = ""; + my $needop = 0; + + for my $tok (split(/\s+/, $_[0])) { + if ($tok eq "~") { + # ignore + } elsif ($tok eq '&&') { + $condition .= ' && '; + $needop = 0; + } elsif ($tok eq '||') { + $condition .= ") || ("; + $needop = 0; + } else { + if ($needop) { + $condition .= ' && '; + } + if ($tok =~ /^\d/) { + # GL Version + $tok =~ s/[.]/_/g; + $condition .= "GL_VERSION_${tok}"; + } elsif ($tok eq "core") { + $condition .= " 0 "; + } elsif ($tok eq "forward") { + $condition .= " 0 "; + } + $needop = 1; + } + } + + # optimize expression + $condition = "(" . $condition . ")"; + $condition =~ s/[(][^)]* 0 [^)]*[)]/ 0 /g; + $condition =~ s/\|\|\s*0\s*//g; + $condition =~ s/\s*0\s*\|\|//g; + $condition =~ s/\s+0\s+/ 0 /g; + + if ($condition eq " 0 ") { + return "1"; + } else { + return "!($condition)"; + } +} + # function pointer type declaration sub make_pfn_type($%) { our $api; - return join(' ', "typedef", $_[1]->{rtype}, + my $prefix = ""; + my $suffix = ""; + + if ($_[1]->{deleted}) + { + $prefix = "#if " . make_condition($_[1]->{deleted}) . "\n"; + if ($prefix eq "#if 1\n") { + $prefix = ""; # if optimized away + } else { + $suffix = "\n#endif"; + } + } + return $prefix . join(' ', "typedef", $_[1]->{rtype}, "($api * PFN" . (uc $_[0]) . "PROC)", - "(" . $_[1]->{parms} . ")") . ";"; + "(" . $_[1]->{parms} . ")") . ";" . $suffix; } # function name alias sub make_pfn_alias($%) { our $type; - return join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")") + my $prefix = ""; + my $suffix = ""; + + if ($_[1]->{deleted}) + { + $prefix = "#if " . make_condition($_[1]->{deleted}) . "\n"; + if ($prefix eq "#if 1\n") { + $prefix = ""; # if optimized away + } else { + $suffix = "\n#endif"; + } + } + return $prefix . join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")") . $suffix; } my @extlist = (); diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index f437018..38b7fe9 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -18,7 +18,38 @@ do 'bin/make.pl'; sub make_pfn_def_init($%) { #my $name = prefixname($_[0]); - return " r = ((" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $_[0] . "\")) == NULL) || r;"; + my $condition = ""; + if ($_[1]{deleted}) { + my $needop = 0; + + for my $tok (split(/\s+/, $_[1]{deleted})) { + if ($tok eq "~") { + # ignore + } elsif ($tok eq '&&') { + $condition .= ' && '; + $needop = 0; + } elsif ($tok eq '||') { + $condition .= ') || ('; + $needop = 0; + } else { + if ($needop) { + $condition .= ' && '; + } + if ($tok =~ /^\d/) { + # GL Version + $tok =~ s/[.]/_/g; + $condition .= "GLEW_VERSION_${tok}"; + } elsif ($tok eq "core") { + $condition .= "(context_profile & GL_CONTEXT_CORE_PROFILE_BIT)"; + } elsif ($tok eq "forward") { + $condition .= "(context_flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)"; + } + $needop = 1; + } + } + $condition = "if( !(($condition)) ) "; + } + return " ${condition}r = ((" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $_[0] . "\")) == NULL) || r;"; } #------------------------------------------------------------------------------- diff --git a/auto/bin/make_struct_fun.pl b/auto/bin/make_struct_fun.pl index c885960..a6fdd15 100755 --- a/auto/bin/make_struct_fun.pl +++ b/auto/bin/make_struct_fun.pl @@ -12,10 +12,19 @@ use warnings; do 'bin/make.pl'; +our %defined = (); + # function pointer declaration sub make_pfn_decl($%) { our $export; + our %defined; + + if( $defined{$_[0]} ) # avoid duplicate definitions + { + return ""; + } + $defined{$_[0]} = 1; return $export . " PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";"; } From f6cc5ed156a9ecce4c771e1c7e5cf429b5a1253f Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Thu, 5 Feb 2015 10:14:42 +0100 Subject: [PATCH 5/8] Mark core functions that have been deprecated/removed. --- auto/core/gl/GL_VERSION_1_3 | 74 ++++++++++++++++++------------------ auto/core/gl/GL_VERSION_1_4 | 76 ++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/auto/core/gl/GL_VERSION_1_3 b/auto/core/gl/GL_VERSION_1_3 index 0c531d4..40d7ff6 100644 --- a/auto/core/gl/GL_VERSION_1_3 +++ b/auto/core/gl/GL_VERSION_1_3 @@ -99,7 +99,7 @@ http://www.opengl.org/documentation/specs/version1.3/glspec13.pdf GL_CLAMP_TO_BORDER 0x812D void glActiveTexture (GLenum texture) - void glClientActiveTexture (GLenum texture) + void glClientActiveTexture (GLenum texture) ~ 3.0 forward || 3.2 core void glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data) void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) void glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) @@ -107,40 +107,40 @@ http://www.opengl.org/documentation/specs/version1.3/glspec13.pdf void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) void glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) void glGetCompressedTexImage (GLenum target, GLint lod, void *img) - void glLoadTransposeMatrixd (const GLdouble m[16]) - void glLoadTransposeMatrixf (const GLfloat m[16]) - void glMultTransposeMatrixd (const GLdouble m[16]) - void glMultTransposeMatrixf (const GLfloat m[16]) - void glMultiTexCoord1d (GLenum target, GLdouble s) - void glMultiTexCoord1dv (GLenum target, const GLdouble *v) - void glMultiTexCoord1f (GLenum target, GLfloat s) - void glMultiTexCoord1fv (GLenum target, const GLfloat *v) - void glMultiTexCoord1i (GLenum target, GLint s) - void glMultiTexCoord1iv (GLenum target, const GLint *v) - void glMultiTexCoord1s (GLenum target, GLshort s) - void glMultiTexCoord1sv (GLenum target, const GLshort *v) - void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t) - void glMultiTexCoord2dv (GLenum target, const GLdouble *v) - void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t) - void glMultiTexCoord2fv (GLenum target, const GLfloat *v) - void glMultiTexCoord2i (GLenum target, GLint s, GLint t) - void glMultiTexCoord2iv (GLenum target, const GLint *v) - void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t) - void glMultiTexCoord2sv (GLenum target, const GLshort *v) - void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r) - void glMultiTexCoord3dv (GLenum target, const GLdouble *v) - void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r) - void glMultiTexCoord3fv (GLenum target, const GLfloat *v) - void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r) - void glMultiTexCoord3iv (GLenum target, const GLint *v) - void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r) - void glMultiTexCoord3sv (GLenum target, const GLshort *v) - void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) - void glMultiTexCoord4dv (GLenum target, const GLdouble *v) - void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) - void glMultiTexCoord4fv (GLenum target, const GLfloat *v) - void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q) - void glMultiTexCoord4iv (GLenum target, const GLint *v) - void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) - void glMultiTexCoord4sv (GLenum target, const GLshort *v) + void glLoadTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward || 3.2 core + void glLoadTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward || 3.2 core + void glMultTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward || 3.2 core + void glMultTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1d (GLenum target, GLdouble s) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1f (GLenum target, GLfloat s) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1i (GLenum target, GLint s) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1s (GLenum target, GLshort s) ~ 3.0 forward || 3.2 core + void glMultiTexCoord1sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2i (GLenum target, GLint s, GLint t) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t) ~ 3.0 forward || 3.2 core + void glMultiTexCoord2sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r) ~ 3.0 forward || 3.2 core + void glMultiTexCoord3sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) ~ 3.0 forward || 3.2 core + void glMultiTexCoord4sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core void glSampleCoverage (GLclampf value, GLboolean invert) diff --git a/auto/core/gl/GL_VERSION_1_4 b/auto/core/gl/GL_VERSION_1_4 index 2c9ba46..6bce711 100644 --- a/auto/core/gl/GL_VERSION_1_4 +++ b/auto/core/gl/GL_VERSION_1_4 @@ -42,48 +42,48 @@ http://www.opengl.org/documentation/specs/version1.4/glspec14.pdf GL_MIRRORED_REPEAT 0x8370 void glBlendEquation (GLenum mode) void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) - void glFogCoordf (GLfloat coord) - void glFogCoordfv (const GLfloat *coord) - void glFogCoordd (GLdouble coord) - void glFogCoorddv (const GLdouble *coord) - void glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer) + void glFogCoordf (GLfloat coord) ~ 3.0 forward || 3.2 core + void glFogCoordfv (const GLfloat *coord) ~ 3.0 forward || 3.2 core + void glFogCoordd (GLdouble coord) ~ 3.0 forward || 3.2 core + void glFogCoorddv (const GLdouble *coord) ~ 3.0 forward || 3.2 core + void glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward || 3.2 core void glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount) void glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const* indices, GLsizei drawcount) void glPointParameteri (GLenum pname, GLint param) void glPointParameteriv (GLenum pname, const GLint *params) void glPointParameterf (GLenum pname, GLfloat param) void glPointParameterfv (GLenum pname, const GLfloat *params) - void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue) - void glSecondaryColor3bv (const GLbyte *v) - void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue) - void glSecondaryColor3dv (const GLdouble *v) - void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue) - void glSecondaryColor3fv (const GLfloat *v) - void glSecondaryColor3i (GLint red, GLint green, GLint blue) - void glSecondaryColor3iv (const GLint *v) - void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue) - void glSecondaryColor3sv (const GLshort *v) - void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue) - void glSecondaryColor3ubv (const GLubyte *v) - void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue) - void glSecondaryColor3uiv (const GLuint *v) - void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue) - void glSecondaryColor3usv (const GLushort *v) - void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer) + void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3bv (const GLbyte *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3dv (const GLdouble *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3fv (const GLfloat *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3i (GLint red, GLint green, GLint blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3iv (const GLint *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3sv (const GLshort *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3ubv (const GLubyte *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3uiv (const GLuint *v) ~ 3.0 forward || 3.2 core + void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue) ~ 3.0 forward || 3.2 core + void glSecondaryColor3usv (const GLushort *v) ~ 3.0 forward || 3.2 core + void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward || 3.2 core void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) - void glWindowPos2d (GLdouble x, GLdouble y) - void glWindowPos2f (GLfloat x, GLfloat y) - void glWindowPos2i (GLint x, GLint y) - void glWindowPos2s (GLshort x, GLshort y) - void glWindowPos2dv (const GLdouble *p) - void glWindowPos2fv (const GLfloat *p) - void glWindowPos2iv (const GLint *p) - void glWindowPos2sv (const GLshort *p) - void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z) - void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z) - void glWindowPos3i (GLint x, GLint y, GLint z) - void glWindowPos3s (GLshort x, GLshort y, GLshort z) - void glWindowPos3dv (const GLdouble *p) - void glWindowPos3fv (const GLfloat *p) - void glWindowPos3iv (const GLint *p) - void glWindowPos3sv (const GLshort *p) + void glWindowPos2d (GLdouble x, GLdouble y) ~ 3.0 forward || 3.2 core + void glWindowPos2f (GLfloat x, GLfloat y) ~ 3.0 forward || 3.2 core + void glWindowPos2i (GLint x, GLint y) ~ 3.0 forward || 3.2 core + void glWindowPos2s (GLshort x, GLshort y) ~ 3.0 forward || 3.2 core + void glWindowPos2dv (const GLdouble *p) ~ 3.0 forward || 3.2 core + void glWindowPos2fv (const GLfloat *p) ~ 3.0 forward || 3.2 core + void glWindowPos2iv (const GLint *p) ~ 3.0 forward || 3.2 core + void glWindowPos2sv (const GLshort *p) ~ 3.0 forward || 3.2 core + void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z) ~ 3.0 forward || 3.2 core + void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z) ~ 3.0 forward || 3.2 core + void glWindowPos3i (GLint x, GLint y, GLint z) ~ 3.0 forward || 3.2 core + void glWindowPos3s (GLshort x, GLshort y, GLshort z) ~ 3.0 forward || 3.2 core + void glWindowPos3dv (const GLdouble *p) ~ 3.0 forward || 3.2 core + void glWindowPos3fv (const GLfloat *p) ~ 3.0 forward || 3.2 core + void glWindowPos3iv (const GLint *p) ~ 3.0 forward || 3.2 core + void glWindowPos3sv (const GLshort *p) ~ 3.0 forward || 3.2 core From 510ac5680c45cea33081871d1811989576425876 Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Sat, 7 Feb 2015 10:01:01 +0100 Subject: [PATCH 6/8] Add deleters to functions that exist both in core and extensions. Parts of later GL versions are often published as extension too, so these functions may be queried twice. --- auto/Makefile | 5 ++--- auto/bin/parse_spec.pl | 28 +++++++++++++++++++++++++++- auto/bin/update_ext.sh | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/auto/Makefile b/auto/Makefile index 70606d1..21cbb37 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -113,7 +113,7 @@ $(EXT)/.dummy: $(REGISTRY)/.dummy @echo "Creating descriptors" @echo "--------------------------------------------------------------------" rm -rf $(EXT) - $(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST) + $(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST) $(CORE) $(BIN)/$(FILTER) $(EXT) ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin) find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \ @@ -199,8 +199,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy $(SRC)/glew_init_hash.c cp -f $(SRC)/glew_license.h $@ cat $(SRC)/glew_head.c >> $@ echo -e "\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@ - $(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@ - $(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@ + $(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@ echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@ echo -e "\n#if !defined(GLEW_MX)" >> $@; echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@ diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index 00fdde9..d4ff2b9 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -307,8 +307,10 @@ sub parse_spec($) my @speclist = (); my %extensions = (); +my %fcn_in_core = (); my $ext_dir = shift; +my $core_dir = shift; my $reg_http = "http://www.opengl.org/registry/specs/"; # Take command line arguments or read list from file @@ -320,6 +322,24 @@ if (@ARGV) @speclist = split "\n", (<>); } +# Get functions moved to the GL core +my %core_fnc = (); +foreach my $spec (<$core_dir/GL_VERSION_*>) +{ + my $vsn = $spec; + $vsn =~ s/.*\/GL_VERSION_(\d+)_(\d+)/$1.$2/; + + open SPEC, "<$spec"; + while () + { + if ($_ =~ qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)\s*(~.*)?$/i ) + { + $core_fnc{$2} = $vsn; + } + } + close SPEC; +} + foreach my $spec (sort @speclist) { my ($extname, $extnames, $tokens, $functions) = parse_spec($spec); @@ -370,7 +390,13 @@ foreach my $spec (sort @speclist) { if ($function =~ /^$prefix.*/i) { - print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . "\n"; + my $deleter = ""; + + if ($core_fnc{$function}) + { + $deleter = " ~ " . $core_fnc{$function}; + } + print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . $deleter . "\n"; } } close EXT; diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index e990a21..f350cbc 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -20,6 +20,6 @@ if [ ! -d $1 ] ; then # Parse each of the extensions in the registry find $2 -name doc -type d -prune -o -name "*.txt" -print | \ - grep -v -f $3 | sort | bin/parse_spec.pl $1 + grep -v -f $3 | sort | bin/parse_spec.pl $1 $4 fi From 6b47b2f3b5232e938e7d9210ae442112adf9c1d4 Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Sat, 7 Feb 2015 11:02:52 +0100 Subject: [PATCH 7/8] Update core GL specs with functions that exist in extensions too. --- auto/core/gl/GL_VERSION_3_0 | 71 ++++++++++++++++------ auto/core/gl/GL_VERSION_3_1 | 8 +++ auto/core/gl/GL_VERSION_3_2 | 16 +++++ auto/core/gl/GL_VERSION_3_3 | 19 ++++++ auto/core/gl/GL_VERSION_4_0 | 41 +++++++++++++ auto/core/gl/GL_VERSION_4_1 | 89 +++++++++++++++++++++++++++ auto/core/gl/GL_VERSION_4_2 | 16 ++++- auto/core/gl/GL_VERSION_4_3 | 46 ++++++++++++++ auto/core/gl/GL_VERSION_4_4 | 10 +++- auto/core/gl/GL_VERSION_4_5 | 116 ++++++++++++++++++++++++++++++++++-- 10 files changed, 406 insertions(+), 26 deletions(-) diff --git a/auto/core/gl/GL_VERSION_3_0 b/auto/core/gl/GL_VERSION_3_0 index c87cdab..1e29409 100644 --- a/auto/core/gl/GL_VERSION_3_0 +++ b/auto/core/gl/GL_VERSION_3_0 @@ -106,18 +106,6 @@ https://www.opengl.org/registry/doc/glspec30.20080923.pdf GL_QUERY_NO_WAIT 0x8E14 GL_QUERY_BY_REGION_WAIT 0x8E15 GL_QUERY_BY_REGION_NO_WAIT 0x8E16 - void glColorMaski (GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) - void glGetBooleani_v (GLenum pname, GLuint index, GLboolean* data) - void glEnablei (GLenum cap, GLuint index) - void glDisablei (GLenum cap, GLuint index) - GLboolean glIsEnabledi (GLenum cap, GLuint index) - void glBeginTransformFeedback (GLenum primitiveMode) - void glEndTransformFeedback (void) - void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) - void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) - void glClampColor (GLenum target, GLenum clamp) - void glBeginConditionalRender (GLuint id, GLenum mode) - void glEndConditionalRender (void) void glVertexAttribI1i (GLuint index, GLint v0) void glVertexAttribI2i (GLuint index, GLint v0, GLint v1) void glVertexAttribI3i (GLuint index, GLint v0, GLint v1, GLint v2) @@ -139,11 +127,22 @@ https://www.opengl.org/registry/doc/glspec30.20080923.pdf void glVertexAttribI4ubv (GLuint index, const GLubyte* v0) void glVertexAttribI4usv (GLuint index, const GLushort* v0) void glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void*pointer) - void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params) - void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params) - void glGetUniformuiv (GLuint program, GLint location, GLuint* params) - void glBindFragDataLocation (GLuint program, GLuint colorNumber, const GLchar* name) - GLint glGetFragDataLocation (GLuint program, const GLchar* name) + void* glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) + void glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length) + void glGenVertexArrays (GLsizei n, GLuint* arrays) + void glDeleteVertexArrays (GLsizei n, const GLuint* arrays) + void glBindVertexArray (GLuint array) + void glBeginQuery (GLenum target, GLuint id) + void glEndQuery (GLenum target) + void glGenQueries (GLsizei n, GLuint* ids) + void glDeleteQueries (GLsizei n, const GLuint* ids) + void glBeginConditionalRender (GLuint id, GLenum mode) + void glEndConditionalRender (void) + void glBeginTransformFeedback (GLenum primitiveMode) + void glEndTransformFeedback (void) + void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) + void glBindBufferBase (GLenum target, GLuint index, GLuint buffer) + void glClampColor (GLenum target, GLenum clamp) void glUniform1ui (GLint location, GLuint v0) void glUniform2ui (GLint location, GLuint v0, GLuint v1) void glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2) @@ -152,12 +151,46 @@ https://www.opengl.org/registry/doc/glspec30.20080923.pdf void glUniform2uiv (GLint location, GLsizei count, const GLuint* value) void glUniform3uiv (GLint location, GLsizei count, const GLuint* value) void glUniform4uiv (GLint location, GLsizei count, const GLuint* value) + void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) + void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) void glTexParameterIiv (GLenum target, GLenum pname, const GLint* params) void glTexParameterIuiv (GLenum target, GLenum pname, const GLuint* params) - void glGetTexParameterIiv (GLenum target, GLenum pname, GLint* params) - void glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint* params) + void glGenerateMipmap (GLenum target) + void glBindFragDataLocation (GLuint program, GLuint colorNumber, const GLchar* name) + GLint glGetFragDataLocation (GLuint program, const GLchar* name) + void glEnablei (GLenum cap, GLuint index) + void glDisablei (GLenum cap, GLuint index) + void glColorMaski (GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) void glClearBufferiv (GLenum buffer, GLint drawBuffer, const GLint* value) void glClearBufferuiv (GLenum buffer, GLint drawBuffer, const GLuint* value) void glClearBufferfv (GLenum buffer, GLint drawBuffer, const GLfloat* value) void glClearBufferfi (GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil) + void glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) + void glBindFramebuffer (GLenum target, GLuint framebuffer) + void glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers) + void glGenFramebuffers (GLsizei n, GLuint* framebuffers) + void glBindRenderbuffer (GLenum target, GLuint renderbuffer) + void glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers) + void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers) + void glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) + void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) + void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) + void glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) + void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) + void glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer) + void glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) + GLenum glCheckFramebufferStatus (GLenum target) + void glGetBooleani_v (GLenum pname, GLuint index, GLboolean* data) + void glGetIntegeri_v (GLenum pname, GLuint index, GLint *data) + GLboolean glIsEnabledi (GLenum cap, GLuint index) + void glGetTexParameterIiv (GLenum target, GLenum pname, GLint* params) + void glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint* params) + void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params) + void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params) const GLubyte* glGetStringi (GLenum name, GLuint index) + GLboolean glIsVertexArray (GLuint array) + void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params) + void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params) + void glGetUniformuiv (GLuint program, GLint location, GLuint* params) + GLboolean glIsFramebuffer (GLuint framebuffer) + GLboolean glIsRenderbuffer (GLuint renderbuffer) diff --git a/auto/core/gl/GL_VERSION_3_1 b/auto/core/gl/GL_VERSION_3_1 index a829a77..a433ea5 100644 --- a/auto/core/gl/GL_VERSION_3_1 +++ b/auto/core/gl/GL_VERSION_3_1 @@ -37,5 +37,13 @@ https://www.opengl.org/registry/doc/glspec31.20090528.pdf GL_BUFFER_MAP_OFFSET 0x9121 void glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount) void glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) + void glCopyBufferSubData (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size) void glTexBuffer (GLenum target, GLenum internalFormat, GLuint buffer) void glPrimitiveRestartIndex (GLuint buffer) + GLuint glGetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName) + void glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) + void glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) + void glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const * uniformNames, GLuint* uniformIndices) + void glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName) + void glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) + void glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) diff --git a/auto/core/gl/GL_VERSION_3_2 b/auto/core/gl/GL_VERSION_3_2 index 85cea08..03c696a 100644 --- a/auto/core/gl/GL_VERSION_3_2 +++ b/auto/core/gl/GL_VERSION_3_2 @@ -23,6 +23,22 @@ https://www.opengl.org/registry/doc/glspec32.compatibility.20091207.pdf GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 GL_CONTEXT_PROFILE_MASK 0x9126 + void glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) + void glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex) + void glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) + void glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei* count, GLenum type, const void *const *indices, GLsizei primcount, const GLint *basevertex) + void glProvokingVertex (GLenum mode) + void glGetMultisamplefv (GLenum pname, GLuint index, GLfloat* val) + void glSampleMaski (GLuint index, GLbitfield mask) + void glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) + void glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) void glGetInteger64i_v (GLenum pname, GLuint index, GLint64 * data) void glGetBufferParameteri64v (GLenum target, GLenum value, GLint64 * data) void glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level) + GLenum glClientWaitSync (GLsync GLsync,GLbitfield flags,GLuint64 timeout) + void glDeleteSync (GLsync GLsync) + GLsync glFenceSync (GLenum condition,GLbitfield flags) + void glGetInteger64v (GLenum pname, GLint64* params) + void glGetSynciv (GLsync GLsync,GLenum pname,GLsizei bufSize,GLsizei* length, GLint *values) + GLboolean glIsSync (GLsync GLsync) + void glWaitSync (GLsync GLsync,GLbitfield flags,GLuint64 timeout) diff --git a/auto/core/gl/GL_VERSION_3_3 b/auto/core/gl/GL_VERSION_3_3 index bbd6914..d118350 100644 --- a/auto/core/gl/GL_VERSION_3_3 +++ b/auto/core/gl/GL_VERSION_3_3 @@ -4,3 +4,22 @@ https://www.opengl.org/registry/doc/glspec33.compatibility.20100311.pdf GL_RGB10_A2UI 0x906F GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE void glVertexAttribDivisor (GLuint index, GLuint divisor) + void glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar * name) + GLint glGetFragDataIndex (GLuint program, const GLchar * name) + void glBindSampler (GLuint unit, GLuint sampler) + void glDeleteSamplers (GLsizei count, const GLuint * samplers) + void glGenSamplers (GLsizei count, GLuint* samplers) + void glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint* params) + void glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint* params) + void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params) + void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params) + GLboolean glIsSampler (GLuint sampler) + void glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint* params) + void glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint* params) + void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param) + void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* params) + void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param) + void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint* params) + void glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64* params) + void glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64* params) + void glQueryCounter (GLuint id, GLenum target) diff --git a/auto/core/gl/GL_VERSION_4_0 b/auto/core/gl/GL_VERSION_4_0 index a3a0dc2..8df4435 100644 --- a/auto/core/gl/GL_VERSION_4_0 +++ b/auto/core/gl/GL_VERSION_4_0 @@ -18,3 +18,44 @@ https://www.opengl.org/registry/doc/glspec40.compatibility.20100311.pdf void glBlendEquationi (GLuint buf, GLenum mode) void glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) void glBlendFunci (GLuint buf, GLenum src, GLenum dst) + void glDrawArraysIndirect (GLenum mode, const void *indirect) + void glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect) + void glGetUniformdv (GLuint program, GLint location, GLdouble* params) + void glUniform1d (GLint location, GLdouble x) + void glUniform1dv (GLint location, GLsizei count, const GLdouble* value) + void glUniform2d (GLint location, GLdouble x, GLdouble y) + void glUniform2dv (GLint location, GLsizei count, const GLdouble* value) + void glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z) + void glUniform3dv (GLint location, GLsizei count, const GLdouble* value) + void glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) + void glUniform4dv (GLint location, GLsizei count, const GLdouble* value) + void glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar *name) + void glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar *name) + void glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values) + void glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint* values) + GLuint glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar* name) + GLint glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar* name) + void glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint* params) + void glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint* indices) + void glPatchParameterfv (GLenum pname, const GLfloat* values) + void glPatchParameteri (GLenum pname, GLint value) + void glBindTransformFeedback (GLenum target, GLuint id) + void glDeleteTransformFeedbacks (GLsizei n, const GLuint* ids) + void glDrawTransformFeedback (GLenum mode, GLuint id) + void glGenTransformFeedbacks (GLsizei n, GLuint* ids) + GLboolean glIsTransformFeedback (GLuint id) + void glPauseTransformFeedback (void) + void glResumeTransformFeedback (void) + void glBeginQueryIndexed (GLenum target, GLuint index, GLuint id) + void glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream) + void glEndQueryIndexed (GLenum target, GLuint index) + void glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint* params) diff --git a/auto/core/gl/GL_VERSION_4_1 b/auto/core/gl/GL_VERSION_4_1 index 91da382..feff920 100644 --- a/auto/core/gl/GL_VERSION_4_1 +++ b/auto/core/gl/GL_VERSION_4_1 @@ -1,2 +1,91 @@ GL_VERSION_4_1 https://www.opengl.org/registry/doc/glspec41.compatibility.20100725.pdf + + void glClearDepthf (GLclampf d) + void glDepthRangef (GLclampf n, GLclampf f) + void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint *precision) + void glReleaseShaderCompiler (void) + void glShaderBinary (GLsizei count, const GLuint* shaders, GLenum binaryformat, const void*binary, GLsizei length) + void glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum *binaryFormat, void*binary) + void glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length) + void glProgramParameteri (GLuint program, GLenum pname, GLint value) + void glActiveShaderProgram (GLuint pipeline, GLuint program) + void glBindProgramPipeline (GLuint pipeline) + GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar * const * strings) + void glDeleteProgramPipelines (GLsizei n, const GLuint* pipelines) + void glGenProgramPipelines (GLsizei n, GLuint* pipelines) + void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar *infoLog) + void glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint* params) + GLboolean glIsProgramPipeline (GLuint pipeline) + void glProgramUniform1d (GLuint program, GLint location, GLdouble x) + void glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble* value) + void glProgramUniform1f (GLuint program, GLint location, GLfloat x) + void glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat* value) + void glProgramUniform1i (GLuint program, GLint location, GLint x) + void glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint* value) + void glProgramUniform1ui (GLuint program, GLint location, GLuint x) + void glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint* value) + void glProgramUniform2d (GLuint program, GLint location, GLdouble x, GLdouble y) + void glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble* value) + void glProgramUniform2f (GLuint program, GLint location, GLfloat x, GLfloat y) + void glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat* value) + void glProgramUniform2i (GLuint program, GLint location, GLint x, GLint y) + void glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint* value) + void glProgramUniform2ui (GLuint program, GLint location, GLuint x, GLuint y) + void glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint* value) + void glProgramUniform3d (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z) + void glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble* value) + void glProgramUniform3f (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) + void glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat* value) + void glProgramUniform3i (GLuint program, GLint location, GLint x, GLint y, GLint z) + void glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint* value) + void glProgramUniform3ui (GLuint program, GLint location, GLuint x, GLuint y, GLuint z) + void glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint* value) + void glProgramUniform4d (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) + void glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble* value) + void glProgramUniform4f (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) + void glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat* value) + void glProgramUniform4i (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) + void glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint* value) + void glProgramUniform4ui (GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) + void glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint* value) + void glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) + void glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + void glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program) + void glValidateProgramPipeline (GLuint pipeline) + void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble* params) + void glVertexAttribL1d (GLuint index, GLdouble x) + void glVertexAttribL1dv (GLuint index, const GLdouble* v) + void glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y) + void glVertexAttribL2dv (GLuint index, const GLdouble* v) + void glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z) + void glVertexAttribL3dv (GLuint index, const GLdouble* v) + void glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) + void glVertexAttribL4dv (GLuint index, const GLdouble* v) + void glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) + void glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd * v) + void glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f) + void glGetDoublei_v (GLenum target, GLuint index, GLdouble* data) + void glGetFloati_v (GLenum target, GLuint index, GLfloat* data) + void glScissorArrayv (GLuint first, GLsizei count, const GLint * v) + void glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) + void glScissorIndexedv (GLuint index, const GLint * v) + void glViewportArrayv (GLuint first, GLsizei count, const GLfloat * v) + void glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) + void glViewportIndexedfv (GLuint index, const GLfloat * v) diff --git a/auto/core/gl/GL_VERSION_4_2 b/auto/core/gl/GL_VERSION_4_2 index d5c1708..2c337f5 100644 --- a/auto/core/gl/GL_VERSION_4_2 +++ b/auto/core/gl/GL_VERSION_4_2 @@ -9,4 +9,18 @@ https://www.opengl.org/registry/doc/glspec42.compatibility.20120427.pdf GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F - + void glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint* params) + void glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) + void glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) + void glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) + void glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) + void glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) + void glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) + void glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei primcount) + void glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei primcount) + void glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance) + void glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance) + void glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance) + void glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) + void glMemoryBarrier (GLbitfield barriers) + void glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) diff --git a/auto/core/gl/GL_VERSION_4_3 b/auto/core/gl/GL_VERSION_4_3 index dc2b408..62db92d 100644 --- a/auto/core/gl/GL_VERSION_4_3 +++ b/auto/core/gl/GL_VERSION_4_3 @@ -3,3 +3,49 @@ https://www.opengl.org/registry/doc/glspec43.compatibility.20130214.pdf GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 + void glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data) + void glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data) + void glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data) + void glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data) + void glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) + void glDispatchComputeIndirect (GLintptr indirect) + void glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) + void glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam) + void glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) + void glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf) + GLuint glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) + void glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar *label) + void glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei* length, GLchar *label) + void glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar* label) + void glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar* label) + void glPopDebugGroup (void) + void glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar * message) + void glFramebufferParameteri (GLenum target, GLenum pname, GLint param) + void glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint* params) + void glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params) + void glInvalidateBufferData (GLuint buffer) + void glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length) + void glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments) + void glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) + void glInvalidateTexImage (GLuint texture, GLint level) + void glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth) + void glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride) + void glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride) + void glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint* params) + GLuint glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar* name) + GLint glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar* name) + GLint glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar* name) + void glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar *name) + void glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei *length, GLint *params) + void glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding) + void glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) + void glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) + void glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) + void glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) + void glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) + void glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) + void glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) + void glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) + void glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) + void glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) + typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) diff --git a/auto/core/gl/GL_VERSION_4_4 b/auto/core/gl/GL_VERSION_4_4 index 959c146..c4f64ee 100644 --- a/auto/core/gl/GL_VERSION_4_4 +++ b/auto/core/gl/GL_VERSION_4_4 @@ -4,4 +4,12 @@ https://www.opengl.org/registry/doc/glspec44.compatibility.pdf GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 GL_TEXTURE_BUFFER_BINDING 0x8C2A - + void glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags) + void glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data) + void glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data) + void glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint* buffers) + void glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizeiptr *sizes) + void glBindImageTextures (GLuint first, GLsizei count, const GLuint* textures) + void glBindSamplers (GLuint first, GLsizei count, const GLuint* samplers) + void glBindTextures (GLuint first, GLsizei count, const GLuint* textures) + void glBindVertexBuffers (GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizei *strides) diff --git a/auto/core/gl/GL_VERSION_4_5 b/auto/core/gl/GL_VERSION_4_5 index 3c06e85..0d9ad70 100644 --- a/auto/core/gl/GL_VERSION_4_5 +++ b/auto/core/gl/GL_VERSION_4_5 @@ -1,8 +1,114 @@ GL_VERSION_4_5 https://www.opengl.org/registry/doc/glspec45.compatibility.pdf - GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 - GLenum glGetGraphicsResetStatus (void) - void glGetnTexImage (GLenum tex, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *pixels) - void glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, GLvoid *pixels) - void glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params) + GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 + GLenum glGetGraphicsResetStatus (void) + void glClipControl (GLenum origin, GLenum depth) + void glMemoryBarrierByRegion (GLbitfield barriers) + void glBindTextureUnit (GLuint unit, GLuint texture) + void glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) + GLenum glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target) + void glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data) + void glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data) + void glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil) + void glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat* value) + void glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint* value) + void glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint* value) + void glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data) + void glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) + void glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) + void glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) + void glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) + void glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) + void glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) + void glCreateBuffers (GLsizei n, GLuint* buffers) + void glCreateFramebuffers (GLsizei n, GLuint* framebuffers) + void glCreateProgramPipelines (GLsizei n, GLuint* pipelines) + void glCreateQueries (GLenum target, GLsizei n, GLuint* ids) + void glCreateRenderbuffers (GLsizei n, GLuint* renderbuffers) + void glCreateSamplers (GLsizei n, GLuint* samplers) + void glCreateTextures (GLenum target, GLsizei n, GLuint* textures) + void glCreateTransformFeedbacks (GLsizei n, GLuint* ids) + void glCreateVertexArrays (GLsizei n, GLuint* arrays) + void glDisableVertexArrayAttrib (GLuint vaobj, GLuint index) + void glEnableVertexArrayAttrib (GLuint vaobj, GLuint index) + void glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length) + void glGenerateTextureMipmap (GLuint texture) + void glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels) + void glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64* params) + void glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint* params) + void glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void** params) + void glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data) + void glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params) + void glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint* param) + void glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint* params) + void glGetQueryBufferObjecti64v (GLuint id,GLuint buffer,GLenum pname,GLintptr offset) + void glGetQueryBufferObjectiv (GLuint id,GLuint buffer,GLenum pname,GLintptr offset) + void glGetQueryBufferObjectui64v (GLuint id,GLuint buffer,GLenum pname,GLintptr offset) + void glGetQueryBufferObjectuiv (GLuint id,GLuint buffer,GLenum pname,GLintptr offset) + void glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels) + void glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat* params) + void glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint* params) + void glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint* params) + void glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint* params) + void glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat* params) + void glGetTextureParameteriv (GLuint texture, GLenum pname, GLint* params) + void glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64* param) + void glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint* param) + void glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint* param) + void glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64* param) + void glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint* param) + void glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint* param) + void glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments) + void glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) + void * glMapNamedBuffer (GLuint buffer, GLenum access) + void * glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) + void glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage) + void glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags) + void glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data) + void glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum mode) + void glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum* bufs) + void glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param) + void glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum mode) + void glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) + void glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) + void glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) + void glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) + void glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) + void glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer) + void glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) + void glTextureParameterIiv (GLuint texture, GLenum pname, const GLint* params) + void glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint* params) + void glTextureParameterf (GLuint texture, GLenum pname, GLfloat param) + void glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat* param) + void glTextureParameteri (GLuint texture, GLenum pname, GLint param) + void glTextureParameteriv (GLuint texture, GLenum pname, const GLint* param) + void glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) + void glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) + void glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) + void glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) + void glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) + void glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels) + void glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) + void glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) + void glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer) + void glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) + GLboolean glUnmapNamedBuffer (GLuint buffer) + void glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex) + void glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) + void glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) + void glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) + void glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor) + void glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer) + void glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) + void glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizei *strides) + void glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels) + void glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels) + void glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat* params) + void glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint* params) + void glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint* params) + void glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) + void glTextureBarrier (void) + void glGetnTexImage (GLenum tex, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *pixels) + void glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, GLvoid *pixels) + void glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params) From 80e905a30affbef2a2a610d2ba7ca01eb61c8bd2 Mon Sep 17 00:00:00 2001 From: Matthias Bentrup Date: Wed, 11 Feb 2015 09:48:53 +0100 Subject: [PATCH 8/8] Fix forward compatible compatibility profiles. The compatibility functions have not only been un-removed, but also un-deprecated, so they should be present in the forward-compatible compatibility profile. --- auto/bin/make_header.pl | 4 ++ auto/bin/make_init.pl | 4 ++ auto/core/gl/GL_VERSION_1_3 | 74 ++++++++++++++++++------------------ auto/core/gl/GL_VERSION_1_4 | 76 ++++++++++++++++++------------------- 4 files changed, 83 insertions(+), 75 deletions(-) diff --git a/auto/bin/make_header.pl b/auto/bin/make_header.pl index 886e7b7..f4a4923 100755 --- a/auto/bin/make_header.pl +++ b/auto/bin/make_header.pl @@ -42,6 +42,10 @@ sub make_condition($) if ($needop) { $condition .= ' && '; } + if ($tok =~ /^!/) { + $condition .= '!'; + $tok =~ s/^!//; + } if ($tok =~ /^\d/) { # GL Version $tok =~ s/[.]/_/g; diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index 38b7fe9..a739389 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -35,6 +35,10 @@ sub make_pfn_def_init($%) if ($needop) { $condition .= ' && '; } + if ($tok =~ /^!/) { + $condition .= '!'; + $tok =~ s/^!//; + } if ($tok =~ /^\d/) { # GL Version $tok =~ s/[.]/_/g; diff --git a/auto/core/gl/GL_VERSION_1_3 b/auto/core/gl/GL_VERSION_1_3 index 40d7ff6..ee424e7 100644 --- a/auto/core/gl/GL_VERSION_1_3 +++ b/auto/core/gl/GL_VERSION_1_3 @@ -99,7 +99,7 @@ http://www.opengl.org/documentation/specs/version1.3/glspec13.pdf GL_CLAMP_TO_BORDER 0x812D void glActiveTexture (GLenum texture) - void glClientActiveTexture (GLenum texture) ~ 3.0 forward || 3.2 core + void glClientActiveTexture (GLenum texture) ~ 3.0 forward !3.2 || 3.2 core void glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data) void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) void glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) @@ -107,40 +107,40 @@ http://www.opengl.org/documentation/specs/version1.3/glspec13.pdf void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) void glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) void glGetCompressedTexImage (GLenum target, GLint lod, void *img) - void glLoadTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward || 3.2 core - void glLoadTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward || 3.2 core - void glMultTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward || 3.2 core - void glMultTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1d (GLenum target, GLdouble s) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1f (GLenum target, GLfloat s) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1i (GLenum target, GLint s) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1s (GLenum target, GLshort s) ~ 3.0 forward || 3.2 core - void glMultiTexCoord1sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2i (GLenum target, GLint s, GLint t) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t) ~ 3.0 forward || 3.2 core - void glMultiTexCoord2sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r) ~ 3.0 forward || 3.2 core - void glMultiTexCoord3sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4dv (GLenum target, const GLdouble *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4fv (GLenum target, const GLfloat *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4iv (GLenum target, const GLint *v) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) ~ 3.0 forward || 3.2 core - void glMultiTexCoord4sv (GLenum target, const GLshort *v) ~ 3.0 forward || 3.2 core + void glLoadTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward !3.2 || 3.2 core + void glLoadTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward !3.2 || 3.2 core + void glMultTransposeMatrixd (const GLdouble m[16]) ~ 3.0 forward !3.2 || 3.2 core + void glMultTransposeMatrixf (const GLfloat m[16]) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1d (GLenum target, GLdouble s) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1dv (GLenum target, const GLdouble *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1f (GLenum target, GLfloat s) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1fv (GLenum target, const GLfloat *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1i (GLenum target, GLint s) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1iv (GLenum target, const GLint *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1s (GLenum target, GLshort s) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord1sv (GLenum target, const GLshort *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2dv (GLenum target, const GLdouble *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2fv (GLenum target, const GLfloat *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2i (GLenum target, GLint s, GLint t) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2iv (GLenum target, const GLint *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord2sv (GLenum target, const GLshort *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3dv (GLenum target, const GLdouble *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3fv (GLenum target, const GLfloat *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3iv (GLenum target, const GLint *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord3sv (GLenum target, const GLshort *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4dv (GLenum target, const GLdouble *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4fv (GLenum target, const GLfloat *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4iv (GLenum target, const GLint *v) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) ~ 3.0 forward !3.2 || 3.2 core + void glMultiTexCoord4sv (GLenum target, const GLshort *v) ~ 3.0 forward !3.2 || 3.2 core void glSampleCoverage (GLclampf value, GLboolean invert) diff --git a/auto/core/gl/GL_VERSION_1_4 b/auto/core/gl/GL_VERSION_1_4 index 6bce711..4c7d203 100644 --- a/auto/core/gl/GL_VERSION_1_4 +++ b/auto/core/gl/GL_VERSION_1_4 @@ -42,48 +42,48 @@ http://www.opengl.org/documentation/specs/version1.4/glspec14.pdf GL_MIRRORED_REPEAT 0x8370 void glBlendEquation (GLenum mode) void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) - void glFogCoordf (GLfloat coord) ~ 3.0 forward || 3.2 core - void glFogCoordfv (const GLfloat *coord) ~ 3.0 forward || 3.2 core - void glFogCoordd (GLdouble coord) ~ 3.0 forward || 3.2 core - void glFogCoorddv (const GLdouble *coord) ~ 3.0 forward || 3.2 core - void glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward || 3.2 core + void glFogCoordf (GLfloat coord) ~ 3.0 forward !3.2 || 3.2 core + void glFogCoordfv (const GLfloat *coord) ~ 3.0 forward !3.2 || 3.2 core + void glFogCoordd (GLdouble coord) ~ 3.0 forward !3.2 || 3.2 core + void glFogCoorddv (const GLdouble *coord) ~ 3.0 forward !3.2 || 3.2 core + void glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward !3.2 || 3.2 core void glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount) void glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const* indices, GLsizei drawcount) void glPointParameteri (GLenum pname, GLint param) void glPointParameteriv (GLenum pname, const GLint *params) void glPointParameterf (GLenum pname, GLfloat param) void glPointParameterfv (GLenum pname, const GLfloat *params) - void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3bv (const GLbyte *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3dv (const GLdouble *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3fv (const GLfloat *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3i (GLint red, GLint green, GLint blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3iv (const GLint *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3sv (const GLshort *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3ubv (const GLubyte *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3uiv (const GLuint *v) ~ 3.0 forward || 3.2 core - void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue) ~ 3.0 forward || 3.2 core - void glSecondaryColor3usv (const GLushort *v) ~ 3.0 forward || 3.2 core - void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward || 3.2 core + void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3bv (const GLbyte *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3dv (const GLdouble *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3fv (const GLfloat *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3i (GLint red, GLint green, GLint blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3iv (const GLint *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3sv (const GLshort *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3ubv (const GLubyte *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3uiv (const GLuint *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColor3usv (const GLushort *v) ~ 3.0 forward !3.2 || 3.2 core + void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer) ~ 3.0 forward !3.2 || 3.2 core void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) - void glWindowPos2d (GLdouble x, GLdouble y) ~ 3.0 forward || 3.2 core - void glWindowPos2f (GLfloat x, GLfloat y) ~ 3.0 forward || 3.2 core - void glWindowPos2i (GLint x, GLint y) ~ 3.0 forward || 3.2 core - void glWindowPos2s (GLshort x, GLshort y) ~ 3.0 forward || 3.2 core - void glWindowPos2dv (const GLdouble *p) ~ 3.0 forward || 3.2 core - void glWindowPos2fv (const GLfloat *p) ~ 3.0 forward || 3.2 core - void glWindowPos2iv (const GLint *p) ~ 3.0 forward || 3.2 core - void glWindowPos2sv (const GLshort *p) ~ 3.0 forward || 3.2 core - void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z) ~ 3.0 forward || 3.2 core - void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z) ~ 3.0 forward || 3.2 core - void glWindowPos3i (GLint x, GLint y, GLint z) ~ 3.0 forward || 3.2 core - void glWindowPos3s (GLshort x, GLshort y, GLshort z) ~ 3.0 forward || 3.2 core - void glWindowPos3dv (const GLdouble *p) ~ 3.0 forward || 3.2 core - void glWindowPos3fv (const GLfloat *p) ~ 3.0 forward || 3.2 core - void glWindowPos3iv (const GLint *p) ~ 3.0 forward || 3.2 core - void glWindowPos3sv (const GLshort *p) ~ 3.0 forward || 3.2 core + void glWindowPos2d (GLdouble x, GLdouble y) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2f (GLfloat x, GLfloat y) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2i (GLint x, GLint y) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2s (GLshort x, GLshort y) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2dv (const GLdouble *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2fv (const GLfloat *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2iv (const GLint *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos2sv (const GLshort *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3i (GLint x, GLint y, GLint z) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3s (GLshort x, GLshort y, GLshort z) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3dv (const GLdouble *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3fv (const GLfloat *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3iv (const GLint *p) ~ 3.0 forward !3.2 || 3.2 core + void glWindowPos3sv (const GLshort *p) ~ 3.0 forward !3.2 || 3.2 core