From 9178ed2871c198f0e50212ba7b80f9c9fdf94871 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 Jul 2015 19:54:55 +0100 Subject: [PATCH 001/200] Fix some preprocessor expressions in Interrogate --- dtool/src/cppparser/cppPreprocessor.cxx | 10 +++++++--- dtool/src/cppparser/cppPreprocessor.h | 2 +- dtool/src/parser-inc/stdtypedefs.h | 7 +++++-- makepanda/makepanda.py | 9 ++++----- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 52c758acd6..cbb7174239 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -687,7 +687,7 @@ push_string(const string &input, bool lock_position) { // string and return the new string. //////////////////////////////////////////////////////////////////// string CPPPreprocessor:: -expand_manifests(const string &input_expr) { +expand_manifests(const string &input_expr, bool expand_undefined) { // Get a copy of the expression string we can modify. string expr = input_expr; @@ -722,6 +722,10 @@ expand_manifests(const string &input_expr) { expand_manifest_inline(expr, q, p, (*mi).second); manifest_found = true; } + } else if (expand_undefined && ident != "true" && ident != "false") { + // It is not found. Expand it to 0. + expr = expr.substr(0, q) + "0" + expr.substr(p); + p = q + 1; } } } else { @@ -751,7 +755,7 @@ expand_manifests(const string &input_expr) { CPPExpression *CPPPreprocessor:: parse_expr(const string &input_expr, CPPScope *current_scope, CPPScope *global_scope) { - string expr = expand_manifests(input_expr); + string expr = expand_manifests(input_expr, true); CPPExpressionParser ep(current_scope, global_scope); ep._verbose = 0; @@ -1380,7 +1384,7 @@ handle_include_directive(const string &args, int first_line, // might not filter out quotes and angle brackets properly, we'll // only expand manifests if we don't begin with a quote or bracket. if (!expr.empty() && (expr[0] != '"' && expr[0] != '<')) { - expr = expand_manifests(expr); + expr = expand_manifests(expr, false); } if (!expr.empty()) { diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 571ef0598b..9aedcb24de 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -106,7 +106,7 @@ protected: bool push_file(const CPPFile &file); bool push_string(const string &input, bool lock_position); - string expand_manifests(const string &input_expr); + string expand_manifests(const string &input_expr, bool expand_undefined); CPPExpression *parse_expr(const string &expr, CPPScope *current_scope, CPPScope *global_scope); diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 345eda1fd0..99280ebb4f 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -39,10 +39,13 @@ typedef unsigned short ushort; typedef unsigned char uchar; #ifdef __cplusplus -#define NULL 0 +#define NULL 0L #else #define NULL ((void *)0) #endif -#endif +// One day, we might extend interrogate to be able to parse this, +// but we currently don't need it. +#define alignas(x) +#endif diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b7ac3cbc4a..d7bc6e723d 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1020,7 +1020,6 @@ def CompileCxx(obj,src,opts): if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir) for (opt,var,val) in DEFSYMBOLS: if (opt=="ALWAYS") or (opt in opts): cmd += " /D" + var + "=" + val - if (opts.count('NOFLOATWARN')): cmd += ' /wd4244 /wd4305' if (opts.count('MSFORSCOPE')): cmd += ' /Zc:forScope-' if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS" @@ -1070,7 +1069,6 @@ def CompileCxx(obj,src,opts): if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir) for (opt,var,val) in DEFSYMBOLS: if (opt=="ALWAYS") or (opt in opts): cmd += " /D" + var + "=" + val - if (opts.count('NOFLOATWARN')): cmd += ' /wd4244 /wd4305' if (opts.count('MSFORSCOPE')): cmd += ' /Zc:forScope-' if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS" @@ -1339,14 +1337,15 @@ def CompileIgate(woutd,wsrc,opts): cmd = 'interrogate' cmd += ' -srcdir %s -I%s -Dvolatile -Dmutable' % (srcdir, srcdir) + cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus=201103L' if (COMPILER=="MSVC"): - cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D_X86_ -DWIN32_VC -DWIN32 -D_WIN32' + cmd += ' -D__inline -D_X86_ -DWIN32_VC -DWIN32 -D_WIN32' if GetTargetArch() == 'x64': cmd += ' -DWIN64_VC -DWIN64 -D_WIN64' # NOTE: this 1600 value is the version number for VC2010. - cmd += ' -D_MSC_VER=1600 -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' + cmd += ' -D_MSC_VER=1600 -D"__declspec(param)=" -D__cdecl -D_near -D_far -D__near -D__far -D__stdcall' if (COMPILER=="GCC"): - cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D__attribute__\(x\)=' + cmd += ' -D__inline -D__const=const -D__attribute__\(x\)=' if GetTargetArch() in ("x86_64", "amd64"): cmd += ' -D_LP64' else: From da6140a8cc177ccc37c3d076a14cb5b5fba7dfdf Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 14 Jul 2015 21:00:12 +0100 Subject: [PATCH 002/200] Changes to GLSL input handling that further assist in efforts to port from Cg to GLSL --- panda/src/glstuff/glShaderContext_src.cxx | 159 ++++++++++++++-------- panda/src/glstuff/glShaderContext_src.h | 2 +- 2 files changed, 107 insertions(+), 54 deletions(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 2fd3c25577..f0fcf509d8 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -51,59 +51,51 @@ TypeHandle CLP(ShaderContext)::_type_handle; // actually picked up and the appropriate ShaderMatSpec pushed onto _mat_spec. //////////////////////////////////////////////////////////////////// bool CLP(ShaderContext):: -parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, Shader *objShader) { +parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, GLenum param_type, GLint param_size, Shader *objShader) { Shader::ShaderArgInfo p; p._id = arg_id; p._cat = GLCAT; string basename(arg_id._name); + // Split it at the underscores. vector_string pieces; tokenize(basename, pieces, "_"); - if (pieces[0] == "mstrans") { - pieces[0] = "trans"; - pieces.push_back("to"); - pieces.push_back("model"); - } - if (pieces[0] == "wstrans") { - pieces[0] = "trans"; - pieces.push_back("to"); - pieces.push_back("world"); - } - if (pieces[0] == "vstrans") { - pieces[0] = "trans"; - pieces.push_back("to"); - pieces.push_back("view"); - } - if (pieces[0] == "cstrans") { - pieces[0] = "trans"; - pieces.push_back("to"); - pieces.push_back("clip"); - } - if (pieces[0] == "mspos") { - pieces[0] = "row3"; - pieces.push_back("to"); - pieces.push_back("model"); - } - if (pieces[0] == "wspos") { - pieces[0] = "row3"; - pieces.push_back("to"); - pieces.push_back("world"); - } - if (pieces[0] == "vspos") { - pieces[0] = "row3"; - pieces.push_back("to"); - pieces.push_back("view"); - } - if (pieces[0] == "cspos") { - pieces[0] = "row3"; - pieces.push_back("to"); - pieces.push_back("clip"); + if (pieces.size() == 0 || pieces[0].size() < 3) { + return false; } - if ((pieces[0] == "mat") || (pieces[0] == "inv") || - (pieces[0] == "tps") || (pieces[0] == "itp")) { + // mstrans, wstrans, vstrans, cstrans, mspos, wspos, vspos, cspos + if (strcmp(pieces[0].c_str() + 1, "strans") == 0 || + strcmp(pieces[0].c_str() + 1, "spos") == 0) { + pieces.push_back("to"); + + switch (pieces[0][0]) { + case 'm': + pieces.push_back("model"); + break; + case 'w': + pieces.push_back("world"); + break; + case 'v': + pieces.push_back("view"); + break; + case 'c': + pieces.push_back("clip"); + break; + default: + return false; + } + if (strcmp(pieces[0].c_str() + 1, "strans") == 0) { + pieces[0] = "trans"; + } else { + pieces[0] = "row3"; + } + // mat_modelproj et al + } else if (pieces[0].size() == 3 && + (pieces[0] == "mat" || pieces[0] == "inv" || + pieces[0] == "tps" || pieces[0] == "itp")) { if (!objShader->cp_errchk_parameter_words(p, 2)) { return false; } @@ -156,16 +148,58 @@ parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, Shader *objSha pieces.push_back(""); // Decide whether this is a matrix or vector. - if (pieces[0] == "trans") bind._piece = Shader::SMP_whole; - else if (pieces[0] == "tpose") bind._piece = Shader::SMP_transpose; - else if (pieces[0] == "row0") bind._piece = Shader::SMP_row0; - else if (pieces[0] == "row1") bind._piece = Shader::SMP_row1; - else if (pieces[0] == "row2") bind._piece = Shader::SMP_row2; - else if (pieces[0] == "row3") bind._piece = Shader::SMP_row3; - else if (pieces[0] == "col0") bind._piece = Shader::SMP_col0; - else if (pieces[0] == "col1") bind._piece = Shader::SMP_col1; - else if (pieces[0] == "col2") bind._piece = Shader::SMP_col2; - else if (pieces[0] == "col3") bind._piece = Shader::SMP_col3; + if (param_type == GL_FLOAT_MAT4) { + if (pieces[0] == "trans") bind._piece = Shader::SMP_whole; + else if (pieces[0] == "tpose") bind._piece = Shader::SMP_transpose; + else { + GLCAT.error() << basename << " should be vec4, not mat3\n"; + return false; + } + } else if (param_type == GL_FLOAT_MAT3) { + if (pieces[0] == "trans") bind._piece = Shader::SMP_upper3x3; + else if (pieces[0] == "tpose") bind._piece = Shader::SMP_transpose3x3; + else { + GLCAT.error() << basename << " should be vec4, not mat3\n"; + return false; + } + } else if (param_type == GL_FLOAT_VEC4) { + if (pieces[0] == "trans") bind._piece = Shader::SMP_col0; + else if (pieces[0] == "tpose") bind._piece = Shader::SMP_row0; + else if (pieces[0] == "row0") bind._piece = Shader::SMP_row0; + else if (pieces[0] == "row1") bind._piece = Shader::SMP_row1; + else if (pieces[0] == "row2") bind._piece = Shader::SMP_row2; + else if (pieces[0] == "row3") bind._piece = Shader::SMP_row3; + else if (pieces[0] == "col0") bind._piece = Shader::SMP_col0; + else if (pieces[0] == "col1") bind._piece = Shader::SMP_col1; + else if (pieces[0] == "col2") bind._piece = Shader::SMP_col2; + else if (pieces[0] == "col3") bind._piece = Shader::SMP_col3; + else { + GLCAT.error() << basename << " should be mat4, not vec4\n"; + return false; + } + } else if (pieces[0] == "row3") { + // We'll permit this too, simply because we can support it. + switch (param_type) { + case GL_FLOAT: + bind._piece = Shader::SMP_row3x1; + break; + case GL_FLOAT_VEC2: + bind._piece = Shader::SMP_row3x2; + break; + case GL_FLOAT_VEC3: + bind._piece = Shader::SMP_row3x3; + break; + default: + GLCAT.error() << basename << " should be vec4\n"; + return false; + } + } else if (pieces[0] == "trans" || pieces[0] == "tpose") { + GLCAT.error() << basename << " should be mat4 or mat3\n"; + return false; + } else { + GLCAT.error() << basename << " should be vec4\n"; + return false; + } if (!objShader->cp_parse_coord_sys(p, pieces, next, bind, true)) { return false; @@ -194,6 +228,25 @@ parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, Shader *objSha objShader->cp_optimize_mat_spec(bind); objShader->_mat_spec.push_back(bind); + + if (param_size > 1) { + // We support arrays of rows and arrays of columns, so we can + // run the GLSL shaders that cgc spits out. + if (bind._piece == Shader::SMP_row0 || bind._piece == Shader::SMP_col0) { + if (param_size > 4) { + GLCAT.warning() << basename << "[" << param_size << "] is too large, only the first four elements will be defined\n"; + param_size = 4; + } + for (int i = 1; i < param_size; ++i) { + bind._id._seqno += 1; + bind._piece = (Shader::ShaderMatPiece)((int)bind._piece + 1); + objShader->_mat_spec.push_back(bind); + } + } else { + GLCAT.warning() << basename << "[" << param_size << "] should not be an array, only the first element will be defined\n"; + } + } + return true; } return false; @@ -963,7 +1016,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } else { // Tries to parse shorthand notations like mspos_XXX and trans_model_to_clip_of_XXX - if (parse_and_set_short_hand_shader_vars(arg_id, _shader)) { + if (parse_and_set_short_hand_shader_vars(arg_id, param_type, param_size, _shader)) { return; } } diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index fd4b56def4..9147bcf1b1 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -98,7 +98,7 @@ private: void glsl_report_program_errors(GLuint program, bool fatal); bool glsl_compile_shader(Shader::ShaderType type); bool glsl_compile_and_link(); - bool parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, Shader *s); + bool parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, GLenum param_type, GLint param_size, Shader *s); void release_resources(); public: From 1206d93813f231864f4e6a67c6b60dbdc9ce9815 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 14 Jul 2015 22:22:45 +0100 Subject: [PATCH 003/200] Fix pandac.PandaModules import error with Python 3 (thanks, tzaeru!) --- makepanda/makepanda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index d7bc6e723d..35bfea1e7f 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2648,7 +2648,7 @@ for module in panda_modules: panda_modules_code += """ try: from panda3d.%s import * -except ImportError, err: +except ImportError as err: if "No module named %s" not in str(err): raise""" % (module, module) From dafae50ce26b89ffbdd6a154a273d17e5ebbbfeb Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 17 Jul 2015 15:55:24 +0200 Subject: [PATCH 004/200] Protect against self-move-assignment to fix stable_sort in MSVC --- panda/src/express/pointerToBase.I | 15 +++++++++------ panda/src/putil/copyOnWritePointer.I | 13 ++++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/panda/src/express/pointerToBase.I b/panda/src/express/pointerToBase.I index 783d59353e..ce319a5f50 100644 --- a/panda/src/express/pointerToBase.I +++ b/panda/src/express/pointerToBase.I @@ -71,14 +71,17 @@ PointerToBase(PointerToBase &&from) NOEXCEPT { template INLINE void PointerToBase:: reassign(PointerToBase &&from) NOEXCEPT { - To *old_ptr = (To *)this->_void_ptr; + // Protect against self-move-assignment. + if (from._void_ptr != this->_void_ptr) { + To *old_ptr = (To *)this->_void_ptr; - this->_void_ptr = from._void_ptr; - from._void_ptr = NULL; + this->_void_ptr = from._void_ptr; + from._void_ptr = NULL; - // Now delete the old pointer. - if (old_ptr != (To *)NULL) { - unref_delete(old_ptr); + // Now delete the old pointer. + if (old_ptr != (To *)NULL) { + unref_delete(old_ptr); + } } } #endif // USE_MOVE_SEMANTICS diff --git a/panda/src/putil/copyOnWritePointer.I b/panda/src/putil/copyOnWritePointer.I index d9c81d9de5..47e51fab15 100644 --- a/panda/src/putil/copyOnWritePointer.I +++ b/panda/src/putil/copyOnWritePointer.I @@ -102,12 +102,15 @@ CopyOnWritePointer(CopyOnWritePointer &&move) NOEXCEPT : //////////////////////////////////////////////////////////////////// INLINE void CopyOnWritePointer:: operator = (CopyOnWritePointer &&move) NOEXCEPT { - CopyOnWriteObject *old_object = _cow_object; - _cow_object = move._cow_object; - move._cow_object = NULL; + // Protect against self-move-assignment. + if (move._cow_object != _cow_object) { + CopyOnWriteObject *old_object = _cow_object; + _cow_object = move._cow_object; + move._cow_object = NULL; - if (old_object != (CopyOnWriteObject *)NULL) { - cache_unref_delete(old_object); + if (old_object != (CopyOnWriteObject *)NULL) { + cache_unref_delete(old_object); + } } } #endif // USE_MOVE_SEMANTICS From 946f273ebb6f30969bf7d099bf9a3fdd06cad64f Mon Sep 17 00:00:00 2001 From: Jeremy Koletar Date: Fri, 17 Jul 2015 13:39:41 -0500 Subject: [PATCH 005/200] controls: Don't make scene graph assumptions when setting the CollisionRay's height --- direct/src/controls/GravityWalker.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/direct/src/controls/GravityWalker.py b/direct/src/controls/GravityWalker.py index 5552168860..7c232e55f4 100755 --- a/direct/src/controls/GravityWalker.py +++ b/direct/src/controls/GravityWalker.py @@ -179,9 +179,9 @@ class GravityWalker(DirectObject.DirectObject): # a higher or lower value depending on whether you want an avatar # that is outside of the world to step up to the floor when they # get under valid floor: - cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0) + self.cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0) cRayNode = CollisionNode('GW.cRayNode') - cRayNode.addSolid(cRay) + cRayNode.addSolid(self.cRay) self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode) cRayNode.setFromCollideMask(bitmask) cRayNode.setIntoCollideMask(BitMask32.allOff()) @@ -697,8 +697,4 @@ class GravityWalker(DirectObject.DirectObject): # There are sometimes issues if the collision ray height is # so tall that it collides with multiple levels of floors. def setCollisionRayHeight(self, height): - oldNode = self.avatarNodePath.getNode(0) - cRayNode = oldNode.getChild(2) - cRayNode.removeSolid(0) - cRay = CollisionRay(0.0, 0.0, height, 0.0, 0.0, -1.0) - cRayNode.addSolid(cRay) \ No newline at end of file + self.cRay.setOrigin(0.0, 0.0, height) From 221507437a4be6d3b9c0b3295d67f05b5ebad2e2 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 17 Jul 2015 21:28:51 +0200 Subject: [PATCH 006/200] Fix crash when passing an undersized array to a GLSL array input --- panda/src/glstuff/glShaderContext_src.cxx | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 5288c446b5..5566680c17 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1186,6 +1186,7 @@ issue_parameters(int altered) { } GLint p = _glsl_parameter_map[spec._id._seqno]; + int array_size = min(spec._dim[0], ptr_data->_size / spec._dim[1]); switch (spec._type) { case Shader::SPT_float: { @@ -1194,16 +1195,16 @@ issue_parameters(int altered) { switch (ptr_data->_type) { case Shader::SPT_int: // Convert int data to float data. - data = (float*) alloca(sizeof(float) * spec._dim[0] * spec._dim[1]); - for (int i = 0; i < (spec._dim[0] * spec._dim[1]); ++i) { + data = (float*) alloca(sizeof(float) * array_size * spec._dim[1]); + for (int i = 0; i < (array_size * spec._dim[1]); ++i) { data[i] = (float)(((int*)ptr_data->_ptr)[i]); } break; case Shader::SPT_double: // Downgrade double data to float data. - data = (float*) alloca(sizeof(float) * spec._dim[0] * spec._dim[1]); - for (int i = 0; i < (spec._dim[0] * spec._dim[1]); ++i) { + data = (float*) alloca(sizeof(float) * array_size * spec._dim[1]); + for (int i = 0; i < (array_size * spec._dim[1]); ++i) { data[i] = (float)(((double*)ptr_data->_ptr)[i]); } break; @@ -1217,12 +1218,12 @@ issue_parameters(int altered) { } switch (spec._dim[1]) { - case 1: _glgsg->_glUniform1fv(p, spec._dim[0], (float*)data); continue; - case 2: _glgsg->_glUniform2fv(p, spec._dim[0], (float*)data); continue; - case 3: _glgsg->_glUniform3fv(p, spec._dim[0], (float*)data); continue; - case 4: _glgsg->_glUniform4fv(p, spec._dim[0], (float*)data); continue; - case 9: _glgsg->_glUniformMatrix3fv(p, spec._dim[0], GL_FALSE, (float*)data); continue; - case 16: _glgsg->_glUniformMatrix4fv(p, spec._dim[0], GL_FALSE, (float*)data); continue; + case 1: _glgsg->_glUniform1fv(p, array_size, (float*)data); continue; + case 2: _glgsg->_glUniform2fv(p, array_size, (float*)data); continue; + case 3: _glgsg->_glUniform3fv(p, array_size, (float*)data); continue; + case 4: _glgsg->_glUniform4fv(p, array_size, (float*)data); continue; + case 9: _glgsg->_glUniformMatrix3fv(p, array_size, GL_FALSE, (float*)data); continue; + case 16: _glgsg->_glUniformMatrix4fv(p, array_size, GL_FALSE, (float*)data); continue; } nassertd(false) continue; } @@ -1239,10 +1240,10 @@ issue_parameters(int altered) { } else { switch (spec._dim[1]) { - case 1: _glgsg->_glUniform1iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue; - case 2: _glgsg->_glUniform2iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue; - case 3: _glgsg->_glUniform3iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue; - case 4: _glgsg->_glUniform4iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue; + case 1: _glgsg->_glUniform1iv(p, array_size, (int*)ptr_data->_ptr); continue; + case 2: _glgsg->_glUniform2iv(p, array_size, (int*)ptr_data->_ptr); continue; + case 3: _glgsg->_glUniform3iv(p, array_size, (int*)ptr_data->_ptr); continue; + case 4: _glgsg->_glUniform4iv(p, array_size, (int*)ptr_data->_ptr); continue; } nassertd(false) continue; } From 5e219f6438935c6dfd526d5bbd10f4db66a6e231 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 17 Jul 2015 21:34:29 +0200 Subject: [PATCH 007/200] Add support for uniform int osg_FrameNumber in GLSL --- panda/src/glstuff/glShaderContext_src.cxx | 28 +++++++++++++++++++---- panda/src/glstuff/glShaderContext_src.h | 2 ++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index a0a6f35959..7101fb62d0 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -266,6 +266,8 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext _color_attrib_index = -1; _transform_table_index = -1; _slider_table_index = -1; + _frame_number_loc = -1; + _frame_number = -1; _validated = !gl_validate_shaders; nassertv(s->get_language() == Shader::SL_GLSL); @@ -941,7 +943,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { if (noprefix == "TransformTable") { if (param_type != GL_FLOAT_MAT4) { GLCAT.error() - << "p3d_TransformTable should be uniform mat4\n"; + << "p3d_TransformTable should be uniform mat4[]\n"; return; } _transform_table_index = p; @@ -951,7 +953,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { if (noprefix == "SliderTable") { if (param_type != GL_FLOAT) { GLCAT.error() - << "p3d_SliderTable should be uniform float\n"; + << "p3d_SliderTable should be uniform float[]\n"; return; } _slider_table_index = p; @@ -965,8 +967,6 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { string noprefix(name_buffer + 4); // These inputs are supported by OpenSceneGraph. We can support // them as well, to increase compatibility. - // Other inputs we may support in the future: - // int osg_FrameNumber Shader::ShaderMatSpec bind; bind._id = arg_id; @@ -983,7 +983,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { _shader->_mat_spec.push_back(bind); return; - } else if (noprefix == "InverseViewMatrix") { + } else if (noprefix == "InverseViewMatrix" || noprefix == "ViewMatrixInverse") { bind._piece = Shader::SMP_whole; bind._func = Shader::SMF_compose; bind._part[0] = Shader::SMO_apiview_to_view; @@ -1012,6 +1012,16 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); return; + + } else if (noprefix == "FrameNumber") { + // We don't currently support ints with this mechanism, + // so we special-case this one. + if (param_type != GL_INT) { + GLCAT.error() << "osg_FrameNumber should be uniform int\n"; + } else { + _frame_number_loc = p; + } + return; } } else { @@ -1514,6 +1524,14 @@ issue_parameters(int altered) { return; } + if (_frame_number_loc != -1) { + int current_frame = ClockObject::get_global_clock()->get_frame_count(); + if (current_frame != _frame_number) { + _glgsg->_glUniform1i(_frame_number_loc, current_frame); + _frame_number = current_frame; + } + } + // Iterate through _ptr parameters for (int i = 0; i < (int)_shader->_ptr_spec.size(); ++i) { Shader::ShaderPtrSpec &spec = _shader->_ptr_spec[i]; diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index 9147bcf1b1..cc04500c9d 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -80,6 +80,8 @@ private: GLint _slider_table_index; GLsizei _transform_table_size; GLsizei _slider_table_size; + GLint _frame_number_loc; + GLint _frame_number; pmap _glsl_uniform_handles; struct ImageInput { From c224f351ecb6594cff7fedae7dd089b652e659bd Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 17 Jul 2015 21:50:06 +0200 Subject: [PATCH 008/200] Fix gcc/clang compile error --- panda/src/glstuff/glShaderContext_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 5566680c17..bb58a45572 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1186,7 +1186,7 @@ issue_parameters(int altered) { } GLint p = _glsl_parameter_map[spec._id._seqno]; - int array_size = min(spec._dim[0], ptr_data->_size / spec._dim[1]); + int array_size = min(spec._dim[0], (int)ptr_data->_size / spec._dim[1]); switch (spec._type) { case Shader::SPT_float: { From 96a9e223950f6d832b7a9eca0d6987a9f31f3e32 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 18 Jul 2015 11:06:11 +0200 Subject: [PATCH 009/200] Add uniform mat4 p3d_TextureMatrix[] input to GLSL --- panda/src/display/graphicsStateGuardian.cxx | 24 +++++++++++---- .../glstuff/glGraphicsStateGuardian_src.cxx | 11 +++++-- panda/src/glstuff/glShaderContext_src.cxx | 29 +++++++++++++++++-- panda/src/gobj/shader.cxx | 8 +++-- panda/src/gobj/shader.h | 5 +++- 5 files changed, 63 insertions(+), 14 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index a3979a6c2c..15ebcd9dc2 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1190,14 +1190,26 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, } return &t; } - case Shader::SMO_texmat_x: { - const TexMatrixAttrib *tma = DCAST(TexMatrixAttrib, _target_rs->get_attrib_def(TexMatrixAttrib::get_class_slot())); - const TextureAttrib *ta = DCAST(TextureAttrib, _target_rs->get_attrib_def(TextureAttrib::get_class_slot())); - int stagenr = atoi(name->get_name().c_str()); - if (stagenr >= ta->get_num_on_stages()) { + case Shader::SMO_texmat_i: { + const TexMatrixAttrib *tma; + const TextureAttrib *ta; + if (_target_rs->get_attrib(ta) && _target_rs->get_attrib(tma) && + index < ta->get_num_on_stages()) { + return &tma->get_mat(ta->get_on_stage(index)); + } else { + return &LMatrix4::ident_mat(); + } + } + case Shader::SMO_inv_texmat_i: { + const TexMatrixAttrib *tma; + const TextureAttrib *ta; + if (_target_rs->get_attrib(ta) && _target_rs->get_attrib(tma) && + index < ta->get_num_on_stages()) { + t = tma->get_transform(ta->get_on_stage(index))->get_inverse()->get_mat(); + return &t; + } else { return &LMatrix4::ident_mat(); } - return &tma->get_mat(ta->get_on_stage(stagenr)); } case Shader::SMO_plane_x: { const NodePath &np = _target_shader->get_shader_input_nodepath(name); diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index e594579d4c..6159dd5cfb 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -9217,7 +9217,6 @@ set_state_and_transform(const RenderState *target, // If one of the previously-loaded TexGen modes modified the texture // matrix, then if either state changed, we have to change both of // them now. -#ifdef SUPPORT_FIXED_FUNCTION if (_tex_gen_modifies_mat) { int tex_gen_slot = TexGenAttrib::get_class_slot(); int tex_matrix_slot = TexMatrixAttrib::get_class_slot(); @@ -9234,10 +9233,16 @@ set_state_and_transform(const RenderState *target, if (_target_rs->get_attrib(tex_matrix_slot) != _state_rs->get_attrib(tex_matrix_slot) || !_state_mask.get_bit(tex_matrix_slot)) { //PStatGPUTimer timer(this, _draw_set_state_tex_matrix_pcollector); +#ifdef SUPPORT_FIXED_FUNCTION do_issue_tex_matrix(); - _state_mask.set_bit(tex_matrix_slot); - } #endif + _state_mask.set_bit(tex_matrix_slot); +#ifndef OPENGLES_1 + if (_current_shader_context) { + _current_shader_context->issue_parameters(Shader::SSD_tex_matrix); + } +#endif + } #ifdef SUPPORT_FIXED_FUNCTION int tex_gen_slot = TexGenAttrib::get_class_slot(); diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 50a40f4e30..f2f0bd8a27 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -690,12 +690,16 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } else { bind._piece = Shader::SMP_transpose3x3; } - } else { + } else if (param_type == GL_FLOAT_MAT4) { if (transpose) { bind._piece = Shader::SMP_transpose; } else { bind._piece = Shader::SMP_whole; } + } else { + GLCAT.error() + << "Matrix input p3d_" << matrix_name << " should be mat3 or mat4\n"; + return; } bind._arg[0] = NULL; bind._arg[1] = NULL; @@ -731,7 +735,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._part[1] = Shader::SMO_identity; if (param_type != GL_FLOAT_MAT3) { - GLCAT.error() << "p3d_NormalMatrix input should be mat3, not mat4!\n"; + GLCAT.warning() << "p3d_NormalMatrix input should be mat3, not mat4!\n"; } } else if (matrix_name == "ModelMatrix") { @@ -761,6 +765,27 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._part[1] = Shader::SMO_view_to_apiclip; } + } else if (matrix_name == "TextureMatrix") { + // We may support 2-D texmats later, but let's make sure that people + // don't think they can just use a mat3 to get the 2-D version. + if (param_type != GL_FLOAT_MAT4) { + GLCAT.error() << "p3d_TextureMatrix should be mat4[], not mat3[]!\n"; + return; + } + + bind._func = Shader::SMF_first; + bind._part[0] = inverse ? Shader::SMO_inv_texmat_i + : Shader::SMO_texmat_i; + bind._part[1] = Shader::SMO_identity; + bind._dep[0] = Shader::SSD_general | Shader::SSD_tex_matrix; + bind._dep[1] = 0; + + // Add it once for each index. + for (bind._index = 0; bind._index < param_size; ++bind._index) { + _shader->_mat_spec.push_back(bind); + } + return; + } else { GLCAT.error() << "Unrecognized uniform matrix name '" << matrix_name << "'!\n"; return; diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index 8f1cc70d33..b20ac8e1b2 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -452,6 +452,9 @@ cp_dependency(ShaderMatInput inp) { (inp == SMO_apiview_clipplane_i)) { dep |= SSD_clip_planes; } + if (inp == SMO_texmat_i || inp == SMO_inv_texmat_i) { + dep |= SSD_tex_matrix; + } return dep; } @@ -1040,10 +1043,11 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { bind._id = p._id; bind._piece = SMP_whole; bind._func = SMF_first; - bind._part[0] = SMO_texmat_x; - bind._arg[0] = InternalName::make(pieces[1]); + bind._part[0] = SMO_texmat_i; + bind._arg[0] = NULL; bind._part[1] = SMO_identity; bind._arg[1] = NULL; + bind._index = atoi(pieces[1].c_str()); cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index e56960b1f5..33fe43b799 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -132,7 +132,7 @@ public: SMO_plight_x, SMO_slight_x, SMO_satten_x, - SMO_texmat_x, + SMO_texmat_i, SMO_plane_x, SMO_clipplane_x, @@ -191,6 +191,8 @@ public: SMO_apiview_to_apiclip, SMO_apiclip_to_apiview, + SMO_inv_texmat_i, + SMO_INVALID }; @@ -270,6 +272,7 @@ public: SSD_fog = 0x040, SSD_light = 0x080, SSD_clip_planes = 0x100, + SSD_tex_matrix = 0x200, }; enum ShaderBug { From e91a9100ed3398bfe14bfa793d274a02fbbcb871 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 18 Jul 2015 22:40:57 +0200 Subject: [PATCH 010/200] Support specifying custom gl-version or requesting debug context on Windows Also works around NVIDIA driver bug where GL_VERSION is always reported as 1.2 for pview.exe --- .../glstuff/glGraphicsStateGuardian_src.cxx | 65 +++++++++++++++---- .../wgldisplay/wglGraphicsStateGuardian.cxx | 39 ++++++++++- .../src/wgldisplay/wglGraphicsStateGuardian.h | 2 + panda/src/wgldisplay/wglGraphicsWindow.cxx | 12 +++- 4 files changed, 103 insertions(+), 15 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 6159dd5cfb..476e1af9f1 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -6835,10 +6835,9 @@ show_gl_string(const string &name, GLenum id) { const GLubyte *text = glGetString(id); if (text == (const GLubyte *)NULL) { - if (GLCAT.is_debug()) { - GLCAT.debug() - << "Unable to query " << name << "\n"; - } + GLCAT.warning() + << "Unable to query " << name << "\n"; + } else { result = (const char *)text; if (GLCAT.is_debug()) { @@ -6859,20 +6858,60 @@ void CLP(GraphicsStateGuardian):: query_gl_version() { _gl_vendor = show_gl_string("GL_VENDOR", GL_VENDOR); _gl_renderer = show_gl_string("GL_RENDERER", GL_RENDERER); + _gl_version = show_gl_string("GL_VERSION", GL_VERSION); _gl_version_major = 0; _gl_version_minor = 0; + // This is the most preposterous driver bug: NVIDIA drivers will claim + // that the version is 1.2 as long as the process is named pview.exe! +#ifndef OPENGLES + if (_gl_version.substr(0, 10) == "1.2 NVIDIA") { + Filename exec_name = ExecutionEnvironment::get_binary_name(); + if (cmp_nocase(exec_name.get_basename(), "pview.exe") == 0) { + glGetIntegerv(GL_MAJOR_VERSION, &_gl_version_major); + glGetIntegerv(GL_MINOR_VERSION, &_gl_version_minor); + + if (glGetError() == GL_INVALID_ENUM) { + _gl_version_major = 1; + _gl_version_minor = 2; + GLCAT.warning() + << "Driver possibly misreported GL_VERSION! Unable to detect " + "correct OpenGL version.\n"; + + } else if (_gl_version_major != 1 || _gl_version_minor != 2) { + GLCAT.debug() + << "Driver misreported GL_VERSION! Correct version detected as " + << _gl_version_major << "." << _gl_version_minor << "\n"; + } + return; + } + } +#endif + + // If we asked for a GL 3 context, let's first try and see if we + // can use the OpenGL 3 way to query version. + if (gl_version.get_num_words() > 0 && gl_version[0] >= 3) { + glGetIntegerv(GL_MAJOR_VERSION, &_gl_version_major); + glGetIntegerv(GL_MINOR_VERSION, &_gl_version_minor); + + if (_gl_version_major >= 1) { + // Fair enough, seems to check out. + if (GLCAT.is_debug()) { + GLCAT.debug() + << "Detected OpenGL version: " + << _gl_version_major << "." << _gl_version_minor << "\n"; + } + return; + } + } + + // Otherwise, parse the GL_VERSION string. + if (_gl_version.empty()) { + GLCAT.error() << "Unable to detect OpenGL version\n"; - const GLubyte *text = glGetString(GL_VERSION); - if (text == (const GLubyte *)NULL) { - GLCAT.warning() - << "Unable to query GL_VERSION\n"; } else { - string version((const char *)text); - _gl_version = version; - - string input = version; + string input = _gl_version; // Skip any initial words that don't begin with a digit. while (!input.empty() && !isdigit(input[0])) { @@ -6904,7 +6943,7 @@ query_gl_version() { if (GLCAT.is_debug()) { GLCAT.debug() - << "GL_VERSION = " << version << ", decoded to " + << "GL_VERSION decoded to: " << _gl_version_major << "." << _gl_version_minor << "\n"; } diff --git a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx index e89ce1fdb6..236ab57a77 100644 --- a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx +++ b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx @@ -47,6 +47,8 @@ wglGraphicsStateGuardian(GraphicsEngine *engine, GraphicsPipe *pipe, _supports_wgl_multisample = false; _supports_wgl_render_texture = false; + _wglCreateContextAttribsARB = NULL; + get_gamma_table(); atexit(atexit_function); } @@ -345,6 +347,14 @@ choose_pixel_format(const FrameBufferProperties &properties, get_extra_extensions(); _supports_pixel_format = has_extension("WGL_ARB_pixel_format"); _supports_wgl_multisample = has_extension("WGL_ARB_multisample"); + + if (has_extension("WGL_ARB_create_context")) { + _wglCreateContextAttribsARB = + (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB"); + } else { + _wglCreateContextAttribsARB = NULL; + } + _extensions.clear(); if (!_supports_pixel_format) { @@ -614,7 +624,34 @@ make_context(HDC hdc) { // Attempt to create a context. wglGraphicsPipe::_current_valid = false; - _context = wglCreateContext(hdc); + + if (_wglCreateContextAttribsARB != NULL) { + // We have a fancier version of wglCreateContext that allows us + // to specify what kind of OpenGL context we would like. + int attrib_list[32]; + int n = 0; + attrib_list[0] = NULL; + + if (gl_version.get_num_words() > 0) { + attrib_list[n++] = WGL_CONTEXT_MAJOR_VERSION_ARB; + attrib_list[n++] = gl_version[0]; + if (gl_version.get_num_words() > 1) { + attrib_list[n++] = WGL_CONTEXT_MINOR_VERSION_ARB; + attrib_list[n++] = gl_version[1]; + } + } + if (gl_debug) { + attrib_list[n++] = WGL_CONTEXT_FLAGS_ARB; + attrib_list[n++] = WGL_CONTEXT_DEBUG_BIT_ARB; + } + attrib_list[n++] = WGL_CONTEXT_PROFILE_MASK_ARB; + attrib_list[n++] = WGL_CONTEXT_CORE_PROFILE_BIT_ARB; + attrib_list[n] = NULL; + + _context = _wglCreateContextAttribsARB(hdc, 0, attrib_list); + } else { + _context = wglCreateContext(hdc); + } if (_context == NULL) { wgldisplay_cat.error() diff --git a/panda/src/wgldisplay/wglGraphicsStateGuardian.h b/panda/src/wgldisplay/wglGraphicsStateGuardian.h index 4fa70b2a46..b76dac9578 100644 --- a/panda/src/wgldisplay/wglGraphicsStateGuardian.h +++ b/panda/src/wgldisplay/wglGraphicsStateGuardian.h @@ -118,6 +118,8 @@ public: PFNWGLRELEASETEXIMAGEARBPROC _wglReleaseTexImageARB; PFNWGLSETPBUFFERATTRIBARBPROC _wglSetPbufferAttribARB; + PFNWGLCREATECONTEXTATTRIBSARBPROC _wglCreateContextAttribsARB; + public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index 0ddcdb208a..43a3d5a480 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -304,8 +304,18 @@ open_window() { // Initializes _colormap setup_colormap(pixelformat); + // Make sure we have a context created. + HGLRC context = wglgsg->get_context(_hdc); + if (!context) { + // The context failed to create for some reason. + wgldisplay_cat.error() + << "Closing window because no valid context is available.\n"; + close_window(); + return false; + } + // Initialize the gsg. - wglGraphicsPipe::wgl_make_current(_hdc, wglgsg->get_context(_hdc), &_make_current_pcollector); + wglGraphicsPipe::wgl_make_current(_hdc, context, &_make_current_pcollector); wglgsg->reset_if_new(); wglgsg->report_my_gl_errors(); if (!wglgsg->get_fb_properties().verify_hardware_software From 23441aa5bb7edf3ed170d2c926e6399bece53b8d Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 19 Jul 2015 09:22:57 +0200 Subject: [PATCH 011/200] Fix intel driver issues, particularly with geometry shaders --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 1 + .../glstuff/glGraphicsStateGuardian_src.cxx | 74 ++++++++++++------- panda/src/glstuff/glShaderContext_src.cxx | 18 +++-- 3 files changed, 58 insertions(+), 35 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 05d8c4b78f..cd40b52384 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -1062,6 +1062,7 @@ attach_tex(int layer, int view, Texture *attach, GLenum attachpoint) { #ifndef OPENGLES if (_rb_size_z != 1) { // Bind all of the layers of the texture. + nassertv(glgsg->_glFramebufferTexture != NULL); glgsg->_glFramebufferTexture(GL_FRAMEBUFFER_EXT, attachpoint, gtc->_index, 0); return; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index cb7b0e4da3..db342f423a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -829,13 +829,22 @@ reset() { _supports_2d_texture_array = false; #ifndef OPENGLES - _supports_2d_texture_array = has_extension("GL_EXT_texture_array"); - if (_supports_2d_texture_array) { + if (is_at_least_gl_version(3, 0)) { + _supports_2d_texture_array = true; + + _glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) + get_extension_func("glFramebufferTextureLayer"); + + } else if (has_extension("GL_EXT_texture_array")) { + _supports_2d_texture_array = true; + _glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) get_extension_func("glFramebufferTextureLayerEXT"); - } else { - // ARB_geometry_shader4 also provides a version. - _glFramebufferTextureLayer = NULL; + } + + if (_supports_2d_texture_array && _glFramebufferTextureLayer == NULL) { + GLCAT.warning() + << "Texture arrays advertised as supported by OpenGL runtime, but could not get pointer to glFramebufferTextureLayer function.\n"; } #endif @@ -1263,20 +1272,40 @@ reset() { #endif // HAVE_CG -#ifdef OPENGLES_2 +#if defined(OPENGLES_1) + _supports_glsl = false; + _supports_geometry_shaders = false; + _supports_tessellation_shaders = false; +#elif defined(OPENGLES) _supports_glsl = true; _supports_geometry_shaders = false; _supports_tessellation_shaders = false; #else - #ifdef OPENGLES_1 - _supports_glsl = false; + _supports_glsl = is_at_least_gl_version(2, 0) || has_extension("GL_ARB_shading_language_100"); + _supports_tessellation_shaders = is_at_least_gl_version(4, 0) || has_extension("GL_ARB_tessellation_shader"); + + if (is_at_least_gl_version(3, 2)) { + _supports_geometry_shaders = true; + _glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREARBPROC) + get_extension_func("glFramebufferTexture"); + + } else if (has_extension("GL_ARB_geometry_shader4")) { + _supports_geometry_shaders = true; + _glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREARBPROC) + get_extension_func("glFramebufferTextureARB"); + _glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) + get_extension_func("glProgramParameteriARB"); + + } else if (has_extension("GL_EXT_geometry_shader4")) { + _supports_geometry_shaders = true; + _glFramebufferTexture = NULL; + _glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) + get_extension_func("glProgramParameteriEXT"); + + } else { _supports_geometry_shaders = false; - _supports_tessellation_shaders = false; - #else - _supports_glsl = is_at_least_gl_version(2, 0) || has_extension("GL_ARB_shading_language_100"); - _supports_geometry_shaders = is_at_least_gl_version(3, 2) || has_extension("GL_ARB_geometry_shader4"); - _supports_tessellation_shaders = is_at_least_gl_version(4, 0) || has_extension("GL_ARB_tessellation_shader"); - #endif + _glFramebufferTexture = NULL; + } #endif _shader_caps._supports_glsl = _supports_glsl; @@ -1378,17 +1407,6 @@ reset() { _glVertexAttribLPointer = NULL; } - if (_supports_geometry_shaders) { - _glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) - get_extension_func("glProgramParameteri"); - _glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREARBPROC) - get_extension_func("glFramebufferTextureARB"); - - if (_glFramebufferTextureLayer == NULL) { - _glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) - get_extension_func("glFramebufferTextureLayerARB"); - } - } if (_supports_tessellation_shaders) { _glPatchParameteri = (PFNGLPATCHPARAMETERIPROC) get_extension_func("glPatchParameteri"); @@ -1533,7 +1551,7 @@ reset() { _glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) get_extension_func("glDrawElementsInstancedARB"); _supports_geometry_instancing = true; - + } else if (has_extension("GL_EXT_draw_instanced")) { _glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) get_extension_func("glDrawArraysInstancedEXT"); @@ -2202,8 +2220,10 @@ reset() { if (is_at_least_gl_version(4, 1) || has_extension("GL_ARB_get_program_binary")) { _glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC) get_extension_func("glGetProgramBinary"); + _glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) + get_extension_func("glProgramParameteri"); - if (_glGetProgramBinary != NULL) { + if (_glGetProgramBinary != NULL && _glProgramParameteri != NULL) { _supports_get_program_binary = true; } } diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index bb58a45572..2a67e0ba21 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -212,10 +212,11 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext if (_glsl_parameter_map.size() == 0) { int seqno = 0, texunitno = 0, imgunitno = 0; string noprefix; - GLint param_count, param_maxlength, param_size; + GLint param_count = 0, param_maxlength = 0, param_size; GLenum param_type; _glgsg->_glGetProgramiv(_glsl_program, GL_ACTIVE_UNIFORMS, ¶m_count); _glgsg->_glGetProgramiv(_glsl_program, GL_ACTIVE_UNIFORM_MAX_LENGTH, ¶m_maxlength); + param_maxlength = max(64, param_maxlength); char* param_name_cstr = (char *)alloca(param_maxlength); for (int i = 0; i < param_count; ++i) { @@ -856,6 +857,7 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext // Now we've processed the uniforms, we'll process the attribs. _glgsg->_glGetProgramiv(_glsl_program, GL_ACTIVE_ATTRIBUTES, ¶m_count); _glgsg->_glGetProgramiv(_glsl_program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, ¶m_maxlength); + param_maxlength = max(64, param_maxlength); param_name_cstr = (char *)alloca(param_maxlength); for (int i = 0; i < param_count; ++i) { @@ -1940,13 +1942,13 @@ glsl_compile_and_link() { if (!_shader->get_text(Shader::ST_geometry).empty()) { valid &= glsl_compile_shader(Shader::ST_geometry); - // Set the vertex output limit to the maximum. - // This is slow, but it is probably reasonable to require - // the user to override this in his shader using layout(). - nassertr(_glgsg->_glProgramParameteri != NULL, false); - GLint max_vertices; - glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, &max_vertices); - _glgsg->_glProgramParameteri(_glsl_program, GL_GEOMETRY_VERTICES_OUT_ARB, max_vertices); + //XXX Actually, it turns out that this is unavailable in the core + // version of geometry shaders. Probably no need to bother with it. + + //nassertr(_glgsg->_glProgramParameteri != NULL, false); + //GLint max_vertices; + //glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, &max_vertices); + //_glgsg->_glProgramParameteri(_glsl_program, GL_GEOMETRY_VERTICES_OUT_ARB, max_vertices); } #endif From 1bb1cc79f4fae129fa1b991349ffa85459324ac4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 19 Jul 2015 20:13:55 +0200 Subject: [PATCH 012/200] Improve reporting of supported extensions and compressed formats --- .../glstuff/glGraphicsStateGuardian_src.cxx | 190 +++++++++++++----- .../src/glstuff/glGraphicsStateGuardian_src.h | 4 + 2 files changed, 146 insertions(+), 48 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 20bc4c2ae8..601b1a3215 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -2128,61 +2128,22 @@ reset() { GLCAT.debug() << "No specific compressed texture formats are supported.\n"; } else { +#ifndef NDEBUG GLCAT.debug() << "Supported compressed texture formats:\n"; GLint *formats = (GLint *)alloca(num_compressed_formats * sizeof(GLint)); glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS, formats); for (int i = 0; i < num_compressed_formats; ++i) { - switch (formats[i]) { - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - GLCAT.debug(false) << " GL_COMPRESSED_RGB_S3TC_DXT1_EXT\n"; - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\n"; - break; -#ifdef OPENGLES - case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG: - GLCAT.debug(false) << " GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG\n"; - break; - - case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\n"; - break; - - case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: - GLCAT.debug(false) << " GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG\n"; - break; - - case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\n"; - break; -#endif -#ifndef OPENGLES_1 - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\n"; - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\n"; - break; -#endif -#ifndef OPENGLES - case GL_COMPRESSED_RGB_FXT1_3DFX: - GLCAT.debug(false) << " GL_COMPRESSED_RGB_FXT1_3DFX\n"; - break; - - case GL_COMPRESSED_RGBA_FXT1_3DFX: - GLCAT.debug(false) << " GL_COMPRESSED_RGBA_FXT1_3DFX\n"; - break; -#endif - - default: + const char *format_str = get_compressed_format_string(formats[i]); + if (format_str != NULL) { + GLCAT.debug(false) << " " << format_str << '\n'; + } else { GLCAT.debug(false) << " Unknown compressed format 0x" << hex << formats[i] << dec << "\n"; } } +#endif } } } @@ -7049,11 +7010,25 @@ get_extra_extensions() { void CLP(GraphicsStateGuardian):: report_extensions() const { if (GLCAT.is_debug()) { - GLCAT.debug() - << "GL Extensions:\n"; + ostream &out = GLCAT.debug(); + out << "GL Extensions:\n"; + + size_t maxlen = 0; pset::const_iterator ei; for (ei = _extensions.begin(); ei != _extensions.end(); ++ei) { - GLCAT.debug() << (*ei) << "\n"; + size_t len = (*ei).size(); + out << " " << (*ei); + + // Display a second column. + if (len <= 38) { + if (++ei != _extensions.end()) { + for (int i = len; i < 38; ++i) { + out.put(' '); + } + out << ' ' << (*ei); + } + } + out.put('\n'); } } } @@ -8801,6 +8776,125 @@ get_usage(Geom::UsageHint usage_hint) { return GL_STATIC_DRAW; } +//////////////////////////////////////////////////////////////////// +// Function: GLGraphicsStateGuardian::get_compressed_format_string +// Access: Public, Static +// Description: Returns a string describing an compression format. +//////////////////////////////////////////////////////////////////// +const char *CLP(GraphicsStateGuardian):: +get_compressed_format_string(GLenum format) { + switch (format) { + case 0x83F0: return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT"; + case 0x83F1: return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT"; + case 0x83F2: return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT"; + case 0x83F3: return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT"; + case 0x86B0: return "GL_COMPRESSED_RGB_FXT1_3DFX"; + case 0x86B1: return "GL_COMPRESSED_RGBA_FXT1_3DFX"; + case 0x8A54: return "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT"; + case 0x8A55: return "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT"; + case 0x8A56: return "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT"; + case 0x8A57: return "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT"; + case 0x8B90: return "GL_PALETTE4_RGB8_OES"; + case 0x8B91: return "GL_PALETTE4_RGBA8_OES"; + case 0x8B92: return "GL_PALETTE4_R5_G6_B5_OES"; + case 0x8B93: return "GL_PALETTE4_RGBA4_OES"; + case 0x8B94: return "GL_PALETTE4_RGB5_A1_OES"; + case 0x8B95: return "GL_PALETTE8_RGB8_OES"; + case 0x8B96: return "GL_PALETTE8_RGBA8_OES"; + case 0x8B97: return "GL_PALETTE8_R5_G6_B5_OES"; + case 0x8B98: return "GL_PALETTE8_RGBA4_OES"; + case 0x8B99: return "GL_PALETTE8_RGB5_A1_OES"; + case 0x8C00: return "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG"; + case 0x8C01: return "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG"; + case 0x8C02: return "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG"; + case 0x8C03: return "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG"; + case 0x8C48: return "GL_COMPRESSED_SRGB_EXT"; + case 0x8C49: return "GL_COMPRESSED_SRGB_ALPHA_EXT"; + case 0x8C4A: return "GL_COMPRESSED_SLUMINANCE_EXT"; + case 0x8C4B: return "GL_COMPRESSED_SLUMINANCE_ALPHA_EXT"; + case 0x8C4C: return "GL_COMPRESSED_SRGB_S3TC_DXT1_EXT"; + case 0x8C4D: return "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT"; + case 0x8C4E: return "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT"; + case 0x8C4F: return "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"; + case 0x8C70: return "GL_COMPRESSED_LUMINANCE_LATC1_EXT"; + case 0x8C71: return "GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT"; + case 0x8C72: return "GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT"; + case 0x8C73: return "GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT"; + case 0x8DBB: return "GL_COMPRESSED_RED_RGTC1"; + case 0x8DBC: return "GL_COMPRESSED_SIGNED_RED_RGTC1"; + case 0x8DBD: return "GL_COMPRESSED_RG_RGTC2"; + case 0x8DBE: return "GL_COMPRESSED_SIGNED_RG_RGTC2"; + case 0x8E8C: return "GL_COMPRESSED_RGBA_BPTC_UNORM"; + case 0x8E8D: return "GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM"; + case 0x8E8E: return "GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT"; + case 0x8E8F: return "GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT"; + case 0x9137: return "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG"; + case 0x9138: return "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG"; + case 0x9270: return "GL_COMPRESSED_R11_EAC"; + case 0x9271: return "GL_COMPRESSED_SIGNED_R11_EAC"; + case 0x9272: return "GL_COMPRESSED_RG11_EAC"; + case 0x9273: return "GL_COMPRESSED_SIGNED_RG11_EAC"; + case 0x9274: return "GL_COMPRESSED_RGB8_ETC2"; + case 0x9275: return "GL_COMPRESSED_SRGB8_ETC2"; + case 0x9276: return "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"; + case 0x9277: return "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"; + case 0x9278: return "GL_COMPRESSED_RGBA8_ETC2_EAC"; + case 0x9279: return "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"; + case 0x93B0: return "GL_COMPRESSED_RGBA_ASTC_4x4_KHR"; + case 0x93B1: return "GL_COMPRESSED_RGBA_ASTC_5x4_KHR"; + case 0x93B2: return "GL_COMPRESSED_RGBA_ASTC_5x5_KHR"; + case 0x93B3: return "GL_COMPRESSED_RGBA_ASTC_6x5_KHR"; + case 0x93B4: return "GL_COMPRESSED_RGBA_ASTC_6x6_KHR"; + case 0x93B5: return "GL_COMPRESSED_RGBA_ASTC_8x5_KHR"; + case 0x93B6: return "GL_COMPRESSED_RGBA_ASTC_8x6_KHR"; + case 0x93B7: return "GL_COMPRESSED_RGBA_ASTC_8x8_KHR"; + case 0x93B8: return "GL_COMPRESSED_RGBA_ASTC_10x5_KHR"; + case 0x93B9: return "GL_COMPRESSED_RGBA_ASTC_10x6_KHR"; + case 0x93BA: return "GL_COMPRESSED_RGBA_ASTC_10x8_KHR"; + case 0x93BB: return "GL_COMPRESSED_RGBA_ASTC_10x10_KHR"; + case 0x93BC: return "GL_COMPRESSED_RGBA_ASTC_12x10_KHR"; + case 0x93BD: return "GL_COMPRESSED_RGBA_ASTC_12x12_KHR"; + case 0x93C0: return "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES"; + case 0x93C1: return "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES"; + case 0x93C2: return "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES"; + case 0x93C3: return "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES"; + case 0x93C4: return "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES"; + case 0x93C5: return "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES"; + case 0x93C6: return "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES"; + case 0x93C7: return "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES"; + case 0x93C8: return "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES"; + case 0x93C9: return "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES"; + case 0x93D0: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"; + case 0x93D1: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"; + case 0x93D2: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"; + case 0x93D3: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"; + case 0x93D4: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"; + case 0x93D5: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"; + case 0x93D6: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"; + case 0x93D7: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"; + case 0x93D8: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"; + case 0x93D9: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"; + case 0x93DA: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"; + case 0x93DB: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"; + case 0x93DC: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"; + case 0x93DD: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"; + case 0x93E0: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES"; + case 0x93E1: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES"; + case 0x93E2: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES"; + case 0x93E3: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES"; + case 0x93E4: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES"; + case 0x93E5: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES"; + case 0x93E6: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES"; + case 0x93E7: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES"; + case 0x93E8: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES"; + case 0x93E9: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES"; + case 0x93F0: return "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG"; + case 0x93F1: return "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG"; + default: + return NULL; + } +} + //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::get_light_color // Access: Public diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 71339e4b23..63c4cb8abd 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -511,6 +511,10 @@ protected: static GLenum get_blend_func(ColorBlendAttrib::Operand operand); static GLenum get_usage(Geom::UsageHint usage_hint); +#ifndef NDEBUG + static const char *get_compressed_format_string(GLenum format); +#endif + void unbind_buffers(); #ifdef SUPPORT_FIXED_FUNCTION void disable_standard_vertex_arrays(); From e515cbdbd1dae5319a667a6b9d538db434316753 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 19 Jul 2015 21:11:43 +0200 Subject: [PATCH 013/200] Reintroduce display mode information in Windows via Win32 API Also clean up the CPUID code in winGraphicsPipe a bit --- panda/src/display/displayInformation.cxx | 59 +- panda/src/display/displayInformation.h | 23 +- panda/src/windisplay/winGraphicsPipe.cxx | 667 ++++++++++------------- 3 files changed, 353 insertions(+), 396 deletions(-) diff --git a/panda/src/display/displayInformation.cxx b/panda/src/display/displayInformation.cxx index 0c3dc53ebe..41eab9d020 100644 --- a/panda/src/display/displayInformation.cxx +++ b/panda/src/display/displayInformation.cxx @@ -15,10 +15,52 @@ #include "graphicsStateGuardian.h" #include "displayInformation.h" +//////////////////////////////////////////////////////////////////// +// Function: DisplayMode::Comparison Operator +// Access: Published +// Description: Returns true if these two DisplayModes are identical. +//////////////////////////////////////////////////////////////////// +bool DisplayMode:: +operator == (const DisplayMode &other) const { + return (width == other.width && height == other.height && + bits_per_pixel == other.bits_per_pixel && + refresh_rate == other.refresh_rate && + fullscreen_only == other.fullscreen_only); +} + +//////////////////////////////////////////////////////////////////// +// Function: DisplayMode::Comparison Operator +// Access: Published +// Description: Returns false if these two DisplayModes are identical. +//////////////////////////////////////////////////////////////////// +bool DisplayMode:: +operator != (const DisplayMode &other) const { + return !operator == (other); +} + +//////////////////////////////////////////////////////////////////// +// Function: DisplayMode::output +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +void DisplayMode:: +output(ostream &out) const { + out << width << 'x' << height; + if (bits_per_pixel > 0) { + out << ' ' << bits_per_pixel << "bpp"; + } + if (refresh_rate > 0) { + out << ' ' << refresh_rate << "Hz"; + } + if (fullscreen_only > 0) { + out << " (fullscreen only)"; + } +} + //////////////////////////////////////////////////////////////////// // Function: DisplayInformation::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayInformation:: ~DisplayInformation() { @@ -181,6 +223,21 @@ get_total_display_modes() { return _total_display_modes; } +//////////////////////////////////////////////////////////////////// +// Function: DisplayInformation::get_display_mode +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +const DisplayMode &DisplayInformation:: +get_display_mode(int display_index) { +#ifndef NDEBUG + static DisplayMode err_mode = {0}; + nassertr(display_index >= 0 && display_index < _total_display_modes, err_mode); +#endif + + return _display_mode_array[display_index]; +} + //////////////////////////////////////////////////////////////////// // Function: DisplayInformation::get_display_mode_width // Access: Published diff --git a/panda/src/display/displayInformation.h b/panda/src/display/displayInformation.h index df158e45f3..32ee8c687e 100644 --- a/panda/src/display/displayInformation.h +++ b/panda/src/display/displayInformation.h @@ -17,29 +17,30 @@ #include "typedef.h" -typedef struct { +struct EXPCL_PANDA_DISPLAY DisplayMode { +PUBLISHED: int width; int height; int bits_per_pixel; int refresh_rate; int fullscreen_only; -} -DisplayMode; + + bool operator == (const DisplayMode &other) const; + bool operator != (const DisplayMode &other) const; + void output(ostream &out) const; +}; //////////////////////////////////////////////////////////////////// // Class : DisplayInformation // Description : This class contains various display information. //////////////////////////////////////////////////////////////////// - class EXPCL_PANDA_DISPLAY DisplayInformation { - PUBLISHED: - enum DetectionState { - DS_unknown, - DS_success, + DS_unknown, + DS_success, - DS_direct_3d_create_error, + DS_direct_3d_create_error, DS_create_window_error, DS_create_device_error, }; @@ -54,6 +55,10 @@ PUBLISHED: int get_window_bits_per_pixel(); int get_total_display_modes(); + const DisplayMode &get_display_mode(int display_index); + MAKE_SEQ(get_display_modes, get_total_display_modes, get_display_mode); + + // Older interface for display modes. int get_display_mode_width(int display_index); int get_display_mode_height(int display_index); int get_display_mode_bits_per_pixel(int display_index); diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index 1fd25e52e1..3776e8dbc5 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -15,6 +15,7 @@ #include "winGraphicsPipe.h" #include "config_windisplay.h" #include "displaySearchParameters.h" +#include "displayInformation.h" #include "dtool_config.h" #include "pbitops.h" @@ -52,49 +53,47 @@ static GetProcessMemoryInfoType GetProcessMemoryInfoFunction = 0; static GlobalMemoryStatusExType GlobalMemoryStatusExFunction = 0; static CallNtPowerInformationType CallNtPowerInformationFunction = 0; -void get_memory_information (DisplayInformation *display_information) -{ +void get_memory_information (DisplayInformation *display_information) { if (initialize == false) { - psapi_dll = LoadLibrary ("psapi.dll"); + psapi_dll = LoadLibrary("psapi.dll"); if (psapi_dll) { - GetProcessMemoryInfoFunction = (GetProcessMemoryInfoType) GetProcAddress (psapi_dll, "GetProcessMemoryInfo"); + GetProcessMemoryInfoFunction = (GetProcessMemoryInfoType) GetProcAddress(psapi_dll, "GetProcessMemoryInfo"); } - kernel32_dll = LoadLibrary ("kernel32.dll"); + kernel32_dll = LoadLibrary("kernel32.dll"); if (kernel32_dll) { - GlobalMemoryStatusExFunction = (GlobalMemoryStatusExType) GetProcAddress (kernel32_dll, "GlobalMemoryStatusEx"); + GlobalMemoryStatusExFunction = (GlobalMemoryStatusExType) GetProcAddress(kernel32_dll, "GlobalMemoryStatusEx"); } - + initialize = true; } if (GlobalMemoryStatusExFunction) { MEMORYSTATUSEX memory_status; - memory_status.dwLength = sizeof (MEMORYSTATUSEX); - if (GlobalMemoryStatusExFunction (&memory_status)) { - display_information -> _physical_memory = memory_status.ullTotalPhys; - display_information -> _available_physical_memory = memory_status.ullAvailPhys; - display_information -> _page_file_size = memory_status.ullTotalPageFile; - display_information -> _available_page_file_size = memory_status.ullAvailPageFile; - display_information -> _process_virtual_memory = memory_status.ullTotalVirtual; - display_information -> _available_process_virtual_memory = memory_status.ullAvailVirtual; - display_information -> _memory_load = memory_status.dwMemoryLoad; - } - } - else { + memory_status.dwLength = sizeof(MEMORYSTATUSEX); + if (GlobalMemoryStatusExFunction(&memory_status)) { + display_information->_physical_memory = memory_status.ullTotalPhys; + display_information->_available_physical_memory = memory_status.ullAvailPhys; + display_information->_page_file_size = memory_status.ullTotalPageFile; + display_information->_available_page_file_size = memory_status.ullAvailPageFile; + display_information->_process_virtual_memory = memory_status.ullTotalVirtual; + display_information->_available_process_virtual_memory = memory_status.ullAvailVirtual; + display_information->_memory_load = memory_status.dwMemoryLoad; + } + } else { MEMORYSTATUS memory_status; - memory_status.dwLength = sizeof (MEMORYSTATUS); + memory_status.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus (&memory_status); - display_information -> _physical_memory = memory_status.dwTotalPhys; - display_information -> _available_physical_memory = memory_status.dwAvailPhys; - display_information -> _page_file_size = memory_status.dwTotalPageFile; - display_information -> _available_page_file_size = memory_status.dwAvailPageFile; - display_information -> _process_virtual_memory = memory_status.dwTotalVirtual; - display_information -> _available_process_virtual_memory = memory_status.dwAvailVirtual; - display_information -> _memory_load = memory_status.dwMemoryLoad; + display_information->_physical_memory = memory_status.dwTotalPhys; + display_information->_available_physical_memory = memory_status.dwAvailPhys; + display_information->_page_file_size = memory_status.dwTotalPageFile; + display_information->_available_page_file_size = memory_status.dwAvailPageFile; + display_information->_process_virtual_memory = memory_status.dwTotalVirtual; + display_information->_available_process_virtual_memory = memory_status.dwAvailVirtual; + display_information->_memory_load = memory_status.dwMemoryLoad; } if (GetProcessMemoryInfoFunction) { @@ -105,21 +104,20 @@ void get_memory_information (DisplayInformation *display_information) process_id = GetCurrentProcessId(); process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, process_id); if (process) { - if (GetProcessMemoryInfoFunction (process, &process_memory_counters, sizeof (PROCESS_MEMORY_COUNTERS))) { - display_information -> _page_fault_count = process_memory_counters.PageFaultCount; - display_information -> _process_memory = process_memory_counters.WorkingSetSize; - display_information -> _peak_process_memory = process_memory_counters.PeakWorkingSetSize; - display_information -> _page_file_usage = process_memory_counters.PagefileUsage; - display_information -> _peak_page_file_usage = process_memory_counters.PeakPagefileUsage; + if (GetProcessMemoryInfoFunction (process, &process_memory_counters, sizeof(PROCESS_MEMORY_COUNTERS))) { + display_information->_page_fault_count = process_memory_counters.PageFaultCount; + display_information->_process_memory = process_memory_counters.WorkingSetSize; + display_information->_peak_process_memory = process_memory_counters.PeakWorkingSetSize; + display_information->_page_file_usage = process_memory_counters.PagefileUsage; + display_information->_peak_page_file_usage = process_memory_counters.PeakPagefileUsage; } CloseHandle(process); } - } + } } -typedef union -{ +typedef union { PN_uint64 long_integer; } LONG_INTEGER; @@ -130,11 +128,10 @@ PN_uint64 cpu_time_function (void) { #else LONG_INTEGER long_integer; LONG_INTEGER *long_integer_pointer; - + long_integer_pointer = &long_integer; - - __asm - { + + __asm { mov ebx,[long_integer_pointer] rdtsc mov [ebx + 0], eax @@ -145,14 +142,10 @@ PN_uint64 cpu_time_function (void) { #endif } -typedef union -{ - struct - { - union - { - struct - { +typedef union { + struct { + union { + struct { unsigned char al; unsigned char ah; }; @@ -162,15 +155,11 @@ typedef union unsigned int ecx; unsigned int edx; }; -} -CPU_ID_REGISTERS; +} CPU_ID_REGISTERS; -typedef struct -{ - union - { - struct - { +typedef struct { + union { + struct { int maximum_cpu_id_input; char cpu_vendor [16]; }; @@ -178,19 +167,15 @@ typedef struct CPU_ID_REGISTERS cpu_id_registers_0; }; - union - { + union { CPU_ID_REGISTERS cpu_id_registers_1; - struct - { + struct { // eax - union - { + union { unsigned int eax; unsigned int version_information; - struct - { + struct { unsigned int stepping_id : 4; unsigned int model : 4; unsigned int family : 4; @@ -203,11 +188,9 @@ typedef struct }; // ebx - union - { + union { unsigned int ebx; - struct - { + struct { unsigned int brand_index : 8; unsigned int clflush : 8; unsigned int maximum_logical_processors : 8; @@ -216,11 +199,9 @@ typedef struct }; // ecx - union - { + union { unsigned int ecx; - struct - { + struct { unsigned int sse3 : 1; unsigned int reserved_1_to_2 : 2; unsigned int monitor : 1; @@ -239,11 +220,9 @@ typedef struct }; // edx - union - { + union { unsigned int edx; - struct - { + struct { unsigned int fpu : 1; unsigned int vme : 1; unsigned int de : 1; @@ -282,71 +261,47 @@ typedef struct }; #define MAXIMUM_2 8 - #define MAXIMUM_CHARACTERS (MAXIMUM_2 * sizeof (CPU_ID_REGISTERS)) + #define MAXIMUM_CHARACTERS (MAXIMUM_2 * sizeof(CPU_ID_REGISTERS)) - union - { + union { CPU_ID_REGISTERS cpu_id_registers_2; unsigned char character_array_2 [MAXIMUM_CHARACTERS]; CPU_ID_REGISTERS cpu_id_registers_2_array [MAXIMUM_2]; }; - union - { + union { CPU_ID_REGISTERS cpu_id_registers_0x80000000; }; - union - { + union { CPU_ID_REGISTERS cpu_id_registers_0x80000001; }; - union - { - char cpu_brand_string [sizeof (CPU_ID_REGISTERS) * 3]; - struct - { + union { + char cpu_brand_string [sizeof(CPU_ID_REGISTERS) * 3]; + struct { CPU_ID_REGISTERS cpu_id_registers_0x80000002; CPU_ID_REGISTERS cpu_id_registers_0x80000003; CPU_ID_REGISTERS cpu_id_registers_0x80000004; }; }; - union - { - struct - { - // eax - union - { - unsigned int eax; - }; - - // ebx - union - { - unsigned int ebx; - }; - - // ecx - union - { + union { + struct { + unsigned int eax; + unsigned int ebx; + union { unsigned int ecx; - struct - { + struct { unsigned int l1_data_cache_line_size : 8; unsigned int l1_data_reserved_8_to_15 : 8; unsigned int l1_data_associativity : 8; unsigned int l1_data_cache_size : 8; }; }; - - // edx - union - { + union { unsigned int edx; - struct - { + struct { unsigned int l1_code_cache_line_size : 8; unsigned int l1_code_reserved_8_to_15 : 8; unsigned int l1_code_associativity : 8; @@ -357,82 +312,31 @@ typedef struct CPU_ID_REGISTERS cpu_id_registers_0x80000005; }; - union - { - struct - { - // eax - union - { - unsigned int eax; - }; - - // ebx - union - { - unsigned int ebx; - }; - - // ecx - union - { + union { + struct { + unsigned int eax; + unsigned int ebx; + union { unsigned int ecx; - struct - { + struct { unsigned int l2_cache_line_size : 8; unsigned int l2_reserved_8_to_11 : 4; unsigned int l2_associativity : 4; unsigned int l2_cache_size : 16; }; }; - - // edx - union - { - unsigned int edx; - }; + unsigned int edx; }; CPU_ID_REGISTERS cpu_id_registers_0x80000006; }; - union - { - struct - { - // eax - union - { - unsigned int eax; - }; + CPU_ID_REGISTERS cpu_id_registers_0x80000008; - // ebx - union - { - unsigned int ebx; - }; - - // ecx - union - { - unsigned int ecx; - }; - - // edx - union - { - unsigned int edx; - }; - }; - CPU_ID_REGISTERS cpu_id_registers_0x80000008; - }; - unsigned int cache_line_size; unsigned int log_base_2_cache_line_size; -} -CPU_ID; +} CPU_ID; -typedef struct -{ +typedef struct { CPU_ID_REGISTERS cpu_id_registers_0; CPU_ID_REGISTERS cpu_id_registers_1; @@ -445,63 +349,48 @@ typedef struct CPU_ID_REGISTERS cpu_id_registers_0x80000006; CPU_ID_REGISTERS cpu_id_registers_0x80000008; -} -CPU_ID_BINARY_DATA; - -typedef struct -{ - union - { - CPU_ID_BINARY_DATA cpu_binary_data; - unsigned int data_array [sizeof (CPU_ID_BINARY_DATA) / 4]; - }; -} -CPU_ID_BINARY_DATA_ARRAY; +} CPU_ID_BINARY_DATA; void cpu_id_to_cpu_id_binary_data (CPU_ID *cpu_id, CPU_ID_BINARY_DATA *cpu_id_binary_data) { - - cpu_id_binary_data -> cpu_id_registers_0 = cpu_id -> cpu_id_registers_0; - cpu_id_binary_data -> cpu_id_registers_1 = cpu_id -> cpu_id_registers_1; - cpu_id_binary_data -> cpu_id_registers_0x80000000 = cpu_id -> cpu_id_registers_0x80000000; - cpu_id_binary_data -> cpu_id_registers_0x80000001 = cpu_id -> cpu_id_registers_0x80000001; - cpu_id_binary_data -> cpu_id_registers_0x80000002 = cpu_id -> cpu_id_registers_0x80000002; - cpu_id_binary_data -> cpu_id_registers_0x80000003 = cpu_id -> cpu_id_registers_0x80000003; - cpu_id_binary_data -> cpu_id_registers_0x80000004 = cpu_id -> cpu_id_registers_0x80000004; - cpu_id_binary_data -> cpu_id_registers_0x80000006 = cpu_id -> cpu_id_registers_0x80000006; - cpu_id_binary_data -> cpu_id_registers_0x80000008 = cpu_id -> cpu_id_registers_0x80000008; + cpu_id_binary_data->cpu_id_registers_0 = cpu_id->cpu_id_registers_0; + cpu_id_binary_data->cpu_id_registers_1 = cpu_id->cpu_id_registers_1; + cpu_id_binary_data->cpu_id_registers_0x80000000 = cpu_id->cpu_id_registers_0x80000000; + cpu_id_binary_data->cpu_id_registers_0x80000001 = cpu_id->cpu_id_registers_0x80000001; + cpu_id_binary_data->cpu_id_registers_0x80000002 = cpu_id->cpu_id_registers_0x80000002; + cpu_id_binary_data->cpu_id_registers_0x80000003 = cpu_id->cpu_id_registers_0x80000003; + cpu_id_binary_data->cpu_id_registers_0x80000004 = cpu_id->cpu_id_registers_0x80000004; + cpu_id_binary_data->cpu_id_registers_0x80000006 = cpu_id->cpu_id_registers_0x80000006; + cpu_id_binary_data->cpu_id_registers_0x80000008 = cpu_id->cpu_id_registers_0x80000008; } void cpu_id_binary_data_to_cpu_id (CPU_ID_BINARY_DATA *cpu_id_binary_data, CPU_ID *cpu_id) { + memset (cpu_id, 0, sizeof(CPU_ID)); - memset (cpu_id, 0, sizeof (CPU_ID)); - - cpu_id -> cpu_id_registers_0 = cpu_id_binary_data -> cpu_id_registers_0; - cpu_id -> cpu_id_registers_1 = cpu_id_binary_data -> cpu_id_registers_1; - cpu_id -> cpu_id_registers_0x80000000 = cpu_id_binary_data -> cpu_id_registers_0x80000000; - cpu_id -> cpu_id_registers_0x80000001 = cpu_id_binary_data -> cpu_id_registers_0x80000001; - cpu_id -> cpu_id_registers_0x80000002 = cpu_id_binary_data -> cpu_id_registers_0x80000002; - cpu_id -> cpu_id_registers_0x80000003 = cpu_id_binary_data -> cpu_id_registers_0x80000003; - cpu_id -> cpu_id_registers_0x80000004 = cpu_id_binary_data -> cpu_id_registers_0x80000004; - cpu_id -> cpu_id_registers_0x80000006 = cpu_id_binary_data -> cpu_id_registers_0x80000006; - cpu_id -> cpu_id_registers_0x80000008 = cpu_id_binary_data -> cpu_id_registers_0x80000008; + cpu_id->cpu_id_registers_0 = cpu_id_binary_data->cpu_id_registers_0; + cpu_id->cpu_id_registers_1 = cpu_id_binary_data->cpu_id_registers_1; + cpu_id->cpu_id_registers_0x80000000 = cpu_id_binary_data->cpu_id_registers_0x80000000; + cpu_id->cpu_id_registers_0x80000001 = cpu_id_binary_data->cpu_id_registers_0x80000001; + cpu_id->cpu_id_registers_0x80000002 = cpu_id_binary_data->cpu_id_registers_0x80000002; + cpu_id->cpu_id_registers_0x80000003 = cpu_id_binary_data->cpu_id_registers_0x80000003; + cpu_id->cpu_id_registers_0x80000004 = cpu_id_binary_data->cpu_id_registers_0x80000004; + cpu_id->cpu_id_registers_0x80000006 = cpu_id_binary_data->cpu_id_registers_0x80000006; + cpu_id->cpu_id_registers_0x80000008 = cpu_id_binary_data->cpu_id_registers_0x80000008; } -int cpuid (int input_eax, CPU_ID_REGISTERS *cpu_id_registers) { +int cpuid(int input_eax, CPU_ID_REGISTERS *cpu_id_registers) { int state; - state = false; - __try - { + state = false; + __try { if (input_eax == 0) { // the order of ecx and edx is swapped when saved to make a proper vendor string #ifdef _WIN64 - __cpuid((int*)cpu_id_registers, input_eax); - unsigned int tmp = cpu_id_registers->edx; - cpu_id_registers->edx = cpu_id_registers->ecx; - cpu_id_registers->ecx = tmp; + __cpuid((int*)cpu_id_registers, input_eax); + unsigned int tmp = cpu_id_registers->edx; + cpu_id_registers->edx = cpu_id_registers->ecx; + cpu_id_registers->ecx = tmp; #else - __asm - { + __asm { mov eax, [input_eax] mov edi, [cpu_id_registers] @@ -513,13 +402,11 @@ int cpuid (int input_eax, CPU_ID_REGISTERS *cpu_id_registers) { mov [edi + 12], ecx } #endif - } - else { + } else { #ifdef _WIN64 - __cpuid((int*)cpu_id_registers, input_eax); + __cpuid((int*)cpu_id_registers, input_eax); #else - __asm - { + __asm { mov eax, [input_eax] mov edi, [cpu_id_registers] @@ -535,153 +422,144 @@ int cpuid (int input_eax, CPU_ID_REGISTERS *cpu_id_registers) { state = true; } - __except (1) - { + __except (1) { state = false; } return state; } -void parse_cpu_id (CPU_ID *cpu_id) { +void parse_cpu_id(CPU_ID *cpu_id) { + printf("CPUID\n"); + printf(" vendor = %s\n", cpu_id->cpu_vendor); + printf(" brand string %s\n", cpu_id->cpu_brand_string); + printf(" maximum_cpu_id_input = %u\n", cpu_id->maximum_cpu_id_input); + printf(" maximum extended information = 0x%X\n", cpu_id->cpu_id_registers_0x80000000.eax); - printf ("CPUID\n"); - printf (" vendor = %s \n", cpu_id -> cpu_vendor); - printf (" brand string %s \n", cpu_id -> cpu_brand_string); - printf (" maximum_cpu_id_input = %u \n", cpu_id -> maximum_cpu_id_input); - printf (" maximum extended information = 0x%X \n", cpu_id -> cpu_id_registers_0x80000000.eax); + printf(" MMX = %u\n", cpu_id->mmx); + printf(" SSE = %u\n", cpu_id->sse); + printf(" SSE2 = %u\n", cpu_id->sse2); + printf(" SSE3 = %u\n", cpu_id->sse3); - printf (" MMX = %u \n", cpu_id -> mmx); - printf (" SSE = %u \n", cpu_id -> sse); - printf (" SSE2 = %u \n", cpu_id -> sse2); - printf (" SSE3 = %u \n", cpu_id -> sse3); + printf(" EST = %u\n", cpu_id->est); - printf (" EST = %u \n", cpu_id -> est); + if (cpu_id->maximum_cpu_id_input >= 1) { + printf(" version_information\n"); + printf(" stepping_id %u\n", cpu_id->stepping_id); + printf(" model %u\n", cpu_id->model); + printf(" family %u\n", cpu_id->family); + printf(" processor_type %u\n", cpu_id->processor_type); + printf(" extended_model_id %u\n", cpu_id->extended_model_id); + printf(" extended_family_id %u\n", cpu_id->extended_family_id); - if (cpu_id -> maximum_cpu_id_input >= 1) { - printf (" version_information \n"); - printf (" stepping_id %u \n", cpu_id -> stepping_id); - printf (" model %u \n", cpu_id -> model); - printf (" family %u \n", cpu_id -> family); - printf (" processor_type %u \n", cpu_id -> processor_type); - printf (" extended_model_id %u \n", cpu_id -> extended_model_id); - printf (" extended_family_id %u \n", cpu_id -> extended_family_id); + printf(" brand_index %u\n", cpu_id->brand_index); + printf(" clflush %u\n", cpu_id->clflush); + printf(" maximum_logical_processors %u\n", cpu_id->maximum_logical_processors); + printf(" initial_apic_id %u\n", cpu_id->initial_apic_id); - printf (" brand_index %u \n", cpu_id -> brand_index); - printf (" clflush %u \n", cpu_id -> clflush); - printf (" maximum_logical_processors %u \n", cpu_id -> maximum_logical_processors); - printf (" initial_apic_id %u \n", cpu_id -> initial_apic_id); - -// printf (" cache_line_size %u \n", cpu_id -> cache_line_size); -// printf (" log_base_2_cache_line_size %u \n", cpu_id -> log_base_2_cache_line_size); +// printf(" cache_line_size %u\n", cpu_id->cache_line_size); +// printf(" log_base_2_cache_line_size %u\n", cpu_id->log_base_2_cache_line_size); } - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000005) { - printf (" l1_data_cache_line_size %d \n", cpu_id -> l1_data_cache_line_size); - printf (" l1_data_associativity %d \n", cpu_id -> l1_data_associativity); - printf (" l1_data_cache_size %dK \n", cpu_id -> l1_data_cache_size); + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000005) { + printf(" l1_data_cache_line_size %d\n", cpu_id->l1_data_cache_line_size); + printf(" l1_data_associativity %d\n", cpu_id->l1_data_associativity); + printf(" l1_data_cache_size %dK\n", cpu_id->l1_data_cache_size); - printf (" l1_code_cache_line_size %d \n", cpu_id -> l1_code_cache_line_size); - printf (" l1_code_associativity %d \n", cpu_id -> l1_code_associativity); - printf (" l1_code_cache_size %dK \n", cpu_id -> l1_code_cache_size); + printf(" l1_code_cache_line_size %d\n", cpu_id->l1_code_cache_line_size); + printf(" l1_code_associativity %d\n", cpu_id->l1_code_associativity); + printf(" l1_code_cache_size %dK\n", cpu_id->l1_code_cache_size); } - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000006) { - printf (" l2_cache_line_size %d \n", cpu_id -> l2_cache_line_size); - printf (" l2_associativity %d \n", cpu_id -> l2_associativity); - printf (" l2_cache_size %dK \n", cpu_id -> l2_cache_size); + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000006) { + printf(" l2_cache_line_size %d\n", cpu_id->l2_cache_line_size); + printf(" l2_associativity %d\n", cpu_id->l2_associativity); + printf(" l2_cache_size %dK\n", cpu_id->l2_cache_size); } } -int initialize_cpu_id (CPU_ID *cpu_id) { +int initialize_cpu_id(CPU_ID *cpu_id) { + int debug = false; + memset(cpu_id, 0, sizeof(CPU_ID)); - int state; - int debug; - - state = false; - debug = false; - memset (cpu_id, 0, sizeof (CPU_ID)); - - if (cpuid (0, &cpu_id -> cpu_id_registers_0)) { - if (cpu_id -> maximum_cpu_id_input >= 1) { - cpuid (1, &cpu_id -> cpu_id_registers_1); + if (cpuid(0, &cpu_id->cpu_id_registers_0)) { + if (cpu_id->maximum_cpu_id_input >= 1) { + cpuid(1, &cpu_id->cpu_id_registers_1); } - if (cpu_id -> maximum_cpu_id_input >= 2) { + if (cpu_id->maximum_cpu_id_input >= 2) { unsigned int index; - cpuid (2, &cpu_id -> cpu_id_registers_2); + cpuid(2, &cpu_id->cpu_id_registers_2); if (debug) { - printf (" al = %u \n", cpu_id -> cpu_id_registers_2.al); + printf(" al = %u\n", cpu_id->cpu_id_registers_2.al); } - - for (index = 1; index < cpu_id -> cpu_id_registers_2.al && index < MAXIMUM_2; index++) { - cpuid (2, &cpu_id -> cpu_id_registers_2_array [index]); + + for (index = 1; index < cpu_id->cpu_id_registers_2.al && index < MAXIMUM_2; index++) { + cpuid(2, &cpu_id->cpu_id_registers_2_array [index]); } for (index = 1; index < MAXIMUM_CHARACTERS; index++) { - if (cpu_id -> character_array_2 [index]) { + if (cpu_id->character_array_2 [index]) { if (debug) { - printf (" cache/TLB byte = %X \n", cpu_id -> character_array_2 [index]); + printf(" cache/TLB byte = %X\n", cpu_id->character_array_2 [index]); } - switch (cpu_id -> character_array_2 [index]) - { - case 0x0A: - case 0x0C: - cpu_id -> cache_line_size = 32; - cpu_id -> log_base_2_cache_line_size = 5; - break; + switch (cpu_id->character_array_2 [index]) { + case 0x0A: + case 0x0C: + cpu_id->cache_line_size = 32; + cpu_id->log_base_2_cache_line_size = 5; + break; - case 0x2C: - case 0x60: - case 0x66: - case 0x67: - case 0x68: - cpu_id -> cache_line_size = 64; - cpu_id -> log_base_2_cache_line_size = 6; - break; + case 0x2C: + case 0x60: + case 0x66: + case 0x67: + case 0x68: + cpu_id->cache_line_size = 64; + cpu_id->log_base_2_cache_line_size = 6; + break; } } } } - cpuid (0x80000000, &cpu_id -> cpu_id_registers_0x80000000); + cpuid(0x80000000, &cpu_id->cpu_id_registers_0x80000000); - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000001) { - cpuid (0x80000001, &cpu_id -> cpu_id_registers_0x80000001); - } - - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000004) { - cpuid (0x80000002, &cpu_id -> cpu_id_registers_0x80000002); - cpuid (0x80000003, &cpu_id -> cpu_id_registers_0x80000003); - cpuid (0x80000004, &cpu_id -> cpu_id_registers_0x80000004); + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000001) { + cpuid(0x80000001, &cpu_id->cpu_id_registers_0x80000001); } - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000005) { - cpuid (0x80000005, &cpu_id -> cpu_id_registers_0x80000005); + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000004) { + cpuid(0x80000002, &cpu_id->cpu_id_registers_0x80000002); + cpuid(0x80000003, &cpu_id->cpu_id_registers_0x80000003); + cpuid(0x80000004, &cpu_id->cpu_id_registers_0x80000004); } - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000006) { - cpuid (0x80000006, &cpu_id -> cpu_id_registers_0x80000006); + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000005) { + cpuid(0x80000005, &cpu_id->cpu_id_registers_0x80000005); } - if (cpu_id -> cpu_id_registers_0x80000000.eax >= 0x80000008) { - cpuid (0x80000008, &cpu_id -> cpu_id_registers_0x80000008); - } + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000006) { + cpuid(0x80000006, &cpu_id->cpu_id_registers_0x80000006); + } - state = true; + if (cpu_id->cpu_id_registers_0x80000000.eax >= 0x80000008) { + cpuid(0x80000008, &cpu_id->cpu_id_registers_0x80000008); + } + + return true; } - - return state; + + return false; } -int update_cpu_frequency_function (int processor_number, DisplayInformation *display_information) -{ +int update_cpu_frequency_function(int processor_number, DisplayInformation *display_information) { int update; - + update = false; - display_information -> _maximum_cpu_frequency = 0; - display_information -> _current_cpu_frequency = 0; - + display_information->_maximum_cpu_frequency = 0; + display_information->_current_cpu_frequency = 0; + if (CallNtPowerInformationFunction) { int i; @@ -692,38 +570,38 @@ int update_cpu_frequency_function (int processor_number, DisplayInformation *dis POWER_INFORMATION_LEVEL information_level; PROCESSOR_POWER_INFORMATION *processor_power_information; PROCESSOR_POWER_INFORMATION processor_power_information_array [MAXIMUM_PROCESSORS]; - - memset (processor_power_information_array, 0, sizeof (PROCESSOR_POWER_INFORMATION) * MAXIMUM_PROCESSORS); + + memset(processor_power_information_array, 0, sizeof(PROCESSOR_POWER_INFORMATION) * MAXIMUM_PROCESSORS); processor_power_information = processor_power_information_array; for (i = 0; i < MAXIMUM_PROCESSORS; i++) { - processor_power_information -> Number = 0xFFFFFFFF; + processor_power_information->Number = 0xFFFFFFFF; processor_power_information++; } - + information_level = ProcessorInformation; input_buffer = NULL; output_buffer = processor_power_information_array; input_buffer_size = 0; - output_buffer_size = sizeof (PROCESSOR_POWER_INFORMATION) * MAXIMUM_PROCESSORS; - if (CallNtPowerInformationFunction (information_level, input_buffer, input_buffer_size, output_buffer, output_buffer_size) == 0) { + output_buffer_size = sizeof(PROCESSOR_POWER_INFORMATION) * MAXIMUM_PROCESSORS; + if (CallNtPowerInformationFunction(information_level, input_buffer, input_buffer_size, output_buffer, output_buffer_size) == 0) { processor_power_information = processor_power_information_array; for (i = 0; i < MAXIMUM_PROCESSORS; i++) { - if (processor_power_information -> Number == processor_number) { + if (processor_power_information->Number == processor_number) { PN_uint64 value; - value = processor_power_information -> MaxMhz; - display_information -> _maximum_cpu_frequency = value * 1000000; + value = processor_power_information->MaxMhz; + display_information->_maximum_cpu_frequency = value * 1000000; - value = processor_power_information -> CurrentMhz; - display_information -> _current_cpu_frequency = value * 1000000; + value = processor_power_information->CurrentMhz; + display_information->_current_cpu_frequency = value * 1000000; update = true; break; } processor_power_information++; - } + } } } @@ -736,7 +614,7 @@ count_number_of_cpus(DisplayInformation *display_information) { int num_logical_cpus = 0; // Get a pointer to the GetLogicalProcessorInformation function. - typedef BOOL (WINAPI *LPFN_GLPI)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, + typedef BOOL (WINAPI *LPFN_GLPI)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, PDWORD); LPFN_GLPI glpi; glpi = (LPFN_GLPI)GetProcAddress(GetModuleHandle(TEXT("kernel32")), @@ -801,11 +679,8 @@ count_number_of_cpus(DisplayInformation *display_information) { //////////////////////////////////////////////////////////////////// WinGraphicsPipe:: WinGraphicsPipe() { - - bool state; char string [512]; - state = false; _supported_types = OT_window | OT_fullscreen_window; // these fns arent defined on win95, so get dynamic ptrs to them @@ -819,15 +694,38 @@ WinGraphicsPipe() { } #ifdef HAVE_DX9 - if (request_dxdisplay_information){ + // Use D3D to get display info. This is disabled by default as it is slow. + if (request_dxdisplay_information) { DisplaySearchParameters display_search_parameters_dx9; int dx9_display_information (DisplaySearchParameters &display_search_parameters_dx9, DisplayInformation *display_information); + dx9_display_information(display_search_parameters_dx9, _display_information); + } else +#endif + { + // Use the Win32 API to query the available display modes. + pvector display_modes; + DEVMODE dm = {0}; + dm.dmSize = sizeof(dm); + for (int i = 0; EnumDisplaySettings(NULL, i, &dm) != 0; ++i) { + DisplayMode mode; + mode.width = dm.dmPelsWidth; + mode.height = dm.dmPelsHeight; + mode.bits_per_pixel = dm.dmBitsPerPel; + mode.refresh_rate = dm.dmDisplayFrequency; + mode.fullscreen_only = 0; + if (i == 0 || mode != display_modes.back()) { + display_modes.push_back(mode); + } + } - if (state == false && dx9_display_information (display_search_parameters_dx9, _display_information)) { - state = true; + // Copy this information to the DisplayInformation object. + _display_information->_total_display_modes = display_modes.size(); + if (!display_modes.empty()) { + _display_information->_display_mode_array = new DisplayMode[display_modes.size()]; + std::copy(display_modes.begin(), display_modes.end(), + _display_information->_display_mode_array); } } -#endif if (auto_cpu_data) { lookup_cpu_data(); @@ -836,15 +734,17 @@ WinGraphicsPipe() { OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - if (GetVersionEx (&version_info)) { - sprintf (string, "OS version: %d.%d.%d.%d \n", version_info.dwMajorVersion, version_info.dwMinorVersion, version_info.dwPlatformId, version_info.dwBuildNumber); - windisplay_cat.info() << string; - windisplay_cat.info() << " " << version_info.szCSDVersion << "\n"; + if (GetVersionEx(&version_info)) { + if (windisplay_cat.is_info()) { + sprintf(string, "OS version: %d.%d.%d.%d\n", version_info.dwMajorVersion, version_info.dwMinorVersion, version_info.dwPlatformId, version_info.dwBuildNumber); + windisplay_cat.info() << string; + windisplay_cat.info() << " " << version_info.szCSDVersion << "\n"; + } - _display_information -> _os_version_major = version_info.dwMajorVersion; - _display_information -> _os_version_minor = version_info.dwMinorVersion; - _display_information -> _os_version_build = version_info.dwBuildNumber; - _display_information -> _os_platform_id = version_info.dwPlatformId; + _display_information->_os_version_major = version_info.dwMajorVersion; + _display_information->_os_version_minor = version_info.dwMinorVersion; + _display_information->_os_version_build = version_info.dwBuildNumber; + _display_information->_os_platform_id = version_info.dwPlatformId; } // Screen size _display_width = GetSystemMetrics(SM_CXSCREEN); @@ -852,23 +752,19 @@ WinGraphicsPipe() { HMODULE power_dll; - power_dll = LoadLibrary ("PowrProf.dll"); + power_dll = LoadLibrary("PowrProf.dll"); if (power_dll) { - CallNtPowerInformationFunction = (CallNtPowerInformationType) GetProcAddress (power_dll, "CallNtPowerInformation"); + CallNtPowerInformationFunction = (CallNtPowerInformationType) GetProcAddress(power_dll, "CallNtPowerInformation"); if (CallNtPowerInformationFunction) { - _display_information -> _update_cpu_frequency_function = update_cpu_frequency_function; + _display_information->_update_cpu_frequency_function = update_cpu_frequency_function; update_cpu_frequency_function(0, _display_information); - sprintf (string, "max Mhz %I64d, current Mhz %I64d \n", _display_information -> _maximum_cpu_frequency, _display_information -> _current_cpu_frequency); + sprintf(string, "max Mhz %I64d, current Mhz %I64d\n", _display_information->_maximum_cpu_frequency, _display_information->_current_cpu_frequency); windisplay_cat.info() << string; } } - - if (state) { - - } } //////////////////////////////////////////////////////////////////// @@ -883,10 +779,10 @@ lookup_cpu_data() { char string [512]; // set callback for memory function - _display_information -> _get_memory_information_function = get_memory_information; + _display_information->_get_memory_information_function = get_memory_information; // set callback for cpu time function - _display_information -> _cpu_time_function = cpu_time_function; + _display_information->_cpu_time_function = cpu_time_function; // determine CPU frequency PN_uint64 time; @@ -900,7 +796,7 @@ lookup_cpu_data() { counter.QuadPart = 0; end.QuadPart = 0; frequency.QuadPart = 0; - + int priority; HANDLE thread; @@ -908,8 +804,8 @@ lookup_cpu_data() { thread = GetCurrentThread(); priority = GetThreadPriority (thread); SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL); - - if (QueryPerformanceFrequency(&frequency)) { + + if (QueryPerformanceFrequency(&frequency)) { if (frequency.QuadPart > 0) { if (QueryPerformanceCounter (&counter)) { time = cpu_time_function(); @@ -919,15 +815,15 @@ lookup_cpu_data() { } end_time = cpu_time_function(); - _display_information -> _cpu_frequency = end_time - time; + _display_information->_cpu_frequency = end_time - time; } } } SetThreadPriority(thread, priority); - sprintf (string, "QueryPerformanceFrequency: %I64d\n", frequency.QuadPart); + sprintf(string, "QueryPerformanceFrequency: %I64d\n", frequency.QuadPart); windisplay_cat.info() << string; - sprintf (string, "CPU frequency: %I64d\n", _display_information -> _cpu_frequency); + sprintf(string, "CPU frequency: %I64d\n", _display_information->_cpu_frequency); windisplay_cat.info() << string; @@ -935,34 +831,33 @@ lookup_cpu_data() { CPU_ID cpu_id; windisplay_cat.info() << "start CPU ID\n"; - - if (initialize_cpu_id (&cpu_id)) { - CPU_ID_BINARY_DATA *cpu_id_binary_data; - - cpu_id_binary_data = new (CPU_ID_BINARY_DATA); - if (cpu_id_binary_data) { - cpu_id_to_cpu_id_binary_data (&cpu_id, cpu_id_binary_data); - _display_information -> _cpu_id_size = sizeof (CPU_ID_BINARY_DATA) / sizeof (unsigned int); - _display_information -> _cpu_id_data = (unsigned int *) cpu_id_binary_data; - _display_information -> _cpu_vendor_string = strdup(cpu_id.cpu_vendor); - _display_information -> _cpu_brand_string = strdup(cpu_id.cpu_brand_string); - _display_information -> _cpu_version_information = cpu_id.version_information; - _display_information -> _cpu_brand_index = cpu_id.brand_index; + if (initialize_cpu_id(&cpu_id)) { + CPU_ID_BINARY_DATA *cpu_id_binary_data; + + cpu_id_binary_data = new (CPU_ID_BINARY_DATA); + if (cpu_id_binary_data) { + cpu_id_to_cpu_id_binary_data(&cpu_id, cpu_id_binary_data); + _display_information->_cpu_id_size = sizeof(CPU_ID_BINARY_DATA) / sizeof(unsigned int); + _display_information->_cpu_id_data = (unsigned int *) cpu_id_binary_data; + + _display_information->_cpu_vendor_string = strdup(cpu_id.cpu_vendor); + _display_information->_cpu_brand_string = strdup(cpu_id.cpu_brand_string); + _display_information->_cpu_version_information = cpu_id.version_information; + _display_information->_cpu_brand_index = cpu_id.brand_index; if (windisplay_cat.is_debug()) { windisplay_cat.debug() - << hex << _display_information -> _cpu_id_version << dec << "|"; + << hex << _display_information->_cpu_id_version << dec << "|"; int index; - for (index = 0; index < _display_information -> _cpu_id_size; index++) { + for (index = 0; index < _display_information->_cpu_id_size; ++index) { unsigned int data; - - data = _display_information -> _cpu_id_data [index]; + data = _display_information->_cpu_id_data[index]; windisplay_cat.debug(false) << hex << data << dec; - if (index < (_display_information -> _cpu_id_size - 1)) { + if (index < _display_information->_cpu_id_size - 1) { windisplay_cat.debug(false) << "|"; } @@ -973,7 +868,7 @@ lookup_cpu_data() { } if (windisplay_cat.is_debug()) { - parse_cpu_id (&cpu_id); + parse_cpu_id(&cpu_id); } } @@ -986,7 +881,7 @@ lookup_cpu_data() { //////////////////////////////////////////////////////////////////// // Function: WinGraphicsPipe::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// WinGraphicsPipe:: ~WinGraphicsPipe() { From 672a191d2a8e4a0d66ff6e88091238c2e83a5ef5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 19 Jul 2015 21:23:46 +0200 Subject: [PATCH 014/200] Improve error message when Cg support is not enabled --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index db342f423a..e05e1e2d8e 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4828,8 +4828,8 @@ prepare_shader(Shader *se) { return NULL; } -#if defined(HAVE_CG) && !defined(OPENGLES) case Shader::SL_Cg: +#if defined(HAVE_CG) && !defined(OPENGLES) if (_supports_basic_shaders) { result = new CLP(CgShaderContext)(this, se); break; @@ -4838,6 +4838,10 @@ prepare_shader(Shader *se) { << "Tried to load Cg shader, but basic shaders not supported.\n"; return NULL; } +#elif defined(OPENGLES) + GLCAT.error() + << "Tried to load Cg shader, but Cg support is not available for OpenGL ES.\n"; + return NULL; #else GLCAT.error() << "Tried to load Cg shader, but Cg support not compiled in.\n"; From 87b23dfeb20778bd43160e94c561b3909f7d4b6d Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 19 Jul 2015 21:31:24 +0200 Subject: [PATCH 015/200] Improve shader model detection mechanism --- panda/src/cocoadisplay/cocoaGraphicsPipe.mm | 1 + panda/src/display/displayInformation.cxx | 10 +- panda/src/display/displayInformation.h | 7 +- panda/src/display/graphicsPipe.cxx | 1 + panda/src/display/graphicsPipe.h | 2 +- panda/src/display/graphicsStateGuardian.I | 4 +- panda/src/display/graphicsStateGuardian.cxx | 8 ++ panda/src/display/graphicsStateGuardian.h | 11 +- .../glstuff/glGraphicsStateGuardian_src.cxx | 132 ++++++++---------- panda/src/osxdisplay/osxGraphicsPipe.cxx | 1 + panda/src/windisplay/winDetectDx.h | 3 +- panda/src/x11display/x11GraphicsPipe.cxx | 1 + 12 files changed, 91 insertions(+), 90 deletions(-) diff --git a/panda/src/cocoadisplay/cocoaGraphicsPipe.mm b/panda/src/cocoadisplay/cocoaGraphicsPipe.mm index 1969ac4116..7883bad834 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsPipe.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsPipe.mm @@ -19,6 +19,7 @@ #include "cocoaPandaApp.h" #include "config_cocoadisplay.h" #include "frameBufferProperties.h" +#include "displayInformation.h" #import #import diff --git a/panda/src/display/displayInformation.cxx b/panda/src/display/displayInformation.cxx index 41eab9d020..3cdcd067ec 100644 --- a/panda/src/display/displayInformation.cxx +++ b/panda/src/display/displayInformation.cxx @@ -90,13 +90,12 @@ DisplayInformation() { int window_bits_per_pixel; int total_display_modes; DisplayMode *display_mode_array; - int shader_model; int video_memory; int texture_memory; PN_uint64 physical_memory; PN_uint64 available_physical_memory; - state = DisplayInformation::DS_unknown; + state = DisplayInformation::DS_unknown; get_adapter_display_mode_state = false; get_device_caps_state = false; window_width = 0; @@ -104,7 +103,6 @@ DisplayInformation() { window_bits_per_pixel = 0; total_display_modes = 0; display_mode_array = NULL; - shader_model = GraphicsStateGuardian::SM_00; video_memory = 0; texture_memory = 0; physical_memory = 0; @@ -118,7 +116,7 @@ DisplayInformation() { _window_bits_per_pixel = window_bits_per_pixel; _total_display_modes = total_display_modes; _display_mode_array = display_mode_array; - _shader_model = shader_model; + _shader_model = GraphicsStateGuardian::SM_00; _video_memory = video_memory; _texture_memory = texture_memory; @@ -328,8 +326,8 @@ get_display_mode_fullscreen_only (int display_index) { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -int DisplayInformation:: -get_shader_model ( ) { +GraphicsStateGuardian::ShaderModel DisplayInformation:: +get_shader_model() { return _shader_model; } diff --git a/panda/src/display/displayInformation.h b/panda/src/display/displayInformation.h index 32ee8c687e..c4d624097e 100644 --- a/panda/src/display/displayInformation.h +++ b/panda/src/display/displayInformation.h @@ -16,6 +16,7 @@ #define DISPLAYINFORMATION_H #include "typedef.h" +#include "graphicsStateGuardian.h" struct EXPCL_PANDA_DISPLAY DisplayMode { PUBLISHED: @@ -65,7 +66,7 @@ PUBLISHED: int get_display_mode_refresh_rate(int display_index); int get_display_mode_fullscreen_only(int display_index); - int get_shader_model(); + GraphicsStateGuardian::ShaderModel get_shader_model(); int get_video_memory(); int get_texture_memory(); @@ -126,9 +127,9 @@ public: int _maximum_window_width; int _maximum_window_height; int _window_bits_per_pixel; - int _total_display_modes; + int _total_display_modes; DisplayMode *_display_mode_array; - int _shader_model; + GraphicsStateGuardian::ShaderModel _shader_model; int _video_memory; int _texture_memory; diff --git a/panda/src/display/graphicsPipe.cxx b/panda/src/display/graphicsPipe.cxx index 4865e3da9f..0a6978db78 100644 --- a/panda/src/display/graphicsPipe.cxx +++ b/panda/src/display/graphicsPipe.cxx @@ -17,6 +17,7 @@ #include "graphicsBuffer.h" #include "config_display.h" #include "mutexHolder.h" +#include "displayInformation.h" TypeHandle GraphicsPipe::_type_handle; diff --git a/panda/src/display/graphicsPipe.h b/panda/src/display/graphicsPipe.h index 134a3baddd..d505af7a1e 100644 --- a/panda/src/display/graphicsPipe.h +++ b/panda/src/display/graphicsPipe.h @@ -21,7 +21,6 @@ #include "typedReferenceCount.h" #include "pointerTo.h" #include "lightMutex.h" -#include "displayInformation.h" class GraphicsEngine; class GraphicsOutput; @@ -32,6 +31,7 @@ class FrameBufferProperties; class WindowProperties; class Texture; class WindowHandle; +class DisplayInformation; //////////////////////////////////////////////////////////////////// // Class : GraphicsPipe diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 9cfa0e3fed..15b2b89b78 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -876,7 +876,7 @@ get_maximum_simultaneous_render_targets() const { // Access: Published // Description: Returns the ShaderModel //////////////////////////////////////////////////////////////////// -INLINE int GraphicsStateGuardian:: +INLINE GraphicsStateGuardian::ShaderModel GraphicsStateGuardian:: get_shader_model() const { return _shader_model; } @@ -889,7 +889,7 @@ get_shader_model() const { // testing lower-end shaders. //////////////////////////////////////////////////////////////////// INLINE void GraphicsStateGuardian:: -set_shader_model(int shader_model) { +set_shader_model(ShaderModel shader_model) { if (shader_model <= _auto_detect_shader_model) { _shader_model = shader_model; } diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 15ebcd9dc2..b2fef6f469 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -3344,3 +3344,11 @@ int GraphicsStateGuardian:: get_driver_shader_version_minor() { return -1; } + +ostream & +operator << (ostream &out, GraphicsStateGuardian::ShaderModel sm) { + static const char *sm_strings[] = {"none", "1.1", "2.0", "2.x", "3.0", "4.0", "5.0", "5.1"}; + nassertr(sm >= 0 && sm <= GraphicsStateGuardian::SM_51, out); + out << sm_strings[sm]; + return out; +} diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 7e9d8b6f47..cc3c78a1bc 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -83,6 +83,7 @@ PUBLISHED: SM_30, SM_40, SM_50, + SM_51, }; INLINE void release_all(); @@ -166,8 +167,8 @@ PUBLISHED: INLINE int get_max_color_targets() const; INLINE int get_maximum_simultaneous_render_targets() const; - INLINE int get_shader_model() const; - INLINE void set_shader_model(int shader_model); + INLINE ShaderModel get_shader_model() const; + INLINE void set_shader_model(ShaderModel shader_model); virtual int get_supported_geom_rendering() const; virtual bool get_supports_cg_profile(const string &name) const; @@ -545,8 +546,8 @@ protected: int _stereo_buffer_mask; - int _auto_detect_shader_model; - int _shader_model; + ShaderModel _auto_detect_shader_model; + ShaderModel _shader_model; static PT(TextureStage) _alpha_scale_texture_stage; @@ -664,6 +665,8 @@ private: friend class GraphicsEngine; }; +EXPCL_PANDA_DISPLAY ostream &operator << (ostream &out, GraphicsStateGuardian::ShaderModel sm); + #include "graphicsStateGuardian.I" #endif diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 02d03b0b66..2fc02f6eb0 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -64,6 +64,7 @@ #include "graphicsEngine.h" #include "shaderGenerator.h" #include "samplerState.h" +#include "displayInformation.h" #if defined(HAVE_CG) && !defined(OPENGLES) #include "Cg/cgGL.h" @@ -2450,58 +2451,39 @@ reset() { report_my_gl_errors(); -#if defined(HAVE_CG) && !defined(OPENGLES) - - typedef struct { - CGprofile cg_profile; - int shader_model; - } CG_PROFILE_TO_SHADER_MODEL; - - static CG_PROFILE_TO_SHADER_MODEL cg_profile_to_shader_model_array[] = { +#ifndef OPENGLES + if (_gl_shadlang_ver_major >= 4 || has_extension("GL_NV_gpu_program5")) { // gp5fp - OpenGL fragment profile for GeForce 400 Series and up - (CGprofile)7017, /*CG_PROFILE_GP5FP,*/ - SM_50, + _shader_model = SM_50; + } else if (_gl_shadlang_ver_major >= 3 || + has_extension("GL_NV_gpu_program4")) { // gp4fp - OpenGL fragment profile for G8x (GeForce 8xxx and up) - (CGprofile)7010, /*CG_PROFILE_GP4FP,*/ - SM_40, + _shader_model = SM_40; + } else if (has_extension("GL_NV_fragment_program2")) { // fp40 - OpenGL fragment profile for NV4x (GeForce 6xxx and 7xxx // Series, NV4x-based Quadro FX, etc.) - CG_PROFILE_FP40, - SM_30, + _shader_model = SM_30; + } else if (has_extension("GL_NV_fragment_program")) { // fp30 - OpenGL fragment profile for NV3x (GeForce FX, Quadro FX, etc.) - CG_PROFILE_FP30, - SM_2X, + _shader_model = SM_2X; + } else if (_gl_shadlang_ver_major >= 1 || + has_extension("GL_ARB_fragment_program")) { // This OpenGL profile corresponds to the per-fragment - // functionality introduced by GeForce FX and other DirectX 9 - // GPUs. - CG_PROFILE_ARBFP1, - SM_20, + // functionality introduced by GeForce FX and other DirectX 9 GPUs. + _shader_model = SM_20; + } else if (has_extension("GL_NV_texture_shader2")) { // fp20 - OpenGL fragment profile for NV2x (GeForce3, GeForce4 Ti, // Quadro DCC, etc.) - CG_PROFILE_FP20, - SM_11, + _shader_model = SM_11; - // no shader support - CG_PROFILE_UNKNOWN, - SM_00, - }; - - int index; - CG_PROFILE_TO_SHADER_MODEL *cg_profile_to_shader_model; - - index = 0; - cg_profile_to_shader_model = cg_profile_to_shader_model_array; - while (cg_profile_to_shader_model->shader_model != SM_00) { - if (cgGLIsProfileSupported(cg_profile_to_shader_model->cg_profile)) { - _shader_model = cg_profile_to_shader_model->shader_model; - break; - } - cg_profile_to_shader_model++; + } else { + // No shader support + _shader_model = SM_00; } // DisplayInformation may have better shader model detection @@ -2521,12 +2503,8 @@ reset() { } _auto_detect_shader_model = _shader_model; - CGprofile vertex_profile; - CGprofile pixel_profile; - - vertex_profile = cgGLGetLatestProfile(CG_GL_VERTEX); - pixel_profile = cgGLGetLatestProfile(CG_GL_FRAGMENT); if (GLCAT.is_debug()) { +#ifdef HAVE_CG #if CG_VERSION_NUM >= 2200 GLCAT.debug() << "Supported Cg profiles:\n"; int num_profiles = cgGetNumSupportedProfiles(); @@ -2539,22 +2517,25 @@ reset() { #endif // CG_VERSION_NUM >= 2200 #if CG_VERSION_NUM >= 3100 - if (GLCAT.is_debug()) { - CGGLglslversion ver = cgGLGetContextGLSLVersion(_cg_context); - GLCAT.debug() - << "Cg GLSL version: " << cgGLGetGLSLVersionString(ver) << "\n"; - } -#endif - + CGGLglslversion ver = cgGLGetContextGLSLVersion(_cg_context); GLCAT.debug() - << "\nCg latest vertex profile = " << cgGetProfileString(vertex_profile) << " id = " << vertex_profile - << "\nCg latest pixel profile = " << cgGetProfileString(pixel_profile) << " id = " << pixel_profile - << "\nshader model = " << _shader_model - << "\n"; - } - + << "Cg GLSL version: " << cgGLGetGLSLVersionString(ver) << "\n"; #endif + CGprofile vertex_profile = cgGLGetLatestProfile(CG_GL_VERTEX); + CGprofile pixel_profile = cgGLGetLatestProfile(CG_GL_FRAGMENT); + GLCAT.debug() + << "Cg latest vertex profile = " << cgGetProfileString(vertex_profile) + << " (" << vertex_profile << ")\n"; + GLCAT.debug() + << "Cg latest pixel profile = " << cgGetProfileString(pixel_profile) + << " (" << pixel_profile << ")\n"; +#endif // HAVE_CG + + GLCAT.debug() << "shader model = " << _shader_model << "\n"; + } +#endif // !OPENGLES + // OpenGL core profile requires a VAO to be bound. It's a bit silly, // because we can just bind a VAO and then forget about it. #if !defined(OPENGLES) @@ -6872,7 +6853,6 @@ query_gl_version() { return; } } -#endif // If we asked for a GL 3 context, let's first try and see if we // can use the OpenGL 3 way to query version. @@ -6890,6 +6870,7 @@ query_gl_version() { return; } } +#endif // !OPENGLES // Otherwise, parse the GL_VERSION string. if (_gl_version.empty()) { @@ -6946,31 +6927,36 @@ query_glsl_version() { _gl_shadlang_ver_minor = 0; #ifndef OPENGLES - if (_gl_version_major == 1) { - if (has_extension("GL_ARB_shading_language_100")) { - _gl_shadlang_ver_major = 1; - _gl_shadlang_ver_minor = 0; - } - } else if (_gl_version_major >= 2) { + // OpenGL 2.0 introduces GLSL in the core. In 1.x, it is an extension. + if (_gl_version_major >= 2 || has_extension("GL_ARB_shading_language_100")) { + string ver = show_gl_string("GL_SHADING_LANGUAGE_VERSION", GL_SHADING_LANGUAGE_VERSION); _gl_shadlang_ver_major = 1; - _gl_shadlang_ver_minor = 1; - const char *verstr = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION); - if (verstr == NULL || - sscanf(verstr, "%d.%d", &_gl_shadlang_ver_major, - &_gl_shadlang_ver_minor) != 2) { + _gl_shadlang_ver_minor = (_gl_version_major >= 2) ? 1 : 0; + if (ver.empty() || + sscanf(ver.c_str(), "%d.%d", &_gl_shadlang_ver_major, + &_gl_shadlang_ver_minor) != 2) { GLCAT.warning() << "Invalid GL_SHADING_LANGUAGE_VERSION format.\n"; } } -#elif defined(OPENGLES_2) +#elif !defined(OPENGLES_1) + // OpenGL ES 2.0 and above has shader support built-in. + string ver = show_gl_string("GL_SHADING_LANGUAGE_VERSION", GL_SHADING_LANGUAGE_VERSION); _gl_shadlang_ver_major = 1; _gl_shadlang_ver_minor = 0; - const char *verstr = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION); - if (verstr == NULL || - sscanf(verstr, "OpenGL ES GLSL %d.%d", &_gl_shadlang_ver_major, - &_gl_shadlang_ver_minor) != 2) { + if (ver.empty() || + sscanf(ver.c_str(), "OpenGL ES GLSL %d.%d", &_gl_shadlang_ver_major, + &_gl_shadlang_ver_minor) != 2) { GLCAT.warning() << "Invalid GL_SHADING_LANGUAGE_VERSION format.\n"; } #endif + +#ifndef OPENGLES_1 + if (GLCAT.is_debug()) { + GLCAT.debug() + << "Detected GLSL version: " + << _gl_shadlang_ver_major << "." << _gl_shadlang_ver_minor << "\n"; + } +#endif } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/osxdisplay/osxGraphicsPipe.cxx b/panda/src/osxdisplay/osxGraphicsPipe.cxx index 79e4d9c3c3..5c85bd018e 100644 --- a/panda/src/osxdisplay/osxGraphicsPipe.cxx +++ b/panda/src/osxdisplay/osxGraphicsPipe.cxx @@ -17,6 +17,7 @@ #include "pnmImage.h" #include "subprocessWindow.h" #include "nativeWindowHandle.h" +#include "displayInformation.h" #import // some macros to make code more readable. diff --git a/panda/src/windisplay/winDetectDx.h b/panda/src/windisplay/winDetectDx.h index f04d468090..b88901143d 100644 --- a/panda/src/windisplay/winDetectDx.h +++ b/panda/src/windisplay/winDetectDx.h @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include +#include "displayInformation.h" typedef struct { D3DFORMAT d3d_format; @@ -116,7 +117,7 @@ static int get_display_information (DisplaySearchParameters &display_search_para int get_adapter_display_mode_state; int get_device_caps_state; - int shader_model; + GraphicsStateGuardian::ShaderModel shader_model; UINT minimum_width; UINT maximum_width; UINT minimum_height; diff --git a/panda/src/x11display/x11GraphicsPipe.cxx b/panda/src/x11display/x11GraphicsPipe.cxx index 83ba8de3d4..e6fc85a3e3 100644 --- a/panda/src/x11display/x11GraphicsPipe.cxx +++ b/panda/src/x11display/x11GraphicsPipe.cxx @@ -16,6 +16,7 @@ #include "x11GraphicsWindow.h" #include "config_x11display.h" #include "frameBufferProperties.h" +#include "displayInformation.h" TypeHandle x11GraphicsPipe::_type_handle; From 1c2c60acba94c97004987165912e9f9c9759927c Mon Sep 17 00:00:00 2001 From: Michael Wass Date: Mon, 20 Jul 2015 11:03:42 -0400 Subject: [PATCH 016/200] Removed a nonexistent import from GridChild This import is nonexistent and has no calls to it. The purpose it serves right now is causing an ImportError :P. --- direct/src/distributed/GridChild.py | 1 - 1 file changed, 1 deletion(-) diff --git a/direct/src/distributed/GridChild.py b/direct/src/distributed/GridChild.py index d139adff4a..58ac9783b4 100755 --- a/direct/src/distributed/GridChild.py +++ b/direct/src/distributed/GridChild.py @@ -1,6 +1,5 @@ from direct.distributed.DistributedSmoothNodeBase import DistributedSmoothNodeBase from direct.distributed.GridParent import GridParent -from pandac.PandaModules import EmbeddedValue class GridChild: """ From 3ad274639d4aa702e5cf4d53c3bcc1181a779ca8 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 20 Jul 2015 19:59:26 +0200 Subject: [PATCH 017/200] Move Cg calls out of GSG reset() function - do profile detection entirely without Cg functions --- panda/src/glstuff/glCgShaderContext_src.cxx | 15 +- .../glstuff/glGraphicsStateGuardian_src.cxx | 163 +++++++++++------- 2 files changed, 110 insertions(+), 68 deletions(-) diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index d8db598182..643fa4299a 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -49,7 +49,20 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte nassertv(s->get_language() == Shader::SL_Cg); - CGcontext context = _glgsg->_cg_context; + // Get a Cg context for this GSG. + CGcontext context = glgsg->_cg_context; + if (context == 0) { + // The GSG doesn't have a Cg context yet. Create one. + glgsg->_cg_context = context = cgCreateContext(); + +#if CG_VERSION_NUM >= 3100 + // This just sounds like a good thing to do. + cgGLSetContextGLSLVersion(context, cgGLDetectGLSLVersion()); + if (glgsg->_shader_caps._active_vprofile == CG_PROFILE_GLSLV) { + cgGLSetContextOptimalOptions(context, CG_PROFILE_GLSLC); + } +#endif + } // Ask the shader to compile itself for us and // to give us the resulting Cg program objects. diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 2fc02f6eb0..55ea62b8de 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -1269,63 +1269,7 @@ reset() { } } -#if defined(HAVE_CG) && !defined(OPENGLES) - if (cgGLIsProfileSupported(CG_PROFILE_ARBFP1) && - cgGLIsProfileSupported(CG_PROFILE_ARBVP1)) { - _supports_basic_shaders = true; - if (basic_shaders_only) { - _shader_caps._active_vprofile = (int)CG_PROFILE_ARBVP1; - _shader_caps._active_fprofile = (int)CG_PROFILE_ARBFP1; - _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; // No geometry shader if only using basic - } else { - _shader_caps._active_vprofile = (int)cgGLGetLatestProfile(CG_GL_VERTEX); - _shader_caps._active_fprofile = (int)cgGLGetLatestProfile(CG_GL_FRAGMENT); - _shader_caps._active_gprofile = (int)cgGLGetLatestProfile(CG_GL_GEOMETRY); - - // cgGLGetLatestProfile doesn't seem to return anything other - // arbvp1/arbfp1 on non-NVIDIA cards, which is severely limiting. - // So, if this happens, we set it to GLSL, which is - // usually supported on all cards. - // The GLSL profiles are horribly broken on non-NVIDIA cards, but - // I think I've worked around the issues sufficiently. - if ((_shader_caps._active_vprofile == CG_PROFILE_ARBVP1 || - _shader_caps._active_fprofile == CG_PROFILE_ARBFP1) && - cgGLIsProfileSupported(CG_PROFILE_GLSLV) && - cgGLIsProfileSupported(CG_PROFILE_GLSLF)) { - - _shader_caps._active_vprofile = (int)CG_PROFILE_GLSLV; - _shader_caps._active_fprofile = (int)CG_PROFILE_GLSLF; -#if CG_VERSION_NUM >= 2200 - if (cgGLIsProfileSupported(CG_PROFILE_GLSLG)) { - _shader_caps._active_gprofile = (int)CG_PROFILE_GLSLG; - } -#endif - } - } - _shader_caps._ultimate_vprofile = (int)CG_PROFILE_VP40; - _shader_caps._ultimate_fprofile = (int)CG_PROFILE_FP40; - _shader_caps._ultimate_gprofile = (int)CG_PROFILE_GPU_GP; - - _cg_context = cgCreateContext(); - -#if CG_VERSION_NUM >= 3100 - // This just sounds like a good thing to do. - cgGLSetContextGLSLVersion(_cg_context, cgGLDetectGLSLVersion()); - if (_shader_caps._active_vprofile == CG_PROFILE_GLSLV) { - cgGLSetContextOptimalOptions(_cg_context, CG_PROFILE_GLSLC); - } -#endif - - // Bug workaround for radeons. - if (_shader_caps._active_fprofile == CG_PROFILE_ARBFP1) { - if (has_extension("GL_ATI_draw_buffers")) { - _shader_caps._bug_list.insert(Shader::SBUG_ati_draw_buffers); - } - } - } -#endif // HAVE_CG - - + // Check for GLSL support. #if defined(OPENGLES_1) _supports_glsl = false; _supports_geometry_shaders = false; @@ -1335,7 +1279,7 @@ reset() { _supports_geometry_shaders = false; _supports_tessellation_shaders = false; #else - _supports_glsl = is_at_least_gl_version(2, 0) || has_extension("GL_ARB_shading_language_100"); + _supports_glsl = (_gl_shadlang_ver_major >= 1); _supports_tessellation_shaders = is_at_least_gl_version(4, 0) || has_extension("GL_ARB_tessellation_shader"); if (is_at_least_gl_version(3, 2)) { @@ -1363,6 +1307,79 @@ reset() { #endif _shader_caps._supports_glsl = _supports_glsl; + // Check for support for other types of shaders that can be used by Cg. + _supports_basic_shaders = false; +#if defined(HAVE_CG) && !defined(OPENGLES) + if (has_extension("GL_ARB_vertex_program") && + has_extension("GL_ARB_fragment_program")) { + _supports_basic_shaders = true; + _shader_caps._active_vprofile = (int)CG_PROFILE_ARBVP1; + _shader_caps._active_fprofile = (int)CG_PROFILE_ARBFP1; + _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; // No geometry shader if only using basic + + if (basic_shaders_only) { + // We're happy with ARB programs, thanks. + } else if (has_extension("GL_NV_gpu_program5")) { + _shader_caps._active_vprofile = (int)CG_PROFILE_GP5VP; + _shader_caps._active_fprofile = (int)CG_PROFILE_GP5FP; + _shader_caps._active_gprofile = (int)CG_PROFILE_GP5GP; + + } else if (has_extension("GL_NV_gpu_program4")) { + _shader_caps._active_vprofile = (int)CG_PROFILE_GP4VP; + _shader_caps._active_fprofile = (int)CG_PROFILE_GP4FP; + _shader_caps._active_gprofile = (int)CG_PROFILE_GP4GP; + + } else if (has_extension("GL_NV_vertex_program3") && + has_extension("GL_NV_fragment_program2")) { + _shader_caps._active_vprofile = (int)CG_PROFILE_VP40; + _shader_caps._active_fprofile = (int)CG_PROFILE_FP40; + _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; + + } else if (has_extension("GL_NV_vertex_program2") && + has_extension("GL_NV_fragment_program")) { + _shader_caps._active_vprofile = (int)CG_PROFILE_VP30; + _shader_caps._active_fprofile = (int)CG_PROFILE_FP30; + _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; + + } else if (has_extension("GL_NV_vertex_program1_1") && + has_extension("GL_NV_texture_shader2") && + has_extension("GL_NV_register_combiners2")) { + _shader_caps._active_vprofile = (int)CG_PROFILE_VP20; + _shader_caps._active_fprofile = (int)CG_PROFILE_FP20; + _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; + + } else if (_supports_glsl) { + // This is what will be available to non-NVIDIA cards. It is the last + // option since it is slower to compile GLSL than the other options. + _shader_caps._active_vprofile = (int)CG_PROFILE_GLSLV; + _shader_caps._active_fprofile = (int)CG_PROFILE_GLSLF; + if (_supports_geometry_shaders) { + _shader_caps._active_gprofile = (int)CG_PROFILE_GLSLG; + } + } + _shader_caps._ultimate_vprofile = (int)CG_PROFILE_VP40; + _shader_caps._ultimate_fprofile = (int)CG_PROFILE_FP40; + _shader_caps._ultimate_gprofile = (int)CG_PROFILE_GPU_GP; + + // Bug workaround for radeons. + if (_shader_caps._active_fprofile == CG_PROFILE_ARBFP1) { + if (has_extension("GL_ATI_draw_buffers")) { + _shader_caps._bug_list.insert(Shader::SBUG_ati_draw_buffers); + } + } + + } else if (_supports_glsl) { + // No, but we do support GLSL... + _shader_caps._active_vprofile = (int)CG_PROFILE_GLSLV; + _shader_caps._active_fprofile = (int)CG_PROFILE_GLSLF; + if (_supports_geometry_shaders) { + _shader_caps._active_gprofile = (int)CG_PROFILE_GLSLG; + } else { + _shader_caps._active_gprofile = (int)CG_PROFILE_UNKNOWN; + } + } +#endif // HAVE_CG + _supports_compute_shaders = false; #ifndef OPENGLES if (is_at_least_gl_version(4, 3) || has_extension("GL_ARB_compute_shader")) { @@ -2517,19 +2534,31 @@ reset() { #endif // CG_VERSION_NUM >= 2200 #if CG_VERSION_NUM >= 3100 - CGGLglslversion ver = cgGLGetContextGLSLVersion(_cg_context); - GLCAT.debug() - << "Cg GLSL version: " << cgGLGetGLSLVersionString(ver) << "\n"; + GLCAT.debug() << "Cg GLSL version = " + << cgGLGetGLSLVersionString(cgGLDetectGLSLVersion()) << "\n"; #endif - CGprofile vertex_profile = cgGLGetLatestProfile(CG_GL_VERTEX); - CGprofile pixel_profile = cgGLGetLatestProfile(CG_GL_FRAGMENT); GLCAT.debug() - << "Cg latest vertex profile = " << cgGetProfileString(vertex_profile) - << " (" << vertex_profile << ")\n"; + << "Cg latest vertex profile = " + << cgGetProfileString(cgGLGetLatestProfile(CG_GL_VERTEX)) << "\n"; GLCAT.debug() - << "Cg latest pixel profile = " << cgGetProfileString(pixel_profile) - << " (" << pixel_profile << ")\n"; + << "Cg latest fragment profile = " + << cgGetProfileString(cgGLGetLatestProfile(CG_GL_FRAGMENT)) << "\n"; +#if CG_VERSION_NUM >= 2000 + GLCAT.debug() + << "Cg latest geometry profile = " + << cgGetProfileString(cgGLGetLatestProfile(CG_GL_GEOMETRY)) << "\n"; +#endif + GLCAT.debug() << "basic-shaders-only " << basic_shaders_only << "\n"; + GLCAT.debug() + << "Cg active vertex profile = " + << cgGetProfileString((CGprofile)_shader_caps._active_vprofile) << "\n"; + GLCAT.debug() + << "Cg active fragment profile = " + << cgGetProfileString((CGprofile)_shader_caps._active_fprofile) << "\n"; + GLCAT.debug() + << "Cg active geometry profile = " + << cgGetProfileString((CGprofile)_shader_caps._active_gprofile) << "\n"; #endif // HAVE_CG GLCAT.debug() << "shader model = " << _shader_model << "\n"; From 49fdd56c09ff8a4e9361a2c027d6ef036f946214 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 20 Jul 2015 20:04:27 +0200 Subject: [PATCH 018/200] Remove DirectStart imports from shadows sample --- samples/shadows/advanced.py | 8 +++++--- samples/shadows/basic.py | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/samples/shadows/advanced.py b/samples/shadows/advanced.py index 6e8fbf5eb2..7211f9a087 100755 --- a/samples/shadows/advanced.py +++ b/samples/shadows/advanced.py @@ -4,7 +4,7 @@ from panda3d.core import * import sys import os -import direct.directbase.DirectStart +from direct.showbase.ShowBase import ShowBase from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import OnscreenText from direct.showbase.DirectObject import DirectObject @@ -235,5 +235,7 @@ class World(DirectObject): 'A/Z: Increase/Decrease the Push-Bias [%F]' % self.pushBias) render.setShaderInput('push', self.pushBias) -w = World() -base.run() +if __name__ == '__main__': + base = ShowBase() + w = World() + base.run() diff --git a/samples/shadows/basic.py b/samples/shadows/basic.py index d6ec8671f5..95de1198a2 100755 --- a/samples/shadows/basic.py +++ b/samples/shadows/basic.py @@ -4,7 +4,7 @@ from panda3d.core import * import sys import os -import direct.directbase.DirectStart +from direct.showbase.ShowBase import ShowBase from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import OnscreenText from direct.showbase.DirectObject import DirectObject @@ -176,5 +176,7 @@ class World(DirectObject): base.win.getGsg().getSupportsDepthTexture() and \ base.win.getGsg().getSupportsShadowFilter() -w = World() -base.run() +if __name__ == '__main__': + base = ShowBase() + w = World() + base.run() From 5413a267ba109755b7a49e078e9b2156beca2ddc Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 12:48:45 +0200 Subject: [PATCH 019/200] Fix error with AnimControlInterval --- direct/src/interval/AnimControlInterval.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/interval/AnimControlInterval.py b/direct/src/interval/AnimControlInterval.py index 3e1d1259d1..f53fe22057 100755 --- a/direct/src/interval/AnimControlInterval.py +++ b/direct/src/interval/AnimControlInterval.py @@ -152,7 +152,7 @@ class AnimControlInterval(Interval.Interval): else: frame = max(min(absFrame, numFrames - 1), 0) - self.controls.poseAll(frame) + self.controls.poseAll(int(frame)) self.state = CInterval.SStarted self.currT = t @@ -168,9 +168,9 @@ class AnimControlInterval(Interval.Interval): # a hitch in the animation when it plays back-to-back with # the next cycle. if self.reverse: - self.controls.poseAll(self.startFrame) + self.controls.poseAll(int(self.startFrame)) else: - self.controls.poseAll(self.endFrame) + self.controls.poseAll(int(self.endFrame)) else: # Otherwise, the user-specified duration determines which From e8e155f21847f0024874dcc43df7424427d5235f Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 12:56:13 +0200 Subject: [PATCH 020/200] AnimControlCollection methods should take floating-point frame numbers to match AnimInterface --- direct/src/interval/AnimControlInterval.py | 6 +++--- panda/src/chan/animControlCollection.I | 6 +++--- panda/src/chan/animControlCollection.cxx | 6 +++--- panda/src/chan/animControlCollection.h | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/direct/src/interval/AnimControlInterval.py b/direct/src/interval/AnimControlInterval.py index 9a92e0d589..bd2acc17ff 100755 --- a/direct/src/interval/AnimControlInterval.py +++ b/direct/src/interval/AnimControlInterval.py @@ -153,7 +153,7 @@ class AnimControlInterval(Interval.Interval): else: frame = max(min(absFrame, numFrames - 1), 0) - self.controls.poseAll(int(frame)) + self.controls.poseAll(frame) self.state = CInterval.SStarted self.currT = t @@ -169,9 +169,9 @@ class AnimControlInterval(Interval.Interval): # a hitch in the animation when it plays back-to-back with # the next cycle. if self.reverse: - self.controls.poseAll(int(self.startFrame)) + self.controls.poseAll(self.startFrame) else: - self.controls.poseAll(int(self.endFrame)) + self.controls.poseAll(self.endFrame) else: # Otherwise, the user-specified duration determines which diff --git a/panda/src/chan/animControlCollection.I b/panda/src/chan/animControlCollection.I index 95d21d2f81..4081d04f64 100644 --- a/panda/src/chan/animControlCollection.I +++ b/panda/src/chan/animControlCollection.I @@ -35,7 +35,7 @@ play(const string &anim_name) { // Description: Starts the named animation playing. //////////////////////////////////////////////////////////////////// INLINE bool AnimControlCollection:: -play(const string &anim_name, int from, int to) { +play(const string &anim_name, double from, double to) { AnimControl *control = find_anim(anim_name); if (control == (AnimControl *)NULL) { return false; @@ -67,7 +67,7 @@ loop(const string &anim_name, bool restart) { // Description: Starts the named animation looping. //////////////////////////////////////////////////////////////////// INLINE bool AnimControlCollection:: -loop(const string &anim_name, bool restart, int from, int to) { +loop(const string &anim_name, bool restart, double from, double to) { AnimControl *control = find_anim(anim_name); if (control == (AnimControl *)NULL) { return false; @@ -99,7 +99,7 @@ stop(const string &anim_name) { // Description: Sets to a particular frame in the named animation. //////////////////////////////////////////////////////////////////// INLINE bool AnimControlCollection:: -pose(const string &anim_name, int frame) { +pose(const string &anim_name, double frame) { AnimControl *control = find_anim(anim_name); if (control == (AnimControl *)NULL) { return false; diff --git a/panda/src/chan/animControlCollection.cxx b/panda/src/chan/animControlCollection.cxx index 075e73c0ab..87cb4b026b 100644 --- a/panda/src/chan/animControlCollection.cxx +++ b/panda/src/chan/animControlCollection.cxx @@ -191,7 +191,7 @@ play_all() { // Description: Starts all animations playing. //////////////////////////////////////////////////////////////////// void AnimControlCollection:: -play_all(int from, int to) { +play_all(double from, double to) { Controls::const_iterator ci; for (ci = _controls.begin(); ci != _controls.end(); ++ci) { (*ci)._control->play(from, to); @@ -219,7 +219,7 @@ loop_all(bool restart) { // Description: Starts all animations looping. //////////////////////////////////////////////////////////////////// void AnimControlCollection:: -loop_all(bool restart, int from, int to) { +loop_all(bool restart, double from, double to) { Controls::const_iterator ci; for (ci = _controls.begin(); ci != _controls.end(); ++ci) { (*ci)._control->loop(restart, from, to); @@ -254,7 +254,7 @@ stop_all() { // Description: Sets all animations to the indicated frame. //////////////////////////////////////////////////////////////////// void AnimControlCollection:: -pose_all(int frame) { +pose_all(double frame) { Controls::const_iterator ci; for (ci = _controls.begin(); ci != _controls.end(); ++ci) { (*ci)._control->pose(frame); diff --git a/panda/src/chan/animControlCollection.h b/panda/src/chan/animControlCollection.h index 38be5b9407..7435339660 100644 --- a/panda/src/chan/animControlCollection.h +++ b/panda/src/chan/animControlCollection.h @@ -55,19 +55,19 @@ PUBLISHED: // directly into the AnimControl's functionality by anim name. INLINE bool play(const string &anim_name); - INLINE bool play(const string &anim_name, int from, int to); + INLINE bool play(const string &anim_name, double from, double to); INLINE bool loop(const string &anim_name, bool restart); - INLINE bool loop(const string &anim_name, bool restart, int from, int to); + INLINE bool loop(const string &anim_name, bool restart, double from, double to); INLINE bool stop(const string &anim_name); - INLINE bool pose(const string &anim_name, int frame); + INLINE bool pose(const string &anim_name, double frame); // These functions operate on all anims at once. void play_all(); - void play_all(int from, int to); + void play_all(double from, double to); void loop_all(bool restart); - void loop_all(bool restart, int from, int to); + void loop_all(bool restart, double from, double to); bool stop_all(); - void pose_all(int frame); + void pose_all(double frame); INLINE int get_frame(const string &anim_name) const; INLINE int get_frame() const; From 4206e349c94dea9bc2bb31b9bd15746deea4f31f Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 12:57:06 +0200 Subject: [PATCH 021/200] Fix obscure GL crash --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 4 ++-- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 40a6d4fdcc..e440ecb988 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -155,7 +155,7 @@ begin_frame(FrameMode mode, Thread *current_thread) { for (it = _texture_contexts.begin(); it != _texture_contexts.end(); ++it) { CLP(TextureContext) *gtc = *it; - if (gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) { + if (gtc != NULL && gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) { glgsg->issue_memory_barrier(GL_FRAMEBUFFER_BARRIER_BIT); // If we've done it for one, we've done it for all. break; @@ -1656,7 +1656,7 @@ resolve_multisamples() { for (it = _texture_contexts.begin(); it != _texture_contexts.end(); ++it) { CLP(TextureContext) *gtc = *it; - if (gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) { + if (gtc != NULL && gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) { glgsg->issue_memory_barrier(GL_FRAMEBUFFER_BARRIER_BIT); // If we've done it for one, we've done it for all. break; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 55ea62b8de..8ab2c7b872 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -7045,6 +7045,9 @@ report_extensions() const { out.put(' '); } out << ' ' << (*ei); + } else { + out.put('\n'); + break; } } out.put('\n'); From c0e1a3cdb4696b4dd5c254ac2ff332f8e6d15fcc Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 14:23:17 +0200 Subject: [PATCH 022/200] Keysyms for dead acute and dead grave keys to better support int'l keyboards --- panda/src/x11display/x11GraphicsWindow.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 785ab51ff0..709911479e 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1641,6 +1641,7 @@ map_button(KeySym key) const { case XK_ampersand: return KeyboardButton::ascii_key('&'); case XK_apostrophe: // == XK_quoteright + case XK_dead_acute: // on int'l keyboards return KeyboardButton::ascii_key('\''); case XK_parenleft: return KeyboardButton::ascii_key('('); @@ -1772,6 +1773,7 @@ map_button(KeySym key) const { case XK_underscore: return KeyboardButton::ascii_key('_'); case XK_grave: // == XK_quoteleft + case XK_dead_grave: // on int'l keyboards return KeyboardButton::ascii_key('`'); case XK_a: return KeyboardButton::ascii_key('a'); @@ -1914,15 +1916,20 @@ map_button(KeySym key) const { case XK_Alt_R: return KeyboardButton::ralt(); case XK_Meta_L: + case XK_Super_L: return KeyboardButton::lmeta(); case XK_Meta_R: + case XK_Super_R: return KeyboardButton::rmeta(); case XK_Caps_Lock: return KeyboardButton::caps_lock(); case XK_Shift_Lock: return KeyboardButton::shift_lock(); } - + if (x11display_cat.is_debug()) { + x11display_cat.debug() + << "Unrecognized keysym 0x" << hex << key << dec << "\n"; + } return ButtonHandle::none(); } From 75019784f4e7adb964c45786e2e3fd21d0c3e9b8 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 15:39:15 +0200 Subject: [PATCH 023/200] Changes to inlining so we can use FORCE_INLINING in gcc as well --- dtool/src/dtoolbase/atomicAdjustDummyImpl.I | 28 ++++++++++----------- dtool/src/dtoolbase/atomicAdjustDummyImpl.h | 26 +++++++++---------- dtool/src/dtoolbase/atomicAdjustWin32Impl.I | 12 ++++----- dtool/src/dtoolbase/atomicAdjustWin32Impl.h | 18 ++++++------- dtool/src/dtoolbase/dtoolbase_cc.h | 13 ++++++++-- dtool/src/dtoolbase/typeHandle.I | 21 ---------------- dtool/src/dtoolbase/typeHandle.cxx | 21 ++++++++++++++++ dtool/src/dtoolbase/typeHandle.h | 2 +- dtool/src/prc/configFlags.I | 4 +-- dtool/src/prc/configFlags.h | 4 +-- panda/src/pgraph/nodePath.I | 17 ------------- panda/src/pgraph/nodePath.cxx | 17 +++++++++++++ panda/src/pgraph/nodePath.h | 3 +-- 13 files changed, 97 insertions(+), 89 deletions(-) diff --git a/dtool/src/dtoolbase/atomicAdjustDummyImpl.I b/dtool/src/dtoolbase/atomicAdjustDummyImpl.I index aa86d2c83e..d7b405ae15 100644 --- a/dtool/src/dtoolbase/atomicAdjustDummyImpl.I +++ b/dtool/src/dtoolbase/atomicAdjustDummyImpl.I @@ -18,7 +18,7 @@ // Access: Public, Static // Description: Atomically increments the indicated variable. //////////////////////////////////////////////////////////////////// -INLINE void AtomicAdjustDummyImpl:: +ALWAYS_INLINE void AtomicAdjustDummyImpl:: inc(TVOLATILE AtomicAdjustDummyImpl::Integer &var) { ++var; } @@ -30,7 +30,7 @@ inc(TVOLATILE AtomicAdjustDummyImpl::Integer &var) { // returns true if the new value is nonzero, false if it // is zero. //////////////////////////////////////////////////////////////////// -INLINE bool AtomicAdjustDummyImpl:: +ALWAYS_INLINE bool AtomicAdjustDummyImpl:: dec(TVOLATILE AtomicAdjustDummyImpl::Integer &var) { return (--var) != 0; } @@ -41,7 +41,7 @@ dec(TVOLATILE AtomicAdjustDummyImpl::Integer &var) { // Description: Atomically computes var += delta. It is legal for // delta to be negative. //////////////////////////////////////////////////////////////////// -INLINE void AtomicAdjustDummyImpl:: +ALWAYS_INLINE void AtomicAdjustDummyImpl:: add(TVOLATILE AtomicAdjustDummyImpl::Integer &var, AtomicAdjustDummyImpl::Integer delta) { var += delta; } @@ -52,7 +52,7 @@ add(TVOLATILE AtomicAdjustDummyImpl::Integer &var, AtomicAdjustDummyImpl::Intege // Description: Atomically changes the indicated variable and // returns the original value. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: +ALWAYS_INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: set(TVOLATILE AtomicAdjustDummyImpl::Integer &var, AtomicAdjustDummyImpl::Integer new_value) { Integer orig_value = var; var = new_value; @@ -68,7 +68,7 @@ set(TVOLATILE AtomicAdjustDummyImpl::Integer &var, AtomicAdjustDummyImpl::Intege // asynchronously setting, incrementing, or decrementing // (via other AtomicAjust methods). //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: +ALWAYS_INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: get(const TVOLATILE AtomicAdjustDummyImpl::Integer &var) { return var; } @@ -79,8 +79,8 @@ get(const TVOLATILE AtomicAdjustDummyImpl::Integer &var) { // Description: Atomically changes the indicated variable and // returns the original value. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: -set_ptr(TVOLATILE AtomicAdjustDummyImpl::Pointer &var, +ALWAYS_INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: +set_ptr(TVOLATILE AtomicAdjustDummyImpl::Pointer &var, AtomicAdjustDummyImpl::Pointer new_value) { Pointer orig_value = var; var = new_value; @@ -96,7 +96,7 @@ set_ptr(TVOLATILE AtomicAdjustDummyImpl::Pointer &var, // asynchronously setting, incrementing, or decrementing // (via other AtomicAjust methods). //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: +ALWAYS_INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: get_ptr(const TVOLATILE AtomicAdjustDummyImpl::Pointer &var) { return var; } @@ -104,15 +104,15 @@ get_ptr(const TVOLATILE AtomicAdjustDummyImpl::Pointer &var) { //////////////////////////////////////////////////////////////////// // Function: AtomicAdjustDummyImpl::compare_and_exchange // Access: Public, Static -// Description: Atomic compare and exchange. +// Description: Atomic compare and exchange. // // If mem is equal to old_value, store new_value in mem. // In either case, return the original value of mem. // The caller can test for success by comparing // return_value == old_value. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: -compare_and_exchange(TVOLATILE AtomicAdjustDummyImpl::Integer &mem, +ALWAYS_INLINE AtomicAdjustDummyImpl::Integer AtomicAdjustDummyImpl:: +compare_and_exchange(TVOLATILE AtomicAdjustDummyImpl::Integer &mem, AtomicAdjustDummyImpl::Integer old_value, AtomicAdjustDummyImpl::Integer new_value) { Integer orig_value = mem; @@ -125,12 +125,12 @@ compare_and_exchange(TVOLATILE AtomicAdjustDummyImpl::Integer &mem, //////////////////////////////////////////////////////////////////// // Function: AtomicAdjustDummyImpl::compare_and_exchange_ptr // Access: Public, Static -// Description: Atomic compare and exchange. +// Description: Atomic compare and exchange. // // As above, but works on pointers instead of integers. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: -compare_and_exchange_ptr(TVOLATILE AtomicAdjustDummyImpl::Pointer &mem, +ALWAYS_INLINE AtomicAdjustDummyImpl::Pointer AtomicAdjustDummyImpl:: +compare_and_exchange_ptr(TVOLATILE AtomicAdjustDummyImpl::Pointer &mem, AtomicAdjustDummyImpl::Pointer old_value, AtomicAdjustDummyImpl::Pointer new_value) { Pointer orig_value = mem; diff --git a/dtool/src/dtoolbase/atomicAdjustDummyImpl.h b/dtool/src/dtoolbase/atomicAdjustDummyImpl.h index 17e03c04e6..c77f527dc1 100644 --- a/dtool/src/dtoolbase/atomicAdjustDummyImpl.h +++ b/dtool/src/dtoolbase/atomicAdjustDummyImpl.h @@ -31,22 +31,22 @@ public: typedef long Integer; typedef void *Pointer; - INLINE static void inc(TVOLATILE Integer &var); - INLINE static bool dec(TVOLATILE Integer &var); - INLINE static void add(TVOLATILE Integer &var, Integer delta); - INLINE static Integer set(TVOLATILE Integer &var, Integer new_value); - INLINE static Integer get(const TVOLATILE Integer &var); + ALWAYS_INLINE static void inc(TVOLATILE Integer &var); + ALWAYS_INLINE static bool dec(TVOLATILE Integer &var); + ALWAYS_INLINE static void add(TVOLATILE Integer &var, Integer delta); + ALWAYS_INLINE static Integer set(TVOLATILE Integer &var, Integer new_value); + ALWAYS_INLINE static Integer get(const TVOLATILE Integer &var); - INLINE static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value); - INLINE static Pointer get_ptr(const TVOLATILE Pointer &var); + ALWAYS_INLINE static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value); + ALWAYS_INLINE static Pointer get_ptr(const TVOLATILE Pointer &var); - INLINE static Integer compare_and_exchange(TVOLATILE Integer &mem, - Integer old_value, - Integer new_value); + ALWAYS_INLINE static Integer compare_and_exchange(TVOLATILE Integer &mem, + Integer old_value, + Integer new_value); - INLINE static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem, - Pointer old_value, - Pointer new_value); + ALWAYS_INLINE static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem, + Pointer old_value, + Pointer new_value); }; #include "atomicAdjustDummyImpl.I" diff --git a/dtool/src/dtoolbase/atomicAdjustWin32Impl.I b/dtool/src/dtoolbase/atomicAdjustWin32Impl.I index d96fe98bc1..f04dfbe8fa 100644 --- a/dtool/src/dtoolbase/atomicAdjustWin32Impl.I +++ b/dtool/src/dtoolbase/atomicAdjustWin32Impl.I @@ -18,7 +18,7 @@ // Access: Public, Static // Description: Atomically increments the indicated variable. //////////////////////////////////////////////////////////////////// -INLINE void AtomicAdjustWin32Impl:: +ALWAYS_INLINE void AtomicAdjustWin32Impl:: inc(TVOLATILE AtomicAdjustWin32Impl::Integer &var) { assert((((size_t)&var) & (sizeof(Integer) - 1)) == 0); #ifdef _WIN64 @@ -35,7 +35,7 @@ inc(TVOLATILE AtomicAdjustWin32Impl::Integer &var) { // returns true if the new value is nonzero, false if it // is zero. //////////////////////////////////////////////////////////////////// -INLINE bool AtomicAdjustWin32Impl:: +ALWAYS_INLINE bool AtomicAdjustWin32Impl:: dec(TVOLATILE AtomicAdjustWin32Impl::Integer &var) { assert((((size_t)&var) & (sizeof(Integer) - 1)) == 0); #ifdef _WIN64 @@ -70,7 +70,7 @@ add(TVOLATILE AtomicAdjustWin32Impl::Integer &var, AtomicAdjustWin32Impl::Intege // Description: Atomically changes the indicated variable and // returns the original value. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustWin32Impl::Integer AtomicAdjustWin32Impl:: +ALWAYS_INLINE AtomicAdjustWin32Impl::Integer AtomicAdjustWin32Impl:: set(TVOLATILE AtomicAdjustWin32Impl::Integer &var, AtomicAdjustWin32Impl::Integer new_value) { assert((((size_t)&var) & (sizeof(Integer) - 1)) == 0); @@ -90,7 +90,7 @@ set(TVOLATILE AtomicAdjustWin32Impl::Integer &var, // asynchronously setting, incrementing, or decrementing // (via other AtomicAjust methods). //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustWin32Impl::Integer AtomicAdjustWin32Impl:: +ALWAYS_INLINE AtomicAdjustWin32Impl::Integer AtomicAdjustWin32Impl:: get(const TVOLATILE AtomicAdjustWin32Impl::Integer &var) { // On Intel platforms, word-aligned loads are atomic (if performed // in a single instruction). We can't guarantee the compiler will @@ -107,7 +107,7 @@ get(const TVOLATILE AtomicAdjustWin32Impl::Integer &var) { // Description: Atomically changes the indicated variable and // returns the original value. //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustWin32Impl::Pointer AtomicAdjustWin32Impl:: +ALWAYS_INLINE AtomicAdjustWin32Impl::Pointer AtomicAdjustWin32Impl:: set_ptr(TVOLATILE AtomicAdjustWin32Impl::Pointer &var, AtomicAdjustWin32Impl::Pointer new_value) { assert((((size_t)&var) & (sizeof(Pointer) - 1)) == 0); @@ -123,7 +123,7 @@ set_ptr(TVOLATILE AtomicAdjustWin32Impl::Pointer &var, // asynchronously setting, incrementing, or decrementing // (via other AtomicAjust methods). //////////////////////////////////////////////////////////////////// -INLINE AtomicAdjustWin32Impl::Pointer AtomicAdjustWin32Impl:: +ALWAYS_INLINE AtomicAdjustWin32Impl::Pointer AtomicAdjustWin32Impl:: get_ptr(const TVOLATILE AtomicAdjustWin32Impl::Pointer &var) { // As in get(), make sure the address is word-aligned. assert((((size_t)&var) & (sizeof(Pointer) - 1)) == 0); diff --git a/dtool/src/dtoolbase/atomicAdjustWin32Impl.h b/dtool/src/dtoolbase/atomicAdjustWin32Impl.h index 2ead06d0fe..2018560577 100644 --- a/dtool/src/dtoolbase/atomicAdjustWin32Impl.h +++ b/dtool/src/dtoolbase/atomicAdjustWin32Impl.h @@ -45,20 +45,20 @@ public: typedef ALIGN_4BYTE UnalignedPointer Pointer; #endif // _WIN64 - INLINE static void inc(TVOLATILE Integer &var); - INLINE static bool dec(TVOLATILE Integer &var); + ALWAYS_INLINE static void inc(TVOLATILE Integer &var); + ALWAYS_INLINE static bool dec(TVOLATILE Integer &var); INLINE static void add(TVOLATILE Integer &var, Integer delta); - INLINE static Integer set(TVOLATILE Integer &var, Integer new_value); - INLINE static Integer get(const TVOLATILE Integer &var); + ALWAYS_INLINE static Integer set(TVOLATILE Integer &var, Integer new_value); + ALWAYS_INLINE static Integer get(const TVOLATILE Integer &var); - INLINE static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value); - INLINE static Pointer get_ptr(const TVOLATILE Pointer &var); + ALWAYS_INLINE static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value); + ALWAYS_INLINE static Pointer get_ptr(const TVOLATILE Pointer &var); - INLINE static Integer compare_and_exchange(TVOLATILE Integer &mem, + INLINE static Integer compare_and_exchange(TVOLATILE Integer &mem, Integer old_value, Integer new_value); - - INLINE static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem, + + INLINE static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem, Pointer old_value, Pointer new_value); }; diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index efefd36e9e..60ea4bd37f 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -32,6 +32,7 @@ using namespace std; #define INLINE inline +#define ALWAYS_INLINE inline #define TYPENAME typename #define CONSTEXPR #define NOEXCEPT noexcept @@ -115,11 +116,19 @@ typedef ios::iostate ios_iostate; typedef ios::seekdir ios_seekdir; #endif -#if defined(WIN32_VC) && defined(FORCE_INLINING) +#ifdef _MSC_VER +#define ALWAYS_INLINE __forceinline +#elif defined(__GNUC__) +#define ALWAYS_INLINE __attribute__((always_inline)) inline +#else +#define ALWAYS_INLINE inline +#endif + +#ifdef FORCE_INLINING // If FORCE_INLINING is defined, we use the keyword __forceinline, // which tells MS VC++ to override its internal benefit heuristic // and inline the fn if it is technically possible to do so. -#define INLINE __forceinline +#define INLINE ALWAYS_INLINE #else #define INLINE inline #endif diff --git a/dtool/src/dtoolbase/typeHandle.I b/dtool/src/dtoolbase/typeHandle.I index e489fd4099..867bdb4cea 100644 --- a/dtool/src/dtoolbase/typeHandle.I +++ b/dtool/src/dtoolbase/typeHandle.I @@ -263,24 +263,3 @@ INLINE TypeHandle:: operator bool () const { return (_index != 0); } - -//////////////////////////////////////////////////////////////////// -// Function: get_best_parent_from_Set -// Access: Published -// Description: Return the Index of the BEst fit Classs from a set -//////////////////////////////////////////////////////////////////// -INLINE int TypeHandle::get_best_parent_from_Set(const std::set< int > &legal_vals) const -{ - if(legal_vals.find(_index) != legal_vals.end()) - return _index; - - for(int pi = 0; pi < get_num_parent_classes() ; pi++) - { - TypeHandle ph = get_parent_class(pi); - int val = ph.get_best_parent_from_Set(legal_vals); - if(val > 0) - return val; - - } - return -1; -} diff --git a/dtool/src/dtoolbase/typeHandle.cxx b/dtool/src/dtoolbase/typeHandle.cxx index cca55062c1..d807a298b6 100644 --- a/dtool/src/dtoolbase/typeHandle.cxx +++ b/dtool/src/dtoolbase/typeHandle.cxx @@ -84,6 +84,27 @@ dec_memory_usage(MemoryClass memory_class, size_t size) { } #endif // DO_MEMORY_USAGE +//////////////////////////////////////////////////////////////////// +// Function: get_best_parent_from_Set +// Access: Published +// Description: Return the Index of the BEst fit Classs from a set +//////////////////////////////////////////////////////////////////// +int TypeHandle:: +get_best_parent_from_Set(const std::set< int > &legal_vals) const { + if (legal_vals.find(_index) != legal_vals.end()) { + return _index; + } + + for (int pi = 0; pi < get_num_parent_classes(); ++pi) { + TypeHandle ph = get_parent_class(pi); + int val = ph.get_best_parent_from_Set(legal_vals); + if (val > 0) { + return val; + } + } + return -1; +} + ostream & operator << (ostream &out, TypeHandle::MemoryClass mem_class) { switch (mem_class) { diff --git a/dtool/src/dtoolbase/typeHandle.h b/dtool/src/dtoolbase/typeHandle.h index c669fa8084..f94e983447 100644 --- a/dtool/src/dtoolbase/typeHandle.h +++ b/dtool/src/dtoolbase/typeHandle.h @@ -123,7 +123,7 @@ PUBLISHED: INLINE TypeHandle get_parent_towards(TypeHandle ancestor, TypedObject *object = (TypedObject *)NULL) const; - INLINE int get_best_parent_from_Set(const std::set< int > &legal_vals) const; + int get_best_parent_from_Set(const std::set< int > &legal_vals) const; #ifdef DO_MEMORY_USAGE int get_memory_usage(MemoryClass memory_class) const; diff --git a/dtool/src/prc/configFlags.I b/dtool/src/prc/configFlags.I index f0bb39bf51..d13cdd2699 100644 --- a/dtool/src/prc/configFlags.I +++ b/dtool/src/prc/configFlags.I @@ -20,7 +20,7 @@ // valid (based on a comparison of the supplied // local_modified value with the global_modified value). //////////////////////////////////////////////////////////////////// -INLINE bool ConfigFlags:: +ALWAYS_INLINE bool ConfigFlags:: is_cache_valid(AtomicAdjust::Integer local_modified) { return local_modified == _global_modified; } @@ -32,7 +32,7 @@ is_cache_valid(AtomicAdjust::Integer local_modified) { // the cache will appear to be valid, until someone next // calls invalidate_cache(). //////////////////////////////////////////////////////////////////// -INLINE void ConfigFlags:: +ALWAYS_INLINE void ConfigFlags:: mark_cache_valid(AtomicAdjust::Integer &local_modified) { local_modified = _global_modified; } diff --git a/dtool/src/prc/configFlags.h b/dtool/src/prc/configFlags.h index a90bdc1f33..b7a3205468 100644 --- a/dtool/src/prc/configFlags.h +++ b/dtool/src/prc/configFlags.h @@ -62,8 +62,8 @@ PUBLISHED: }; protected: - INLINE static bool is_cache_valid(AtomicAdjust::Integer local_modified); - INLINE static void mark_cache_valid(AtomicAdjust::Integer &local_modified); + ALWAYS_INLINE static bool is_cache_valid(AtomicAdjust::Integer local_modified); + ALWAYS_INLINE static void mark_cache_valid(AtomicAdjust::Integer &local_modified); INLINE static AtomicAdjust::Integer initial_invalid_cache(); INLINE static void invalidate_cache(); diff --git a/panda/src/pgraph/nodePath.I b/panda/src/pgraph/nodePath.I index ce0228174a..4c19e3fdc2 100644 --- a/panda/src/pgraph/nodePath.I +++ b/panda/src/pgraph/nodePath.I @@ -517,23 +517,6 @@ reverse_ls() const { reverse_ls(nout); } -//////////////////////////////////////////////////////////////////// -// Function: NodePath::reverse_ls -// Access: Published -// Description: Lists the hierarchy at and above the referenced node. -//////////////////////////////////////////////////////////////////// -INLINE int NodePath:: -reverse_ls(ostream &out, int indent_level) const { - if (is_empty()) { - out << "(empty)\n"; - return 0; - } else if (has_parent()) { - indent_level = get_parent().reverse_ls(out, indent_level); - } - node()->write(out, indent_level); - return indent_level + 2; -} - //////////////////////////////////////////////////////////////////// // Function: NodePath::set_state // Access: Published diff --git a/panda/src/pgraph/nodePath.cxx b/panda/src/pgraph/nodePath.cxx index 20a2f90ab4..5fe2c1ab3b 100644 --- a/panda/src/pgraph/nodePath.cxx +++ b/panda/src/pgraph/nodePath.cxx @@ -810,6 +810,23 @@ detach_node(Thread *current_thread) { } } +//////////////////////////////////////////////////////////////////// +// Function: NodePath::reverse_ls +// Access: Published +// Description: Lists the hierarchy at and above the referenced node. +//////////////////////////////////////////////////////////////////// +int NodePath:: +reverse_ls(ostream &out, int indent_level) const { + if (is_empty()) { + out << "(empty)\n"; + return 0; + } else if (has_parent()) { + indent_level = get_parent().reverse_ls(out, indent_level); + } + node()->write(out, indent_level); + return indent_level + 2; +} + //////////////////////////////////////////////////////////////////// // Function: NodePath::output // Access: Published diff --git a/panda/src/pgraph/nodePath.h b/panda/src/pgraph/nodePath.h index 4e7a098601..0762600b2e 100644 --- a/panda/src/pgraph/nodePath.h +++ b/panda/src/pgraph/nodePath.h @@ -278,8 +278,7 @@ PUBLISHED: INLINE void ls() const; INLINE void ls(ostream &out, int indent_level = 0) const; INLINE void reverse_ls() const; - INLINE int reverse_ls(ostream &out, int indent_level = 0) const; - + int reverse_ls(ostream &out, int indent_level = 0) const; // Aggregate transform and state information. const RenderState *get_state(Thread *current_thread = Thread::get_current_thread()) const; From 6cf2da9e562739e2639f478230a939a36e1bb28a Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 15:55:12 +0200 Subject: [PATCH 024/200] Fix error when loading a particle effect in particle panel --- direct/src/tkpanels/ParticlePanel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/direct/src/tkpanels/ParticlePanel.py b/direct/src/tkpanels/ParticlePanel.py index ccc622bdc6..addd503191 100644 --- a/direct/src/tkpanels/ParticlePanel.py +++ b/direct/src/tkpanels/ParticlePanel.py @@ -19,6 +19,8 @@ import Pmw, os,Placer from panda3d.core import * from panda3d.physics import * +from panda3d.direct import getParticlePath + class ParticlePanel(AppShell): # Override class variables From f33e4508230e01fb1a4bfb3e55da65b4b1b22f36 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 16:32:57 +0200 Subject: [PATCH 025/200] A lot of performance changes, particularly wrt dcasts and state management --- dtool/src/dtoolbase/typedObject.I | 4 +- panda/src/char/character.cxx | 15 +- panda/src/char/characterJointBundle.cxx | 4 +- panda/src/cull/cullBinBackToFront.cxx | 4 +- panda/src/cull/cullBinFrontToBack.cxx | 4 +- panda/src/display/displayRegion.I | 11 +- panda/src/display/displayRegion.h | 2 +- panda/src/display/graphicsEngine.cxx | 11 +- panda/src/display/graphicsStateGuardian.cxx | 49 +- panda/src/display/standardMunger.cxx | 35 +- panda/src/egg2pg/characterMaker.cxx | 4 +- panda/src/egg2pg/eggBinner.cxx | 20 +- panda/src/glstuff/glCgShaderContext_src.cxx | 9 +- panda/src/glstuff/glGeomMunger_src.cxx | 8 +- .../glstuff/glGraphicsStateGuardian_src.cxx | 25 +- .../src/glstuff/glGraphicsStateGuardian_src.h | 4 +- panda/src/gobj/geom.I | 2 +- panda/src/gobj/geom.cxx | 4 +- panda/src/gobj/geom.h | 6 +- panda/src/gobj/geomPrimitive.I | 4 +- panda/src/mathutil/boundingVolume.cxx | 12 + panda/src/mathutil/boundingVolume.h | 1 + .../src/mathutil/geometricBoundingVolume.cxx | 14 +- panda/src/mathutil/geometricBoundingVolume.h | 3 +- panda/src/pgraph/alphaTestAttrib.cxx | 6 +- panda/src/pgraph/alphaTestAttrib.h | 4 +- panda/src/pgraph/antialiasAttrib.cxx | 36 +- panda/src/pgraph/antialiasAttrib.h | 9 +- panda/src/pgraph/audioVolumeAttrib.cxx | 10 +- panda/src/pgraph/audioVolumeAttrib.h | 4 +- panda/src/pgraph/auxBitplaneAttrib.cxx | 4 +- panda/src/pgraph/auxBitplaneAttrib.h | 2 +- panda/src/pgraph/clipPlaneAttrib.h | 2 +- panda/src/pgraph/colorAttrib.cxx | 4 +- panda/src/pgraph/colorAttrib.h | 3 +- panda/src/pgraph/colorBlendAttrib.cxx | 3 +- panda/src/pgraph/colorBlendAttrib.h | 2 +- panda/src/pgraph/colorScaleAttrib.cxx | 10 +- panda/src/pgraph/colorScaleAttrib.h | 3 +- panda/src/pgraph/colorWriteAttrib.cxx | 3 +- panda/src/pgraph/colorWriteAttrib.h | 2 +- panda/src/pgraph/config_pgraph.cxx | 5 - panda/src/pgraph/config_pgraph.h | 1 - panda/src/pgraph/cullBinAttrib.cxx | 4 +- panda/src/pgraph/cullBinAttrib.h | 2 +- panda/src/pgraph/cullFaceAttrib.cxx | 10 +- panda/src/pgraph/cullFaceAttrib.h | 3 +- panda/src/pgraph/cullResult.cxx | 5 +- panda/src/pgraph/cullTraverserData.cxx | 14 +- panda/src/pgraph/cullableObject.cxx | 3 +- panda/src/pgraph/depthOffsetAttrib.cxx | 12 +- panda/src/pgraph/depthOffsetAttrib.h | 3 +- panda/src/pgraph/depthTestAttrib.cxx | 4 +- panda/src/pgraph/depthTestAttrib.h | 2 +- panda/src/pgraph/depthWriteAttrib.cxx | 4 +- panda/src/pgraph/depthWriteAttrib.h | 2 +- panda/src/pgraph/fogAttrib.cxx | 3 +- panda/src/pgraph/fogAttrib.h | 2 +- panda/src/pgraph/lightAttrib.cxx | 6 +- panda/src/pgraph/lightAttrib.h | 2 +- panda/src/pgraph/lightRampAttrib.cxx | 4 +- panda/src/pgraph/lightRampAttrib.h | 2 +- panda/src/pgraph/materialAttrib.cxx | 3 +- panda/src/pgraph/materialAttrib.h | 2 +- panda/src/pgraph/renderAttrib.I | 19 +- panda/src/pgraph/renderAttrib.cxx | 13 +- panda/src/pgraph/renderAttrib.h | 9 +- panda/src/pgraph/renderAttribRegistry.I | 46 +- panda/src/pgraph/renderAttribRegistry.cxx | 85 +-- panda/src/pgraph/renderAttribRegistry.h | 22 +- panda/src/pgraph/renderModeAttrib.cxx | 7 +- panda/src/pgraph/renderModeAttrib.h | 3 +- panda/src/pgraph/renderState.I | 31 +- panda/src/pgraph/renderState.cxx | 93 +-- panda/src/pgraph/renderState.h | 15 +- panda/src/pgraph/rescaleNormalAttrib.I | 13 + panda/src/pgraph/rescaleNormalAttrib.cxx | 69 +- panda/src/pgraph/rescaleNormalAttrib.h | 15 +- panda/src/pgraph/scissorAttrib.cxx | 6 +- panda/src/pgraph/scissorAttrib.h | 5 +- panda/src/pgraph/shadeModelAttrib.cxx | 6 +- panda/src/pgraph/shadeModelAttrib.h | 2 +- panda/src/pgraph/shaderAttrib.cxx | 7 +- panda/src/pgraph/shaderAttrib.h | 2 +- panda/src/pgraph/stateMunger.cxx | 13 +- panda/src/pgraph/stateMunger.h | 4 +- panda/src/pgraph/stencilAttrib.cxx | 3 +- panda/src/pgraph/stencilAttrib.h | 2 +- panda/src/pgraph/texGenAttrib.cxx | 9 +- panda/src/pgraph/texGenAttrib.h | 2 +- panda/src/pgraph/texMatrixAttrib.cxx | 11 +- panda/src/pgraph/texMatrixAttrib.h | 2 +- panda/src/pgraph/textureAttrib.cxx | 6 +- panda/src/pgraph/textureAttrib.h | 2 +- panda/src/pgraph/transparencyAttrib.cxx | 4 +- panda/src/pgraph/transparencyAttrib.h | 2 +- panda/src/putil/p3putil_composite2.cxx | 1 + panda/src/putil/weakKeyHashMap.I | 714 ++++++++++++++++++ panda/src/putil/weakKeyHashMap.cxx | 15 + panda/src/putil/weakKeyHashMap.h | 115 +++ 100 files changed, 1322 insertions(+), 511 deletions(-) create mode 100644 panda/src/putil/weakKeyHashMap.I create mode 100644 panda/src/putil/weakKeyHashMap.cxx create mode 100644 panda/src/putil/weakKeyHashMap.h diff --git a/dtool/src/dtoolbase/typedObject.I b/dtool/src/dtoolbase/typedObject.I index 684d0e8143..7c2917072f 100644 --- a/dtool/src/dtoolbase/typedObject.I +++ b/dtool/src/dtoolbase/typedObject.I @@ -61,7 +61,9 @@ get_type_index() const { //////////////////////////////////////////////////////////////////// INLINE bool TypedObject:: is_of_type(TypeHandle handle) const { - return get_type().is_derived_from(handle, (TypedObject *)this); + // Shortcut for the common case where the type matches exactly. + TypeHandle my_type = get_type(); + return handle == my_type || my_type.is_derived_from(handle, (TypedObject *)this); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/char/character.cxx b/panda/src/char/character.cxx index 9be6fe87d5..6d3ce17d94 100644 --- a/panda/src/char/character.cxx +++ b/panda/src/char/character.cxx @@ -420,8 +420,7 @@ find_joint(const string &name) const { int num_bundles = get_num_bundles(); for (int i = 0; i < num_bundles; ++i) { PartGroup *part = get_bundle(i)->find_child(name); - if (part != (PartGroup *)NULL && - part->is_of_type(CharacterJoint::get_class_type())) { + if (part != (PartGroup *)NULL && part->is_character_joint()) { return DCAST(CharacterJoint, part); } } @@ -728,7 +727,7 @@ r_merge_bundles(Character::JointMap &joint_map, PartGroup *old_group, PartGroup *new_group) { joint_map[old_group] = new_group; - if (new_group->is_of_type(CharacterJoint::get_class_type())) { + if (new_group->is_character_joint()) { CharacterJoint *new_joint; DCAST_INTO_V(new_joint, new_group); @@ -736,7 +735,7 @@ r_merge_bundles(Character::JointMap &joint_map, new_joint->_character = this; if (old_group != new_group && - old_group->is_of_type(CharacterJoint::get_class_type())) { + old_group->is_character_joint()) { CharacterJoint *old_joint; DCAST_INTO_V(old_joint, old_group); @@ -763,7 +762,7 @@ r_merge_bundles(Character::JointMap &joint_map, if (old_group == new_group) { return; } - + int i = 0, j = 0; int old_num_children = old_group->get_num_children(); int new_num_children = new_group->get_num_children(); @@ -809,7 +808,7 @@ r_merge_bundles(Character::JointMap &joint_map, // new_group. Duplicate it. PartGroup *new_pc = pc->make_copy(); new_children.push_back(new_pc); - + r_merge_bundles(joint_map, pc, new_pc); i++; } @@ -968,7 +967,7 @@ copy_geom(const Geom *source, const Character::JointMap &joint_map, void Character:: copy_node_pointers(const Character::NodeMap &node_map, PartGroup *dest, const PartGroup *source) { - if (dest->is_of_type(CharacterJoint::get_class_type())) { + if (dest->is_character_joint()) { nassertv(dest != source); const CharacterJoint *source_joint; CharacterJoint *dest_joint; @@ -1204,7 +1203,7 @@ redirect_slider(const VertexSlider *vs, Character::GeomSliderMap &gsmap) { //////////////////////////////////////////////////////////////////// void Character:: r_clear_joint_characters(PartGroup *part) { - if (part->is_of_type(CharacterJoint::get_class_type())) { + if (part->is_character_joint()) { CharacterJoint *joint = DCAST(CharacterJoint, part); // It is possible for the joint to reference a different Character diff --git a/panda/src/char/characterJointBundle.cxx b/panda/src/char/characterJointBundle.cxx index 8732d5a2ac..ba045369c4 100644 --- a/panda/src/char/characterJointBundle.cxx +++ b/panda/src/char/characterJointBundle.cxx @@ -102,8 +102,8 @@ r_set_character(PartGroup *group, Character *character) { return; } - if (group->is_of_type(CharacterJoint::get_class_type())) { - DCAST(CharacterJoint, group)->set_character(character); + if (group->is_character_joint()) { + ((CharacterJoint *)group)->set_character(character); } Children::const_iterator ci; diff --git a/panda/src/cull/cullBinBackToFront.cxx b/panda/src/cull/cullBinBackToFront.cxx index 6a734c0092..9e67adc36b 100644 --- a/panda/src/cull/cullBinBackToFront.cxx +++ b/panda/src/cull/cullBinBackToFront.cxx @@ -64,8 +64,8 @@ add_object(CullableObject *object, Thread *current_thread) { return; } - const GeometricBoundingVolume *gbv; - DCAST_INTO_V(gbv, volume); + const GeometricBoundingVolume *gbv = volume->as_geometric_bounding_volume(); + nassertv(gbv != NULL); LPoint3 center = gbv->get_approx_center(); nassertv(object->_internal_transform != (const TransformState *)NULL); diff --git a/panda/src/cull/cullBinFrontToBack.cxx b/panda/src/cull/cullBinFrontToBack.cxx index 91e8c99133..ba2103a0f7 100644 --- a/panda/src/cull/cullBinFrontToBack.cxx +++ b/panda/src/cull/cullBinFrontToBack.cxx @@ -64,8 +64,8 @@ add_object(CullableObject *object, Thread *current_thread) { return; } - const GeometricBoundingVolume *gbv; - DCAST_INTO_V(gbv, volume); + const GeometricBoundingVolume *gbv = volume->as_geometric_bounding_volume(); + nassertv(gbv != NULL); LPoint3 center = gbv->get_approx_center(); nassertv(object->_internal_transform != (const TransformState *)NULL); diff --git a/panda/src/display/displayRegion.I b/panda/src/display/displayRegion.I index 53d68ff00d..112b612de4 100644 --- a/panda/src/display/displayRegion.I +++ b/panda/src/display/displayRegion.I @@ -597,11 +597,16 @@ get_region_pixels_i(int i, int &xo, int &yo, int &w, int &h) const { // to all upstream pipeline stages. //////////////////////////////////////////////////////////////////// INLINE void DisplayRegion:: -set_cull_result(CullResult *cull_result, SceneSetup *scene_setup, +set_cull_result(PT(CullResult) cull_result, PT(SceneSetup) scene_setup, Thread *current_thread) { CDCullWriter cdata(_cycler_cull, true, current_thread); - cdata->_cull_result = cull_result; - cdata->_scene_setup = scene_setup; +#ifdef USE_MOVE_SEMANTICS + cdata->_cull_result = std::move(cull_result); + cdata->_scene_setup = std::move(scene_setup); +#else + swap(cdata->_cull_result, cull_result); + swap(cdata->_scene_setup, scene_setup); +#endif } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/displayRegion.h b/panda/src/display/displayRegion.h index 811b913e5c..3b33590996 100644 --- a/panda/src/display/displayRegion.h +++ b/panda/src/display/displayRegion.h @@ -161,7 +161,7 @@ public: virtual bool supports_pixel_zoom() const; - INLINE void set_cull_result(CullResult *cull_result, SceneSetup *scene_setup, + INLINE void set_cull_result(PT(CullResult) cull_result, PT(SceneSetup) scene_setup, Thread *current_thread); INLINE CullResult *get_cull_result(Thread *current_thread) const; INLINE SceneSetup *get_scene_setup(Thread *current_thread) const; diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 2cac310b0c..892d70361d 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -41,7 +41,6 @@ #include "bamCache.h" #include "cullableObject.h" #include "geomVertexArrayData.h" -#include "omniBoundingVolume.h" #include "vertexDataSaveFile.h" #include "vertexDataBook.h" #include "vertexDataPage.h" @@ -1248,12 +1247,12 @@ do_cull(CullHandler *cull_handler, SceneSetup *scene_setup, // from the lens. PT(BoundingVolume) bv = scene_setup->get_cull_bounds(); - if (bv != (BoundingVolume *)NULL && - bv->is_of_type(GeometricBoundingVolume::get_class_type()) && - !bv->is_of_type(OmniBoundingVolume::get_class_type())) { + if (bv != (BoundingVolume *)NULL && !bv->is_infinite() && + bv->as_geometric_bounding_volume() != NULL) { // Transform it into the appropriate coordinate space. PT(GeometricBoundingVolume) local_frustum; - local_frustum = DCAST(GeometricBoundingVolume, bv->make_copy()); + local_frustum = bv->make_copy()->as_geometric_bounding_volume(); + nassertv(!local_frustum.is_null()); NodePath scene_parent = scene_setup->get_scene_root().get_parent(current_thread); CPT(TransformState) cull_center_transform = @@ -1580,7 +1579,7 @@ cull_to_bins(GraphicsOutput *win, DisplayRegion *dr, Thread *current_thread) { } // Save the results for next frame. - dr->set_cull_result(cull_result, scene_setup, current_thread); + dr->set_cull_result(MOVE(cull_result), MOVE(scene_setup), current_thread); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index b2fef6f469..de9b8d0036 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -40,6 +40,7 @@ #include "graphicsOutput.h" #include "texturePool.h" #include "geomMunger.h" +#include "stateMunger.h" #include "ambientLight.h" #include "directionalLight.h" #include "pointLight.h" @@ -814,38 +815,42 @@ dispatch_compute(int num_groups_x, int num_groups_y, int num_groups_z) { //////////////////////////////////////////////////////////////////// PT(GeomMunger) GraphicsStateGuardian:: get_geom_munger(const RenderState *state, Thread *current_thread) { - // Before we even look up the map, see if the _last_mi value points - // to this GSG. This is likely because we tend to visit the same - // state multiple times during a frame. Also, this might well be - // the only GSG in the world anyway. - if (!state->_mungers.empty()) { - RenderState::Mungers::const_iterator mi = state->_last_mi; - if (!(*mi).first.was_deleted() && (*mi).first == this) { - if ((*mi).second->is_registered()) { - return (*mi).second; + RenderState::Mungers &mungers = state->_mungers; + + if (mungers.is_empty()) { + // Before we even look up the map, see if the _last_mi value points + // to this GSG. This is likely because we tend to visit the same + // state multiple times during a frame. Also, this might well be + // the only GSG in the world anyway. + int mi = state->_last_mi; + if (mi >= 0 && mungers.has_element(mi) && mungers.get_key(mi) == this) { + PT(GeomMunger) munger = mungers.get_data(mi); + if (munger->is_registered()) { + return munger; } } - } - // Nope, we have to look it up in the map. - RenderState::Mungers::iterator mi = state->_mungers.find(this); - if (mi != state->_mungers.end() && !(*mi).first.was_deleted()) { - if ((*mi).second->is_registered()) { - state->_last_mi = mi; - return (*mi).second; + // Nope, we have to look it up in the map. + mi = mungers.find(this); + if (mi >= 0) { + PT(GeomMunger) munger = mungers.get_data(mi); + if (munger->is_registered()) { + state->_last_mi = mi; + return munger; + } else { + // This GeomMunger is no longer registered. Remove it from + // the map. + mungers.remove_element(mi); + } } - // This GeomMunger is no longer registered. Remove it from the - // map. - state->_mungers.erase(mi); } // Nothing in the map; create a new entry. PT(GeomMunger) munger = make_geom_munger(state, current_thread); nassertr(munger != (GeomMunger *)NULL && munger->is_registered(), munger); + nassertr(munger->is_of_type(StateMunger::get_class_type()), munger); - mi = state->_mungers.insert(RenderState::Mungers::value_type(this, munger)).first; - state->_last_mi = mi; - + state->_last_mi = mungers.store(this, munger); return munger; } diff --git a/panda/src/display/standardMunger.cxx b/panda/src/display/standardMunger.cxx index 85ddd0f3e1..53b4485303 100644 --- a/panda/src/display/standardMunger.cxx +++ b/panda/src/display/standardMunger.cxx @@ -15,7 +15,6 @@ #include "standardMunger.h" #include "renderState.h" #include "graphicsStateGuardian.h" -#include "dcast.h" #include "config_gobj.h" #include "displayRegion.h" @@ -43,16 +42,15 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, _auto_shader(false), _shader_skinning(false) { - _render_mode = DCAST(RenderModeAttrib, state->get_attrib(RenderModeAttrib::get_class_slot())); + _render_mode = (const RenderModeAttrib *) + state->get_attrib(RenderModeAttrib::get_class_slot()); if (!get_gsg()->get_runtime_color_scale()) { // We might need to munge the colors. - const ColorAttrib *color_attrib = (const ColorAttrib *) - state->get_attrib(ColorAttrib::get_class_slot()); - const ColorScaleAttrib *color_scale_attrib = (const ColorScaleAttrib *) - state->get_attrib(ColorScaleAttrib::get_class_slot()); + const ColorAttrib *color_attrib; + const ColorScaleAttrib *color_scale_attrib; - if (color_attrib != (ColorAttrib *)NULL && + if (state->get_attrib(color_attrib) && color_attrib->get_color_type() == ColorAttrib::T_flat) { if (!get_gsg()->get_color_scale_via_lighting()) { @@ -60,7 +58,7 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, // can't cheat the color via lighting (presumably, in this case, // by applying a material). _color = color_attrib->get_color(); - if (color_scale_attrib != (ColorScaleAttrib *)NULL && + if (state->get_attrib(color_scale_attrib) && color_scale_attrib->has_scale()) { const LVecBase4 &cs = color_scale_attrib->get_scale(); _color.set(_color[0] * cs[0], @@ -70,11 +68,11 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, } _munge_color = true; } - - } else if (color_scale_attrib != (ColorScaleAttrib *)NULL && + + } else if (state->get_attrib(color_scale_attrib) && color_scale_attrib->has_scale()) { _color_scale = color_scale_attrib->get_scale(); - + const TextureAttrib *tex_attrib = (const TextureAttrib *) state->get_attrib(TextureAttrib::get_class_slot()); @@ -106,7 +104,7 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, //////////////////////////////////////////////////////////////////// // Function: StandardMunger::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// StandardMunger:: ~StandardMunger() { @@ -126,7 +124,7 @@ munge_data_impl(const GeomVertexData *data) { new_data = new_data->set_color(_color, _num_components, _numeric_type, _contents); } else if (_munge_color_scale) { - new_data = new_data->scale_color(_color_scale, _num_components, + new_data = new_data->scale_color(_color_scale, _num_components, _numeric_type, _contents); } @@ -142,9 +140,9 @@ munge_data_impl(const GeomVertexData *data) { const TransformBlendTable *table = new_data->get_transform_blend_table(); if (table != (TransformBlendTable *)NULL && table->get_num_transforms() != 0 && - table->get_max_simultaneous_transforms() <= + table->get_max_simultaneous_transforms() <= get_gsg()->get_max_vertex_transforms()) { - if (matrix_palette && + if (matrix_palette && table->get_num_transforms() <= get_gsg()->get_max_vertex_transform_indices()) { if (table->get_num_transforms() == table->get_max_simultaneous_transforms()) { @@ -186,7 +184,7 @@ munge_data_impl(const GeomVertexData *data) { // Description: Converts a Geom and/or its data as necessary. //////////////////////////////////////////////////////////////////// void StandardMunger:: -munge_geom_impl(CPT(Geom) &geom, CPT(GeomVertexData) &vertex_data, +munge_geom_impl(CPT(Geom) &geom, CPT(GeomVertexData) &vertex_data, Thread *) { int supported_geom_rendering = get_gsg()->get_supported_geom_rendering(); @@ -289,7 +287,7 @@ premunge_geom_impl(CPT(Geom) &geom, CPT(GeomVertexData) &vertex_data) { //////////////////////////////////////////////////////////////////// int StandardMunger:: compare_to_impl(const GeomMunger *other) const { - const StandardMunger *om = DCAST(StandardMunger, other); + const StandardMunger *om = (const StandardMunger *)other; if (_render_mode != om->_render_mode) { return _render_mode < om->_render_mode ? -1 : 1; @@ -335,7 +333,8 @@ compare_to_impl(const GeomMunger *other) const { //////////////////////////////////////////////////////////////////// int StandardMunger:: geom_compare_to_impl(const GeomMunger *other) const { - const StandardMunger *om = DCAST(StandardMunger, other); + const StandardMunger *om = (const StandardMunger *)other; + if (_munge_color != om->_munge_color) { return (int)_munge_color - (int)om->_munge_color; } diff --git a/panda/src/egg2pg/characterMaker.cxx b/panda/src/egg2pg/characterMaker.cxx index 18b688f3e1..5450a3ab6d 100644 --- a/panda/src/egg2pg/characterMaker.cxx +++ b/panda/src/egg2pg/characterMaker.cxx @@ -156,7 +156,7 @@ PandaNode *CharacterMaker:: part_to_node(PartGroup *part, const string &name) const { PandaNode *node = _character_node; - if (part->is_of_type(CharacterJoint::get_class_type())) { + if (part->is_character_joint()) { CharacterJoint *joint = DCAST(CharacterJoint, part); if (joint->_geom_node != (PandaNode *)NULL) { node = joint->_geom_node; @@ -343,7 +343,7 @@ build_joint_hierarchy(EggNode *egg_node, PartGroup *part, int index) { //////////////////////////////////////////////////////////////////// void CharacterMaker:: parent_joint_nodes(PartGroup *part) { - if (part->is_of_type(CharacterJoint::get_class_type())) { + if (part->is_character_joint()) { CharacterJoint *joint = DCAST(CharacterJoint, part); PandaNode *joint_node = joint->_geom_node; if (joint_node != NULL) { diff --git a/panda/src/egg2pg/eggBinner.cxx b/panda/src/egg2pg/eggBinner.cxx index 89d5db08a6..f06cf04ff9 100644 --- a/panda/src/egg2pg/eggBinner.cxx +++ b/panda/src/egg2pg/eggBinner.cxx @@ -57,16 +57,7 @@ prepare_node(EggNode *node) { //////////////////////////////////////////////////////////////////// int EggBinner:: get_bin_number(const EggNode *node) { - if (node->is_of_type(EggNurbsSurface::get_class_type())) { - return (int)BN_nurbs_surface; - - } else if (node->is_of_type(EggNurbsCurve::get_class_type())) { - return (int)BN_nurbs_curve; - - } else if (node->is_of_type(EggPatch::get_class_type())) { - return (int)BN_patches; - - } else if (node->is_of_type(EggPrimitive::get_class_type())) { + if (node->is_of_type(EggPrimitive::get_class_type())) { return (int)BN_polyset; } else if (node->is_of_type(EggGroup::get_class_type())) { @@ -74,6 +65,15 @@ get_bin_number(const EggNode *node) { if (group->has_lod()) { return (int)BN_lod; } + + } else if (node->is_of_type(EggNurbsSurface::get_class_type())) { + return (int)BN_nurbs_surface; + + } else if (node->is_of_type(EggNurbsCurve::get_class_type())) { + return (int)BN_nurbs_curve; + + } else if (node->is_of_type(EggPatch::get_class_type())) { + return (int)BN_patches; } return (int)BN_none; diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index 643fa4299a..a2301e74a7 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -991,8 +991,8 @@ update_shader_texture_bindings(ShaderContext *prev) { // We get the TextureAttrib directly from the _target_rs, not the // filtered TextureAttrib in _target_texture. - const TextureAttrib *texattrib = DCAST(TextureAttrib, _glgsg->_target_rs->get_attrib_def(TextureAttrib::get_class_slot())); - nassertv(texattrib != (TextureAttrib *)NULL); + const TextureAttrib *texattrib; + _glgsg->_target_rs->get_attrib_def(texattrib); for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) { Shader::ShaderTexSpec &spec = _shader->_tex_spec[i]; @@ -1053,8 +1053,9 @@ update_shader_texture_bindings(ShaderContext *prev) { continue; } - _glgsg->apply_texture(tc); - _glgsg->apply_sampler(texunit, sampler, tc); + CLP(TextureContext) *gtc = (CLP(TextureContext) *)tc; + _glgsg->apply_texture(gtc); + _glgsg->apply_sampler(texunit, sampler, gtc); } cg_report_errors(); diff --git a/panda/src/glstuff/glGeomMunger_src.cxx b/panda/src/glstuff/glGeomMunger_src.cxx index 778fb71d95..7be5a50d50 100644 --- a/panda/src/glstuff/glGeomMunger_src.cxx +++ b/panda/src/glstuff/glGeomMunger_src.cxx @@ -26,8 +26,8 @@ ALLOC_DELETED_CHAIN_DEF(CLP(GeomMunger)); CLP(GeomMunger):: CLP(GeomMunger)(GraphicsStateGuardian *gsg, const RenderState *state) : StandardMunger(gsg, state, 4, NT_uint8, C_color), - _texture(DCAST(TextureAttrib, state->get_attrib(TextureAttrib::get_class_slot()))), - _tex_gen(DCAST(TexGenAttrib, state->get_attrib(TexGenAttrib::get_class_slot()))) + _texture((const TextureAttrib *)state->get_attrib(TextureAttrib::get_class_slot())), + _tex_gen((const TexGenAttrib *)state->get_attrib(TexGenAttrib::get_class_slot())) { // Set a callback to unregister ourselves when either the Texture or // the TexGen object gets deleted. @@ -475,7 +475,7 @@ premunge_geom_impl(CPT(Geom) &geom, CPT(GeomVertexData) &vertex_data) { //////////////////////////////////////////////////////////////////// int CLP(GeomMunger):: compare_to_impl(const GeomMunger *other) const { - const CLP(GeomMunger) *om = DCAST(CLP(GeomMunger), other); + const CLP(GeomMunger) *om = (CLP(GeomMunger) *)other; if (_texture != om->_texture) { return _texture < om->_texture ? -1 : 1; } @@ -499,7 +499,7 @@ compare_to_impl(const GeomMunger *other) const { //////////////////////////////////////////////////////////////////// int CLP(GeomMunger):: geom_compare_to_impl(const GeomMunger *other) const { - const CLP(GeomMunger) *om = DCAST(CLP(GeomMunger), other); + const CLP(GeomMunger) *om = (CLP(GeomMunger) *)other; #ifdef OPENGLES if (get_render_mode() != om->get_render_mode()) { return get_render_mode() < om->get_render_mode() ? -1 : 1; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 8ab2c7b872..89227ee1bf 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4512,13 +4512,14 @@ prepare_texture(Texture *tex, int view) { //////////////////////////////////////////////////////////////////// bool CLP(GraphicsStateGuardian):: update_texture(TextureContext *tc, bool force) { - CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); + CLP(TextureContext) *gtc; + DCAST_INTO_R(gtc, tc, false); if (gtc->was_image_modified() || !gtc->_has_storage) { PStatGPUTimer timer(this, _texture_update_pcollector); // If the texture image was modified, reload the texture. - apply_texture(tc); + apply_texture(gtc); Texture *tex = tc->get_texture(); if (gtc->was_properties_modified()) { @@ -4536,7 +4537,7 @@ update_texture(TextureContext *tc, bool force) { // If only the properties have been modified, we don't necessarily // need to reload the texture. - apply_texture(tc); + apply_texture(gtc); Texture *tex = tc->get_texture(); if (specify_texture(gtc, tex->get_default_sampler())) { @@ -9649,8 +9650,10 @@ update_standard_texture_bindings() { glDisable(target); continue; } - apply_texture(tc); - apply_sampler(i, _target_texture->get_on_sampler(stage), tc); + // Don't DCAST(); we already did the verification in update_texture. + CLP(TextureContext) *gtc = (CLP(TextureContext) *)tc; + apply_texture(gtc); + apply_sampler(i, _target_texture->get_on_sampler(stage), gtc); if (stage->involves_color_scale() && _color_scale_enabled) { LColor color = stage->get_color(); @@ -10487,9 +10490,7 @@ specify_texture(CLP(TextureContext) *gtc, const SamplerState &sampler) { // for rendering. //////////////////////////////////////////////////////////////////// bool CLP(GraphicsStateGuardian):: -apply_texture(TextureContext *tc) { - CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); - +apply_texture(CLP(TextureContext) *gtc) { gtc->set_active(true); GLenum target = get_texture_target(gtc->get_texture()->get_texture_type()); if (target == GL_NONE) { @@ -10520,9 +10521,7 @@ apply_texture(TextureContext *tc) { // context instead. //////////////////////////////////////////////////////////////////// bool CLP(GraphicsStateGuardian):: -apply_sampler(GLuint unit, const SamplerState &sampler, TextureContext *tc) { - CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); - +apply_sampler(GLuint unit, const SamplerState &sampler, CLP(TextureContext) *gtc) { #ifndef OPENGLES if (_supports_sampler_objects) { // We support sampler objects. Prepare the sampler object and @@ -10547,7 +10546,7 @@ apply_sampler(GLuint unit, const SamplerState &sampler, TextureContext *tc) { // texture and change the texture parameters if they don't match. if (gtc->_active_sampler != sampler) { _glActiveTexture(GL_TEXTURE0 + unit); - apply_texture(tc); + apply_texture(gtc); specify_texture(gtc, sampler); } } @@ -10555,7 +10554,7 @@ apply_sampler(GLuint unit, const SamplerState &sampler, TextureContext *tc) { if (sampler.uses_mipmaps() && !gtc->_uses_mipmaps) { // The texture wasn't created with mipmaps, but we are trying // to sample it with mipmaps. We will need to reload it. - apply_texture(tc); + apply_texture(gtc); gtc->mark_needs_reload(); bool okflag = upload_texture(gtc, false, true); if (!okflag) { diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 63c4cb8abd..f38dd5326c 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -531,8 +531,8 @@ protected: #endif // NDEBUG bool specify_texture(CLP(TextureContext) *gtc, const SamplerState &sampler); - bool apply_texture(TextureContext *tc); - bool apply_sampler(GLuint unit, const SamplerState &sampler, TextureContext *tc); + bool apply_texture(CLP(TextureContext) *gtc); + bool apply_sampler(GLuint unit, const SamplerState &sampler, CLP(TextureContext) *gtc); bool upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps); bool upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, bool uses_mipmaps, int mipmap_bias, diff --git a/panda/src/gobj/geom.I b/panda/src/gobj/geom.I index 823e9798a4..b639041c85 100644 --- a/panda/src/gobj/geom.I +++ b/panda/src/gobj/geom.I @@ -832,7 +832,7 @@ get_modified() const { INLINE GeomContext *GeomPipelineReader:: prepare_now(PreparedGraphicsObjects *prepared_objects, GraphicsStateGuardianBase *gsg) const { - return ((Geom *)_object.p())->prepare_now(prepared_objects, gsg); + return ((Geom *)_object)->prepare_now(prepared_objects, gsg); } INLINE ostream & diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index fe82255c6e..40166e15bc 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -1897,7 +1897,7 @@ check_usage_hint() const { #ifdef DO_PIPELINING unref_delete((CycleData *)_cdata); #endif - Geom::CDWriter fresh_cdata(((Geom *)_object.p())->_cycler, + Geom::CDWriter fresh_cdata(((Geom *)_object)->_cycler, false, _current_thread); ((GeomPipelineReader *)this)->_cdata = fresh_cdata; #ifdef DO_PIPELINING @@ -1906,7 +1906,7 @@ check_usage_hint() const { if (!fresh_cdata->_got_usage_hint) { // The cache is still stale. We have to do the work of // freshening it. - ((Geom *)_object.p())->reset_usage_hint(fresh_cdata); + ((Geom *)_object)->reset_usage_hint(fresh_cdata); nassertv(fresh_cdata->_got_usage_hint); } diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index 5e5b269f10..e1acb5f465 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -397,6 +397,10 @@ private: // Class : GeomPipelineReader // Description : Encapsulates the data from a Geom, // pre-fetched for one stage of the pipeline. +// +// Does not hold a reference to the Geom. The caller +// must ensure that the Geom persists for at least the +// lifetime of the GeomPipelineReader. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA_GOBJ GeomPipelineReader : public GeomEnums { public: @@ -434,7 +438,7 @@ public: bool force) const; private: - CPT(Geom) _object; + const Geom *_object; Thread *_current_thread; const Geom::CData *_cdata; diff --git a/panda/src/gobj/geomPrimitive.I b/panda/src/gobj/geomPrimitive.I index 9eb42022db..cbaede08be 100644 --- a/panda/src/gobj/geomPrimitive.I +++ b/panda/src/gobj/geomPrimitive.I @@ -107,8 +107,8 @@ is_composite() const { //////////////////////////////////////////////////////////////////// INLINE bool GeomPrimitive:: is_indexed() const { - GeomPrimitivePipelineReader reader(this, Thread::get_current_thread()); - return reader.is_indexed(); + CDReader cdata(_cycler); + return (!cdata->_vertices.is_null()); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/mathutil/boundingVolume.cxx b/panda/src/mathutil/boundingVolume.cxx index 48ca7a8bab..de223c05bf 100644 --- a/panda/src/mathutil/boundingVolume.cxx +++ b/panda/src/mathutil/boundingVolume.cxx @@ -84,6 +84,18 @@ write(ostream &out, int indent_level) const { indent(out, indent_level) << *this << "\n"; } +//////////////////////////////////////////////////////////////////// +// Function: BoundingVolume::as_geometric_bounding_volume +// Access: Public, Virtual +// Description: Virtual downcast method. Returns this object as a +// pointer of the indicated type, if it is in fact that +// type. Returns NULL if it is not that type. +//////////////////////////////////////////////////////////////////// +GeometricBoundingVolume *BoundingVolume:: +as_geometric_bounding_volume() { + return NULL; +} + //////////////////////////////////////////////////////////////////// // Function: BoundingVolume::as_geometric_bounding_volume // Access: Public, Virtual diff --git a/panda/src/mathutil/boundingVolume.h b/panda/src/mathutil/boundingVolume.h index 3af3e7fa2d..ab6f02578f 100644 --- a/panda/src/mathutil/boundingVolume.h +++ b/panda/src/mathutil/boundingVolume.h @@ -112,6 +112,7 @@ PUBLISHED: }; public: + virtual GeometricBoundingVolume *as_geometric_bounding_volume(); virtual const GeometricBoundingVolume *as_geometric_bounding_volume() const; virtual const FiniteBoundingVolume *as_finite_bounding_volume() const; virtual const BoundingSphere *as_bounding_sphere() const; diff --git a/panda/src/mathutil/geometricBoundingVolume.cxx b/panda/src/mathutil/geometricBoundingVolume.cxx index 756f86dca0..829c705d85 100644 --- a/panda/src/mathutil/geometricBoundingVolume.cxx +++ b/panda/src/mathutil/geometricBoundingVolume.cxx @@ -19,7 +19,19 @@ TypeHandle GeometricBoundingVolume::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GeometricBoundingVolume::as_geometric_bounding_volume -// Access: Public, Virtual +// Access: Public, Virtual, Final +// Description: Virtual downcast method. Returns this object as a +// pointer of the indicated type, if it is in fact that +// type. Returns NULL if it is not that type. +//////////////////////////////////////////////////////////////////// +GeometricBoundingVolume *GeometricBoundingVolume:: +as_geometric_bounding_volume() { + return this; +} + +//////////////////////////////////////////////////////////////////// +// Function: GeometricBoundingVolume::as_geometric_bounding_volume +// Access: Public, Virtual, Final // Description: Virtual downcast method. Returns this object as a // pointer of the indicated type, if it is in fact that // type. Returns NULL if it is not that type. diff --git a/panda/src/mathutil/geometricBoundingVolume.h b/panda/src/mathutil/geometricBoundingVolume.h index 4bd53591e3..a1e191285c 100644 --- a/panda/src/mathutil/geometricBoundingVolume.h +++ b/panda/src/mathutil/geometricBoundingVolume.h @@ -53,7 +53,8 @@ PUBLISHED: virtual void xform(const LMatrix4 &mat)=0; public: - virtual const GeometricBoundingVolume *as_geometric_bounding_volume() const; + virtual GeometricBoundingVolume *as_geometric_bounding_volume() FINAL; + virtual const GeometricBoundingVolume *as_geometric_bounding_volume() const FINAL; protected: // Some virtual functions to implement fundamental bounding diff --git a/panda/src/pgraph/alphaTestAttrib.cxx b/panda/src/pgraph/alphaTestAttrib.cxx index 8819fe74f0..b9f4531bc5 100644 --- a/panda/src/pgraph/alphaTestAttrib.cxx +++ b/panda/src/pgraph/alphaTestAttrib.cxx @@ -76,13 +76,13 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int AlphaTestAttrib:: compare_to_impl(const RenderAttrib *other) const { - const AlphaTestAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AlphaTestAttrib *ta = (const AlphaTestAttrib *)other; + int compare_result = ((int)_mode - (int)ta->_mode) ; if (compare_result != 0) { return compare_result; } - + if (_reference_alpha != ta->_reference_alpha) { return _reference_alpha < ta->_reference_alpha ? -1 : 1; } diff --git a/panda/src/pgraph/alphaTestAttrib.h b/panda/src/pgraph/alphaTestAttrib.h index 2e3cf9e539..3714f39d9d 100644 --- a/panda/src/pgraph/alphaTestAttrib.h +++ b/panda/src/pgraph/alphaTestAttrib.h @@ -65,7 +65,7 @@ public: protected: static TypedWritable *make_from_bam(const FactoryParams ¶ms); void fillin(DatagramIterator &scan, BamReader *manager); - + public: static TypeHandle get_class_type() { return _type_handle; @@ -74,7 +74,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "AlphaTestAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new AlphaTestAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/antialiasAttrib.cxx b/panda/src/pgraph/antialiasAttrib.cxx index 54c41096f1..e2242f34be 100644 --- a/panda/src/pgraph/antialiasAttrib.cxx +++ b/panda/src/pgraph/antialiasAttrib.cxx @@ -75,11 +75,7 @@ make(unsigned short mode) { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) AntialiasAttrib:: make_default() { - if (default_antialias_enable) { - return return_new(new AntialiasAttrib(M_auto)); - } else { - return return_new(new AntialiasAttrib(M_none)); - } + return RenderAttribRegistry::quick_get_global_ptr()->get_slot_default(_attrib_slot); } //////////////////////////////////////////////////////////////////// @@ -146,8 +142,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int AntialiasAttrib:: compare_to_impl(const RenderAttrib *other) const { - const AntialiasAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AntialiasAttrib *ta = (const AntialiasAttrib *)other; + if (_mode != ta->_mode) { return (int)_mode - (int)ta->_mode; } @@ -190,8 +186,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) AntialiasAttrib:: compose_impl(const RenderAttrib *other) const { - const AntialiasAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AntialiasAttrib *ta = (const AntialiasAttrib *)other; unsigned short mode_type; unsigned short mode_quality; @@ -277,3 +272,26 @@ fillin(DatagramIterator &scan, BamReader *manager) { _mode = scan.get_uint16(); } + +//////////////////////////////////////////////////////////////////// +// Function: AntialiasAttrib::init_type +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +void AntialiasAttrib:: +init_type() { + RenderAttrib::init_type(); + register_type(_type_handle, "AntialiasAttrib", + RenderAttrib::get_class_type()); + + // This is defined here, since we have otherwise no guarantee that + // the config var has already been constructed by the time we call + // init_type() at static init time. + static ConfigVariableBool default_antialias_enable + ("default-antialias-enable", false, + PRC_DESC("Set this true to enable the M_auto antialiasing mode for all " + "nodes by default.")); + + _attrib_slot = register_slot(_type_handle, 100, + new AntialiasAttrib(default_antialias_enable ? M_auto : M_none)); +} diff --git a/panda/src/pgraph/antialiasAttrib.h b/panda/src/pgraph/antialiasAttrib.h index ae7fbfddb1..d975f60575 100644 --- a/panda/src/pgraph/antialiasAttrib.h +++ b/panda/src/pgraph/antialiasAttrib.h @@ -80,17 +80,12 @@ public: protected: static TypedWritable *make_from_bam(const FactoryParams ¶ms); void fillin(DatagramIterator &scan, BamReader *manager); - + public: static TypeHandle get_class_type() { return _type_handle; } - static void init_type() { - RenderAttrib::init_type(); - register_type(_type_handle, "AntialiasAttrib", - RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); - } + static void init_type(); virtual TypeHandle get_type() const { return get_class_type(); } diff --git a/panda/src/pgraph/audioVolumeAttrib.cxx b/panda/src/pgraph/audioVolumeAttrib.cxx index 05f546ad55..59c055f447 100644 --- a/panda/src/pgraph/audioVolumeAttrib.cxx +++ b/panda/src/pgraph/audioVolumeAttrib.cxx @@ -147,8 +147,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int AudioVolumeAttrib:: compare_to_impl(const RenderAttrib *other) const { - const AudioVolumeAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AudioVolumeAttrib *ta = (const AudioVolumeAttrib *)other; if (_off != ta->_off) { return (int)_off - (int)ta->_off; @@ -198,8 +197,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) AudioVolumeAttrib:: compose_impl(const RenderAttrib *other) const { - const AudioVolumeAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AudioVolumeAttrib *ta = (const AudioVolumeAttrib *)other; if (ta->is_off()) { return ta; @@ -223,8 +221,8 @@ invert_compose_impl(const RenderAttrib *other) const { if (is_off()) { return other; } - const AudioVolumeAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AudioVolumeAttrib *ta = (const AudioVolumeAttrib *)other; + PN_stdfloat new_volume = _volume == 0.0f ? 1.0f : ta->_volume / _volume; AudioVolumeAttrib *attrib = new AudioVolumeAttrib(false, new_volume); diff --git a/panda/src/pgraph/audioVolumeAttrib.h b/panda/src/pgraph/audioVolumeAttrib.h index 5f616425a0..ebfab1077d 100644 --- a/panda/src/pgraph/audioVolumeAttrib.h +++ b/panda/src/pgraph/audioVolumeAttrib.h @@ -73,7 +73,7 @@ public: protected: static TypedWritable *make_from_bam(const FactoryParams ¶ms); void fillin(DatagramIterator &scan, BamReader *manager); - + public: static TypeHandle get_class_type() { return _type_handle; @@ -82,7 +82,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "AudioVolumeAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new AudioVolumeAttrib(false, 1)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/auxBitplaneAttrib.cxx b/panda/src/pgraph/auxBitplaneAttrib.cxx index 2972bcd227..5f836a0b87 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.cxx +++ b/panda/src/pgraph/auxBitplaneAttrib.cxx @@ -88,8 +88,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int AuxBitplaneAttrib:: compare_to_impl(const RenderAttrib *other) const { - const AuxBitplaneAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const AuxBitplaneAttrib *ta = (const AuxBitplaneAttrib *)other; + int compare_result = _outputs - ta->_outputs; if (compare_result != 0) { return compare_result; diff --git a/panda/src/pgraph/auxBitplaneAttrib.h b/panda/src/pgraph/auxBitplaneAttrib.h index 7c918db7bc..4285294f33 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.h +++ b/panda/src/pgraph/auxBitplaneAttrib.h @@ -108,7 +108,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "AuxBitplaneAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new AuxBitplaneAttrib(0)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/clipPlaneAttrib.h b/panda/src/pgraph/clipPlaneAttrib.h index f8651800b0..f6f6a05b96 100644 --- a/panda/src/pgraph/clipPlaneAttrib.h +++ b/panda/src/pgraph/clipPlaneAttrib.h @@ -148,7 +148,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ClipPlaneAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new ClipPlaneAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/colorAttrib.cxx b/panda/src/pgraph/colorAttrib.cxx index 9e0b299e13..9cb2095bc9 100644 --- a/panda/src/pgraph/colorAttrib.cxx +++ b/panda/src/pgraph/colorAttrib.cxx @@ -122,8 +122,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ColorAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ColorAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorAttrib *ta = (const ColorAttrib *)other; + if (_type != ta->_type) { return (int)_type - (int)ta->_type; } diff --git a/panda/src/pgraph/colorAttrib.h b/panda/src/pgraph/colorAttrib.h index c30131159a..8a7e70a6e1 100644 --- a/panda/src/pgraph/colorAttrib.h +++ b/panda/src/pgraph/colorAttrib.h @@ -86,7 +86,8 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ColorAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, + new ColorAttrib(T_off, LColor(1, 1, 1, 1))); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/colorBlendAttrib.cxx b/panda/src/pgraph/colorBlendAttrib.cxx index 2ad7bb5065..7c6c5aea23 100644 --- a/panda/src/pgraph/colorBlendAttrib.cxx +++ b/panda/src/pgraph/colorBlendAttrib.cxx @@ -113,8 +113,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ColorBlendAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ColorBlendAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorBlendAttrib *ta = (const ColorBlendAttrib *)other; if (_mode != ta->_mode) { return (int)_mode - (int)ta->_mode; diff --git a/panda/src/pgraph/colorBlendAttrib.h b/panda/src/pgraph/colorBlendAttrib.h index 85ee3b2164..dc2975985f 100644 --- a/panda/src/pgraph/colorBlendAttrib.h +++ b/panda/src/pgraph/colorBlendAttrib.h @@ -129,7 +129,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ColorBlendAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new ColorBlendAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/colorScaleAttrib.cxx b/panda/src/pgraph/colorScaleAttrib.cxx index 04d9db0b9b..dbdf0511cd 100644 --- a/panda/src/pgraph/colorScaleAttrib.cxx +++ b/panda/src/pgraph/colorScaleAttrib.cxx @@ -186,8 +186,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ColorScaleAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ColorScaleAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorScaleAttrib *ta = (const ColorScaleAttrib *)other; if (is_off() != ta->is_off()) { return (int)is_off() - (int)ta->is_off(); @@ -233,8 +232,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) ColorScaleAttrib:: compose_impl(const RenderAttrib *other) const { - const ColorScaleAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorScaleAttrib *ta = (const ColorScaleAttrib *)other; if (ta->is_off()) { return ta; @@ -263,8 +261,8 @@ invert_compose_impl(const RenderAttrib *other) const { if (is_off()) { return other; } - const ColorScaleAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorScaleAttrib *ta = (const ColorScaleAttrib *)other; + LVecBase4 new_scale(_scale[0] == 0.0f ? 1.0f : ta->_scale[0] / _scale[0], _scale[1] == 0.0f ? 1.0f : ta->_scale[1] / _scale[1], _scale[2] == 0.0f ? 1.0f : ta->_scale[2] / _scale[2], diff --git a/panda/src/pgraph/colorScaleAttrib.h b/panda/src/pgraph/colorScaleAttrib.h index ca947ec049..2fd09b5c3c 100644 --- a/panda/src/pgraph/colorScaleAttrib.h +++ b/panda/src/pgraph/colorScaleAttrib.h @@ -92,7 +92,8 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ColorScaleAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, + new ColorScaleAttrib(false, LVecBase4(1, 1, 1, 1))); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/colorWriteAttrib.cxx b/panda/src/pgraph/colorWriteAttrib.cxx index 66b7218e35..66e2ab329f 100644 --- a/panda/src/pgraph/colorWriteAttrib.cxx +++ b/panda/src/pgraph/colorWriteAttrib.cxx @@ -89,8 +89,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ColorWriteAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ColorWriteAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ColorWriteAttrib *ta = (const ColorWriteAttrib *)other; return (int)_channels - (int)ta->_channels; } diff --git a/panda/src/pgraph/colorWriteAttrib.h b/panda/src/pgraph/colorWriteAttrib.h index bb77709bc4..a9c4442e14 100644 --- a/panda/src/pgraph/colorWriteAttrib.h +++ b/panda/src/pgraph/colorWriteAttrib.h @@ -85,7 +85,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ColorWriteAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new ColorWriteAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/config_pgraph.cxx b/panda/src/pgraph/config_pgraph.cxx index a79eb0c23d..2c879aba12 100644 --- a/panda/src/pgraph/config_pgraph.cxx +++ b/panda/src/pgraph/config_pgraph.cxx @@ -310,11 +310,6 @@ ConfigVariableInt max_lenses "this can be used as a simple sanity check. Set it larger or " "smaller to suit your needs.")); -ConfigVariableBool default_antialias_enable -("default-antialias-enable", false, - PRC_DESC("Set this true to enable the M_auto antialiasing mode for all " - "nodes by default.")); - ConfigVariableBool polylight_info ("polylight-info", false, PRC_DESC("Set this true to view some info statements regarding the polylight. " diff --git a/panda/src/pgraph/config_pgraph.h b/panda/src/pgraph/config_pgraph.h index a7158b5a86..876eae7485 100644 --- a/panda/src/pgraph/config_pgraph.h +++ b/panda/src/pgraph/config_pgraph.h @@ -58,7 +58,6 @@ extern EXPCL_PANDA_PGRAPH ConfigVariableBool premunge_data; extern ConfigVariableBool preserve_geom_nodes; extern ConfigVariableBool flatten_geoms; extern EXPCL_PANDA_PGRAPH ConfigVariableInt max_lenses; -extern ConfigVariableBool default_antialias_enable; extern ConfigVariableBool polylight_info; diff --git a/panda/src/pgraph/cullBinAttrib.cxx b/panda/src/pgraph/cullBinAttrib.cxx index 7b4773bfc7..3d7707b93e 100644 --- a/panda/src/pgraph/cullBinAttrib.cxx +++ b/panda/src/pgraph/cullBinAttrib.cxx @@ -84,8 +84,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int CullBinAttrib:: compare_to_impl(const RenderAttrib *other) const { - const CullBinAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const CullBinAttrib *ta = (const CullBinAttrib *)other; + if (_draw_order != ta->_draw_order) { return _draw_order - ta->_draw_order; } diff --git a/panda/src/pgraph/cullBinAttrib.h b/panda/src/pgraph/cullBinAttrib.h index 09430302fb..f1a0809caf 100644 --- a/panda/src/pgraph/cullBinAttrib.h +++ b/panda/src/pgraph/cullBinAttrib.h @@ -73,7 +73,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "CullBinAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new CullBinAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/cullFaceAttrib.cxx b/panda/src/pgraph/cullFaceAttrib.cxx index 88d9586081..8fa8b1c19b 100644 --- a/panda/src/pgraph/cullFaceAttrib.cxx +++ b/panda/src/pgraph/cullFaceAttrib.cxx @@ -154,8 +154,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int CullFaceAttrib:: compare_to_impl(const RenderAttrib *other) const { - const CullFaceAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const CullFaceAttrib *ta = (const CullFaceAttrib *)other; + if (_mode != ta->_mode) { return (int)_mode - (int)ta->_mode; } @@ -199,8 +199,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) CullFaceAttrib:: compose_impl(const RenderAttrib *other) const { - const CullFaceAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const CullFaceAttrib *ta = (const CullFaceAttrib *)other; if (!_reverse && ta->_mode != M_cull_unchanged) { // The normal case (there is nothing funny going on): the second @@ -231,8 +230,7 @@ compose_impl(const RenderAttrib *other) const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) CullFaceAttrib:: invert_compose_impl(const RenderAttrib *other) const { - const CullFaceAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const CullFaceAttrib *ta = (const CullFaceAttrib *)other; // The invert case is the same as the normal case, except that the // meaning of _reverse is inverted. See compose_impl(), above. diff --git a/panda/src/pgraph/cullFaceAttrib.h b/panda/src/pgraph/cullFaceAttrib.h index 54e55b4173..7ac2427e91 100644 --- a/panda/src/pgraph/cullFaceAttrib.h +++ b/panda/src/pgraph/cullFaceAttrib.h @@ -84,7 +84,8 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "CullFaceAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, + new CullFaceAttrib(M_cull_clockwise, false)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/cullResult.cxx b/panda/src/pgraph/cullResult.cxx index 67a80b4c43..cd27cc29f5 100644 --- a/panda/src/pgraph/cullResult.cxx +++ b/panda/src/pgraph/cullResult.cxx @@ -237,9 +237,8 @@ add_object(CullableObject *object, const CullTraverser *traverser) { } // Check for a special wireframe setting. - const RenderModeAttrib *rmode = (const RenderModeAttrib *) - object->_state->get_attrib(RenderModeAttrib::get_class_slot()); - if (rmode != (const RenderModeAttrib *)NULL) { + const RenderModeAttrib *rmode; + if (object->_state->get_attrib(rmode)) { if (rmode->get_mode() == RenderModeAttrib::M_filled_wireframe) { CullableObject *wireframe_part = new CullableObject(*object); wireframe_part->_state = get_wireframe_overlay_state(rmode); diff --git a/panda/src/pgraph/cullTraverserData.cxx b/panda/src/pgraph/cullTraverserData.cxx index ce665e4806..2fc0f1665c 100644 --- a/panda/src/pgraph/cullTraverserData.cxx +++ b/panda/src/pgraph/cullTraverserData.cxx @@ -93,7 +93,9 @@ apply_transform_and_state(CullTraverser *trav, // Copy the bounding volumes for the frustums so we can // transform them. if (_view_frustum != (GeometricBoundingVolume *)NULL) { - _view_frustum = DCAST(GeometricBoundingVolume, _view_frustum->make_copy()); + _view_frustum = _view_frustum->make_copy()->as_geometric_bounding_volume(); + nassertv(_view_frustum != (GeometricBoundingVolume *)NULL); + _view_frustum->xform(inv_transform->get_mat()); } @@ -106,9 +108,9 @@ apply_transform_and_state(CullTraverser *trav, if (clip_plane_cull) { _cull_planes = _cull_planes->apply_state(trav, this, - DCAST(ClipPlaneAttrib, node_state->get_attrib(ClipPlaneAttrib::get_class_slot())), + (const ClipPlaneAttrib *)node_state->get_attrib(ClipPlaneAttrib::get_class_slot()), DCAST(ClipPlaneAttrib, off_clip_planes), - DCAST(OccluderEffect, node_effects->get_effect(OccluderEffect::get_class_type()))); + (const OccluderEffect *)node_effects->get_effect(OccluderEffect::get_class_type())); } } @@ -122,7 +124,8 @@ is_in_view_impl() { const GeometricBoundingVolume *node_gbv = NULL; if (_view_frustum != (GeometricBoundingVolume *)NULL) { - DCAST_INTO_R(node_gbv, _node_reader.get_bounds(), false) + node_gbv = _node_reader.get_bounds()->as_geometric_bounding_volume(); + nassertr(node_gbv != (const GeometricBoundingVolume *)NULL, false); int result = _view_frustum->contains(node_gbv); @@ -168,7 +171,8 @@ is_in_view_impl() { if (!_cull_planes->is_empty()) { if (node_gbv == (const GeometricBoundingVolume *)NULL) { - DCAST_INTO_R(node_gbv, _node_reader.get_bounds(), false) + node_gbv = _node_reader.get_bounds()->as_geometric_bounding_volume(); + nassertr(node_gbv != (const GeometricBoundingVolume *)NULL, false); } // Also cull against the current clip planes. diff --git a/panda/src/pgraph/cullableObject.cxx b/panda/src/pgraph/cullableObject.cxx index b842850db7..5ad7a9b5f2 100644 --- a/panda/src/pgraph/cullableObject.cxx +++ b/panda/src/pgraph/cullableObject.cxx @@ -140,8 +140,7 @@ munge_geom(GraphicsStateGuardianBase *gsg, } } - StateMunger *state_munger; - DCAST_INTO_R(state_munger, munger, false); + StateMunger *state_munger = (StateMunger *)munger; _state = state_munger->munge_state(_state); // If there is any animation left in the vertex data after it diff --git a/panda/src/pgraph/depthOffsetAttrib.cxx b/panda/src/pgraph/depthOffsetAttrib.cxx index f30fd68266..8861947048 100644 --- a/panda/src/pgraph/depthOffsetAttrib.cxx +++ b/panda/src/pgraph/depthOffsetAttrib.cxx @@ -95,8 +95,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int DepthOffsetAttrib:: compare_to_impl(const RenderAttrib *other) const { - const DepthOffsetAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const DepthOffsetAttrib *ta = (const DepthOffsetAttrib *)other; + if (_offset != ta->_offset) { return _offset - ta->_offset; } @@ -147,8 +147,8 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) DepthOffsetAttrib:: compose_impl(const RenderAttrib *other) const { - const DepthOffsetAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const DepthOffsetAttrib *ta = (const DepthOffsetAttrib *)other; + int new_offset = ta->_offset + _offset; DepthOffsetAttrib *attrib = new DepthOffsetAttrib(new_offset, ta->_min_value, ta->_max_value); @@ -166,8 +166,8 @@ compose_impl(const RenderAttrib *other) const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) DepthOffsetAttrib:: invert_compose_impl(const RenderAttrib *other) const { - const DepthOffsetAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const DepthOffsetAttrib *ta = (const DepthOffsetAttrib *)other; + int new_offset = ta->_offset - _offset; DepthOffsetAttrib *attrib = new DepthOffsetAttrib(new_offset, ta->_min_value, ta->_max_value); diff --git a/panda/src/pgraph/depthOffsetAttrib.h b/panda/src/pgraph/depthOffsetAttrib.h index 8ff94e8c2c..626d24707f 100644 --- a/panda/src/pgraph/depthOffsetAttrib.h +++ b/panda/src/pgraph/depthOffsetAttrib.h @@ -107,7 +107,8 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "DepthOffsetAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, + new DepthOffsetAttrib(0, 0, 1)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/depthTestAttrib.cxx b/panda/src/pgraph/depthTestAttrib.cxx index 2c80d010af..f1cb49a429 100644 --- a/panda/src/pgraph/depthTestAttrib.cxx +++ b/panda/src/pgraph/depthTestAttrib.cxx @@ -74,8 +74,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int DepthTestAttrib:: compare_to_impl(const RenderAttrib *other) const { - const DepthTestAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const DepthTestAttrib *ta = (const DepthTestAttrib *)other; + return (int)_mode - (int)ta->_mode; } diff --git a/panda/src/pgraph/depthTestAttrib.h b/panda/src/pgraph/depthTestAttrib.h index a2cea148c7..373fd48723 100644 --- a/panda/src/pgraph/depthTestAttrib.h +++ b/panda/src/pgraph/depthTestAttrib.h @@ -69,7 +69,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "DepthTestAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new DepthTestAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/depthWriteAttrib.cxx b/panda/src/pgraph/depthWriteAttrib.cxx index 8aaa94159e..db0d724a54 100644 --- a/panda/src/pgraph/depthWriteAttrib.cxx +++ b/panda/src/pgraph/depthWriteAttrib.cxx @@ -81,8 +81,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int DepthWriteAttrib:: compare_to_impl(const RenderAttrib *other) const { - const DepthWriteAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const DepthWriteAttrib *ta = (const DepthWriteAttrib *)other; + return (int)_mode - (int)ta->_mode; } diff --git a/panda/src/pgraph/depthWriteAttrib.h b/panda/src/pgraph/depthWriteAttrib.h index a9e601a971..9b6af606a5 100644 --- a/panda/src/pgraph/depthWriteAttrib.h +++ b/panda/src/pgraph/depthWriteAttrib.h @@ -75,7 +75,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "DepthWriteAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new DepthWriteAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/fogAttrib.cxx b/panda/src/pgraph/fogAttrib.cxx index 4c0cd2e0cf..c830277651 100644 --- a/panda/src/pgraph/fogAttrib.cxx +++ b/panda/src/pgraph/fogAttrib.cxx @@ -91,8 +91,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int FogAttrib:: compare_to_impl(const RenderAttrib *other) const { - const FogAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const FogAttrib *ta = (const FogAttrib *)other; // Comparing pointers by subtraction is problematic. Instead of // doing this, we'll just depend on the built-in != and < operators diff --git a/panda/src/pgraph/fogAttrib.h b/panda/src/pgraph/fogAttrib.h index 99afd79cde..0b93e24126 100644 --- a/panda/src/pgraph/fogAttrib.h +++ b/panda/src/pgraph/fogAttrib.h @@ -72,7 +72,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "FogAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new FogAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/lightAttrib.cxx b/panda/src/pgraph/lightAttrib.cxx index 4a0f0f2fe1..c063746824 100644 --- a/panda/src/pgraph/lightAttrib.cxx +++ b/panda/src/pgraph/lightAttrib.cxx @@ -696,8 +696,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// int LightAttrib:: compare_to_impl(const RenderAttrib *other) const { - const LightAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const LightAttrib *ta = (const LightAttrib *)other; if (_off_all_lights != ta->_off_all_lights) { return (int)_off_all_lights - (int)ta->_off_all_lights; @@ -803,8 +802,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) LightAttrib:: compose_impl(const RenderAttrib *other) const { - const LightAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const LightAttrib *ta = (const LightAttrib *)other; if (ta->_off_all_lights) { // If the other type turns off all lights, it doesn't matter what diff --git a/panda/src/pgraph/lightAttrib.h b/panda/src/pgraph/lightAttrib.h index 393e5436b6..af45e5570f 100644 --- a/panda/src/pgraph/lightAttrib.h +++ b/panda/src/pgraph/lightAttrib.h @@ -162,7 +162,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "LightAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 20, make_default); + _attrib_slot = register_slot(_type_handle, 20, new LightAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/lightRampAttrib.cxx b/panda/src/pgraph/lightRampAttrib.cxx index 399754a69c..3f9c15cfbb 100644 --- a/panda/src/pgraph/lightRampAttrib.cxx +++ b/panda/src/pgraph/lightRampAttrib.cxx @@ -241,8 +241,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int LightRampAttrib:: compare_to_impl(const RenderAttrib *other) const { - const LightRampAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const LightRampAttrib *ta = (const LightRampAttrib *)other; + int compare_result = ((int)_mode - (int)ta->_mode) ; if (compare_result != 0) { return compare_result; diff --git a/panda/src/pgraph/lightRampAttrib.h b/panda/src/pgraph/lightRampAttrib.h index 1fc427c1ea..bb7236cd3f 100644 --- a/panda/src/pgraph/lightRampAttrib.h +++ b/panda/src/pgraph/lightRampAttrib.h @@ -95,7 +95,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "LightRampAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new LightRampAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/materialAttrib.cxx b/panda/src/pgraph/materialAttrib.cxx index 26912d6d09..d77c47a969 100644 --- a/panda/src/pgraph/materialAttrib.cxx +++ b/panda/src/pgraph/materialAttrib.cxx @@ -92,8 +92,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int MaterialAttrib:: compare_to_impl(const RenderAttrib *other) const { - const MaterialAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const MaterialAttrib *ta = (const MaterialAttrib *)other; // Comparing pointers by subtraction is problematic. Instead of // doing this, we'll just depend on the built-in != and < operators diff --git a/panda/src/pgraph/materialAttrib.h b/panda/src/pgraph/materialAttrib.h index 5272375852..f43ec7e07c 100644 --- a/panda/src/pgraph/materialAttrib.h +++ b/panda/src/pgraph/materialAttrib.h @@ -75,7 +75,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "MaterialAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new MaterialAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/renderAttrib.I b/panda/src/pgraph/renderAttrib.I index a32e666c3c..91ab7332a0 100644 --- a/panda/src/pgraph/renderAttrib.I +++ b/panda/src/pgraph/renderAttrib.I @@ -49,20 +49,6 @@ invert_compose(const RenderAttrib *other) const { return invert_compose_impl(other); } -//////////////////////////////////////////////////////////////////// -// Function: RenderAttrib::always_reissue -// Access: Public -// Description: Returns true if the RenderAttrib should be reissued -// to the GSG with every state change, even if it is the -// same pointer as it was before; or false for the -// normal case, to reissue only when the RenderAttrib -// pointer changes. -//////////////////////////////////////////////////////////////////// -INLINE bool RenderAttrib:: -always_reissue() const { - return _always_reissue; -} - //////////////////////////////////////////////////////////////////// // Function: RenderAttrib::compare_to // Access: Published @@ -160,8 +146,7 @@ calc_hash() { // number. See RenderAttribRegistry. //////////////////////////////////////////////////////////////////// INLINE int RenderAttrib:: -register_slot(TypeHandle type_handle, int sort, - RenderAttribRegistry::MakeDefaultFunc *make_default_func) { +register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib) { RenderAttribRegistry *reg = RenderAttribRegistry::get_global_ptr(); - return reg->register_slot(type_handle, sort, make_default_func); + return reg->register_slot(type_handle, sort, default_attrib); } diff --git a/panda/src/pgraph/renderAttrib.cxx b/panda/src/pgraph/renderAttrib.cxx index 419a9094c9..c7397d0429 100644 --- a/panda/src/pgraph/renderAttrib.cxx +++ b/panda/src/pgraph/renderAttrib.cxx @@ -38,8 +38,6 @@ RenderAttrib() { init_attribs(); } _saved_entry = -1; - - _always_reissue = false; } //////////////////////////////////////////////////////////////////// @@ -435,13 +433,14 @@ return_unique(RenderAttrib *attrib) { return attrib; } - // Save the attrib in a local PointerTo so that it will be freed at - // the end of this function if no one else uses it. - CPT(RenderAttrib) pt_attrib = attrib; - int si = _attribs->find(attrib); if (si != -1) { // There's an equivalent attrib already in the set. Return it. + // If this is a newly created RenderAttrib, though, be sure to + // delete it. + if (attrib->get_ref_count() == 0) { + delete attrib; + } return _attribs->get_key(si); } @@ -456,7 +455,7 @@ return_unique(RenderAttrib *attrib) { // Save the index and return the input attrib. attrib->_saved_entry = si; - return pt_attrib; + return attrib; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/renderAttrib.h b/panda/src/pgraph/renderAttrib.h index d3d9c67c40..92386cba1e 100644 --- a/panda/src/pgraph/renderAttrib.h +++ b/panda/src/pgraph/renderAttrib.h @@ -73,8 +73,6 @@ PUBLISHED: virtual bool lower_attrib_can_override() const; public: - INLINE bool always_reissue() const; - virtual bool has_cull_callback() const; virtual bool cull_callback(CullTraverser *trav, const CullTraverserData &data) const; @@ -190,14 +188,11 @@ protected: public: INLINE static int register_slot(TypeHandle type_handle, int sort, - RenderAttribRegistry::MakeDefaultFunc *make_default_func); + RenderAttrib *default_attrib); private: void release_new(); -protected: - bool _always_reissue; - public: static void init_attribs(); @@ -218,6 +213,8 @@ private: static PStatCollector _garbage_collect_pcollector; + friend class RenderAttribRegistry; + public: virtual void write_datagram(BamWriter *manager, Datagram &dg); static TypedWritable *change_this(TypedWritable *old_ptr, BamReader *manager); diff --git a/panda/src/pgraph/renderAttribRegistry.I b/panda/src/pgraph/renderAttribRegistry.I index ba8da15691..6b3da8d567 100644 --- a/panda/src/pgraph/renderAttribRegistry.I +++ b/panda/src/pgraph/renderAttribRegistry.I @@ -30,7 +30,7 @@ get_slot(TypeHandle type_handle) const { //////////////////////////////////////////////////////////////////// // Function: RenderAttribRegistry::get_max_slots -// Access: Published +// Access: Published, Static // Description: Returns the maximum number that any slot number is // allowed to grow. Actually, this number will be one // higher than the highest possible slot number. This @@ -41,8 +41,8 @@ get_slot(TypeHandle type_handle) const { // This number will not change during the lifetime of // the application. //////////////////////////////////////////////////////////////////// -INLINE int RenderAttribRegistry:: -get_max_slots() const { +CONSTEXPR int RenderAttribRegistry:: +get_max_slots() { return _max_slots; } @@ -80,6 +80,20 @@ get_slot_sort(int slot) const { return _registry[slot]._sort; } +//////////////////////////////////////////////////////////////////// +// Function: RenderAttribRegistry::get_slot_default +// Access: Published +// Description: Returns the default RenderAttrib object associated +// with slot n. This is the attrib that should be +// applied in the absence of any other attrib of this +// type. +//////////////////////////////////////////////////////////////////// +INLINE const RenderAttrib *RenderAttribRegistry:: +get_slot_default(int slot) const { + nassertr(slot >= 0 && slot < (int)_registry.size(), 0); + return _registry[slot]._default_attrib; +} + //////////////////////////////////////////////////////////////////// // Function: RenderAttribRegistry::get_num_sorted_slots // Access: Published @@ -104,18 +118,6 @@ get_sorted_slot(int n) const { return _sorted_slots[n]; } -//////////////////////////////////////////////////////////////////// -// Function: RenderAttribRegistry::get_array_chain -// Access: Published -// Description: Returns the DeletedBufferChain object that may be -// used to allocated appropriately-sized arrays of -// RenderState::Attribute objects. -//////////////////////////////////////////////////////////////////// -INLINE DeletedBufferChain *RenderAttribRegistry:: -get_array_chain() const { - return _array_chain; -} - //////////////////////////////////////////////////////////////////// // Function: RenderAttribRegistry::get_global_ptr // Access: Published, Static @@ -154,9 +156,21 @@ SortSlots(RenderAttribRegistry *reg) : _reg(reg) { //////////////////////////////////////////////////////////////////// // Function: RenderAttribRegistry::SortSlots::operator () // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool RenderAttribRegistry::SortSlots:: operator () (int a, int b) const { return _reg->get_slot_sort(a) < _reg->get_slot_sort(b); } + +//////////////////////////////////////////////////////////////////// +// Function: RenderAttribRegistry::RegistryNode::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE RenderAttribRegistry::RegistryNode:: +RegistryNode(TypeHandle type, int sort, const RenderAttrib *default_attrib) : + _type(type), + _sort(sort), + _default_attrib(default_attrib) { +} diff --git a/panda/src/pgraph/renderAttribRegistry.cxx b/panda/src/pgraph/renderAttribRegistry.cxx index 7dd633fb0e..fc7f8d1076 100644 --- a/panda/src/pgraph/renderAttribRegistry.cxx +++ b/panda/src/pgraph/renderAttribRegistry.cxx @@ -26,37 +26,12 @@ RenderAttribRegistry *RenderAttribRegistry::_global_ptr; //////////////////////////////////////////////////////////////////// RenderAttribRegistry:: RenderAttribRegistry() { - ConfigVariableInt max_attribs - ("max-attribs", SlotMask::get_max_num_bits(), - PRC_DESC("This specifies the maximum number of different RenderAttrib " - "types that may be defined at runtime. Normally you should " - "never need to change this, but if the default value is too " - "low for the number of attribs that Panda actually defines, " - "you may need to raise this number.")); - - // Assign this number once, at startup, and never change it again. - _max_slots = max((int)max_attribs, 1); - if (_max_slots > SlotMask::get_max_num_bits()) { - pgraph_cat->warning() - << "Value for max-attribs too large: cannot exceed " - << SlotMask::get_max_num_bits() - << " in this build. To raise this limit, change the typedef " - << "for SlotMask in renderAttribRegistry.h and recompile.\n"; - - _max_slots = SlotMask::get_max_num_bits(); - } - - // Get a DeletedBufferChain to manage the arrays of RenderAttribs that are - // allocated within each RenderState object. - init_memory_hook(); - _array_chain = memory_hook->get_deleted_chain(_max_slots * sizeof(RenderState::Attribute)); + _registry.reserve(_max_slots); + _sorted_slots.reserve(_max_slots); // Reserve slot 0 for TypeHandle::none(), and for types that exceed // max_slots. - RegistryNode node; - node._sort = 0; - node._make_default_func = NULL; - _registry.push_back(node); + _registry.push_back(RegistryNode(TypeHandle::none(), 0, NULL)); } //////////////////////////////////////////////////////////////////// @@ -86,9 +61,9 @@ RenderAttribRegistry:: // RenderAttribs (that is, those which are more // expensive to change) have lower sort values. // -// The make_default_func pointer is a function that may -// be called to generate a default RenderAttrib to apply -// in the absence of any other attrib of this type. +// The default_attrib pointer should be a newly +// created instance of this attribute that represents +// the default state for this attribute. // // register_slot() is intended to be called at // application start for each different RenderAttrib @@ -96,8 +71,11 @@ RenderAttribRegistry:: // slot number to each one. //////////////////////////////////////////////////////////////////// int RenderAttribRegistry:: -register_slot(TypeHandle type_handle, int sort, - RenderAttribRegistry::MakeDefaultFunc *make_default_func) { +register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib) { + // Sanity check; if this triggers, you either passed a wrong argument, + // or you didn't use the type system correctly. + nassertr(default_attrib->get_type() == type_handle, 0); + int type_index = type_handle.get_index(); while (type_index >= (int)_slots_by_type.size()) { _slots_by_type.push_back(0); @@ -111,19 +89,33 @@ register_slot(TypeHandle type_handle, int sort, int slot = (int)_registry.size(); if (slot >= _max_slots) { pgraph_cat->error() - << "Too many registered RenderAttribs; not registering " + << "Too many registered RenderAttribs; not registering " << type_handle << "\n"; nassertr(false, 0); return 0; } + // Register the default attribute. We don't use return_unique and + // register it even if the state cache is disabled, because we can't read + // the state_cache config variable yet at this time. It probably doesn't + // hurt to have these 32 entries around in the attrib cache. + if (default_attrib != (RenderAttrib *)NULL) { + default_attrib->calc_hash(); + + if (default_attrib->_saved_entry == -1) { + // If this attribute was already registered, something odd is going on. + nassertr(RenderAttrib::_attribs->find(default_attrib) == -1, 0); + default_attrib->_saved_entry = + RenderAttrib::_attribs->store(default_attrib, RenderAttrib::Empty()); + } + + // It effectively lives forever. Might as well make it official. + default_attrib->local_object(); + } + _slots_by_type[type_index] = slot; - RegistryNode node; - node._type = type_handle; - node._sort = sort; - node._make_default_func = make_default_func; - _registry.push_back(node); + _registry.push_back(RegistryNode(type_handle, sort, default_attrib)); _sorted_slots.push_back(slot); ::sort(_sorted_slots.begin(), _sorted_slots.end(), SortSlots(this)); @@ -143,27 +135,12 @@ set_slot_sort(int slot, int sort) { // Re-sort the slot list. _sorted_slots.clear(); - _sorted_slots.reserve(_registry.size() - 1); for (int i = 1; i < (int)_registry.size(); ++i) { _sorted_slots.push_back(i); } ::sort(_sorted_slots.begin(), _sorted_slots.end(), SortSlots(this)); } -//////////////////////////////////////////////////////////////////// -// Function: RenderAttribRegistry::get_slot_default -// Access: Published -// Description: Returns the default RenderAttrib object associated -// with slot n. This is the attrib that should be -// applied in the absence of any other attrib of this -// type. -//////////////////////////////////////////////////////////////////// -CPT(RenderAttrib) RenderAttribRegistry:: -get_slot_default(int slot) const { - nassertr(slot >= 0 && slot < (int)_registry.size(), 0); - return (*_registry[slot]._make_default_func)(); -} - //////////////////////////////////////////////////////////////////// // Function: RenderAttribRegistry::init_global_ptr // Access: Private, Static diff --git a/panda/src/pgraph/renderAttribRegistry.h b/panda/src/pgraph/renderAttribRegistry.h index 207171c505..7c8f049ddb 100644 --- a/panda/src/pgraph/renderAttribRegistry.h +++ b/panda/src/pgraph/renderAttribRegistry.h @@ -48,24 +48,26 @@ public: // or a DoubleBitMask will be faster on a 32-bit machine. typedef BitMask32 SlotMask; + // Raise this number whenever we add a new attrib. This used to be + // determined at runtime, but it's better to have it as a constexpr. + static const int _max_slots = 29; + int register_slot(TypeHandle type_handle, int sort, - MakeDefaultFunc *make_default_func); + RenderAttrib *default_attrib); PUBLISHED: INLINE int get_slot(TypeHandle type_handle) const; - INLINE int get_max_slots() const; + static CONSTEXPR int get_max_slots(); INLINE int get_num_slots() const; INLINE TypeHandle get_slot_type(int slot) const; INLINE int get_slot_sort(int slot) const; void set_slot_sort(int slot, int sort); - CPT(RenderAttrib) get_slot_default(int slot) const; + INLINE const RenderAttrib *get_slot_default(int slot) const; INLINE int get_num_sorted_slots() const; INLINE int get_sorted_slot(int n) const; - INLINE DeletedBufferChain *get_array_chain() const; - INLINE static RenderAttribRegistry *get_global_ptr(); public: @@ -75,8 +77,6 @@ private: static void init_global_ptr(); private: - int _max_slots; - class SortSlots { public: INLINE SortSlots(RenderAttribRegistry *reg); @@ -86,9 +86,12 @@ private: class RegistryNode { public: + INLINE RegistryNode(TypeHandle type, int sort, + const RenderAttrib *default_attrib); + TypeHandle _type; int _sort; - MakeDefaultFunc *_make_default_func; + const RenderAttrib *_default_attrib; }; typedef pvector Registry; Registry _registry; @@ -96,12 +99,9 @@ private: vector_int _slots_by_type; vector_int _sorted_slots; - DeletedBufferChain *_array_chain; - static RenderAttribRegistry *_global_ptr; }; #include "renderAttribRegistry.I" #endif - diff --git a/panda/src/pgraph/renderModeAttrib.cxx b/panda/src/pgraph/renderModeAttrib.cxx index cb91cdcf6e..83a3fe9282 100644 --- a/panda/src/pgraph/renderModeAttrib.cxx +++ b/panda/src/pgraph/renderModeAttrib.cxx @@ -128,8 +128,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int RenderModeAttrib:: compare_to_impl(const RenderAttrib *other) const { - const RenderModeAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const RenderModeAttrib *ta = (const RenderModeAttrib *)other; + if (_mode != ta->_mode) { return (int)_mode - (int)ta->_mode; } @@ -186,8 +186,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) RenderModeAttrib:: compose_impl(const RenderAttrib *other) const { - const RenderModeAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const RenderModeAttrib *ta = (const RenderModeAttrib *)other; // The special mode M_unchanged means to keep the current mode. Mode mode = ta->get_mode(); diff --git a/panda/src/pgraph/renderModeAttrib.h b/panda/src/pgraph/renderModeAttrib.h index 401b1d0152..1003abc328 100644 --- a/panda/src/pgraph/renderModeAttrib.h +++ b/panda/src/pgraph/renderModeAttrib.h @@ -106,7 +106,8 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "RenderModeAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, + new RenderModeAttrib(M_filled, 1, false)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/renderState.I b/panda/src/pgraph/renderState.I index 6bce566751..bc7bbad4fe 100644 --- a/panda/src/pgraph/renderState.I +++ b/panda/src/pgraph/renderState.I @@ -58,35 +58,9 @@ has_cull_callback() const { //////////////////////////////////////////////////////////////////// INLINE CPT(RenderState) RenderState:: make_empty() { - // The empty state is asked for so often, we make it a special case - // and store a pointer forever once we find it the first time. - if (_empty_state == (RenderState *)NULL) { - RenderState *state = new RenderState; - _empty_state = return_unique(state); - } - return _empty_state; } -//////////////////////////////////////////////////////////////////// -// Function: RenderState::make_full_default -// Access: Published, Static -// Description: Returns a RenderState with all possible attributes -// set to their default value. -//////////////////////////////////////////////////////////////////// -INLINE CPT(RenderState) RenderState:: -make_full_default() { - // The empty state is asked for so often, we make it a special case - // and store a pointer forever once we find it the first time. - if (_full_default_state == (RenderState *)NULL) { - RenderState *state = new RenderState; - state->fill_default(); - _full_default_state = return_unique(state); - } - - return _full_default_state; -} - //////////////////////////////////////////////////////////////////// // Function: RenderState::remove_attrib // Access: Published @@ -144,7 +118,7 @@ get_attrib(TypeHandle type) const { // index, or NULL if there is no such RenderAttrib in // the state. //////////////////////////////////////////////////////////////////// -INLINE const RenderAttrib *RenderState:: +ALWAYS_INLINE const RenderAttrib *RenderState:: get_attrib(int slot) const { return _attributes[slot]._attrib; } @@ -161,7 +135,8 @@ get_attrib_def(int slot) const { if (_attributes[slot]._attrib != (RenderAttrib *)NULL) { return _attributes[slot]._attrib; } - return make_full_default()->get_attrib(slot); + RenderAttribRegistry *reg = RenderAttribRegistry::quick_get_global_ptr(); + return reg->get_slot_default(slot); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index a7cf3ecddc..69a5f502f7 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -40,8 +40,7 @@ LightReMutex *RenderState::_states_lock = NULL; RenderState::States *RenderState::_states = NULL; -CPT(RenderState) RenderState::_empty_state; -CPT(RenderState) RenderState::_full_default_state; +const RenderState *RenderState::_empty_state = NULL; UpdateSeq RenderState::_last_cycle_detect; int RenderState::_garbage_index = 0; @@ -72,20 +71,11 @@ RenderState() : _auto_shader_state(NULL), _lock("RenderState") { - // Allocate the _attributes array. - RenderAttribRegistry *reg = RenderAttribRegistry::get_global_ptr(); - _attributes = (Attribute *)reg->get_array_chain()->allocate(reg->get_max_slots() * sizeof(Attribute), get_class_type()); - - // Also make sure each element gets initialized. - for (int i = 0; i < reg->get_max_slots(); ++i) { - new(&_attributes[i]) Attribute(); - } - if (_states == (States *)NULL) { init_states(); } _saved_entry = -1; - _last_mi = _mungers.end(); + _last_mi = -1; _cache_stats.add_num_states(1); _read_overrides = NULL; _generated_shader = NULL; @@ -103,17 +93,13 @@ RenderState(const RenderState ©) : _auto_shader_state(NULL), _lock("RenderState") { - // Allocate the _attributes array. - RenderAttribRegistry *reg = RenderAttribRegistry::get_global_ptr(); - _attributes = (Attribute *)reg->get_array_chain()->allocate(reg->get_max_slots() * sizeof(Attribute), get_class_type()); - - // Also make sure each element gets initialized, as a copy. - for (int i = 0; i < reg->get_max_slots(); ++i) { - new(&_attributes[i]) Attribute(copy._attributes[i]); + // Copy over the attributes. + for (int i = 0; i < RenderAttribRegistry::_max_slots; ++i) { + _attributes[i] = copy._attributes[i]; } _saved_entry = -1; - _last_mi = _mungers.end(); + _last_mi = -1; _cache_stats.add_num_states(1); _read_overrides = NULL; _generated_shader = NULL; @@ -159,14 +145,6 @@ RenderState:: // longer true now, probably we've been double-deleted. nassertv(get_ref_count() == 0); _cache_stats.add_num_states(-1); - - // Free the _attributes array. - RenderAttribRegistry *reg = RenderAttribRegistry::get_global_ptr(); - for (int i = 0; i < reg->get_max_slots(); ++i) { - _attributes[i].~Attribute(); - } - reg->get_array_chain()->deallocate(_attributes, get_class_type()); - _attributes = NULL; } //////////////////////////////////////////////////////////////////// @@ -360,7 +338,7 @@ make(const RenderAttrib *attrib1, CPT(RenderState) RenderState:: make(const RenderAttrib * const *attrib, int num_attribs, int override) { if (num_attribs == 0) { - return make_empty(); + return _empty_state; } RenderState *state = new RenderState; for (int i = 0; i < num_attribs; i++) { @@ -490,7 +468,7 @@ invert_compose(const RenderState *other) const { if (other == this) { // a->invert_compose(a) always produces identity. - return make_empty(); + return _empty_state; } if (!state_cache) { @@ -633,7 +611,7 @@ remove_attrib(int slot) const { // Will this bring us down to the empty state? if (_filled_slots.get_num_on_bits() == 1) { - return make_empty(); + return _empty_state; } RenderState *new_state = new RenderState(*this); @@ -1110,7 +1088,7 @@ clear_munger_cache() { } RenderState *state = (RenderState *)(_states->get_key(si)); state->_mungers.clear(); - state->_last_mi = state->_mungers.end(); + state->_last_mi = -1; } } @@ -1314,17 +1292,17 @@ validate_states() { //////////////////////////////////////////////////////////////////// int RenderState:: get_geom_rendering(int geom_rendering) const { - const RenderModeAttrib *render_mode = DCAST(RenderModeAttrib, get_attrib(RenderModeAttrib::get_class_slot())); - const TexGenAttrib *tex_gen = DCAST(TexGenAttrib, get_attrib(TexGenAttrib::get_class_slot())); - const TexMatrixAttrib *tex_matrix = DCAST(TexMatrixAttrib, get_attrib(TexMatrixAttrib::get_class_slot())); + const RenderModeAttrib *render_mode; + const TexGenAttrib *tex_gen; + const TexMatrixAttrib *tex_matrix; - if (render_mode != (const RenderModeAttrib *)NULL) { + if (get_attrib(render_mode)) { geom_rendering = render_mode->get_geom_rendering(geom_rendering); } - if (tex_gen != (const TexGenAttrib *)NULL) { + if (get_attrib(tex_gen)) { geom_rendering = tex_gen->get_geom_rendering(geom_rendering); } - if (tex_matrix != (const TexMatrixAttrib *)NULL) { + if (get_attrib(tex_matrix)) { geom_rendering = tex_matrix->get_geom_rendering(geom_rendering); } @@ -1507,7 +1485,7 @@ return_new(RenderState *state) { //////////////////////////////////////////////////////////////////// CPT(RenderState) RenderState:: return_unique(RenderState *state) { - nassertr(state != (RenderState *)NULL, state); + nassertr(state != (RenderState *)NULL, NULL); if (!state_cache) { return state; @@ -1523,14 +1501,10 @@ return_unique(RenderState *state) { if (state->_saved_entry != -1) { // This state is already in the cache. - //nassertr(_states->find(state) == state->_saved_entry, state); + //nassertr(_states->find(state) == state->_saved_entry, pt_state); return state; } - // Save the state in a local PointerTo so that it will be freed at - // the end of this function if no one else uses it. - CPT(RenderState) pt_state = state; - // Ensure each of the individual attrib pointers has been uniquified // before we add the state to the cache. if (!uniquify_attribs && !state->is_empty()) { @@ -1538,7 +1512,7 @@ return_unique(RenderState *state) { int slot = mask.get_lowest_on_bit(); while (slot >= 0) { Attribute &attrib = state->_attributes[slot]; - nassertr(attrib._attrib != (RenderAttrib *)NULL, state); + nassertd(attrib._attrib != (RenderAttrib *)NULL) continue; attrib._attrib = attrib._attrib->get_unique(); mask.clear_bit(slot); slot = mask.get_lowest_on_bit(); @@ -1548,6 +1522,11 @@ return_unique(RenderState *state) { int si = _states->find(state); if (si != -1) { // There's an equivalent state already in the set. Return it. + // The state that was passed may be newly created and therefore + // may not be automatically deleted. Do that if necessary. + if (state->get_ref_count() == 0) { + delete state; + } return _states->get_key(si); } @@ -1562,7 +1541,7 @@ return_unique(RenderState *state) { // Save the index and return the input state. state->_saved_entry = si; - return pt_state; + return state; } //////////////////////////////////////////////////////////////////// @@ -1621,15 +1600,6 @@ do_compose(const RenderState *other) const { slot = mask.get_lowest_on_bit(); } - // If we have any ShaderAttrib with auto-shader enabled, - // remove any shader inputs on it. This is a workaround for an - // issue that makes the shader-generator regenerate the shader - // every time a shader input changes. - CPT(ShaderAttrib) sattrib = DCAST(ShaderAttrib, new_state->get_attrib_def(ShaderAttrib::get_class_slot())); - if (sattrib->auto_shader()) { - sattrib = DCAST(ShaderAttrib, sattrib->clear_all_shader_inputs()); - } - return return_new(new_state); } @@ -1660,9 +1630,8 @@ do_invert_compose(const RenderState *other) const { } else if (b._attrib == NULL) { // A wins. Invert it. - CPT(RenderState) full_default = make_full_default(); - CPT(RenderAttrib) default_attrib = full_default->get_attrib(slot); - result.set(a._attrib->invert_compose(default_attrib), 0); + RenderAttribRegistry *reg = RenderAttribRegistry::quick_get_global_ptr(); + result.set(a._attrib->invert_compose(reg->get_slot_default(slot)), 0); } else { // Both are good. (Overrides are not used in invert_compose.) @@ -2162,8 +2131,14 @@ init_states() { _states_lock = new LightReMutex("RenderState::_states_lock"); _cache_stats.init(); nassertv(Thread::get_current_thread() == Thread::get_main_thread()); -} + // Initialize the empty state object as well. It is used so often + // that it is declared globally, and lives forever. + RenderState *state = new RenderState; + state->local_object(); + state->_saved_entry = _states->store(state, Empty()); + _empty_state = state; +} //////////////////////////////////////////////////////////////////// // Function: RenderState::register_with_read_factory diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index 4a59fb5302..bd97d7594e 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -31,10 +31,11 @@ #include "lightMutex.h" #include "deletedChain.h" #include "simpleHashMap.h" +#include "weakKeyHashMap.h" #include "cacheStats.h" #include "renderAttribRegistry.h" +#include "graphicsStateGuardianBase.h" -class GraphicsStateGuardianBase; class FactoryParams; class ShaderAttrib; @@ -76,7 +77,6 @@ PUBLISHED: bool cull_callback(CullTraverser *trav, const CullTraverserData &data) const; INLINE static CPT(RenderState) make_empty(); - INLINE static CPT(RenderState) make_full_default(); static CPT(RenderState) make(const RenderAttrib *attrib, int override = 0); static CPT(RenderState) make(const RenderAttrib *attrib1, const RenderAttrib *attrib2, int override = 0); @@ -104,7 +104,7 @@ PUBLISHED: INLINE bool has_attrib(TypeHandle type) const; INLINE bool has_attrib(int slot) const; INLINE const RenderAttrib *get_attrib(TypeHandle type) const; - INLINE const RenderAttrib *get_attrib(int slot) const; + ALWAYS_INLINE const RenderAttrib *get_attrib(int slot) const; INLINE const RenderAttrib *get_attrib_def(int slot) const; INLINE int get_override(TypeHandle type) const; INLINE int get_override(int slot) const; @@ -233,8 +233,7 @@ private: }; typedef SimpleHashMap > States; static States *_states; - static CPT(RenderState) _empty_state; - static CPT(RenderState) _full_default_state; + static const RenderState *_empty_state; // This iterator records the entry corresponding to this // RenderState object in the above global set. We keep the index @@ -270,9 +269,9 @@ private: // since there are likely to be far fewer GSG's than RenderStates. // The code to manage this map lives in // GraphicsStateGuardian::get_geom_munger(). - typedef pmap Mungers; + typedef WeakKeyHashMap Mungers; mutable Mungers _mungers; - mutable Mungers::const_iterator _last_mi; + mutable int _last_mi; // This is used to mark nodes as we visit them to detect cycles. UpdateSeq _cycle_detect; @@ -307,7 +306,7 @@ private: CPT(RenderAttrib) _attrib; int _override; }; - Attribute *_attributes; + Attribute _attributes[RenderAttribRegistry::_max_slots]; // We also store a bitmask of the non-NULL attributes in the above // array. This is redundant, but it is a useful cache. diff --git a/panda/src/pgraph/rescaleNormalAttrib.I b/panda/src/pgraph/rescaleNormalAttrib.I index ed9633bf81..2825f44431 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.I +++ b/panda/src/pgraph/rescaleNormalAttrib.I @@ -25,6 +25,19 @@ RescaleNormalAttrib(RescaleNormalAttrib::Mode mode) : { } +//////////////////////////////////////////////////////////////////// +// Function: RescaleNormalAttrib::make_default +// Access: Published, Static +// Description: Constructs a RescaleNormalAttrib object that's +// suitable for putting at the top of a scene graph. +// This will contain whatever attrib was suggested by +// the user's rescale-normals Config variable. +//////////////////////////////////////////////////////////////////// +INLINE CPT(RenderAttrib) RescaleNormalAttrib:: +make_default() { + return RenderAttribRegistry::quick_get_global_ptr()->get_slot_default(_attrib_slot); +} + //////////////////////////////////////////////////////////////////// // Function: RescaleNormalAttrib::get_mode // Access: Published diff --git a/panda/src/pgraph/rescaleNormalAttrib.cxx b/panda/src/pgraph/rescaleNormalAttrib.cxx index 7c20896810..33de69efe7 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.cxx +++ b/panda/src/pgraph/rescaleNormalAttrib.cxx @@ -25,18 +25,7 @@ TypeHandle RescaleNormalAttrib::_type_handle; int RescaleNormalAttrib::_attrib_slot; - -// This variable is defined here instead of in config_pgraph.cxx, -// because it depends on rescaleNormalAttrib.h having already been -// included. -static ConfigVariableEnum rescale_normals -("rescale-normals", RescaleNormalAttrib::M_auto, - PRC_DESC("Specifies the kind of RescaleNormalAttrib that should be " - "created for the top of the scene graph. This can automatically " - "ensure that your lighting normals are unit-length, which may be " - "particularly necessary in the presence of scales in the scene " - "graph. Turning it off ('none') may produce a small performance " - "benefit.")); +CPT(RenderAttrib) RescaleNormalAttrib::_attribs[RescaleNormalAttrib::M_auto + 1]; //////////////////////////////////////////////////////////////////// // Function: RescaleNormalAttrib::make @@ -47,28 +36,18 @@ static ConfigVariableEnum rescale_normals //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) RescaleNormalAttrib:: make(RescaleNormalAttrib::Mode mode) { - RescaleNormalAttrib *attrib = new RescaleNormalAttrib(mode); - return return_new(attrib); -} - -//////////////////////////////////////////////////////////////////// -// Function: RescaleNormalAttrib::make_default -// Access: Published, Static -// Description: Constructs a RescaleNoramlAttrib object that's -// suitable for putting at the top of a scene graph. -// This will contain whatever attrib was suggested by -// the user's rescale-normals Config variable. -//////////////////////////////////////////////////////////////////// -CPT(RenderAttrib) RescaleNormalAttrib:: -make_default() { - RescaleNormalAttrib *attrib = new RescaleNormalAttrib(rescale_normals); - return return_new(attrib); + if (_attribs[mode].is_null()) { + // Don't bother with return_new, since this is the only way a + // RescaleNormalAttrib can be made anyway. + _attribs[mode] = new RescaleNormalAttrib(mode); + } + return _attribs[mode]; } //////////////////////////////////////////////////////////////////// // Function: RescaleNormalAttrib::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RescaleNormalAttrib:: output(ostream &out) const { @@ -92,8 +71,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int RescaleNormalAttrib:: compare_to_impl(const RenderAttrib *other) const { - const RescaleNormalAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const RescaleNormalAttrib *ta = (const RescaleNormalAttrib *)other; return (int)_mode - (int)ta->_mode; } @@ -187,6 +165,35 @@ fillin(DatagramIterator &scan, BamReader *manager) { _mode = (Mode)scan.get_int8(); } +//////////////////////////////////////////////////////////////////// +// Function: RescaleNormalAttrib::init_type +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +void RescaleNormalAttrib:: +init_type() { + RenderAttrib::init_type(); + register_type(_type_handle, "RescaleNormalAttrib", + RenderAttrib::get_class_type()); + + // This is defined here, since we have otherwise no guarantee that + // the config var has already been constructed by the time we call + // init_type() at static init time. + static ConfigVariableEnum rescale_normals + ("rescale-normals", RescaleNormalAttrib::M_auto, + PRC_DESC("Specifies the kind of RescaleNormalAttrib that should be " + "created for the top of the scene graph. This can automatically " + "ensure that your lighting normals are unit-length, which may be " + "particularly necessary in the presence of scales in the scene " + "graph. Turning it off ('none') may produce a small performance " + "benefit.")); + + Mode mode = rescale_normals; + RescaleNormalAttrib *attrib = new RescaleNormalAttrib(mode); + _attrib_slot = register_slot(_type_handle, 100, attrib); + _attribs[mode] = attrib; +} + //////////////////////////////////////////////////////////////////// // Function: RescaleNormalAttrib::Mode output operator // Description: diff --git a/panda/src/pgraph/rescaleNormalAttrib.h b/panda/src/pgraph/rescaleNormalAttrib.h index 04f5575614..4634d504bb 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.h +++ b/panda/src/pgraph/rescaleNormalAttrib.h @@ -49,7 +49,7 @@ private: PUBLISHED: static CPT(RenderAttrib) make(Mode mode); - static CPT(RenderAttrib) make_default(); + INLINE static CPT(RenderAttrib) make_default(); INLINE Mode get_mode() const; @@ -64,6 +64,10 @@ protected: private: Mode _mode; + // There are so few possible combinations, and it's used fairly often, so + // we keep an array of the possible attributes. + static CPT(RenderAttrib) _attribs[M_auto + 1]; + PUBLISHED: static int get_class_slot() { return _attrib_slot; @@ -79,17 +83,12 @@ public: protected: static TypedWritable *make_from_bam(const FactoryParams ¶ms); void fillin(DatagramIterator &scan, BamReader *manager); - + public: static TypeHandle get_class_type() { return _type_handle; } - static void init_type() { - RenderAttrib::init_type(); - register_type(_type_handle, "RescaleNormalAttrib", - RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); - } + static void init_type(); virtual TypeHandle get_type() const { return get_class_type(); } diff --git a/panda/src/pgraph/scissorAttrib.cxx b/panda/src/pgraph/scissorAttrib.cxx index 24b5111f99..29814d9668 100644 --- a/panda/src/pgraph/scissorAttrib.cxx +++ b/panda/src/pgraph/scissorAttrib.cxx @@ -113,8 +113,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ScissorAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ScissorAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ScissorAttrib *ta = (const ScissorAttrib *)other; if (!_off && !ta->_off) { return 0; @@ -173,8 +172,7 @@ compose_impl(const RenderAttrib *other) const { return other; } - const ScissorAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ScissorAttrib *ta = (const ScissorAttrib *)other; if (ta->_off) { return this; diff --git a/panda/src/pgraph/scissorAttrib.h b/panda/src/pgraph/scissorAttrib.h index e3e63f6685..88475a50fc 100644 --- a/panda/src/pgraph/scissorAttrib.h +++ b/panda/src/pgraph/scissorAttrib.h @@ -89,7 +89,10 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ScissorAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + + ScissorAttrib *attrib = new ScissorAttrib(LVecBase4(0, 1, 0, 1)); + attrib->_off = true; + _attrib_slot = register_slot(_type_handle, 100, attrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/shadeModelAttrib.cxx b/panda/src/pgraph/shadeModelAttrib.cxx index 1787ec3411..24f6ef3585 100644 --- a/panda/src/pgraph/shadeModelAttrib.cxx +++ b/panda/src/pgraph/shadeModelAttrib.cxx @@ -84,8 +84,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int ShadeModelAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ShadeModelAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ShadeModelAttrib *ta = (const ShadeModelAttrib *)other; return (int)_mode - (int)ta->_mode; } @@ -125,8 +124,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) ShadeModelAttrib:: compose_impl(const RenderAttrib *other) const { - const ShadeModelAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const ShadeModelAttrib *ta = (const ShadeModelAttrib *)other; Mode mode = ta->get_mode(); return make(mode); diff --git a/panda/src/pgraph/shadeModelAttrib.h b/panda/src/pgraph/shadeModelAttrib.h index b120b5555b..b2edff59ed 100644 --- a/panda/src/pgraph/shadeModelAttrib.h +++ b/panda/src/pgraph/shadeModelAttrib.h @@ -77,7 +77,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ShadeModelAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new ShadeModelAttrib(M_smooth)); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/shaderAttrib.cxx b/panda/src/pgraph/shaderAttrib.cxx index 82f05cfbad..21145802d6 100644 --- a/panda/src/pgraph/shaderAttrib.cxx +++ b/panda/src/pgraph/shaderAttrib.cxx @@ -542,8 +542,7 @@ get_shader() const { //////////////////////////////////////////////////////////////////// int ShaderAttrib:: compare_to_impl(const RenderAttrib *other) const { - const ShaderAttrib *that; - DCAST_INTO_R(that, other, 0); + const ShaderAttrib *that = (const ShaderAttrib *)other; if (this->_shader != that->_shader) { return (this->_shader < that->_shader) ? -1 : 1; @@ -643,8 +642,8 @@ get_hash_impl() const { CPT(RenderAttrib) ShaderAttrib:: compose_impl(const RenderAttrib *other) const { ShaderAttrib *attr = new ShaderAttrib(*this); - const ShaderAttrib *over; - DCAST_INTO_R(over, other, 0); + const ShaderAttrib *over = (const ShaderAttrib *)other; + // Update the shader portion. if (over->_has_shader) { if ((attr->_has_shader == false) || diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index d146e80bab..fd6b26dffc 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -156,7 +156,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "ShaderAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 10, make_default); + _attrib_slot = register_slot(_type_handle, 10, new ShaderAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/stateMunger.cxx b/panda/src/pgraph/stateMunger.cxx index e6ef2321ff..4ab909127b 100644 --- a/panda/src/pgraph/stateMunger.cxx +++ b/panda/src/pgraph/stateMunger.cxx @@ -32,18 +32,15 @@ StateMunger:: //////////////////////////////////////////////////////////////////// CPT(RenderState) StateMunger:: munge_state(const RenderState *state) { - WCPT(RenderState) pt_state = state; - - StateMap::iterator mi = _state_map.find(pt_state); - if (mi != _state_map.end()) { - if (!(*mi).first.was_deleted() && - !(*mi).second.was_deleted()) { - return (*mi).second.p(); + int mi = _state_map.find(state); + if (mi != -1) { + if (!_state_map.get_data(mi).was_deleted()) { + return _state_map.get_data(mi).p(); } } CPT(RenderState) result = munge_state_impl(state); - _state_map[pt_state] = result; + _state_map.store(state, result.p()); return result; } diff --git a/panda/src/pgraph/stateMunger.h b/panda/src/pgraph/stateMunger.h index 3385890deb..3a317ffa14 100644 --- a/panda/src/pgraph/stateMunger.h +++ b/panda/src/pgraph/stateMunger.h @@ -18,7 +18,7 @@ #include "pandabase.h" #include "geomMunger.h" #include "renderState.h" -#include "weakPointerTo.h" +#include "weakKeyHashMap.h" //////////////////////////////////////////////////////////////////// // Class : StateMunger @@ -36,7 +36,7 @@ public: protected: virtual CPT(RenderState) munge_state_impl(const RenderState *state); - typedef pmap< WCPT(RenderState), WCPT(RenderState) > StateMap; + typedef WeakKeyHashMap StateMap; StateMap _state_map; public: diff --git a/panda/src/pgraph/stencilAttrib.cxx b/panda/src/pgraph/stencilAttrib.cxx index 07657fbf96..481626047e 100644 --- a/panda/src/pgraph/stencilAttrib.cxx +++ b/panda/src/pgraph/stencilAttrib.cxx @@ -311,8 +311,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int StencilAttrib:: compare_to_impl(const RenderAttrib *other) const { - const StencilAttrib *sa; - DCAST_INTO_R(sa, other, 0); + const StencilAttrib *sa = (const StencilAttrib *)other; int a; int b; diff --git a/panda/src/pgraph/stencilAttrib.h b/panda/src/pgraph/stencilAttrib.h index 5e456b29d6..ea19401ccd 100644 --- a/panda/src/pgraph/stencilAttrib.h +++ b/panda/src/pgraph/stencilAttrib.h @@ -175,7 +175,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "StencilAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new StencilAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/texGenAttrib.cxx b/panda/src/pgraph/texGenAttrib.cxx index ca22d7942c..5cd538f600 100644 --- a/panda/src/pgraph/texGenAttrib.cxx +++ b/panda/src/pgraph/texGenAttrib.cxx @@ -297,8 +297,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int TexGenAttrib:: compare_to_impl(const RenderAttrib *other) const { - const TexGenAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TexGenAttrib *ta = (const TexGenAttrib *)other; Stages::const_iterator ai, bi; ai = _stages.begin(); @@ -383,8 +382,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) TexGenAttrib:: compose_impl(const RenderAttrib *other) const { - const TexGenAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TexGenAttrib *ta = (const TexGenAttrib *)other; // The composition is the union of the two attribs. In the case // when a stage is in both attribs, we compose the stages. @@ -441,8 +439,7 @@ compose_impl(const RenderAttrib *other) const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) TexGenAttrib:: invert_compose_impl(const RenderAttrib *other) const { - const TexGenAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TexGenAttrib *ta = (const TexGenAttrib *)other; // The inverse composition works a lot like the composition, except // we invert the ai stages. diff --git a/panda/src/pgraph/texGenAttrib.h b/panda/src/pgraph/texGenAttrib.h index 71840a83aa..be92aff106 100644 --- a/panda/src/pgraph/texGenAttrib.h +++ b/panda/src/pgraph/texGenAttrib.h @@ -139,7 +139,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "TexGenAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new TexGenAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/texMatrixAttrib.cxx b/panda/src/pgraph/texMatrixAttrib.cxx index 7afe6f9014..26dad659e3 100644 --- a/panda/src/pgraph/texMatrixAttrib.cxx +++ b/panda/src/pgraph/texMatrixAttrib.cxx @@ -247,9 +247,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int TexMatrixAttrib:: compare_to_impl(const RenderAttrib *other) const { - const TexMatrixAttrib *ta; - DCAST_INTO_R(ta, other, 0); - + const TexMatrixAttrib *ta = (const TexMatrixAttrib *)other; + Stages::const_iterator ai, bi; ai = _stages.begin(); bi = ta->_stages.begin(); @@ -326,8 +325,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) TexMatrixAttrib:: compose_impl(const RenderAttrib *other) const { - const TexMatrixAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TexMatrixAttrib *ta = (const TexMatrixAttrib *)other; // The composition is the union of the two attribs. In the case // when a stage is in both attribs, we compose the stages. @@ -396,8 +394,7 @@ compose_impl(const RenderAttrib *other) const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) TexMatrixAttrib:: invert_compose_impl(const RenderAttrib *other) const { - const TexMatrixAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TexMatrixAttrib *ta = (const TexMatrixAttrib *)other; // The inverse composition works a lot like the composition, except // we invert the ai stages. diff --git a/panda/src/pgraph/texMatrixAttrib.h b/panda/src/pgraph/texMatrixAttrib.h index a6a29e155a..a1e6d90c94 100644 --- a/panda/src/pgraph/texMatrixAttrib.h +++ b/panda/src/pgraph/texMatrixAttrib.h @@ -123,7 +123,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "TexMatrixAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new TexMatrixAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/textureAttrib.cxx b/panda/src/pgraph/textureAttrib.cxx index bb7a4808e5..6de455327e 100644 --- a/panda/src/pgraph/textureAttrib.cxx +++ b/panda/src/pgraph/textureAttrib.cxx @@ -507,8 +507,7 @@ cull_callback(CullTraverser *trav, const CullTraverserData &data) const { //////////////////////////////////////////////////////////////////// int TextureAttrib:: compare_to_impl(const RenderAttrib *other) const { - const TextureAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TextureAttrib *ta = (const TextureAttrib *)other; if (_off_all_stages != ta->_off_all_stages) { return (int)_off_all_stages - (int)ta->_off_all_stages; @@ -664,8 +663,7 @@ get_hash_impl() const { //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) TextureAttrib:: compose_impl(const RenderAttrib *other) const { - const TextureAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TextureAttrib *ta = (const TextureAttrib *)other; if (ta->_off_all_stages) { // If the other type turns off all stages, it doesn't matter what diff --git a/panda/src/pgraph/textureAttrib.h b/panda/src/pgraph/textureAttrib.h index 0c27a018eb..a5f5ed9bf6 100644 --- a/panda/src/pgraph/textureAttrib.h +++ b/panda/src/pgraph/textureAttrib.h @@ -179,7 +179,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "TextureAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 30, make_default); + _attrib_slot = register_slot(_type_handle, 30, new TextureAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/pgraph/transparencyAttrib.cxx b/panda/src/pgraph/transparencyAttrib.cxx index 2b20559bc8..b2cb9cd75f 100644 --- a/panda/src/pgraph/transparencyAttrib.cxx +++ b/panda/src/pgraph/transparencyAttrib.cxx @@ -101,8 +101,8 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// int TransparencyAttrib:: compare_to_impl(const RenderAttrib *other) const { - const TransparencyAttrib *ta; - DCAST_INTO_R(ta, other, 0); + const TransparencyAttrib *ta = (const TransparencyAttrib *)other; + return (int)_mode - (int)ta->_mode; } diff --git a/panda/src/pgraph/transparencyAttrib.h b/panda/src/pgraph/transparencyAttrib.h index b653641207..1831db44f3 100644 --- a/panda/src/pgraph/transparencyAttrib.h +++ b/panda/src/pgraph/transparencyAttrib.h @@ -92,7 +92,7 @@ public: RenderAttrib::init_type(); register_type(_type_handle, "TransparencyAttrib", RenderAttrib::get_class_type()); - _attrib_slot = register_slot(_type_handle, 100, make_default); + _attrib_slot = register_slot(_type_handle, 100, new TransparencyAttrib); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/putil/p3putil_composite2.cxx b/panda/src/putil/p3putil_composite2.cxx index 1f3b46718d..a4ce5c9cfc 100644 --- a/panda/src/putil/p3putil_composite2.cxx +++ b/panda/src/putil/p3putil_composite2.cxx @@ -23,6 +23,7 @@ #include "vector_typedWritable.cxx" #include "vector_ushort.cxx" #include "vector_writable.cxx" +#include "weakKeyHashMap.cxx" #include "writableConfigurable.cxx" #include "writableParam.cxx" diff --git a/panda/src/putil/weakKeyHashMap.I b/panda/src/putil/weakKeyHashMap.I new file mode 100644 index 0000000000..05f9f4266d --- /dev/null +++ b/panda/src/putil/weakKeyHashMap.I @@ -0,0 +1,714 @@ +// Filename: weakKeyHashMap.I +// Created by: rdb (13Jul15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +template +INLINE WeakKeyHashMap:: +WeakKeyHashMap() : + _table(NULL), + _deleted_chain(NULL), + _table_size(0), + _num_entries(0) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::Destructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +template +INLINE WeakKeyHashMap:: +~WeakKeyHashMap() { + clear(); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::swap +// Access: Public +// Description: Quickly exchanges the contents of this map and the +// other map. +//////////////////////////////////////////////////////////////////// +template +INLINE void WeakKeyHashMap:: +swap(WeakKeyHashMap &other) { + TableEntry *t0 = _table; + _table = other._table; + other._table = t0; + + DeletedBufferChain *t1 = _deleted_chain; + _deleted_chain = other._deleted_chain; + other._deleted_chain = t1; + + size_t t2 = _table_size; + _table_size = other._table_size; + other._table_size = t2; + + size_t t3 = _num_entries; + _num_entries = other._num_entries; + other._num_entries = t3; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::find +// Access: Public +// Description: Searches for the indicated key in the table. Returns +// its index number if it is found, or -1 if it is not +// present in the table. +//////////////////////////////////////////////////////////////////// +template +int WeakKeyHashMap:: +find(const Key *key) const { + if (_table_size == 0) { + // Special case: the table is empty. + return -1; + } + + size_t index = get_hash(key); + if (!has_element(index)) { + return -1; + } + if (is_element(index, key)) { + return index; + } + + // There was some other key at the hashed slot. That's a hash + // conflict. Maybe our entry was recorded at a later slot position; + // scan the subsequent positions until we find the entry or an + // unused slot, indicating the end of the scan. + size_t i = index; + i = (i + 1) & (_table_size - 1); + while (i != index && has_element(i)) { + if (is_element(i, key)) { + return i; + } + i = (i + 1) & (_table_size - 1); + } + + // The key is not in the table. + return -1; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::store +// Access: Public +// Description: Records the indicated key/data pair in the map. If +// the key was already present, silently replaces it. +// Returns the index at which it was stored. +//////////////////////////////////////////////////////////////////// +template +int WeakKeyHashMap:: +store(const Key *key, const Value &data) { + if (_table_size == 0) { + // Special case: the first key in an empty table. + nassertr(_num_entries == 0, -1); + new_table(); + size_t index = get_hash(key); + store_new_element(index, key, data); + ++_num_entries; +#ifdef _DEBUG + nassertr(validate(), index); +#endif + return index; + } + + size_t index = get_hash(key); + if (!has_element(index)) { + // This element is not already in the map; add it. + if (consider_expand_table()) { + return store(key, data); + } + store_new_element(index, key, data); + ++_num_entries; +#ifdef _DEBUG + nassertr(validate(), index); +#endif + return index; + } + if (is_element(index, key)) { + // This element is already in the map; replace the data at that + // key. + _table[index]._data = data; +#ifdef _DEBUG + nassertr(validate(), index); +#endif + return index; + } + + // There was some other key at the hashed slot. That's a hash + // conflict. Record this entry at a later position. + size_t i = index; + i = (i + 1) & (_table_size - 1); + while (i != index) { + if (!has_element(i)) { + if (consider_expand_table()) { + return store(key, data); + } + store_new_element(i, key, data); + ++_num_entries; +#ifdef _DEBUG + nassertr(validate(), i); +#endif + return i; + } + if (is_element(i, key)) { + _table[i]._data = data; +#ifdef _DEBUG + nassertr(validate(), i); +#endif + return i; + } + i = (i + 1) & (_table_size - 1); + } + + // Shouldn't get here unless _num_entries == _table_size, which + // shouldn't be possible due to consider_expand_table(). + nassertr(false, -1); + return -1; // To satisfy compiler +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::remove +// Access: Public +// Description: Removes the indicated key and its associated data +// from the table. Returns true if the key was removed, +// false if it was not present. +//////////////////////////////////////////////////////////////////// +template +INLINE bool WeakKeyHashMap:: +remove(const Key *key) { + int index = find(key); + if (index == -1) { + return false; + } + remove_element(index); + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::clear +// Access: Public +// Description: Completely empties the table. +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +clear() { + if (_table_size != 0) { + for (size_t i = 0; i < _table_size; ++i) { + if (get_exists_array()[i] != 0) { + clear_element(i); + } + } + + _deleted_chain->deallocate(_table, TypeHandle::none()); + _table = NULL; + _deleted_chain = NULL; + _table_size = 0; + _num_entries = 0; + } +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::operator [] +// Access: Public +// Description: Returns a modifiable reference to the data associated +// with the indicated key, or creates a new data entry +// and returns its reference. +//////////////////////////////////////////////////////////////////// +template +INLINE Value &WeakKeyHashMap:: +operator [] (const Key *key) { + int index = find(key); + if (index == -1) { + index = store(key, Value()); + } + return modify_data(index); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_size +// Access: Public +// Description: Returns the total number of slots in the table. +//////////////////////////////////////////////////////////////////// +template +INLINE int WeakKeyHashMap:: +get_size() const { + return _table_size; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::has_element +// Access: Public +// Description: Returns true if there is an element stored in the nth +// slot, false otherwise. +// +// n should be in the range 0 <= n < get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE bool WeakKeyHashMap:: +has_element(int n) const { + nassertr(n >= 0 && n < (int)_table_size, false); + return (get_exists_array()[n] != 0 && !_table[n]._key.was_deleted()); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_key +// Access: Public +// Description: Returns the key in the nth slot of the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE const Key *WeakKeyHashMap:: +get_key(int n) const { + nassertr(has_element(n), _table[n]._key); + return _table[n]._key; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_data +// Access: Public +// Description: Returns the data in the nth slot of the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE const Value &WeakKeyHashMap:: +get_data(int n) const { + nassertr(has_element(n), _table[n]._data); + return _table[n]._data; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::modify_data +// Access: Public +// Description: Returns a modifiable reference to the data in the nth +// slot of the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE Value &WeakKeyHashMap:: +modify_data(int n) { + nassertr(has_element(n), _table[n]._data); + return _table[n]._data; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::set_data +// Access: Public +// Description: Changes the data for the nth slot of the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE void WeakKeyHashMap:: +set_data(int n, const Value &data) { + nassertv(has_element(n)); + _table[n]._data = data; +} + +#ifdef USE_MOVE_SEMANTICS +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::set_data +// Access: Public +// Description: Changes the data for the nth slot of the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +INLINE void WeakKeyHashMap:: +set_data(int n, Value &&data) { + nassertv(has_element(n)); + _table[n]._data = std::move(data); +} +#endif // USE_MOVE_SEMANTICS + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::remove_element +// Access: Public +// Description: Removes the nth slot from the table. +// +// It is an error to call this if there is nothing +// stored in the nth slot (use has_element() to check +// this first). n should be in the range 0 <= n < +// get_size(). +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +remove_element(int n) { + nassertv(get_exists_array()[n] != 0); + + clear_element(n); + nassertv(_num_entries > 0); + --_num_entries; + + // Now we have put a hole in the table. If there was a hash + // conflict in the slot following this one, we have to move it down + // to close the hole. + size_t i = n; + i = (i + 1) & (_table_size - 1); + while (get_exists_array()[i] != 0) { + if (_table[i]._key.was_deleted()) { + // It was deleted. Forget about it. + clear_element(i); + --_num_entries; + } else { + size_t wants_index = get_hash(_table[i]._key); + if (wants_index != i) { + // This one was a hash conflict; try to put it where it belongs. + // We can't just put it in n, since maybe it belongs somewhere + // after n. + while (wants_index != i && has_element(wants_index)) { + // Hash conflict; move it up. + wants_index = (wants_index + 1) & (_table_size - 1); + } + if (wants_index != i) { + store_new_element(wants_index, _table[i]._key, _table[i]._data); + clear_element(i); + } + } + } + + // Continue until we encounter the next unused slot. Until we do, + // we can't be sure we've found all of the potential hash + // conflicts. + i = (i + 1) & (_table_size - 1); + } + +#ifdef _DEBUG + nassertv(validate()); +#endif +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_num_entries +// Access: Public +// Description: Returns the number of active entries in the table. +// This is not necessarily related to the number of +// slots in the table as reported by get_size(). Use +// get_size() to iterate through all of the slots, not +// get_num_entries(). +// +// This is merely an upper bound on the number of +// entries; it may also count false positives for +// pointers that were recently deleted. +//////////////////////////////////////////////////////////////////// +template +INLINE int WeakKeyHashMap:: +get_num_entries() const { + return _num_entries; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::is_empty +// Access: Public +// Description: Returns true if the table is empty; +// i.e. get_num_entries() == 0. This may return a +// false negatives if a pointer was recently deleted; +// if this returns true, though, you can be sure it's +// empty. +//////////////////////////////////////////////////////////////////// +template +INLINE bool WeakKeyHashMap:: +is_empty() const { + return (_num_entries == 0); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::output +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +output(ostream &out) const { + out << "WeakKeyHashMap (" << _num_entries << " entries): ["; + for (size_t i = 0; i < _table_size; ++i) { + if (get_exists_array()[i] == 0) { + out << " *"; + + } else { + out << " " << _table[i]._key; + size_t index = get_hash(_table[i]._key.get_orig()); + if (index != i) { + // This was misplaced as the result of a hash conflict. + // Report how far off it is. + out << "(" << ((_table_size + i - index) & (_table_size - 1)) << ")"; + } + } + } + out << " ]"; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::write +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +write(ostream &out) const { + output(out); + out << "\n"; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::validate +// Access: Public +// Description: Returns true if the internal table appears to be +// consistent, false if there are some internal errors. +//////////////////////////////////////////////////////////////////// +template +bool WeakKeyHashMap:: +validate() const { + size_t count = 0; + + for (size_t i = 0; i < _table_size; ++i) { + if (get_exists_array()[i] != 0) { + ++count; + if (_table[i]._key.was_deleted()) { + continue; + } + size_t ideal_index = get_hash(_table[i]._key.get_orig()); + size_t wants_index = ideal_index; + while (wants_index != i && get_exists_array()[i] != 0) { + wants_index = (wants_index + 1) & (_table_size - 1); + } + if (wants_index != i) { + util_cat.error() + << "WeakKeyHashMap is invalid: key " << _table[i]._key + << " should be in slot " << wants_index << " instead of " + << i << " (ideal is " << ideal_index << ")\n"; + write(util_cat.error(false)); + return false; + } + } + } + + if (count != _num_entries) { + util_cat.error() + << "WeakKeyHashMap is invalid: reports " << _num_entries + << " entries, actually has " << count << "\n"; + write(util_cat.error(false)); + return false; + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_hash +// Access: Private +// Description: Computes an appropriate index number to store the +// given pointer. +//////////////////////////////////////////////////////////////////// +template +INLINE size_t WeakKeyHashMap:: +get_hash(const Key *key) const { + /* + // We want a hash constant 0 < k < 1. This one is suggested by + // Knuth: + static const double hash_constant = (sqrt(5.0) - 1.0) / 2.0; + double f = ((double)(size_t)key * hash_constant); + f -= floor(f); + return (size_t)floor(f * _table_size); + */ + + return (((size_t)key * (size_t)9973) >> 8) & (_table_size - 1); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::is_element +// Access: Private +// Description: Returns true if element n matches key. +//////////////////////////////////////////////////////////////////// +template +INLINE bool WeakKeyHashMap:: +is_element(int n, const Key *key) const { + nassertr(has_element(n), false); + return _table[n]._key == key; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::store_new_element +// Access: Private +// Description: Constructs a new TableEntry at position n, storing +// the indicated key and value. +//////////////////////////////////////////////////////////////////// +template +INLINE void WeakKeyHashMap:: +store_new_element(int n, const Key *key, const Value &data) { + if (get_exists_array()[n] != 0) { + // There was already an element in this spot. This can happen + // if it was a pointer that had already been deleted. + nassertv(_table[n]._key.was_deleted()); + _table[n].~TableEntry(); + --_num_entries; + } + new(&_table[n]) TableEntry(key, data); + get_exists_array()[n] = true; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::clear_element +// Access: Private +// Description: Destructs the TableEntry at position n. +//////////////////////////////////////////////////////////////////// +template +INLINE void WeakKeyHashMap:: +clear_element(int n) { + _table[n].~TableEntry(); + get_exists_array()[n] = false; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::get_exists_array +// Access: Private +// Description: Returns the beginning of the array of _table_size +// unsigned chars that are the boolean flags for whether +// each element exists (has been constructed) within the +// table. +//////////////////////////////////////////////////////////////////// +template +INLINE unsigned char *WeakKeyHashMap:: +get_exists_array() const { + return (unsigned char *)(_table + _table_size); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::new_table +// Access: Private +// Description: Allocates a brand new table. +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +new_table() { + nassertv(_table_size == 0 && _num_entries == 0); + + // Pick a good initial table size. For now, we make it really + // small. Maybe that's the right answer. + _table_size = 4; + + // We allocate enough bytes for _table_size elements of TableEntry, + // plus _table_size more bytes at the end (for the exists array). + size_t alloc_size = _table_size * sizeof(TableEntry) + _table_size; + + _deleted_chain = memory_hook->get_deleted_chain(alloc_size); + _table = (TableEntry *)_deleted_chain->allocate(alloc_size, TypeHandle::none()); + memset(get_exists_array(), 0, _table_size); +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::consider_expand_table +// Access: Private +// Description: Expands the table if it will need it (assuming one +// more element is about to be added). Returns true if +// the table was modified, false otherwise. +//////////////////////////////////////////////////////////////////// +template +INLINE bool WeakKeyHashMap:: +consider_expand_table() { + if (_num_entries >= (_table_size >> 1)) { + // Actually, first, we should see if there are any deleted pointers. + // Clean those up and see how much space we save. + for (size_t i = 0; i < _table_size; ++i) { + if (get_exists_array()[i] != 0 && _table[i]._key.was_deleted()) { + remove_element(i); + } + } + if (_num_entries >= (_table_size >> 1)) { + // Still not enough space. + expand_table(); + } + return true; + } + return false; +} + +//////////////////////////////////////////////////////////////////// +// Function: WeakKeyHashMap::expand_table +// Access: Private +// Description: Doubles the size of the existing table. +//////////////////////////////////////////////////////////////////// +template +void WeakKeyHashMap:: +expand_table() { + nassertv(_table_size != 0); + + WeakKeyHashMap old_map; + swap(old_map); + + // Double the table size. + size_t old_table_size = old_map._table_size; + _table_size = (old_table_size << 1); + nassertv(_table == NULL); + + // We allocate enough bytes for _table_size elements of TableEntry, + // plus _table_size more bytes at the end (for the exists array). + size_t alloc_size = _table_size * sizeof(TableEntry) + _table_size; + _deleted_chain = memory_hook->get_deleted_chain(alloc_size); + _table = (TableEntry *)_deleted_chain->allocate(alloc_size, TypeHandle::none()); + unsigned char *exists_array = get_exists_array(); + memset(exists_array, 0, _table_size); + nassertv(_num_entries == 0); + + // Now copy the entries from the old table into the new table. + int num_added = 0; + for (size_t i = 0; i < old_table_size; ++i) { + if (old_map.has_element(i)) { + size_t new_index = get_hash(old_map._table[i]._key.get_orig()); + + while (exists_array[new_index] != 0) { + // Hash conflict; look for a better spot. This has to succeed. + new_index = (new_index + 1) & (_table_size - 1); + } + +#ifdef USE_MOVE_SEMANTICS + // Use C++11 rvalue references to invoke the move constructor, + // which may be more efficient. + new(&_table[new_index]) TableEntry(move(old_map._table[i])); +#else + new(&_table[new_index]) TableEntry(old_map._table[i]); +#endif + exists_array[new_index] = true; + ++_num_entries; + } + } + + nassertv(validate()); + nassertv(old_map.validate()); + + nassertv(_num_entries == old_map._num_entries); +} diff --git a/panda/src/putil/weakKeyHashMap.cxx b/panda/src/putil/weakKeyHashMap.cxx new file mode 100644 index 0000000000..620603cc82 --- /dev/null +++ b/panda/src/putil/weakKeyHashMap.cxx @@ -0,0 +1,15 @@ +// Filename: weakKeyHashMap.cxx +// Created by: rdb (13Jul15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "weakKeyHashMap.h" diff --git a/panda/src/putil/weakKeyHashMap.h b/panda/src/putil/weakKeyHashMap.h new file mode 100644 index 0000000000..b84213567c --- /dev/null +++ b/panda/src/putil/weakKeyHashMap.h @@ -0,0 +1,115 @@ +// Filename: weakKeyHashMap.h +// Created by: rdb (13Jul15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef WEAKKEYHASHMAP_H +#define WEAKKEYHASHMAP_H + +#include "pandabase.h" +#include "pvector.h" +#include "config_util.h" +#include "weakPointerTo.h" + +//////////////////////////////////////////////////////////////////// +// Class : WeakKeyHashMap +// Description : This is a variation on WeakKeyHashMap that stores +// weak pointers as keys, and automatically frees up +// entries from the map when the associated key has +// been deleted. +// +// This is more efficient than using a naive map of +// WeakPointerTo keys since that would incur the cost +// of constructing a weak reference every time a find +// operation is used. +//////////////////////////////////////////////////////////////////// +template +class WeakKeyHashMap { +public: +#ifndef CPPPARSER + INLINE WeakKeyHashMap(); + INLINE ~WeakKeyHashMap(); + + INLINE void swap(WeakKeyHashMap &other); + + int find(const Key *key) const; + int store(const Key *key, const Value &data); + INLINE bool remove(const Key *key); + void clear(); + + INLINE Value &operator [] (const Key *key); + + INLINE int get_size() const; + INLINE bool has_element(int n) const; + INLINE const Key *get_key(int n) const; + INLINE const Value &get_data(int n) const; + INLINE Value &modify_data(int n); + INLINE void set_data(int n, const Value &data); +#ifdef USE_MOVE_SEMANTICS + INLINE void set_data(int n, Value &&data); +#endif + void remove_element(int n); + + INLINE int get_num_entries() const; + INLINE bool is_empty() const; + + void output(ostream &out) const; + void write(ostream &out) const; + bool validate() const; + +private: + INLINE size_t get_hash(const Key *key) const; + + INLINE bool is_element(int n, const Key *key) const; + INLINE void store_new_element(int n, const Key *key, const Value &data); + INLINE void clear_element(int n); + INLINE unsigned char *get_exists_array() const; + + void new_table(); + INLINE bool consider_expand_table(); + void expand_table(); + + class TableEntry { + public: + INLINE TableEntry(const Key *key, const Value &data) : + _key(key), + _data(data) {} + INLINE TableEntry(const TableEntry ©) : + _key(copy._key), + _data(copy._data) {} +#ifdef USE_MOVE_SEMANTICS + INLINE TableEntry(TableEntry &&from) NOEXCEPT : + _key(move(from._key)), + _data(move(from._data)) {} +#endif + WCPT(Key) _key; + Value _data; + }; + + TableEntry *_table; + DeletedBufferChain *_deleted_chain; + size_t _table_size; + size_t _num_entries; +#endif // CPPPARSER +}; + +template +inline ostream &operator << (ostream &out, const WeakKeyHashMap &shm) { + shm.output(out); + return out; +} + +#ifndef CPPPARSER +#include "weakKeyHashMap.I" +#endif // CPPPARSER + +#endif From e6d29d6f515b9e9180afc9fd7186b91c9805c964 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 20:01:37 +0200 Subject: [PATCH 026/200] Document bug in enable_angular_motor --- panda/src/bullet/bulletHingeConstraint.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/panda/src/bullet/bulletHingeConstraint.cxx b/panda/src/bullet/bulletHingeConstraint.cxx index c9a369eca7..8976c23126 100644 --- a/panda/src/bullet/bulletHingeConstraint.cxx +++ b/panda/src/bullet/bulletHingeConstraint.cxx @@ -211,10 +211,12 @@ get_hinge_angle() { // Function: BulletHingeConstraint::enable_angular_motor // Access: Published // Description: Applies an impulse to the constraint so that the -// angle changes at target_velocity (probably -// degrees/second) where max_impulse is the maximum -// impulse that is used for achieving the specified -// velocity. +// angle changes at target_velocity where max_impulse +// is the maximum impulse that is used for achieving +// the specified velocity. +// +// Note that the target_velocity is in radians/second, +// not degrees. //////////////////////////////////////////////////////////////////// void BulletHingeConstraint:: enable_angular_motor(bool enable, PN_stdfloat target_velocity, PN_stdfloat max_impulse) { From 1f0b4332e325c103e0ff2868f996d57efd069e4c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 27 Jul 2015 20:23:47 +0200 Subject: [PATCH 027/200] Add softspace flag to StreamWriter - fixes print spaces in runtime env --- dtool/src/interrogate/interrogateBuilder.cxx | 5 +++-- dtool/src/prc/streamWriter.I | 17 +++++++++++++---- dtool/src/prc/streamWriter.h | 6 ++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dtool/src/interrogate/interrogateBuilder.cxx b/dtool/src/interrogate/interrogateBuilder.cxx index e6babb17f7..5336c809f8 100644 --- a/dtool/src/interrogate/interrogateBuilder.cxx +++ b/dtool/src/interrogate/interrogateBuilder.cxx @@ -1434,8 +1434,9 @@ scan_element(CPPInstance *element, CPPStructType *struct_type, return 0; } - if (element->_file._source != CPPFile::S_local || - in_ignorefile(element->_file._filename_as_referenced)) { + if (struct_type == NULL && + (element->_file._source != CPPFile::S_local || + in_ignorefile(element->_file._filename_as_referenced))) { // The element is defined in some other package or in an // ignorable file. return 0; diff --git a/dtool/src/prc/streamWriter.I b/dtool/src/prc/streamWriter.I index f92a24416e..ce4500a475 100644 --- a/dtool/src/prc/streamWriter.I +++ b/dtool/src/prc/streamWriter.I @@ -16,10 +16,13 @@ //////////////////////////////////////////////////////////////////// // Function: StreamWriter::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StreamWriter:: -StreamWriter(ostream &out) : +StreamWriter(ostream &out) : +#ifdef HAVE_PYTHON + softspace(0), +#endif _out(&out), _owns_stream(false) { @@ -28,10 +31,13 @@ StreamWriter(ostream &out) : //////////////////////////////////////////////////////////////////// // Function: StreamWriter::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StreamWriter:: -StreamWriter(ostream *out, bool owns_stream) : +StreamWriter(ostream *out, bool owns_stream) : +#ifdef HAVE_PYTHON + softspace(0), +#endif _out(out), _owns_stream(owns_stream) { @@ -45,6 +51,9 @@ StreamWriter(ostream *out, bool owns_stream) : //////////////////////////////////////////////////////////////////// INLINE StreamWriter:: StreamWriter(const StreamWriter ©) : +#ifdef HAVE_PYTHON + softspace(0), +#endif _out(copy._out), _owns_stream(false) { diff --git a/dtool/src/prc/streamWriter.h b/dtool/src/prc/streamWriter.h index cd6f20e6e1..b63feaf6b1 100644 --- a/dtool/src/prc/streamWriter.h +++ b/dtool/src/prc/streamWriter.h @@ -81,6 +81,12 @@ PUBLISHED: private: ostream *_out; bool _owns_stream; + +#ifdef HAVE_PYTHON +PUBLISHED: + // Python 2 needs this for printing to work correctly. + int softspace; +#endif }; #include "streamWriter.I" From 353ae928d250bafac18ecc135f779e4d0132d2a5 Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Mon, 27 Jul 2015 13:51:21 -0500 Subject: [PATCH 028/200] Handle packaging user filetypes more extensibly -- Provide includeExtensions(...) method to augment particular kinds of files, allowing them to be packaged by dir() -- Track the count of files, by extension, silently ignored by dir(), and log this -- Allow "-v" option to verbosely log ignored files in dir() --- direct/src/p3d/Packager.py | 75 +++++++++++++++++++++++++++++++++++++- direct/src/p3d/ppackage.py | 11 +++++- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 9614e96d59..d2166ec4f8 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -375,6 +375,9 @@ class Packager: # This records the current list of modules we have added so # far. self.freezer = FreezeTool.Freezer(platform = self.packager.platform) + + # Map of extensions to files to number (ignored by dir) + self.ignoredDirFiles = {} def close(self): """ Writes out the contents of the current package. Returns True @@ -385,6 +388,13 @@ class Packager: message = 'Cannot generate packages without an installDir; use -i' raise PackagerError, message + if self.ignoredDirFiles: + exts = list(self.ignoredDirFiles.keys()) + exts.sort() + total = sum([x for x in self.ignoredDirFiles.values()]) + self.notify.warning("excluded %s files not marked for inclusion: %s" \ + % (total, ", ".join(["'" + ext + "'" for ext in exts]))) + if not self.host: self.host = self.packager.host @@ -2185,6 +2195,9 @@ class Packager: # ignoring any request to specify a particular download host, # e.g. for testing and development. self.ignoreSetHost = False + + # Set this to true to verbosely log files ignored by dir(). + self.verbosePrint = False # This will be appended to the basename of any .p3d package, # before the .p3d extension. @@ -2390,6 +2403,14 @@ class Packager: # should be added exactly byte-for-byte as they are. self.unprocessedExtensions = [] + # Files for which warnings should be suppressed when they are + # not handled by dir() + self.suppressWarningForExtensions = ['', 'pyc', 'pyo', + 'p3d', 'pdef', + 'c', 'C', 'cxx', 'cpp', 'h', 'H', + 'hpp', 'pp', 'I', 'pem', 'p12', 'crt', + 'o', 'obj', 'a', 'lib', 'bc', 'll'] + # System files that should never be packaged. For # case-insensitive filesystems (like Windows and OSX), put the # lowercase filename here. Case-sensitive filesystems should @@ -2617,12 +2638,20 @@ class Packager: if dirname.makeTrueCase(): searchPath.appendDirectory(dirname) + def _ensureExtensions(self): + self.knownExtensions = \ + self.imageExtensions + \ + self.modelExtensions + \ + self.textExtensions + \ + self.binaryExtensions + \ + self.uncompressibleExtensions + \ + self.unprocessedExtensions def setup(self): """ Call this method to initialize the class after filling in some of the values in the constructor. """ - self.knownExtensions = self.imageExtensions + self.modelExtensions + self.textExtensions + self.binaryExtensions + self.uncompressibleExtensions + self.unprocessedExtensions + self._ensureExtensions() self.currentPackage = None @@ -3604,6 +3633,43 @@ class Packager: filename = Filename(filename) self.currentPackage.excludeFile(filename) + + def do_includeExtensions(self, executableExtensions = None, extractExtensions = None, + imageExtensions = None, textExtensions = None, + uncompressibleExtensions = None, unprocessedExtensions = None, + suppressWarningForExtensions = None): + """ Ensure that dir() will include files with the given extensions. + The extensions should not have '.' prefixes. + + All except 'suppressWarningForExtensions' allow the given kinds of files + to be packaged with their respective semantics (read the source). + + 'suppressWarningForExtensions' lists extensions *expected* to be ignored, + so no warnings will be emitted for them. + """ + if executableExtensions: + self.executableExtensions += executableExtensions + + if extractExtensions: + self.extractExtensions += extractExtensions + + if imageExtensions: + self.imageExtensions += imageExtensions + + if textExtensions: + self.textExtensions += textExtensions + + if uncompressibleExtensions: + self.uncompressibleExtensions += uncompressibleExtensions + + if unprocessedExtensions: + self.unprocessedExtensions += unprocessedExtensions + + if suppressWarningForExtensions: + self.suppressWarningForExtensions += suppressWarningForExtensions + + self._ensureExtensions() + def do_dir(self, dirname, newDir = None, unprocessed = None): """ Adds the indicated directory hierarchy to the current @@ -3676,7 +3742,12 @@ class Packager: filename.setBinary() self.currentPackage.addFile(filename, newName = newName, explicit = False, unprocessed = unprocessed) - + elif not ext in self.suppressWarningForExtensions: + newCount = self.currentPackage.ignoredDirFiles.get(ext, 0) + 1 + self.currentPackage.ignoredDirFiles[ext] = newCount + + if self.verbosePrint: + self.notify.warning("ignoring file %s" % filename) def readContentsFile(self): """ Reads the contents.xml file at the beginning of diff --git a/direct/src/p3d/ppackage.py b/direct/src/p3d/ppackage.py index 36be497a9f..dc00bdc567 100755 --- a/direct/src/p3d/ppackage.py +++ b/direct/src/p3d/ppackage.py @@ -123,6 +123,10 @@ Options: as such. This only applies to .p3d packages, not to other types of packages! + -v + Emit a warning for any file not recognized by the dir() command + (indicating there may be a need for addExtensions(...)). + -h Display this help """ @@ -151,11 +155,12 @@ allowPythonDev = False universalBinaries = False systemRoot = None ignoreSetHost = False +verbosePrint = False p3dSuffix = '' platforms = [] try: - opts, args = getopt.getopt(sys.argv[1:], 'i:ps:S:DuP:R:Ha:h') + opts, args = getopt.getopt(sys.argv[1:], 'i:ps:S:DuP:R:Ha:hv') except getopt.error, msg: usage(1, msg) @@ -188,6 +193,9 @@ for opt, arg in opts: elif opt == '-a': p3dSuffix = arg + elif opt == '-v': + verbosePrint = True + elif opt == '-h': usage(0) else: @@ -230,6 +238,7 @@ for platform in platforms: packager.allowPythonDev = allowPythonDev packager.systemRoot = systemRoot packager.ignoreSetHost = ignoreSetHost + packager.verbosePrint = verbosePrint packager.p3dSuffix = p3dSuffix try: From 265bf42f81225febdc60f9797e51125c080331a0 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 13:41:26 +0200 Subject: [PATCH 029/200] Fix crash when copying a WeakPointerTo that was already deleted --- panda/src/express/referenceCount.I | 6 ++++++ panda/src/express/weakPointerTo.I | 6 +++--- panda/src/express/weakPointerToBase.I | 8 +++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/panda/src/express/referenceCount.I b/panda/src/express/referenceCount.I index c71886f46d..9f098b0384 100644 --- a/panda/src/express/referenceCount.I +++ b/panda/src/express/referenceCount.I @@ -319,6 +319,9 @@ get_weak_list() const { INLINE void ReferenceCount:: weak_ref(WeakPointerToVoid *ptv) { TAU_PROFILE("void ReferenceCount::weak_ref()", " ", TAU_USER); +#ifdef _DEBUG + nassertv(test_ref_count_integrity()); +#endif get_weak_list()->add_reference(ptv); } @@ -332,6 +335,9 @@ weak_ref(WeakPointerToVoid *ptv) { INLINE void ReferenceCount:: weak_unref(WeakPointerToVoid *ptv) { TAU_PROFILE("void ReferenceCount::weak_unref()", " ", TAU_USER); +#ifdef _DEBUG + nassertv(test_ref_count_integrity()); +#endif nassertv(has_weak_list()); ((WeakReferenceList *)_weak_list)->clear_reference(ptv); } diff --git a/panda/src/express/weakPointerTo.I b/panda/src/express/weakPointerTo.I index d42111bbca..797d1cf000 100644 --- a/panda/src/express/weakPointerTo.I +++ b/panda/src/express/weakPointerTo.I @@ -43,7 +43,7 @@ WeakPointerTo(const PointerTo ©) : template INLINE WeakPointerTo:: WeakPointerTo(const WeakPointerTo ©) : - WeakPointerToBase(*(const PointerToBase *)©) + WeakPointerToBase(*(const WeakPointerToBase *)©) { } @@ -194,7 +194,7 @@ WeakConstPointerTo(const ConstPointerTo ©) : template INLINE WeakConstPointerTo:: WeakConstPointerTo(const WeakPointerTo ©) : - WeakPointerToBase(*(const PointerToBase *)©) + WeakPointerToBase(*(const WeakPointerToBase *)©) { } @@ -206,7 +206,7 @@ WeakConstPointerTo(const WeakPointerTo ©) : template INLINE WeakConstPointerTo:: WeakConstPointerTo(const WeakConstPointerTo ©) : - WeakPointerToBase(*(const PointerToBase *)©) + WeakPointerToBase(*(const WeakPointerToBase *)©) { } diff --git a/panda/src/express/weakPointerToBase.I b/panda/src/express/weakPointerToBase.I index 61d454ea89..ead49a1424 100644 --- a/panda/src/express/weakPointerToBase.I +++ b/panda/src/express/weakPointerToBase.I @@ -43,7 +43,13 @@ WeakPointerToBase(const PointerToBase ©) { template INLINE WeakPointerToBase:: WeakPointerToBase(const WeakPointerToBase ©) { - reassign(copy); + _void_ptr = copy._void_ptr; + _ptr_was_deleted = copy._ptr_was_deleted; + + if (is_valid_pointer()) { + To *ptr = (To *)_void_ptr; + ptr->weak_ref(this); + } } //////////////////////////////////////////////////////////////////// From 0cecab312448d9c306864ac2560da97ec07479d0 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 15:40:04 +0200 Subject: [PATCH 030/200] Fix issues with the rtdist build in 1.10 --- direct/src/p3d/Packager.py | 2 +- direct/src/plugin/p3dPythonRun.cxx | 18 +++++++++++++----- direct/src/showbase/VFSImporter.py | 2 +- direct/src/showutil/FreezeTool.py | 10 ---------- makepanda/makepanda.py | 3 +++ .../glstuff/glGraphicsStateGuardian_src.cxx | 2 ++ 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 8685de09ea..f478f4178d 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -3341,7 +3341,7 @@ class Packager: self.do_module('VFSImporter', filename = filename) self.do_freeze('_vfsimporter', compileToExe = False) - self.do_file('panda3d/core.pyd'); + self.do_file('panda3d/_core.pyd'); # Now that we're done freezing, explicitly add 'direct' to # counteract the previous explicit excludeModule(). diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index 667f34e7dc..e3be05bfc8 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -236,29 +236,37 @@ run_python() { } Py_DECREF(app_runner_class); + // Import the JavaScript module. + PyObject *javascript_module = PyImport_ImportModule("direct.p3d.JavaScript"); + if (javascript_module == NULL) { + nout << "Failed to import direct.p3d.JavaScript\n"; + PyErr_Print(); + return false; + } + // Get the UndefinedObject class. - _undefined_object_class = PyObject_GetAttrString(app_runner_module, "UndefinedObject"); + _undefined_object_class = PyObject_GetAttrString(javascript_module, "UndefinedObject"); if (_undefined_object_class == NULL) { PyErr_Print(); return false; } // And the "Undefined" instance. - _undefined = PyObject_GetAttrString(app_runner_module, "Undefined"); + _undefined = PyObject_GetAttrString(javascript_module, "Undefined"); if (_undefined == NULL) { PyErr_Print(); return false; } // Get the ConcreteStruct class. - _concrete_struct_class = PyObject_GetAttrString(app_runner_module, "ConcreteStruct"); + _concrete_struct_class = PyObject_GetAttrString(javascript_module, "ConcreteStruct"); if (_concrete_struct_class == NULL) { PyErr_Print(); return false; } // Get the BrowserObject class. - _browser_object_class = PyObject_GetAttrString(app_runner_module, "BrowserObject"); + _browser_object_class = PyObject_GetAttrString(javascript_module, "BrowserObject"); if (_browser_object_class == NULL) { PyErr_Print(); return false; @@ -272,7 +280,7 @@ run_python() { } Py_DECREF(app_runner_module); - + Py_DECREF(javascript_module); // Construct a Python wrapper around our methods we need to expose to Python. static PyMethodDef p3dpython_methods[] = { diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py index 6f8c76266f..1fc8c6796d 100644 --- a/direct/src/showbase/VFSImporter.py +++ b/direct/src/showbase/VFSImporter.py @@ -1,7 +1,7 @@ __all__ = ['register', 'sharedPackages', 'reloadSharedPackage', 'reloadSharedPackages'] -from panda3d.core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream +from panda3d._core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream import sys import marshal import imp diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index df845b0c26..781caf9588 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -17,7 +17,6 @@ except ImportError: p3extend_frozen = None from panda3d.core import * -from pandac.extension_native_helpers import dll_suffix, dll_ext # Check to see if we are running python_d, which implies we have a # debug build, and we have to build the module with debug options. @@ -1394,15 +1393,6 @@ class PandaModuleFinder(modulefinder.ModuleFinder): # It's a frozen module. return (None, name, ('', '', imp.PY_FROZEN)) - # Look for a dtool extension. This loop is roughly lifted - # from extension_native_helpers.Dtool_PreloadDLL(). - filename = name + dll_suffix + dll_ext - for dir in sys.path + [sys.prefix]: - lib = os.path.join(dir, filename) - if os.path.exists(lib): - file = open(lib, 'rb') - return (file, lib, (dll_ext, 'rb', imp.C_EXTENSION)) - message = "DLL loader cannot find %s." % (name) raise ImportError, message diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 35bfea1e7f..30de3f1552 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -5026,11 +5026,13 @@ if (RTDIST or RUNTIME): TargetAdd('p3dpython.exe', input='p3dpython_p3dPythonMain.obj') TargetAdd('p3dpython.exe', input=COMMON_PANDA_LIBS) TargetAdd('p3dpython.exe', input='libp3tinyxml.ilb') + TargetAdd('p3dpython.exe', input='libp3interrogatedb.dll') TargetAdd('p3dpython.exe', opts=['PYTHON', 'WINUSER']) TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj') TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb') + TargetAdd('libp3dpython.dll', input='libp3interrogatedb.dll') TargetAdd('libp3dpython.dll', opts=['PYTHON', 'WINUSER']) if GetTarget() == 'windows': @@ -5042,6 +5044,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj') TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS) TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb') + TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll') TargetAdd('p3dpythonw.exe', opts=['SUBSYSTEM:WINDOWS', 'PYTHON', 'WINUSER']) if (PkgSkip("OPENSSL")==0 and RTDIST): diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 89227ee1bf..bfc5914b03 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -8799,6 +8799,7 @@ get_usage(Geom::UsageHint usage_hint) { return GL_STATIC_DRAW; } +#ifndef NDEBUG //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::get_compressed_format_string // Access: Public, Static @@ -8917,6 +8918,7 @@ get_compressed_format_string(GLenum format) { return NULL; } } +#endif //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::get_light_color From e4c3301bd03d1508e272941424c7212f12fe7654 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 16:18:33 +0200 Subject: [PATCH 031/200] Shader context input state tracking system, for more efficiently updating shader inputs --- panda/src/glstuff/glCgShaderContext_src.I | 10 - panda/src/glstuff/glCgShaderContext_src.cxx | 195 ++++++++++---- panda/src/glstuff/glCgShaderContext_src.h | 25 +- panda/src/glstuff/glGraphicsBuffer_src.cxx | 2 +- .../glstuff/glGraphicsStateGuardian_src.cxx | 170 +++++++----- .../src/glstuff/glGraphicsStateGuardian_src.h | 4 +- panda/src/glstuff/glShaderContext_src.I | 10 - panda/src/glstuff/glShaderContext_src.cxx | 247 +++++++++++++----- panda/src/glstuff/glShaderContext_src.h | 16 +- panda/src/gobj/shader.cxx | 69 ++++- panda/src/gobj/shader.h | 3 + panda/src/gobj/shaderContext.h | 5 +- panda/src/pgraph/colorBlendAttrib.h | 5 +- 13 files changed, 519 insertions(+), 242 deletions(-) diff --git a/panda/src/glstuff/glCgShaderContext_src.I b/panda/src/glstuff/glCgShaderContext_src.I index 243ed4c758..376347a96e 100644 --- a/panda/src/glstuff/glCgShaderContext_src.I +++ b/panda/src/glstuff/glCgShaderContext_src.I @@ -52,15 +52,5 @@ uses_custom_vertex_arrays() { return true; } -//////////////////////////////////////////////////////////////////// -// Function: GLCgShaderContext::uses_custom_texture_bindings -// Access: Public -// Description: Always true, for now. -//////////////////////////////////////////////////////////////////// -INLINE bool CLP(CgShaderContext):: -uses_custom_texture_bindings() { - return true; -} - #endif // OPENGLES_1 diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index a2301e74a7..1a4589e854 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -46,6 +46,7 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte _color_attrib_index = CA_color; _transform_table_param = 0; _slider_table_param = 0; + _frame_number = -1; nassertv(s->get_language() == Shader::SL_Cg); @@ -361,13 +362,8 @@ release_resources() { // input parameters. //////////////////////////////////////////////////////////////////// void CLP(CgShaderContext):: -bind(bool reissue_parameters) { +bind() { if (_cg_program != 0) { - if (reissue_parameters) { - // Pass in k-parameters and transform-parameters - issue_parameters(Shader::SSD_general); - } - // Bind the shaders. cgGLEnableProgramProfiles(_cg_program); cgGLBindProgram(_cg_program); @@ -397,6 +393,88 @@ unbind() { } } +//////////////////////////////////////////////////////////////////// +// Function: GLCgShaderContext::set_state_and_transform +// Access: Public +// Description: This function gets called whenever the RenderState +// or TransformState has changed, but the Shader +// itself has not changed. It loads new values into the +// shader's parameters. +//////////////////////////////////////////////////////////////////// +void CLP(CgShaderContext):: +set_state_and_transform(const RenderState *target_rs, + const TransformState *modelview_transform, + const TransformState *projection_transform) { + + if (!valid()) { + return; + } + + // Find out which state properties have changed. + int altered = 0; + + if (_modelview_transform != modelview_transform) { + _modelview_transform = modelview_transform; + altered |= Shader::SSD_transform; + } + if (_projection_transform != projection_transform) { + _projection_transform = projection_transform; + altered |= Shader::SSD_projection; + } + + if (_state_rs != target_rs) { + if (_state_rs == NULL) { + // We haven't set any state yet. + altered |= Shader::SSD_general; + } else { + if (_state_rs->get_attrib(ColorAttrib::get_class_slot()) != + target_rs->get_attrib(ColorAttrib::get_class_slot())) { + altered |= Shader::SSD_color; + } + if (_state_rs->get_attrib(ColorScaleAttrib::get_class_slot()) != + target_rs->get_attrib(ColorScaleAttrib::get_class_slot())) { + altered |= Shader::SSD_colorscale; + } + if (_state_rs->get_attrib(MaterialAttrib::get_class_slot()) != + target_rs->get_attrib(MaterialAttrib::get_class_slot())) { + altered |= Shader::SSD_material; + } + if (_state_rs->get_attrib(ShaderAttrib::get_class_slot()) != + target_rs->get_attrib(ShaderAttrib::get_class_slot())) { + altered |= Shader::SSD_shaderinputs; + } + if (_state_rs->get_attrib(FogAttrib::get_class_slot()) != + target_rs->get_attrib(FogAttrib::get_class_slot())) { + altered |= Shader::SSD_fog; + } + if (_state_rs->get_attrib(LightAttrib::get_class_slot()) != + target_rs->get_attrib(LightAttrib::get_class_slot())) { + altered |= Shader::SSD_light; + } + if (_state_rs->get_attrib(ClipPlaneAttrib::get_class_slot()) != + target_rs->get_attrib(ClipPlaneAttrib::get_class_slot())) { + altered |= Shader::SSD_clip_planes; + } + if (_state_rs->get_attrib(TexMatrixAttrib::get_class_slot()) != + target_rs->get_attrib(TexMatrixAttrib::get_class_slot())) { + altered |= Shader::SSD_tex_matrix; + } + } + _state_rs = target_rs; + } + + // Is this the first time this shader is used this frame? + int frame_number = ClockObject::get_global_clock()->get_frame_count(); + if (frame_number != _frame_number) { + altered |= Shader::SSD_frame; + _frame_number = frame_number; + } + + if (altered != 0) { + issue_parameters(altered); + } +} + //////////////////////////////////////////////////////////////////// // Function: GLCgShaderContext::issue_parameters // Access: Public @@ -414,49 +492,48 @@ unbind() { //////////////////////////////////////////////////////////////////// void CLP(CgShaderContext):: issue_parameters(int altered) { - //PStatGPUTimer timer(_glgsg, _glgsg->_draw_set_state_shader_parameters_pcollector); + PStatGPUTimer timer(_glgsg, _glgsg->_draw_set_state_shader_parameters_pcollector); - if (!valid()) { - return; + if (GLCAT.is_spam()) { + GLCAT.spam() + << "Setting uniforms for " << _shader->get_filename() + << " (altered 0x" << hex << altered << dec << ")\n"; } - // Iterate through _ptr parameters - for (int i=0; i<(int)_shader->_ptr_spec.size(); i++) { - if (altered & (_shader->_ptr_spec[i]._dep[0] | _shader->_ptr_spec[i]._dep[1])) { - const Shader::ShaderPtrSpec& _ptr = _shader->_ptr_spec[i]; - Shader::ShaderPtrData* ptr_data = - const_cast< Shader::ShaderPtrData*>(_glgsg->fetch_ptr_parameter(_ptr)); + // We have no way to track modifications to PTAs, so we assume that + // they are modified every frame and when we switch ShaderAttribs. + if (altered & (Shader::SSD_shaderinputs | Shader::SSD_frame)) { + // Iterate through _ptr parameters + for (int i = 0; i < (int)_shader->_ptr_spec.size(); ++i) { + Shader::ShaderPtrSpec &spec = _shader->_ptr_spec[i]; + const Shader::ShaderPtrData *ptr_data =_glgsg->fetch_ptr_parameter(spec); if (ptr_data == NULL){ //the input is not contained in ShaderPtrData release_resources(); return; } - //check if the data must be shipped to the GPU - /*if (!ptr_data->_updated) - continue; - ptr_data->_updated = false;*/ //Check if the size of the shader input and ptr_data match - int input_size = _ptr._dim[0] * _ptr._dim[1] * _ptr._dim[2]; + int input_size = spec._dim[0] * spec._dim[1] * spec._dim[2]; // dimension is negative only if the parameter had the (deprecated)k_ prefix. - if ((input_size > ptr_data->_size) && (_ptr._dim[0] > 0)) { - GLCAT.error() << _ptr._id._name << ": incorrect number of elements, expected " + if ((input_size > ptr_data->_size) && (spec._dim[0] > 0)) { + GLCAT.error() << spec._id._name << ": incorrect number of elements, expected " << input_size <<" got " << ptr_data->_size << "\n"; release_resources(); return; } - CGparameter p = _cg_parameter_map[_ptr._id._seqno]; + CGparameter p = _cg_parameter_map[spec._id._seqno]; switch (ptr_data->_type) { case Shader::SPT_float: - switch(_ptr._info._class) { + switch (spec._info._class) { case Shader::SAC_scalar: cgSetParameter1fv(p, (float*)ptr_data->_ptr); continue; case Shader::SAC_vector: - switch (_ptr._info._type) { + switch (spec._info._type) { case Shader::SAT_vec1: cgSetParameter1fv(p, (float*)ptr_data->_ptr); continue; @@ -479,22 +556,22 @@ issue_parameters(int altered) { continue; case Shader::SAC_array: - switch (_ptr._info._subclass) { + switch (spec._info._subclass) { case Shader::SAC_scalar: - cgGLSetParameterArray1f(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); + cgGLSetParameterArray1f(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; case Shader::SAC_vector: - switch (_ptr._dim[2]) { - case 1: cgGLSetParameterArray1f(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); continue; - case 2: cgGLSetParameterArray2f(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); continue; - case 3: cgGLSetParameterArray3f(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); continue; - case 4: cgGLSetParameterArray4f(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); continue; + switch (spec._dim[2]) { + case 1: cgGLSetParameterArray1f(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; + case 2: cgGLSetParameterArray2f(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; + case 3: cgGLSetParameterArray3f(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; + case 4: cgGLSetParameterArray4f(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; default: - nassertd(_ptr._dim[2] > 0 && _ptr._dim[2] <= 4) continue; + nassertd(spec._dim[2] > 0 && spec._dim[2] <= 4) continue; } continue; case Shader::SAC_matrix: - cgGLSetMatrixParameterArrayfc(p, 0, _ptr._dim[0], (float*)ptr_data->_ptr); + cgGLSetMatrixParameterArrayfc(p, 0, spec._dim[0], (float*)ptr_data->_ptr); continue; default: nassertd(false) continue; @@ -504,13 +581,13 @@ issue_parameters(int altered) { } case Shader::SPT_double: - switch(_ptr._info._class) { + switch (spec._info._class) { case Shader::SAC_scalar: cgSetParameter1dv(p, (double*)ptr_data->_ptr); continue; case Shader::SAC_vector: - switch (_ptr._info._type) { + switch (spec._info._type) { case Shader::SAT_vec1: cgSetParameter1dv(p, (double*)ptr_data->_ptr); continue; @@ -533,22 +610,22 @@ issue_parameters(int altered) { continue; case Shader::SAC_array: - switch (_ptr._info._subclass) { + switch (spec._info._subclass) { case Shader::SAC_scalar: - cgGLSetParameterArray1d(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); + cgGLSetParameterArray1d(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; case Shader::SAC_vector: - switch (_ptr._dim[2]) { - case 1: cgGLSetParameterArray1d(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); continue; - case 2: cgGLSetParameterArray2d(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); continue; - case 3: cgGLSetParameterArray3d(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); continue; - case 4: cgGLSetParameterArray4d(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); continue; + switch (spec._dim[2]) { + case 1: cgGLSetParameterArray1d(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; + case 2: cgGLSetParameterArray2d(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; + case 3: cgGLSetParameterArray3d(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; + case 4: cgGLSetParameterArray4d(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; default: - nassertd(_ptr._dim[2] > 0 && _ptr._dim[2] <= 4) continue; + nassertd(spec._dim[2] > 0 && spec._dim[2] <= 4) continue; } continue; case Shader::SAC_matrix: - cgGLSetMatrixParameterArraydc(p, 0, _ptr._dim[0], (double*)ptr_data->_ptr); + cgGLSetMatrixParameterArraydc(p, 0, spec._dim[0], (double*)ptr_data->_ptr); continue; default: nassertd(false) continue; @@ -559,12 +636,12 @@ issue_parameters(int altered) { continue; case Shader::SPT_int: - switch(_ptr._info._class) { + switch (spec._info._class) { case Shader::SAC_scalar: cgSetParameter1iv(p, (int*)ptr_data->_ptr); continue; case Shader::SAC_vector: - switch(_ptr._info._type) { + switch (spec._info._type) { case Shader::SAT_vec1: cgSetParameter1iv(p, (int*)ptr_data->_ptr); continue; case Shader::SAT_vec2: cgSetParameter2iv(p, (int*)ptr_data->_ptr); continue; case Shader::SAT_vec3: cgSetParameter3iv(p, (int*)ptr_data->_ptr); continue; @@ -576,21 +653,27 @@ issue_parameters(int altered) { nassertd(false) continue; } default: - GLCAT.error() << _ptr._id._name << ":" << "unrecognized parameter type\n"; + GLCAT.error() << spec._id._name << ":" << "unrecognized parameter type\n"; release_resources(); return; } } } - for (int i=0; i<(int)_shader->_mat_spec.size(); i++) { - if (altered & (_shader->_mat_spec[i]._dep[0] | _shader->_mat_spec[i]._dep[1])) { - const LMatrix4 *val = _glgsg->fetch_specified_value(_shader->_mat_spec[i], altered); + if (altered & _shader->_mat_deps) { + for (int i = 0; i < (int)_shader->_mat_spec.size(); ++i) { + Shader::ShaderMatSpec &spec = _shader->_mat_spec[i]; + + if ((altered & (spec._dep[0] | spec._dep[1])) == 0) { + continue; + } + + const LMatrix4 *val = _glgsg->fetch_specified_value(spec, altered); if (!val) continue; const PN_stdfloat *data = val->get_data(); - CGparameter p = _cg_parameter_map[_shader->_mat_spec[i]._id._seqno]; - switch (_shader->_mat_spec[i]._piece) { + CGparameter p = _cg_parameter_map[spec._id._seqno]; + switch (spec._piece) { case Shader::SMP_whole: GLfc(cgGLSetMatrixParameter)(p, data); continue; case Shader::SMP_transpose: GLfr(cgGLSetMatrixParameter)(p, data); continue; case Shader::SMP_col0: GLf(cgGLSetParameter4)(p, data[0], data[4], data[ 8], data[12]); continue; @@ -981,9 +1064,9 @@ disable_shader_texture_bindings() { //////////////////////////////////////////////////////////////////// void CLP(CgShaderContext):: update_shader_texture_bindings(ShaderContext *prev) { - if (prev) { - prev->disable_shader_texture_bindings(); - } + //if (prev) { + // prev->disable_shader_texture_bindings(); + //} if (!valid()) { return; diff --git a/panda/src/glstuff/glCgShaderContext_src.h b/panda/src/glstuff/glCgShaderContext_src.h index da1f0bea78..fb64d37bac 100644 --- a/panda/src/glstuff/glCgShaderContext_src.h +++ b/panda/src/glstuff/glCgShaderContext_src.h @@ -38,19 +38,23 @@ public: ALLOC_DELETED_CHAIN(CLP(CgShaderContext)); INLINE bool valid(void); - void bind(bool reissue_parameters = true); - void unbind(); - void issue_parameters(int altered); + void bind() OVERRIDE; + void unbind() OVERRIDE; + + void set_state_and_transform(const RenderState *state, + const TransformState *modelview_transform, + const TransformState *projection_transform); + + void issue_parameters(int altered) OVERRIDE; void update_transform_table(const TransformTable *table); void update_slider_table(const SliderTable *table); - void disable_shader_vertex_arrays(); - bool update_shader_vertex_arrays(ShaderContext *prev, bool force); - void disable_shader_texture_bindings(); - void update_shader_texture_bindings(ShaderContext *prev); + void disable_shader_vertex_arrays() OVERRIDE; + bool update_shader_vertex_arrays(ShaderContext *prev, bool force) OVERRIDE; + void disable_shader_texture_bindings() OVERRIDE; + void update_shader_texture_bindings(ShaderContext *prev) OVERRIDE; INLINE bool uses_standard_vertex_arrays(void); INLINE bool uses_custom_vertex_arrays(void); - INLINE bool uses_custom_texture_bindings(void); // Special values for location to indicate conventional attrib slots. enum ConventionalAttrib { @@ -74,6 +78,11 @@ private: pvector _cg_parameter_map; + CPT(RenderState) _state_rs; + CPT(TransformState) _modelview_transform; + CPT(TransformState) _projection_transform; + GLint _frame_number; + CLP(GraphicsStateGuardian) *_glgsg; bool _has_divisor; diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index e440ecb988..78ecf91bb1 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -307,7 +307,7 @@ rebuild_bitplanes() { RenderTexturePlane plane = rt._plane; Texture *tex = rt._texture; - if (rtm_mode == RTM_bind_layered) { + if (rtm_mode == RTM_bind_layered && glgsg->_supports_geometry_shaders) { if (tex->get_z_size() != _rb_size_z) { GLCAT.warning() << "All textures attached to layered FBO should have the same layer count!\n"; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index bfc5914b03..5fc640cce7 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -1527,11 +1527,15 @@ reset() { _glVertexAttribLPointer = NULL; #endif -#ifndef OPENGLES_1 // We need to have a default shader to apply in case // something didn't happen to have a shader applied, or // if it failed to compile. This default shader just outputs // a red color, indicating that something went wrong. +#ifndef SUPPORT_FIXED_FUNCTION + if (_default_shader == NULL) { + _default_shader = Shader::make(Shader::SL_GLSL, default_vshader, default_fshader); + } +#elif !defined(OPENGLES) if (_default_shader == NULL && core_profile) { _default_shader = Shader::make(Shader::SL_GLSL, default_vshader, default_fshader); } @@ -2926,6 +2930,11 @@ clear_before_callback() { #ifndef OPENGLES if (_supports_sampler_objects) { _glBindSampler(0, 0); + + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindSampler(0, 0)\n"; + } } #endif } @@ -5548,6 +5557,11 @@ framebuffer_copy_to_texture(Texture *tex, int view, int z, if (new_image && gtc->_immutable) { gtc->reset_data(); glBindTexture(target, gtc->_index); + + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindTexture(0x" << hex << target << dec << ", " << gtc->_index << ")\n"; + } } #ifndef OPENGLES @@ -5844,12 +5858,6 @@ do_issue_transform() { #endif _transform_stale = false; -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_transform); - } -#endif - report_my_gl_errors(); } @@ -5885,9 +5893,9 @@ do_issue_shade_model() { // Description: //////////////////////////////////////////////////////////////////// void CLP(GraphicsStateGuardian):: -do_issue_shader(bool state_has_changed) { +do_issue_shader() { ShaderContext *context = 0; - Shader *shader = (Shader *)(_target_shader->get_shader()); + Shader *shader = (Shader *)_target_shader->get_shader(); #ifndef SUPPORT_FIXED_FUNCTION // If we don't have a shader, apply the default shader. @@ -5919,18 +5927,13 @@ do_issue_shader(bool state_has_changed) { if (context != _current_shader_context) { // Use a completely different shader than before. // Unbind old shader, bind the new one. - if (_current_shader_context != 0) { + if (_current_shader_context != NULL && + _current_shader->get_language() != shader->get_language()) { _current_shader_context->unbind(); } context->bind(); _current_shader = shader; _current_shader_context = context; - context->issue_parameters(Shader::SSD_shaderinputs); - } else { - if (state_has_changed) { - // Use the same shader as before, but with new input arguments. - context->issue_parameters(Shader::SSD_shaderinputs); - } } } @@ -6410,6 +6413,11 @@ do_issue_blending() { _glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_ZERO, GL_ONE); } + + if (GLCAT.is_spam()) { + GLCAT.spam() << "glBlendEquation(GL_FUNC_ADD)\n"; + GLCAT.spam() << "glBlendFunc(GL_ZERO, GL_ONE)\n"; + } return; } else { set_color_write_mask(color_channels); @@ -6433,16 +6441,23 @@ do_issue_blending() { enable_blend(true); _glBlendEquation(get_blend_equation_type(color_blend_mode)); glBlendFunc(get_blend_func(color_blend->get_operand_a()), - get_blend_func(color_blend->get_operand_b())); + get_blend_func(color_blend->get_operand_b())); + LColor c; if (_color_blend_involves_color_scale) { // Apply the current color scale to the blend mode. - _glBlendColor(_current_color_scale[0], _current_color_scale[1], - _current_color_scale[2], _current_color_scale[3]); - + c = _current_color_scale; } else { - LColor c = color_blend->get_color(); - _glBlendColor(c[0], c[1], c[2], c[3]); + c = color_blend->get_color(); + } + + _glBlendColor(c[0], c[1], c[2], c[3]); + + if (GLCAT.is_spam()) { + GLCAT.spam() << "glBlendEquation(" << color_blend_mode << ")\n"; + GLCAT.spam() << "glBlendFunc(" << color_blend->get_operand_a() + << color_blend->get_operand_b() << ")\n"; + GLCAT.spam() << "glBlendColor(" << c << ")\n"; } return; } @@ -6460,6 +6475,11 @@ do_issue_blending() { enable_blend(true); _glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if (GLCAT.is_spam()) { + GLCAT.spam() << "glBlendEquation(GL_FUNC_ADD)\n"; + GLCAT.spam() << "glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)\n"; + } return; case TransparencyAttrib::M_multisample: @@ -6489,6 +6509,11 @@ do_issue_blending() { enable_blend(true); _glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if (GLCAT.is_spam()) { + GLCAT.spam() << "glBlendEquation(GL_FUNC_ADD)\n"; + GLCAT.spam() << "glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)\n"; + } return; } @@ -9224,10 +9249,27 @@ set_state_and_transform(const RenderState *target, } _target_rs = target; +#ifndef OPENGLES_1 _target_shader = (const ShaderAttrib *) _target_rs->get_attrib_def(ShaderAttrib::get_class_slot()); -#ifndef OPENGLES_1 _instance_count = _target_shader->get_instance_count(); + + if (_target_shader != _state_shader) { + //PStatGPUTimer timer(this, _draw_set_state_shader_pcollector); + do_issue_shader(); + _state_shader = _target_shader; + _state_mask.clear_bit(TextureAttrib::get_class_slot()); + } +#ifndef SUPPORT_FIXED_FUNCTION + else { // In the case of OpenGL ES 2.x, we need to glUseShader before we draw anything. + do_issue_shader(); + _state_mask.clear_bit(TextureAttrib::get_class_slot()); + } +#endif + + if (_current_shader_context != NULL) { + _current_shader_context->set_state_and_transform(target, transform, _projection_mat); + } #endif #ifdef SUPPORT_FIXED_FUNCTION @@ -9256,11 +9298,6 @@ set_state_and_transform(const RenderState *target, //PStatGPUTimer timer(this, _draw_set_state_clip_plane_pcollector); do_issue_clip_plane(); _state_mask.set_bit(clip_plane_slot); -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_clip_planes); - } -#endif } int color_slot = ColorAttrib::get_class_slot(); @@ -9274,12 +9311,6 @@ set_state_and_transform(const RenderState *target, do_issue_color_scale(); _state_mask.set_bit(color_slot); _state_mask.set_bit(color_scale_slot); -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_color); - _current_shader_context->issue_parameters(Shader::SSD_colorscale); - } -#endif } int cull_face_slot = CullFaceAttrib::get_class_slot(); @@ -9360,20 +9391,6 @@ set_state_and_transform(const RenderState *target, _state_mask.set_bit(color_blend_slot); } - if (_target_shader != _state_shader) { - //PStatGPUTimer timer(this, _draw_set_state_shader_pcollector); -#ifndef OPENGLES_1 - do_issue_shader(true); -#endif - _state_shader = _target_shader; - _state_mask.clear_bit(TextureAttrib::get_class_slot()); - } -#ifndef SUPPORT_FIXED_FUNCTION - else { // In the case of OpenGL ES 2.x, we need to glUseShader before we draw anything. - do_issue_shader(false); - } -#endif - int texture_slot = TextureAttrib::get_class_slot(); if (_target_rs->get_attrib(texture_slot) != _state_rs->get_attrib(texture_slot) || !_state_mask.get_bit(texture_slot)) { @@ -9441,11 +9458,6 @@ set_state_and_transform(const RenderState *target, do_issue_material(); #endif _state_mask.set_bit(material_slot); -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_material); - } -#endif } int light_slot = LightAttrib::get_class_slot(); @@ -9456,11 +9468,6 @@ set_state_and_transform(const RenderState *target, do_issue_light(); #endif _state_mask.set_bit(light_slot); -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_light); - } -#endif } int stencil_slot = StencilAttrib::get_class_slot(); @@ -9479,11 +9486,6 @@ set_state_and_transform(const RenderState *target, do_issue_fog(); #endif _state_mask.set_bit(fog_slot); -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_fog); - } -#endif } int scissor_slot = ScissorAttrib::get_class_slot(); @@ -9528,7 +9530,7 @@ do_issue_texture() { #ifdef OPENGLES_1 update_standard_texture_bindings(); #else - if (_current_shader_context == 0 || !_current_shader_context->uses_custom_texture_bindings()) { + if (_current_shader_context == 0) { // No shader, or a non-Cg shader. if (_texture_binding_shader_context != 0) { _texture_binding_shader_context->disable_shader_texture_bindings(); @@ -9909,9 +9911,9 @@ update_show_usage_texture_bindings(int show_stage_index) { UsageTextureKey key(texture->get_x_size(), texture->get_y_size()); UsageTextures::iterator ui = _usage_textures.find(key); + GLuint index; if (ui == _usage_textures.end()) { // Need to create a new texture for this size. - GLuint index; glGenTextures(1, &index); glBindTexture(GL_TEXTURE_2D, index); //TODO: this could be a lot simpler with glTexStorage2D @@ -9921,10 +9923,15 @@ update_show_usage_texture_bindings(int show_stage_index) { } else { // Just bind the previously-created texture. - GLuint index = (*ui).second; + index = (*ui).second; glBindTexture(GL_TEXTURE_2D, index); } + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindTexture(GL_TEXTURE_2D, " << index << ")\n"; + } + //TODO: glBindSampler(0) ? } @@ -10468,9 +10475,14 @@ specify_texture(CLP(TextureContext) *gtc, const SamplerState &sampler) { #endif #ifndef OPENGLES - glTexParameterf(target, GL_TEXTURE_MIN_LOD, sampler.get_min_lod()); - glTexParameterf(target, GL_TEXTURE_MAX_LOD, sampler.get_max_lod()); - glTexParameterf(target, GL_TEXTURE_LOD_BIAS, sampler.get_lod_bias()); + if (is_at_least_gl_version(1, 2)) { + glTexParameterf(target, GL_TEXTURE_MIN_LOD, sampler.get_min_lod()); + glTexParameterf(target, GL_TEXTURE_MAX_LOD, sampler.get_max_lod()); + + if (is_at_least_gl_version(1, 4)) { + glTexParameterf(target, GL_TEXTURE_LOD_BIAS, sampler.get_lod_bias()); + } + } #endif report_my_gl_errors(); @@ -10505,7 +10517,12 @@ apply_texture(CLP(TextureContext) *gtc) { gtc->reset_data(); gtc->_target = target; } + glBindTexture(target, gtc->_index); + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindTexture(0x" << hex << target << dec << ", " << gtc->_index << ")\n"; + } report_my_gl_errors(); return true; @@ -10537,8 +10554,8 @@ apply_sampler(GLuint unit, const SamplerState &sampler, CLP(TextureContext) *gtc _glBindSampler(unit, gsc->_index); if (GLCAT.is_spam()) { - GLCAT.spam() - << "bind " << unit << " " << sampler << "\n"; + GLCAT.spam() << "glBindSampler(" << unit << ", " + << gsc->_index << "): " << sampler << "\n"; } } else @@ -10791,6 +10808,11 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) { GLCAT.warning() << "Attempt to modify texture with immutable storage, recreating texture.\n"; gtc->reset_data(); glBindTexture(target, gtc->_index); + + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindTexture(0x" << hex << target << dec << ", " << gtc->_index << ")\n"; + } } #ifndef OPENGLES @@ -11045,6 +11067,8 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) { gtc->update_data_size_bytes(get_texture_memory_size(tex)); } + nassertr(gtc->_has_storage, false); + if (tex->get_post_load_store_cache()) { tex->set_post_load_store_cache(false); // OK, get the RAM image, and save it in a BamCache record. @@ -11752,6 +11776,10 @@ do_extract_texture_data(CLP(TextureContext) *gtc) { #endif glBindTexture(target, gtc->_index); + if (GLCAT.is_spam()) { + GLCAT.spam() + << "glBindTexture(0x" << hex << target << dec << ", " << gtc->_index << ")\n"; + } Texture *tex = gtc->get_texture(); diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index f38dd5326c..52845621a6 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -399,7 +399,7 @@ protected: void do_issue_depth_offset(); void do_issue_shade_model(); #ifndef OPENGLES_1 - void do_issue_shader(bool state_has_changed = false); + void do_issue_shader(); #endif #ifdef SUPPORT_FIXED_FUNCTION void do_issue_material(); @@ -462,8 +462,10 @@ protected: INLINE void enable_stencil_test(bool val); INLINE void enable_blend(bool val); INLINE void enable_depth_test(bool val); +#ifdef SUPPORT_FIXED_FUNCTION INLINE void enable_fog(bool val); INLINE void enable_alpha_test(bool val); +#endif INLINE void enable_polygon_offset(bool val); INLINE void set_color_write_mask(int mask); diff --git a/panda/src/glstuff/glShaderContext_src.I b/panda/src/glstuff/glShaderContext_src.I index c3424b8cca..d95671510f 100644 --- a/panda/src/glstuff/glShaderContext_src.I +++ b/panda/src/glstuff/glShaderContext_src.I @@ -55,13 +55,3 @@ INLINE bool CLP(ShaderContext):: uses_custom_vertex_arrays() { return true; } - -//////////////////////////////////////////////////////////////////// -// Function: GLShaderContext::uses_custom_texture_bindings -// Access: Public -// Description: Always true, for now. -//////////////////////////////////////////////////////////////////// -INLINE bool CLP(ShaderContext):: -uses_custom_texture_bindings() { - return true; -} diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 4602f60e7a..49eb12221a 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -18,17 +18,15 @@ #include "pStatGPUTimer.h" -TypeHandle CLP(ShaderContext)::_type_handle; +#include "colorAttrib.h" +#include "colorScaleAttrib.h" +#include "materialAttrib.h" +#include "shaderAttrib.h" +#include "fogAttrib.h" +#include "lightAttrib.h" +#include "clipPlaneAttrib.h" -#ifndef GL_GEOMETRY_SHADER_EXT -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -#endif -#ifndef GL_GEOMETRY_VERTICES_OUT_EXT -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#endif -#ifndef GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#endif +TypeHandle CLP(ShaderContext)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GLShaderContext::ParseAndSetShaderUniformVars @@ -228,6 +226,7 @@ parse_and_set_short_hand_shader_vars(Shader::ShaderArgId &arg_id, GLenum param_t objShader->cp_optimize_mat_spec(bind); objShader->_mat_spec.push_back(bind); + objShader->_mat_deps |= bind._dep[0] | bind._dep[1]; if (param_size > 1) { // We support arrays of rows and arrays of columns, so we can @@ -338,8 +337,14 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext reflect_attribute(i, name_buffer, name_buflen); } - _glgsg->_glUseProgram(0); _glgsg->report_my_gl_errors(); + + // Restore the active shader. + if (_glgsg->_current_shader_context == NULL) { + _glgsg->_glUseProgram(0); + } else { + _glgsg->_current_shader_context->bind(); + } } //////////////////////////////////////////////////////////////////// @@ -715,8 +720,6 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._arg[0] = NULL; bind._arg[1] = NULL; - bind._dep[0] = Shader::SSD_general | Shader::SSD_transform; - bind._dep[1] = Shader::SSD_general | Shader::SSD_transform; if (matrix_name == "ModelViewProjectionMatrix") { if (inverse) { @@ -802,7 +805,9 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { GLCAT.error() << "Unrecognized uniform matrix name '" << matrix_name << "'!\n"; return; } + _shader->cp_optimize_mat_spec(bind); _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0] | bind._dep[1]; return; } if (size > 7 && noprefix.substr(0, 7) == "Texture") { @@ -846,6 +851,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._piece = Shader::SMP_row0; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } else if (noprefix == "Material.diffuse") { @@ -855,6 +861,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._piece = Shader::SMP_row1; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } else if (noprefix == "Material.emission") { @@ -864,6 +871,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._piece = Shader::SMP_row2; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } else if (noprefix == "Material.specular") { @@ -873,6 +881,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._piece = Shader::SMP_row3x3; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } else if (noprefix == "Material.shininess") { @@ -882,6 +891,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._piece = Shader::SMP_cell15; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } } @@ -906,6 +916,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { return; } _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } if (noprefix == "Color") { @@ -929,6 +940,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { return; } _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } if (noprefix == "ClipPlane") { @@ -951,6 +963,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._arg[1] = NULL; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; } return; } @@ -975,6 +988,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { return; } _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } if (noprefix == "TransformTable") { @@ -1016,8 +1030,9 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._part[0] = Shader::SMO_world_to_view; bind._part[1] = Shader::SMO_view_to_apiview; bind._dep[0] = Shader::SSD_general | Shader::SSD_transform; - bind._dep[1] = Shader::SSD_general | Shader::SSD_transform; + bind._dep[1] = Shader::SSD_general; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0] | bind._dep[1]; return; } else if (noprefix == "InverseViewMatrix" || noprefix == "ViewMatrixInverse") { @@ -1025,9 +1040,10 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_compose; bind._part[0] = Shader::SMO_apiview_to_view; bind._part[1] = Shader::SMO_view_to_world; - bind._dep[0] = Shader::SSD_general | Shader::SSD_transform; + bind._dep[0] = Shader::SSD_general; bind._dep[1] = Shader::SSD_general | Shader::SSD_transform; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0] | bind._dep[1]; return; } else if (noprefix == "FrameTime") { @@ -1035,9 +1051,10 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_frame_time; bind._part[1] = Shader::SMO_identity; - bind._dep[0] = Shader::SSD_general; + bind._dep[0] = Shader::SSD_general | Shader::SSD_frame; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0] | bind._dep[1]; return; } else if (noprefix == "DeltaFrameTime") { @@ -1045,9 +1062,10 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_frame_delta; bind._part[1] = Shader::SMO_identity; - bind._dep[0] = Shader::SSD_general; + bind._dep[0] = Shader::SSD_general | Shader::SSD_frame; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0] | bind._dep[1]; return; } else if (noprefix == "FrameNumber") { @@ -1124,11 +1142,12 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_mat_constant_x; bind._arg[0] = InternalName::make(param_name); - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs; + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; bind._part[1] = Shader::SMO_identity; bind._arg[1] = NULL; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } case GL_FLOAT_MAT4: { @@ -1138,11 +1157,12 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_mat_constant_x; bind._arg[0] = InternalName::make(param_name); - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs; + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; bind._part[1] = Shader::SMO_identity; bind._arg[1] = NULL; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } case GL_FLOAT: @@ -1172,11 +1192,12 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_vec_constant_x_attrib; bind._arg[0] = iname; - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs; + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; bind._part[1] = Shader::SMO_identity; bind._arg[1] = NULL; bind._dep[1] = Shader::SSD_NONE; _shader->_mat_spec.push_back(bind); + _shader->_mat_deps |= bind._dep[0]; return; } // else fall through } @@ -1228,7 +1249,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._arg = InternalName::make(param_name); bind._dim[0] = 1; - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs; + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; bind._dep[1] = Shader::SSD_NONE; _shader->_ptr_spec.push_back(bind); return; @@ -1335,7 +1356,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { } bind._arg = InternalName::make(param_name); bind._dim[0] = param_size; - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs; + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; bind._dep[1] = Shader::SSD_NONE; _shader->_ptr_spec.push_back(bind); return; @@ -1507,23 +1528,22 @@ release_resources() { // input parameters. //////////////////////////////////////////////////////////////////// void CLP(ShaderContext):: -bind(bool reissue_parameters) { - // GLSL shaders need to be bound before passing parameters. - if (!_shader->get_error_flag()) { - _glgsg->_glUseProgram(_glsl_program); - } - - if (reissue_parameters) { - // Pass in k-parameters and transform-parameters - issue_parameters(Shader::SSD_general); - } - +bind() { if (!_validated) { _glgsg->_glValidateProgram(_glsl_program); glsl_report_program_errors(_glsl_program, false); _validated = true; } + if (!_shader->get_error_flag()) { + _glgsg->_glUseProgram(_glsl_program); + } + + if (GLCAT.is_spam()) { + GLCAT.spam() << "glUseProgram(" << _glsl_program << "): " + << _shader->get_filename() << "\n"; + } + _glgsg->report_my_gl_errors(); } @@ -1534,10 +1554,92 @@ bind(bool reissue_parameters) { //////////////////////////////////////////////////////////////////// void CLP(ShaderContext):: unbind() { + if (GLCAT.is_spam()) { + GLCAT.spam() << "glUseProgram(0)\n"; + } + _glgsg->_glUseProgram(0); _glgsg->report_my_gl_errors(); } +//////////////////////////////////////////////////////////////////// +// Function: GLShaderContext::set_state_and_transform +// Access: Public +// Description: This function gets called whenever the RenderState +// or TransformState has changed, but the Shader +// itself has not changed. It loads new values into the +// shader's parameters. +//////////////////////////////////////////////////////////////////// +void CLP(ShaderContext):: +set_state_and_transform(const RenderState *target_rs, + const TransformState *modelview_transform, + const TransformState *projection_transform) { + + // Find out which state properties have changed. + int altered = 0; + + if (_modelview_transform != modelview_transform) { + _modelview_transform = modelview_transform; + altered |= Shader::SSD_transform; + } + if (_projection_transform != projection_transform) { + _projection_transform = projection_transform; + altered |= Shader::SSD_projection; + } + + if (_state_rs != target_rs) { + if (_state_rs == NULL) { + // We haven't set any state yet. + altered |= Shader::SSD_general; + } else { + if (_state_rs->get_attrib(ColorAttrib::get_class_slot()) != + target_rs->get_attrib(ColorAttrib::get_class_slot())) { + altered |= Shader::SSD_color; + } + if (_state_rs->get_attrib(ColorScaleAttrib::get_class_slot()) != + target_rs->get_attrib(ColorScaleAttrib::get_class_slot())) { + altered |= Shader::SSD_colorscale; + } + if (_state_rs->get_attrib(MaterialAttrib::get_class_slot()) != + target_rs->get_attrib(MaterialAttrib::get_class_slot())) { + altered |= Shader::SSD_material; + } + if (_state_rs->get_attrib(ShaderAttrib::get_class_slot()) != + target_rs->get_attrib(ShaderAttrib::get_class_slot())) { + altered |= Shader::SSD_shaderinputs; + } + if (_state_rs->get_attrib(FogAttrib::get_class_slot()) != + target_rs->get_attrib(FogAttrib::get_class_slot())) { + altered |= Shader::SSD_fog; + } + if (_state_rs->get_attrib(LightAttrib::get_class_slot()) != + target_rs->get_attrib(LightAttrib::get_class_slot())) { + altered |= Shader::SSD_light; + } + if (_state_rs->get_attrib(ClipPlaneAttrib::get_class_slot()) != + target_rs->get_attrib(ClipPlaneAttrib::get_class_slot())) { + altered |= Shader::SSD_clip_planes; + } + if (_state_rs->get_attrib(TexMatrixAttrib::get_class_slot()) != + target_rs->get_attrib(TexMatrixAttrib::get_class_slot())) { + altered |= Shader::SSD_tex_matrix; + } + } + _state_rs = target_rs; + } + + // Is this the first time this shader is used this frame? + int frame_number = ClockObject::get_global_clock()->get_frame_count(); + if (frame_number != _frame_number) { + altered |= Shader::SSD_frame; + _frame_number = frame_number; + } + + if (altered != 0) { + issue_parameters(altered); + } +} + //////////////////////////////////////////////////////////////////// // Function: GLShaderContext::issue_parameters // Access: Public @@ -1545,35 +1647,30 @@ unbind() { // or TransformState has changed, but the Shader // itself has not changed. It loads new values into the // shader's parameters. -// -// If "altered" is false, that means you promise that -// the parameters for this shader context have already -// been issued once, and that since the last time the -// parameters were issued, no part of the render -// state has changed except the external and internal -// transforms. //////////////////////////////////////////////////////////////////// void CLP(ShaderContext):: issue_parameters(int altered) { - //PStatGPUTimer timer(_glgsg, _glgsg->_draw_set_state_shader_parameters_pcollector); + PStatGPUTimer timer(_glgsg, _glgsg->_draw_set_state_shader_parameters_pcollector); - if (!valid()) { - return; + if (GLCAT.is_spam()) { + GLCAT.spam() + << "Setting uniforms for " << _shader->get_filename() + << " (altered 0x" << hex << altered << dec << ")\n"; } - if (_frame_number_loc != -1) { - int current_frame = ClockObject::get_global_clock()->get_frame_count(); - if (current_frame != _frame_number) { - _glgsg->_glUniform1i(_frame_number_loc, current_frame); - _frame_number = current_frame; + // We have no way to track modifications to PTAs, so we assume that + // they are modified every frame and when we switch ShaderAttribs. + if (altered & (Shader::SSD_shaderinputs | Shader::SSD_frame)) { + + // If we have an osg_FrameNumber input, set it now. + if ((altered | Shader::SSD_frame) != 0 && _frame_number_loc >= 0) { + _glgsg->_glUniform1i(_frame_number_loc, _frame_number); } - } - // Iterate through _ptr parameters - for (int i = 0; i < (int)_shader->_ptr_spec.size(); ++i) { - Shader::ShaderPtrSpec &spec = _shader->_ptr_spec[i]; + // Iterate through _ptr parameters + for (int i = 0; i < (int)_shader->_ptr_spec.size(); ++i) { + Shader::ShaderPtrSpec &spec = _shader->_ptr_spec[i]; - if (altered & (spec._dep[0] | spec._dep[1])) { const Shader::ShaderPtrData* ptr_data = _glgsg->fetch_ptr_parameter(spec); if (ptr_data == NULL) { //the input is not contained in ShaderPtrData release_resources(); @@ -1657,10 +1754,14 @@ issue_parameters(int altered) { } } - for (int i = 0; i < (int)_shader->_mat_spec.size(); ++i) { - Shader::ShaderMatSpec &spec = _shader->_mat_spec[i]; + if (altered & _shader->_mat_deps) { + for (int i = 0; i < (int)_shader->_mat_spec.size(); ++i) { + Shader::ShaderMatSpec &spec = _shader->_mat_spec[i]; + + if ((altered & (spec._dep[0] | spec._dep[1])) == 0) { + continue; + } - if (altered & (spec._dep[0] | spec._dep[1])) { const LMatrix4 *val = _glgsg->fetch_specified_value(spec, altered); if (!val) continue; #ifndef STDFLOAT_DOUBLE @@ -1814,12 +1915,12 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { return true; } -#ifdef SUPPORT_IMMEDIATE_MODE - if (_glgsg->_use_sender) { - GLCAT.error() << "immediate mode shaders not implemented yet\n"; - } else -#endif // SUPPORT_IMMEDIATE_MODE - { + if (valid()) { + // Get the active ColorAttrib. We'll need it to determine how to + // apply vertex colors. + const ColorAttrib *color_attrib; + _state_rs->get_attrib_def(color_attrib); + const GeomVertexArrayDataHandle *array_reader; Geom::NumericType numeric_type; int start, stride, num_values; @@ -1845,7 +1946,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { // Don't apply vertex colors if they are disabled with a ColorAttrib. int num_elements, element_stride, divisor; bool normalized; - if ((p != _color_attrib_index || _glgsg->_vertex_colors_enabled) && + if ((p != _color_attrib_index || color_attrib->get_type() == ColorAttrib::T_vertex) && _glgsg->_data_reader->get_array_info(name, array_reader, num_values, numeric_type, normalized, start, stride, divisor, @@ -1891,9 +1992,9 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { if (p == _color_attrib_index) { // Vertex colors are disabled or not present. Apply flat color. #if defined(STDFLOAT_DOUBLE) && !defined(OPENGLES) - _glgsg->_glVertexAttrib4dv(p, _glgsg->_scene_graph_color.get_data()); + _glgsg->_glVertexAttrib4dv(p, color_attrib->get_color().get_data()); #else - _glgsg->_glVertexAttrib4fv(p, _glgsg->_scene_graph_color.get_data()); + _glgsg->_glVertexAttrib4fv(p, color_attrib->get_color().get_data()); #endif } } @@ -1926,6 +2027,8 @@ disable_shader_texture_bindings() { return; } + DO_PSTATS_STUFF(_glgsg->_texture_state_pcollector.add_level(1)); + for (int i = 0; i < _shader->_tex_spec.size(); ++i) { #ifndef OPENGLES // Check if bindless was used, if so, there's nothing to unbind. @@ -1960,9 +2063,7 @@ disable_shader_texture_bindings() { break; case Texture::TT_3d_texture: -#ifndef OPENGLES_1 glBindTexture(GL_TEXTURE_3D, 0); -#endif break; case Texture::TT_2d_texture_array: @@ -2026,9 +2127,9 @@ disable_shader_texture_bindings() { //////////////////////////////////////////////////////////////////// void CLP(ShaderContext):: update_shader_texture_bindings(ShaderContext *prev) { - if (prev) { - prev->disable_shader_texture_bindings(); - } + //if (prev) { + // prev->disable_shader_texture_bindings(); + //} if (!valid()) { return; @@ -2134,8 +2235,10 @@ update_shader_texture_bindings(ShaderContext *prev) { // We get the TextureAttrib directly from the _target_rs, not the // filtered TextureAttrib in _target_texture. - const TextureAttrib *texattrib = DCAST(TextureAttrib, _glgsg->_target_rs->get_attrib_def(TextureAttrib::get_class_slot())); - nassertv(texattrib != (TextureAttrib *)NULL); + const TextureAttrib *texattrib; + _glgsg->_target_rs->get_attrib_def(texattrib); + //const TextureAttrib *texattrib; + //_state_rs->get_attrib_def(TextureAttrib::get_class_slot()); for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) { Shader::ShaderTexSpec &spec = _shader->_tex_spec[i]; diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index cc04500c9d..f6231b8481 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -45,19 +45,23 @@ public: bool get_sampler_texture_type(int &out, GLenum param_type); INLINE bool valid(void); - void bind(bool reissue_parameters = true); + void bind(); void unbind(); + + void set_state_and_transform(const RenderState *state, + const TransformState *modelview_transform, + const TransformState *projection_transform); + void issue_parameters(int altered); void update_transform_table(const TransformTable *table); void update_slider_table(const SliderTable *table); void disable_shader_vertex_arrays(); bool update_shader_vertex_arrays(ShaderContext *prev, bool force); - void disable_shader_texture_bindings(); - void update_shader_texture_bindings(ShaderContext *prev); + void disable_shader_texture_bindings() OVERRIDE; + void update_shader_texture_bindings(ShaderContext *prev) OVERRIDE; INLINE bool uses_standard_vertex_arrays(void); INLINE bool uses_custom_vertex_arrays(void); - INLINE bool uses_custom_texture_bindings(void); private: bool _validated; @@ -65,6 +69,10 @@ private: typedef pvector GLSLShaders; GLSLShaders _glsl_shaders; + CPT(RenderState) _state_rs; + CPT(TransformState) _modelview_transform; + CPT(TransformState) _projection_transform; + //struct ParamContext { // CPT(InternalName) _name; // GLint _location; diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index b20ac8e1b2..57b5882ea7 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -416,7 +416,17 @@ cp_dependency(ShaderMatInput inp) { if ((inp == SMO_model_to_view) || (inp == SMO_view_to_model) || (inp == SMO_model_to_apiview) || - (inp == SMO_apiview_to_model)) { + (inp == SMO_apiview_to_model) || + (inp == SMO_view_to_world) || + (inp == SMO_world_to_view) || + (inp == SMO_view_x_to_view) || + (inp == SMO_view_to_view_x) || + (inp == SMO_apiview_x_to_view) || + (inp == SMO_view_to_apiview_x) || + (inp == SMO_clip_x_to_view) || + (inp == SMO_view_to_clip_x) || + (inp == SMO_apiclip_x_to_view) || + (inp == SMO_view_to_apiclip_x)) { dep |= SSD_transform; } if ((inp == SMO_texpad_x) || @@ -438,6 +448,25 @@ cp_dependency(ShaderMatInput inp) { (inp == SMO_apiclip_x_to_view) || (inp == SMO_view_to_apiclip_x)) { dep |= SSD_shaderinputs; + + if ((inp == SMO_alight_x) || + (inp == SMO_dlight_x) || + (inp == SMO_plight_x) || + (inp == SMO_slight_x) || + (inp == SMO_satten_x) || + (inp == SMO_vec_constant_x_attrib) || + (inp == SMO_view_x_to_view) || + (inp == SMO_view_to_view_x) || + (inp == SMO_apiview_x_to_view) || + (inp == SMO_view_to_apiview_x) || + (inp == SMO_clip_x_to_view) || + (inp == SMO_view_to_clip_x) || + (inp == SMO_apiclip_x_to_view) || + (inp == SMO_view_to_apiclip_x)) { + // We can't track changes to these yet, so we have to assume that + // they are modified every frame. + dep |= SSD_frame; + } } if ((inp == SMO_light_ambient) || (inp == SMO_light_source_i_attrib)) { @@ -455,6 +484,21 @@ cp_dependency(ShaderMatInput inp) { if (inp == SMO_texmat_i || inp == SMO_inv_texmat_i) { dep |= SSD_tex_matrix; } + if ((inp == SMO_window_size) || + (inp == SMO_pixel_size) || + (inp == SMO_frame_number) || + (inp == SMO_frame_time) || + (inp == SMO_frame_delta)) { + dep |= SSD_frame; + } + if ((inp == SMO_clip_to_view) || + (inp == SMO_view_to_clip) || + (inp == SMO_apiclip_to_view) || + (inp == SMO_view_to_apiclip) || + (inp == SMO_apiview_to_apiclip) || + (inp == SMO_apiclip_to_apiview)) { + dep |= SSD_projection; + } return dep; } @@ -857,6 +901,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { } cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -931,6 +976,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -944,6 +990,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -967,6 +1014,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -988,6 +1036,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1029,6 +1078,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { } cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1051,6 +1101,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1072,6 +1123,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1093,6 +1145,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1139,6 +1192,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1195,6 +1249,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { bind._arg[1] = NULL; cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1215,6 +1270,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { bind._arg[1] = NULL; cp_optimize_mat_spec(bind); _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; return true; } @@ -1261,8 +1317,12 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { bind._id = p._id; bind._arg = kinputname; bind._info = p; - bind._dep[0] = SSD_general | SSD_shaderinputs; - bind._dep[1] = SSD_general | SSD_NONE; + + // We specify SSD_frame because a PTA may be modified by the app + // from frame to frame, and we have no way to know. So, we must + // respecify a PTA at least once every frame. + bind._dep[0] = SSD_general | SSD_shaderinputs | SSD_frame; + bind._dep[1] = SSD_NONE; memcpy(bind._dim,arg_dim,sizeof(int)*3); @@ -2050,7 +2110,8 @@ Shader(ShaderLanguage lang) : _parse(0), _loaded(false), _language(lang), - _last_modified(0) + _last_modified(0), + _mat_deps(0) { #ifdef HAVE_CG _cg_vprogram = 0; diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 33fe43b799..0c2fb79401 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -273,6 +273,8 @@ public: SSD_light = 0x080, SSD_clip_planes = 0x100, SSD_tex_matrix = 0x200, + SSD_frame = 0x400, + SSD_projection = 0x800, }; enum ShaderBug { @@ -529,6 +531,7 @@ public: epvector _mat_spec; pvector _tex_spec; pvector _var_spec; + int _mat_deps; bool _error_flag; ShaderFile _text; diff --git a/panda/src/gobj/shaderContext.h b/panda/src/gobj/shaderContext.h index 5785b155c9..8531966a10 100644 --- a/panda/src/gobj/shaderContext.h +++ b/panda/src/gobj/shaderContext.h @@ -36,8 +36,10 @@ class EXPCL_PANDA_GOBJ ShaderContext: public SavedContext { public: INLINE ShaderContext(Shader *se); + INLINE virtual void set_state_and_transform(const RenderState *, const TransformState *, const TransformState*) {}; + INLINE virtual bool valid() { return false; } - INLINE virtual void bind(bool reissue_parameters = true) {}; + INLINE virtual void bind() {}; INLINE virtual void unbind() {}; INLINE virtual void issue_parameters(int altered) {}; INLINE virtual void disable_shader_vertex_arrays() {}; @@ -47,7 +49,6 @@ public: INLINE virtual bool uses_standard_vertex_arrays(void) { return true; }; INLINE virtual bool uses_custom_vertex_arrays(void) { return false; }; - INLINE virtual bool uses_custom_texture_bindings(void) { return false; }; PUBLISHED: INLINE Shader *get_shader() const; diff --git a/panda/src/pgraph/colorBlendAttrib.h b/panda/src/pgraph/colorBlendAttrib.h index dc2975985f..0de99e04e5 100644 --- a/panda/src/pgraph/colorBlendAttrib.h +++ b/panda/src/pgraph/colorBlendAttrib.h @@ -141,10 +141,9 @@ private: static int _attrib_slot; }; -ostream &operator << (ostream &out, ColorBlendAttrib::Mode mode); -ostream &operator << (ostream &out, ColorBlendAttrib::Operand operand); +EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, ColorBlendAttrib::Mode mode); +EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, ColorBlendAttrib::Operand operand); #include "colorBlendAttrib.I" #endif - From 1ee8c5f6d2ede96c267c91623659cbcc26a2b160 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 19:48:24 +0200 Subject: [PATCH 032/200] Oops, typo fix --- panda/src/display/graphicsStateGuardian.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index de9b8d0036..02ee982feb 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -817,7 +817,7 @@ PT(GeomMunger) GraphicsStateGuardian:: get_geom_munger(const RenderState *state, Thread *current_thread) { RenderState::Mungers &mungers = state->_mungers; - if (mungers.is_empty()) { + if (!mungers.is_empty()) { // Before we even look up the map, see if the _last_mi value points // to this GSG. This is likely because we tend to visit the same // state multiple times during a frame. Also, this might well be From b9d45ccc04df24f28da03dfd89e78153833931ed Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 21:29:13 +0200 Subject: [PATCH 033/200] Fixes for the fact that render states were no longer sticking around in the cache between frames --- panda/src/pgraph/cullResult.cxx | 79 +++++++++++++++++++---------- panda/src/pgraph/cullResult.h | 11 ++-- panda/src/pgraph/cullableObject.cxx | 4 +- 3 files changed, 61 insertions(+), 33 deletions(-) diff --git a/panda/src/pgraph/cullResult.cxx b/panda/src/pgraph/cullResult.cxx index cd27cc29f5..b346218868 100644 --- a/panda/src/pgraph/cullResult.cxx +++ b/panda/src/pgraph/cullResult.cxx @@ -123,12 +123,9 @@ add_object(CullableObject *object, const CullTraverser *traverser) { Thread *current_thread = traverser->get_current_thread(); CullBinManager *bin_manager = CullBinManager::get_global_ptr(); - const RenderState *state = object->_state; - nassertv(state != (const RenderState *)NULL); - // This is probably a good time to check for an auto rescale setting. const RescaleNormalAttrib *rescale; - state->get_attrib_def(rescale); + object->_state->get_attrib_def(rescale); if (rescale->get_mode() == RescaleNormalAttrib::M_auto) { RescaleNormalAttrib::Mode mode; @@ -140,24 +137,23 @@ add_object(CullableObject *object, const CullTraverser *traverser) { mode = RescaleNormalAttrib::M_normalize; } - state = state->set_attrib(RescaleNormalAttrib::make(mode)); - object->_state = state; + object->_state = object->_state->compose(get_rescale_normal_state(mode)); } // Check to see if there's a special transparency setting. const TransparencyAttrib *trans; - if (state->get_attrib(trans)) { + if (object->_state->get_attrib(trans)) { switch (trans->get_mode()) { case TransparencyAttrib::M_alpha: // M_alpha implies an alpha-write test, so we don't waste time // writing 0-valued pixels. - object->_state = state->compose(get_alpha_state()); + object->_state = object->_state->compose(get_alpha_state()); check_flash_transparency(object->_state, flash_alpha_color); break; case TransparencyAttrib::M_binary: // M_binary is implemented by explicitly setting the alpha test. - object->_state = state->compose(get_binary_state()); + object->_state = object->_state->compose(get_binary_state()); check_flash_transparency(object->_state, flash_binary_color); break; @@ -166,7 +162,7 @@ add_object(CullableObject *object, const CullTraverser *traverser) { // The multisample modes are implemented using M_binary if the // GSG in use doesn't support multisample. if (!_gsg->get_supports_multisample()) { - object->_state = state->compose(get_binary_state()); + object->_state = object->_state->compose(get_binary_state()); } check_flash_transparency(object->_state, flash_multisample_color); break; @@ -174,7 +170,6 @@ add_object(CullableObject *object, const CullTraverser *traverser) { case TransparencyAttrib::M_dual: #ifndef NDEBUG check_flash_transparency(object->_state, flash_dual_color); - state = object->_state; #endif if (!m_dual) { // If m_dual is configured off, it becomes M_alpha. @@ -188,10 +183,8 @@ add_object(CullableObject *object, const CullTraverser *traverser) { // explicit bin already applied; otherwise, M_dual falls back // to M_alpha. { - const CullBinAttrib *bin_attrib = (const CullBinAttrib *) - state->get_attrib(CullBinAttrib::get_class_slot()); - - if (bin_attrib == (CullBinAttrib *)NULL || + const CullBinAttrib *bin_attrib; + if (!object->_state->get_attrib(bin_attrib) || bin_attrib->get_bin_name().empty()) { // We make a copy of the object to draw the transparent part; // this gets placed in the transparent bin. @@ -201,7 +194,7 @@ add_object(CullableObject *object, const CullTraverser *traverser) { { CullableObject *transparent_part = new CullableObject(*object); CPT(RenderState) transparent_state = get_dual_transparent_state(); - transparent_part->_state = state->compose(transparent_state); + transparent_part->_state = object->_state->compose(transparent_state); if (transparent_part->munge_geom (_gsg, _gsg->get_geom_munger(transparent_part->_state, current_thread), traverser, force)) { @@ -217,7 +210,7 @@ add_object(CullableObject *object, const CullTraverser *traverser) { // Now we can draw the opaque part. This will end up in // the opaque bin. - object->_state = state->compose(get_dual_opaque_state()); + object->_state = object->_state->compose(get_dual_opaque_state()); #ifndef NDEBUG if (!m_dual_opaque) { delete object; @@ -255,7 +248,7 @@ add_object(CullableObject *object, const CullTraverser *traverser) { delete wireframe_part; } - object->_state = object->_state->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_filled)); + object->_state = object->_state->compose(get_wireframe_filled_state()); } } @@ -404,13 +397,29 @@ make_new_bin(int bin_index) { return bin_ptr; } +//////////////////////////////////////////////////////////////////// +// Function: CullResult::get_rescale_normal_state +// Access: Private +// Description: Returns a RenderState containing the given rescale +// normal attribute. +//////////////////////////////////////////////////////////////////// +const RenderState *CullResult:: +get_rescale_normal_state(RescaleNormalAttrib::Mode mode) { + static CPT(RenderState) states[RescaleNormalAttrib::M_auto + 1]; + if (states[mode].is_null()) { + states[mode] = RenderState::make(RescaleNormalAttrib::make(mode), + RenderState::get_max_priority()); + } + return states[mode].p(); +} + //////////////////////////////////////////////////////////////////// // Function: CullResult::get_alpha_state // Access: Private // Description: Returns a RenderState that changes the alpha test to // > 0, for implementing M_alpha. //////////////////////////////////////////////////////////////////// -CPT(RenderState) CullResult:: +const RenderState *CullResult:: get_alpha_state() { static CPT(RenderState) state = NULL; if (state == (const RenderState *)NULL) { @@ -418,7 +427,7 @@ get_alpha_state() { // user to override this if he desires. state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_greater, 0.0f)); } - return state; + return state.p(); } //////////////////////////////////////////////////////////////////// @@ -427,7 +436,7 @@ get_alpha_state() { // Description: Returns a RenderState that applies the effects of // M_binary. //////////////////////////////////////////////////////////////////// -CPT(RenderState) CullResult:: +const RenderState *CullResult:: get_binary_state() { static CPT(RenderState) state = NULL; if (state == (const RenderState *)NULL) { @@ -435,7 +444,7 @@ get_binary_state() { TransparencyAttrib::make(TransparencyAttrib::M_none), RenderState::get_max_priority()); } - return state; + return state.p(); } #ifndef NDEBUG @@ -465,7 +474,7 @@ apply_flash_color(CPT(RenderState) &state, const LColor &flash_color) { // Description: Returns a RenderState that renders only the // transparent parts of an object, in support of M_dual. //////////////////////////////////////////////////////////////////// -CPT(RenderState) CullResult:: +const RenderState *CullResult:: get_dual_transparent_state() { static CPT(RenderState) state = NULL; if (state == (const RenderState *)NULL) { @@ -495,12 +504,12 @@ get_dual_transparent_state() { flash_state = flash_state->add_attrib(AlphaTestAttrib::make(AlphaTestAttrib::M_less, 1.0f), RenderState::get_max_priority()); } - return flash_state; + return flash_state.p(); } } #endif // NDEBUG - return state; + return state.p(); } //////////////////////////////////////////////////////////////////// @@ -509,7 +518,7 @@ get_dual_transparent_state() { // Description: Returns a RenderState that renders only the // opaque parts of an object, in support of M_dual. //////////////////////////////////////////////////////////////////// -CPT(RenderState) CullResult:: +const RenderState *CullResult:: get_dual_opaque_state() { static CPT(RenderState) state = NULL; if (state == (const RenderState *)NULL) { @@ -530,12 +539,26 @@ get_dual_opaque_state() { RenderState::get_max_priority()); } - return flash_state; + return flash_state.p(); } } #endif // NDEBUG - return state; + return state.p(); +} + +//////////////////////////////////////////////////////////////////// +// Function: CullResult::get_wireframe_filled_state +// Access: Private +// Description: Returns a RenderState that is composed with the +// filled part of an M_filled_wireframe model. +//////////////////////////////////////////////////////////////////// +const RenderState *CullResult:: +get_wireframe_filled_state() { + static CPT(RenderState) state = RenderState::make( + RenderModeAttrib::make(RenderModeAttrib::M_filled), + RenderState::get_max_priority()); + return state.p(); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/cullResult.h b/panda/src/pgraph/cullResult.h index e24264e469..585b27e606 100644 --- a/panda/src/pgraph/cullResult.h +++ b/panda/src/pgraph/cullResult.h @@ -26,6 +26,7 @@ #include "pvector.h" #include "pset.h" #include "pmap.h" +#include "rescaleNormalAttrib.h" class CullTraverser; class GraphicsStateGuardianBase; @@ -74,10 +75,12 @@ private: void apply_flash_color(CPT(RenderState) &state, const LColor &flash_color); #endif - static CPT(RenderState) get_alpha_state(); - static CPT(RenderState) get_binary_state(); - static CPT(RenderState) get_dual_transparent_state(); - static CPT(RenderState) get_dual_opaque_state(); + static const RenderState *get_rescale_normal_state(RescaleNormalAttrib::Mode mode); + static const RenderState *get_alpha_state(); + static const RenderState *get_binary_state(); + static const RenderState *get_dual_transparent_state(); + static const RenderState *get_dual_opaque_state(); + static const RenderState *get_wireframe_filled_state(); static CPT(RenderState) get_wireframe_overlay_state(const RenderModeAttrib *rmode); GraphicsStateGuardianBase *_gsg; diff --git a/panda/src/pgraph/cullableObject.cxx b/panda/src/pgraph/cullableObject.cxx index 5ad7a9b5f2..2eae19dac5 100644 --- a/panda/src/pgraph/cullableObject.cxx +++ b/panda/src/pgraph/cullableObject.cxx @@ -136,7 +136,9 @@ munge_geom(GraphicsStateGuardianBase *gsg, if (_state->get_attrib(sattr) && sattr->auto_shader()) { GeomVertexDataPipelineReader data_reader(_munged_data, current_thread); if (data_reader.get_format()->get_animation().get_animation_type() == Geom::AT_hardware) { - _state = _state->set_attrib(sattr->set_flag(ShaderAttrib::F_hardware_skinning, true)); + static CPT(RenderState) state = RenderState::make( + DCAST(ShaderAttrib, ShaderAttrib::make())->set_flag(ShaderAttrib::F_hardware_skinning, true)); + _state = _state->compose(state); } } From acc2a310d0cfc82fc9d35cf0eaefbff923b829db Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 28 Jul 2015 21:43:19 +0200 Subject: [PATCH 034/200] Change debug category for shader generator to pgraphnodes --- panda/src/pgraphnodes/shaderGenerator.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 488fe84c95..bb08db38a6 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -538,7 +538,7 @@ create_shader_attrib(const string &txt) { if (_shadows && _dlights[i]->_shadow_caster) { PT(Texture) tex = update_shadow_buffer(_dlights_np[i]); if (tex == NULL) { - pgraph_cat.error() << "Failed to create shadow buffer for DirectionalLight '" << _dlights[i]->get_name() << "'!\n"; + pgraphnodes_cat.error() << "Failed to create shadow buffer for DirectionalLight '" << _dlights[i]->get_name() << "'!\n"; } shattr = DCAST(ShaderAttrib, shattr)->set_shader_input(InternalName::make("dlighttex", i), tex); } else { @@ -553,7 +553,7 @@ create_shader_attrib(const string &txt) { if (_shadows && _slights[i]->_shadow_caster) { PT(Texture) tex = update_shadow_buffer(_slights_np[i]); if (tex == NULL) { - pgraph_cat.error() << "Failed to create shadow buffer for Spotlight '" << _slights[i]->get_name() << "'!\n"; + pgraphnodes_cat.error() << "Failed to create shadow buffer for Spotlight '" << _slights[i]->get_name() << "'!\n"; } shattr = DCAST(ShaderAttrib, shattr)->set_shader_input(InternalName::make("slighttex", i), tex); } else { @@ -635,9 +635,10 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { analyze_renderstate(rs); reset_register_allocator(); - if (pgraph_cat.is_debug()) { - pgraph_cat.debug() - << "Generating shader for render state " << *rs << "\n"; + if (pgraphnodes_cat.is_debug()) { + pgraphnodes_cat.debug() + << "Generating shader for render state " << rs << ":\n"; + rs->write(pgraphnodes_cat.debug(false), 2); } // These variables will hold the results of register allocation. @@ -999,7 +1000,7 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t texcoord" << i << ".w = 1.0f;\n"; break; default: - pgraph_cat.error() << "Unsupported TexGenAttrib mode\n"; + pgraphnodes_cat.error() << "Unsupported TexGenAttrib mode\n"; text << "\t float4 texcoord" << i << " = float4(0, 0, 0, 0);\n"; } } else { @@ -1572,10 +1573,10 @@ combine_mode_as_string(CPT(TextureStage) stage, TextureStage::CombineMode c_mode text << combine_source_as_string(stage, 1, alpha, alpha, texindex); break; case TextureStage::CM_dot3_rgb: - pgraph_cat.error() << "TextureStage::CombineMode DOT3_RGB not yet supported in per-pixel mode.\n"; + pgraphnodes_cat.error() << "TextureStage::CombineMode DOT3_RGB not yet supported in per-pixel mode.\n"; break; case TextureStage::CM_dot3_rgba: - pgraph_cat.error() << "TextureStage::CombineMode DOT3_RGBA not yet supported in per-pixel mode.\n"; + pgraphnodes_cat.error() << "TextureStage::CombineMode DOT3_RGBA not yet supported in per-pixel mode.\n"; break; case TextureStage::CM_replace: default: // Not sure if this is correct as default value. @@ -1695,7 +1696,7 @@ texture_type_as_string(Texture::TextureType ttype) { return "2DARRAY"; break; default: - pgraph_cat.error() << "Unsupported texture type!\n"; + pgraphnodes_cat.error() << "Unsupported texture type!\n"; return "2D"; } } From 64144955a0b0def5a702156f48b82c9fef74228e Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 29 Jul 2015 10:45:55 +0200 Subject: [PATCH 035/200] Fix for typedefs to external types in interrogate --- .../interrogate/interfaceMakerPythonNative.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index a6daee775b..0210ca72fb 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1235,11 +1235,13 @@ void InterfaceMakerPythonNative:: write_sub_module(ostream &out, Object *obj) { //Object * obj = _objects[_embeded_index] ; string class_name = make_safe_name(obj->_itype.get_scoped_name()); + string class_ptr; out << " // Module init upcall for " << obj->_itype.get_scoped_name() << "\n"; if (!obj->_itype.is_typedef()) { out << " // " << *(obj->_itype._cpptype) << "\n"; out << " Dtool_PyModuleClassInit_" << class_name << "(module);\n"; + class_ptr = "&Dtool_" + class_name; } else { // Unwrap typedefs. @@ -1258,22 +1260,29 @@ write_sub_module(ostream &out, Object *obj) { if (!isExportThisRun(wrapped_itype._cpptype)) { _external_imports.insert(TypeManager::resolve_type(wrapped_itype._cpptype)); + + class_ptr = "Dtool_Ptr_" + class_name; + out << " assert(" << class_ptr << " != NULL);\n"; + } else { + class_ptr = "&Dtool_" + class_name; } } std::string export_class_name = classNameFromCppName(obj->_itype.get_name(), false); std::string export_class_name2 = classNameFromCppName(obj->_itype.get_name(), true); + class_ptr = "(PyObject *)" + class_ptr; + // Note: PyModule_AddObject steals a reference, so we have to call Py_INCREF // for every but the first time we add it to the module. if (obj->_itype.is_typedef()) { - out << " Py_INCREF((PyObject *)&Dtool_" << class_name << ");\n"; + out << " Py_INCREF(" << class_ptr << ");\n"; } - out << " PyModule_AddObject(module, \"" << export_class_name << "\", (PyObject *)&Dtool_" << class_name << ");\n"; + out << " PyModule_AddObject(module, \"" << export_class_name << "\", " << class_ptr << ");\n"; if (export_class_name != export_class_name2) { - out << " Py_INCREF((PyObject *)&Dtool_" << class_name << ");\n"; - out << " PyModule_AddObject(module, \"" << export_class_name2 << "\", (PyObject *)&Dtool_" << class_name << ");\n"; + out << " Py_INCREF(Dtool_Ptr_" << class_name << ");\n"; + out << " PyModule_AddObject(module, \"" << export_class_name2 << "\", " << class_ptr << ");\n"; } } From f22cc719959114d24e7c1e2ed43dbc51746bb966 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 29 Jul 2015 14:07:06 +0200 Subject: [PATCH 036/200] Fix double-precision build blibli --- panda/src/glesgsg/glesgsg.h | 6 +--- .../src/glstuff/glGraphicsStateGuardian_src.I | 19 +++++++++++++ .../glstuff/glGraphicsStateGuardian_src.cxx | 28 ++++++++++++------- .../src/glstuff/glGraphicsStateGuardian_src.h | 1 + panda/src/glstuff/glShaderContext_src.cxx | 2 +- panda/src/pnmtext/pnmTextGlyph.cxx | 17 +++++++---- pandatool/src/assimp/assimpLoader.cxx | 2 +- 7 files changed, 52 insertions(+), 23 deletions(-) diff --git a/panda/src/glesgsg/glesgsg.h b/panda/src/glesgsg/glesgsg.h index 6f13f9223c..50dfaeab19 100644 --- a/panda/src/glesgsg/glesgsg.h +++ b/panda/src/glesgsg/glesgsg.h @@ -23,13 +23,9 @@ #define GLP(name) gl##name -#ifndef STDFLOAT_DOUBLE +// OpenGL ES does not support double-precision. #define GLPf(name) gl ## name ## f #define GLPfv(name) gl ## name ## fv -#else // STDFLOAT_DOUBLE -#define GLPf(name) gl ## name ## d -#define GLPfv(name) gl ## name ## dv -#endif // STDFLOAT_DOUBLE #define CLP(name) GLES##name #define GLPREFIX_QUOTED "gl" diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.I b/panda/src/glstuff/glGraphicsStateGuardian_src.I index 5b5a7a81e9..636a80864c 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.I +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.I @@ -644,6 +644,25 @@ clear_color_write_mask() { } } +#ifdef SUPPORT_FIXED_FUNCTION +//////////////////////////////////////////////////////////////////// +// Function: GLGraphicsStateGuardian::call_glLoadMatrix +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void CLP(GraphicsStateGuardian):: +call_glLoadMatrix(const LMatrix4 &mat) { +#if defined(OPENGLES) && defined(STDFLOAT_DOUBLE) + LMatrix4f matf = LCAST(float, mat); + glLoadMatrixf(matf.get_data()); +#elif defined(STDFLOAT_DOUBLE) + glLoadMatrixd(mat.get_data()); +#else + glLoadMatrixf(mat.get_data()); +#endif +} +#endif + #ifdef SUPPORT_FIXED_FUNCTION //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glFogfv diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 5fc640cce7..e61a53487a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -112,6 +112,14 @@ null_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, } #endif +#if defined(OPENGLES) && !defined(OPENGLES_1) +static void APIENTRY +null_glVertexAttrib4dv(GLuint index, const GLdouble *v) { + GLfloat vf[4] = {(GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]}; + glVertexAttrib4fv(index, vf); +} +#endif + static void APIENTRY null_glActiveTexture(GLenum gl_texture_stage) { // If we don't support multitexture, we'd better not try to request @@ -1521,7 +1529,7 @@ reset() { _glUniformMatrix4fv = glUniformMatrix4fv; _glValidateProgram = glValidateProgram; _glVertexAttrib4fv = glVertexAttrib4fv; - _glVertexAttrib4dv = NULL; + _glVertexAttrib4dv = null_glVertexAttrib4dv; _glVertexAttribPointer = glVertexAttribPointer; _glVertexAttribIPointer = NULL; _glVertexAttribLPointer = NULL; @@ -3003,7 +3011,7 @@ prepare_lens() { } glMatrixMode(GL_PROJECTION); - GLPf(LoadMatrix)(_projection_mat->get_mat().get_data()); + call_glLoadMatrix(_projection_mat->get_mat()); report_my_gl_errors(); do_point_size(); @@ -4373,7 +4381,7 @@ end_draw_primitives() { #ifdef SUPPORT_FIXED_FUNCTION if (_transform_stale) { glMatrixMode(GL_MODELVIEW); - GLPf(LoadMatrix)(_internal_transform->get_mat().get_data()); + call_glLoadMatrix(_internal_transform->get_mat()); } if (_data_reader->is_vertex_transformed()) { @@ -5854,7 +5862,7 @@ do_issue_transform() { DO_PSTATS_STUFF(_transform_state_pcollector.add_level(1)); glMatrixMode(GL_MODELVIEW); - GLPf(LoadMatrix)(transform->get_mat().get_data()); + call_glLoadMatrix(transform->get_mat()); #endif _transform_stale = false; @@ -9083,7 +9091,7 @@ begin_bind_lights() { glMatrixMode(GL_MODELVIEW); glPushMatrix(); - GLPf(LoadMatrix)(render_transform->get_mat().get_data()); + call_glLoadMatrix(render_transform->get_mat()); } #endif // SUPPORT_FIXED_FUNCTION @@ -9153,7 +9161,7 @@ begin_bind_clip_planes() { glMatrixMode(GL_MODELVIEW); glPushMatrix(); - GLPf(LoadMatrix)(render_transform->get_mat().get_data()); + call_glLoadMatrix(render_transform->get_mat()); } #endif // SUPPORT_FIXED_FUNCTION @@ -10062,7 +10070,7 @@ do_issue_tex_matrix() { _target_rs->get_attrib_def(target_tex_matrix); if (target_tex_matrix->has_stage(stage)) { - GLPf(LoadMatrix)(target_tex_matrix->get_mat(stage).get_data()); + call_glLoadMatrix(target_tex_matrix->get_mat(stage)); } else { glLoadIdentity(); @@ -10072,7 +10080,7 @@ do_issue_tex_matrix() { // an identity matrix does work. But this buggy-driver // workaround might have other performance implications, so I // leave it out. - // GLPf(LoadMatrix)(LMatrix4::ident_mat().get_data()); + // call_glLoadMatrix(LMatrix4::ident_mat()); } } report_my_gl_errors(); @@ -10247,7 +10255,7 @@ do_issue_tex_gen() { // load the coordinate-system transform. glMatrixMode(GL_MODELVIEW); glPushMatrix(); - GLPf(LoadMatrix)(_cs_transform->get_mat().get_data()); + call_glLoadMatrix(_cs_transform->get_mat()); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); @@ -10276,7 +10284,7 @@ do_issue_tex_gen() { glMatrixMode(GL_MODELVIEW); glPushMatrix(); CPT(TransformState) root_transform = _cs_transform->compose(_scene_setup->get_world_transform()); - GLPf(LoadMatrix)(root_transform->get_mat().get_data()); + call_glLoadMatrix(root_transform->get_mat()); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 52845621a6..98668dc760 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -472,6 +472,7 @@ protected: INLINE void clear_color_write_mask(); #ifdef SUPPORT_FIXED_FUNCTION + INLINE void call_glLoadMatrix(const LMatrix4 &mat); INLINE void call_glFogfv(GLenum pname, const LColor &color); INLINE void call_glMaterialfv(GLenum face, GLenum pname, const LColor &color); INLINE void call_glLightfv(GLenum light, GLenum pname, const LVecBase4 &value); diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 49eb12221a..615ad3db4f 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1991,7 +1991,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { } if (p == _color_attrib_index) { // Vertex colors are disabled or not present. Apply flat color. -#if defined(STDFLOAT_DOUBLE) && !defined(OPENGLES) +#ifdef STDFLOAT_DOUBLE _glgsg->_glVertexAttrib4dv(p, color_attrib->get_color().get_data()); #else _glgsg->_glVertexAttrib4fv(p, color_attrib->get_color().get_data()); diff --git a/panda/src/pnmtext/pnmTextGlyph.cxx b/panda/src/pnmtext/pnmTextGlyph.cxx index 91cbcddfc6..8c4c278dc6 100644 --- a/panda/src/pnmtext/pnmTextGlyph.cxx +++ b/panda/src/pnmtext/pnmTextGlyph.cxx @@ -55,6 +55,8 @@ place(PNMImage &dest_image, int xp, int yp, const LColor &fg) { return; } + LColorf fgf = LCAST(float, fg); + int left = xp + _left; int top = yp - _top; int right = left + _image.get_x_size(); @@ -70,11 +72,11 @@ place(PNMImage &dest_image, int xp, int yp, const LColor &fg) { for (int x = cleft; x < cright; x++) { double gval = get_value(x - left, y - top); if (gval == 1.0) { - dest_image.set_xel_a(x, y, fg); + dest_image.set_xel_a(x, y, fgf); } else if (gval > 0.0) { LColorf bg = dest_image.get_xel_a(x, y); - dest_image.set_xel_a(x, y, fg * gval + bg * (1.0 - gval)); + dest_image.set_xel_a(x, y, fgf * gval + bg * (1.0 - gval)); } } } @@ -95,6 +97,9 @@ place(PNMImage &dest_image, int xp, int yp, const LColor &fg, return; } + LColorf fgf = LCAST(float, fg); + LColorf interiorf = LCAST(float, interior); + int left = xp + _left; int top = yp - _top; int right = left + _image.get_x_size(); @@ -110,22 +115,22 @@ place(PNMImage &dest_image, int xp, int yp, const LColor &fg, for (int x = cleft; x < cright; x++) { double gval = get_value(x - left, y - top); if (gval == 1.0) { - dest_image.set_xel_a(x, y, fg); + dest_image.set_xel_a(x, y, fgf); } else if (gval > 0.0) { bool is_interior = get_interior_flag(x - left, y - top); LColorf bg; if (is_interior) { - bg = interior; + bg = interiorf; } else { bg = dest_image.get_xel_a(x, y); } - dest_image.set_xel_a(x, y, fg * gval + bg * (1.0 - gval)); + dest_image.set_xel_a(x, y, fgf * gval + bg * (1.0 - gval)); } else { // gval == 0.0 bool is_interior = get_interior_flag(x - left, y - top); if (is_interior) { - dest_image.set_xel_a(x, y, interior); + dest_image.set_xel_a(x, y, interiorf); } } } diff --git a/pandatool/src/assimp/assimpLoader.cxx b/pandatool/src/assimp/assimpLoader.cxx index 7b87b574cb..a198a29121 100644 --- a/pandatool/src/assimp/assimpLoader.cxx +++ b/pandatool/src/assimp/assimpLoader.cxx @@ -230,7 +230,7 @@ load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(Textur aiString path; aiTextureMapping mapping; unsigned int uvindex; - PN_stdfloat blend; + float blend; aiTextureOp op; aiTextureMapMode mapmode; From 1834d9e879af860c551c9ee69acabc4ceafbbbb4 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 30 Jul 2015 18:50:53 +0200 Subject: [PATCH 037/200] Fix incorrect assumption that Mesa GL 3.0 driver doesn't implement non-core functionality --- .../glstuff/glGraphicsStateGuardian_src.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index e61a53487a..5cd4a547f8 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -522,17 +522,15 @@ reset() { query_glsl_version(); #ifndef OPENGLES - bool core_profile; - if (_gl_version_major < 3 || has_extension("GL_ARB_compatibility")) { - core_profile = false; - } else { - core_profile = true; - } + bool core_profile = is_at_least_gl_version(3, 2) && + !has_extension("GL_ARB_compatibility"); - if (core_profile) { - GLCAT.debug() << "Using core profile\n"; - } else { - GLCAT.debug() << "Using compatibility profile\n"; + if (GLCAT.is_debug()) { + if (core_profile) { + GLCAT.debug() << "Using core profile\n"; + } else { + GLCAT.debug() << "Using compatibility profile\n"; + } } #elif defined(OPENGLES_1) static const bool core_profile = false; From 0ee972a822a1c5e64f5af4808ecb8896d49039d5 Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Thu, 30 Jul 2015 21:54:13 +0200 Subject: [PATCH 038/200] pallocator should use panda allocators even when DO_MEMORY_USAGE is not defined - fixes 32-bit Linux crash in runtime builds --- dtool/src/dtoolbase/pallocator.T | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtool/src/dtoolbase/pallocator.T b/dtool/src/dtoolbase/pallocator.T index bb09b2633d..f9c6302c4b 100644 --- a/dtool/src/dtoolbase/pallocator.T +++ b/dtool/src/dtoolbase/pallocator.T @@ -56,7 +56,7 @@ allocate(TYPENAME pallocator_array::size_type n, TYPENAME allocator: *((size_t *)ptr) = alloc_size; return (TYPENAME pallocator_array::pointer)(((char *)ptr) + header_reserved_bytes); #else - return (TYPENAME pallocator_array::pointer)malloc(n * sizeof(Type)); + return (TYPENAME pallocator_array::pointer)PANDA_MALLOC_ARRAY(n * sizeof(Type)); #endif // DO_MEMORY_USAGE } @@ -72,6 +72,6 @@ deallocate(TYPENAME pallocator_array::pointer p, TYPENAME pallocator_array _type_handle.dec_memory_usage(TypeHandle::MC_array, (int)alloc_size); PANDA_FREE_ARRAY(ptr); #else - free(p); + PANDA_FREE_ARRAY(p); #endif // DO_MEMORY_USAGE } From 508873a7d399f3f2e019a4b9ac19568f76a7159b Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 31 Jul 2015 13:17:08 +0200 Subject: [PATCH 039/200] improve readability of glgsg spam output --- .../glstuff/glGraphicsStateGuardian_src.cxx | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 5cd4a547f8..a8d9d55c06 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -2770,22 +2770,22 @@ clear(DrawableRegion *clearable) { glClear(mask); if (GLCAT.is_spam()) { - GLCAT.spam() << "glClear("; + string clear_flags; if (mask & GL_COLOR_BUFFER_BIT) { - GLCAT.spam(false) << "GL_COLOR_BUFFER_BIT|"; + clear_flags += " | GL_COLOR_BUFFER_BIT"; } if (mask & GL_DEPTH_BUFFER_BIT) { - GLCAT.spam(false) << "GL_DEPTH_BUFFER_BIT|"; + clear_flags += " | GL_DEPTH_BUFFER_BIT"; } if (mask & GL_STENCIL_BUFFER_BIT) { - GLCAT.spam(false) << "GL_STENCIL_BUFFER_BIT|"; + clear_flags += " | GL_STENCIL_BUFFER_BIT"; } #ifndef OPENGLES if (mask & GL_ACCUM_BUFFER_BIT) { - GLCAT.spam(false) << "GL_ACCUM_BUFFER_BIT|"; + clear_flags += " | GL_ACCUM_BUFFER_BIT"; } #endif - GLCAT.spam(false) << ")" << endl; + GLCAT.spam() << "glClear(" << (clear_flags.c_str() + 3) << ")\n"; } report_my_gl_errors(); @@ -2865,21 +2865,21 @@ prepare_display_region(DisplayRegionPipelineReader *dr) { if (GLCAT.is_spam()) { GLCAT.spam() - << "glViewportArrayv(0, " << count << ", [\n"; + << "glViewportArrayv(0, " << count << ","; for (int i = 0; i < count; ++i) { GLfloat *vr = viewports + i * 4; - GLCAT.spam(false) << vr[0] << ", " << vr[1] << ", " << vr[2] << ", " << vr[3] << ",\n"; + GLCAT.spam(false) << " [" << vr[0] << " " << vr[1] << " " << vr[2] << " " << vr[3] << "]"; } - GLCAT.spam(false) << "])\n"; + GLCAT.spam(false) << ")\n"; if (_scissor_enabled) { GLCAT.spam() - << "glScissorArrayv(0, " << count << ", [\n"; + << "glScissorArrayv(0, " << count << ","; for (int i = 0; i < count; ++i) { const LVecBase4i &sr = _scissor_array[i]; - GLCAT.spam(false) << sr << ",\n"; + GLCAT.spam(false) << " [" << sr << "]"; } + GLCAT.spam(false) << ")\n"; } - GLCAT.spam(false) << "])\n"; } } else @@ -3296,6 +3296,11 @@ end_frame(Thread *current_thread) { } } #endif + + // Add in a newline to the spam output for improved legibility. + if (GLCAT.is_spam()) { + GLCAT.spam(false) << endl; + } } //////////////////////////////////////////////////////////////////// From 53696052b94244b60756b8afabd1a31e7744a41f Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 31 Jul 2015 13:18:01 +0200 Subject: [PATCH 040/200] Fix regression in 1.10 with point/line thickness --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index a8d9d55c06..521bf044b7 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -5990,9 +5990,13 @@ do_issue_render_mode() { // The thickness affects both the line width and the point size. if (thickness != _point_size) { - glLineWidth(_point_size); + if (GLCAT.is_spam()) { + GLCAT.spam() << "setting thickness to " << thickness << "\n"; + } + + glLineWidth(thickness); #ifndef OPENGLES_2 - glPointSize(_point_size); + glPointSize(thickness); #endif _point_size = thickness; } From 62cefcab8ba551c1ea96912a74711407ecb7327a Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 31 Jul 2015 13:20:38 +0200 Subject: [PATCH 041/200] Update glext to make more recent GL functionality available --- panda/src/glgsg/glgsg.h | 1 + .../glstuff/glGraphicsStateGuardian_src.cxx | 51 +- .../src/glstuff/glGraphicsStateGuardian_src.h | 17 +- panda/src/glstuff/panda_glext.h | 20422 ++++++++-------- 4 files changed, 10244 insertions(+), 10247 deletions(-) diff --git a/panda/src/glgsg/glgsg.h b/panda/src/glgsg/glgsg.h index 6c8544b08e..b0cb22eb1a 100644 --- a/panda/src/glgsg/glgsg.h +++ b/panda/src/glgsg/glgsg.h @@ -84,6 +84,7 @@ #include #endif +#undef __glext_h_ #undef GL_GLEXT_VERSION #include "panda_glext.h" diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 521bf044b7..0a40264eb0 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -546,19 +546,19 @@ reset() { _use_object_labels = false; #ifndef OPENGLES_1 if (gl_debug) { - PFNGLDEBUGMESSAGECALLBACKPROC _glDebugMessageCallback; + PFNGLDEBUGMESSAGECALLBACKPROC_P _glDebugMessageCallback; PFNGLDEBUGMESSAGECONTROLPROC _glDebugMessageControl; if (is_at_least_gl_version(4, 3) || has_extension("GL_KHR_debug")) { #ifdef OPENGLES - _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) + _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC_P) get_extension_func("glDebugMessageCallbackKHR"); _glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) get_extension_func("glDebugMessageControlKHR"); _glObjectLabel = (PFNGLOBJECTLABELPROC) get_extension_func("glObjectLabelKHR"); #else - _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) + _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC_P) get_extension_func("glDebugMessageCallback"); _glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) get_extension_func("glDebugMessageControl"); @@ -571,7 +571,7 @@ reset() { #ifndef OPENGLES } else if (has_extension("GL_ARB_debug_output")) { - _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) + _glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC_P) get_extension_func("glDebugMessageCallbackARB"); _glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) get_extension_func("glDebugMessageControlARB"); @@ -591,7 +591,7 @@ reset() { 0, NULL, GLCAT.is_debug()); // Enable the callback. - _glDebugMessageCallback((GLDEBUGPROC) &debug_callback, (void*)this); + _glDebugMessageCallback((GLDEBUGPROC_P) &debug_callback, (void*)this); if (gl_debug_synchronous) { glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); } @@ -1214,6 +1214,13 @@ reset() { get_extension_func("glBufferSubData"); _glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) get_extension_func("glDeleteBuffers"); + +#ifndef OPENGLES + _glMapBuffer = (PFNGLMAPBUFFERPROC) + get_extension_func("glMapBuffer"); + _glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) + get_extension_func("glUnmapBuffer"); +#endif } #ifndef OPENGLES_1 else if (has_extension("GL_ARB_vertex_buffer_object")) { @@ -1229,6 +1236,10 @@ reset() { get_extension_func("glBufferSubDataARB"); _glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) get_extension_func("glDeleteBuffersARB"); + _glMapBuffer = (PFNGLMAPBUFFERPROC) + get_extension_func("glMapBufferARB"); + _glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) + get_extension_func("glUnmapBufferARB"); } #endif // OPENGLES_1 @@ -1243,6 +1254,31 @@ reset() { } #endif +#ifndef OPENGLES + // Check for various advanced buffer management features. + if (is_at_least_gl_version(3, 0) || has_extension("GL_ARB_map_buffer_range")) { + _glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) + get_extension_func("glMapBufferRange"); + } else { + _glMapBufferRange = NULL; + } + + if (is_at_least_gl_version(4, 4) || has_extension("GL_ARB_buffer_storage")) { + _glBufferStorage = (PFNGLBUFFERSTORAGEPROC) + get_extension_func("glBufferStorage"); + + if (_glBufferStorage != NULL) { + _supports_buffer_storage = true; + } else { + GLCAT.warning() + << "Buffer storage advertised as supported by OpenGL runtime, but " + "could not get pointers to extension function.\n"; + } + } else { + _supports_buffer_storage = false; + } +#endif + _supports_vao = false; if (is_at_least_gl_version(3, 0) || has_extension("GL_ARB_vertex_array_object")) { @@ -1557,11 +1593,12 @@ reset() { get_extension_func("glGetActiveUniformBlockiv"); _glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) get_extension_func("glGetActiveUniformBlockName"); + + _glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) + get_extension_func("glBindBufferBase"); } else { _supports_uniform_buffers = false; } -#else - _supports_uniform_buffers = false; #endif // Check whether we support geometry instancing and instanced vertex attribs. diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 98668dc760..d83b585941 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -58,8 +58,8 @@ typedef double GLdouble; // declare these typedefs. #if !defined( __EDG__ ) || defined( __INTEL_COMPILER ) // Protect the following from the Tau instrumentor and expose it for the intel compiler. typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef void (APIENTRY *GLDEBUGPROC_P)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC_P) (GLDEBUGPROC_P callback, const void *userParam); typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); @@ -640,7 +640,6 @@ protected: GLint _max_image_units; bool _supports_multi_bind; bool _supports_get_program_binary; - bool _supports_uniform_buffers; #ifdef OPENGLES bool _supports_depth24; @@ -734,6 +733,18 @@ public: PFNGLBUFFERSUBDATAPROC _glBufferSubData; PFNGLDELETEBUFFERSPROC _glDeleteBuffers; +#ifndef OPENGLES + PFNGLMAPBUFFERPROC _glMapBuffer; + PFNGLUNMAPBUFFERPROC _glUnmapBuffer; + PFNGLMAPBUFFERRANGEPROC _glMapBufferRange; + + bool _supports_uniform_buffers; + PFNGLBINDBUFFERBASEPROC _glBindBufferBase; + + bool _supports_buffer_storage; + PFNGLBUFFERSTORAGEPROC _glBufferStorage; +#endif + PFNGLBLENDEQUATIONPROC _glBlendEquation; PFNGLBLENDCOLORPROC _glBlendColor; diff --git a/panda/src/glstuff/panda_glext.h b/panda/src/glstuff/panda_glext.h index 1fb1c55a0e..61b983ed7a 100644 --- a/panda/src/glstuff/panda_glext.h +++ b/panda/src/glstuff/panda_glext.h @@ -1,11 +1,12 @@ -#ifndef GL_GLEXT_VERSION +#ifndef __glext_h_ +#define __glext_h_ 1 #ifdef __cplusplus extern "C" { #endif /* -** Copyright (c) 2007-2012 The Khronos Group Inc. +** Copyright (c) 2013-2015 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -26,15 +27,19 @@ extern "C" { ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated $Date$ */ -/* Current version at http://www.opengl.org/registry/ */ -#define GL_GLEXT_VERSION 81 -/* Function declaration macros - to move into glplatform.h */ +/* +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** http://www.opengl.org/registry/ +** +** Khronos $Revision: 31717 $ on $Date: 2015-07-20 05:42:11 -0400 (Mon, 20 Jul 2015) $ +*/ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 +#endif #include #endif @@ -48,9 +53,20 @@ extern "C" { #define GLAPI extern #endif -/*************************************************************/ +#define GL_GLEXT_VERSION 20150720 + +/* Generated C header for: + * API: gl + * Profile: compatibility + * Versions considered: .* + * Versions emitted: 1\.[2-9]|[234]\.[0-9] + * Default extensions included: gl + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ #ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 @@ -87,98 +103,25 @@ extern "C" { #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#endif - -#ifndef GL_VERSION_1_2_DEPRECATED #define GL_RESCALE_NORMAL 0x803A #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 #define GL_SINGLE_COLOR 0x81F9 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA #define GL_ALIASED_POINT_SIZE_RANGE 0x846D +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif - -#ifndef GL_ARB_imaging -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#endif - -#ifndef GL_ARB_imaging_DEPRECATED -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#endif +#endif /* GL_VERSION_1_2 */ #ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 #define GL_TEXTURE0 0x84C0 #define GL_TEXTURE1 0x84C1 #define GL_TEXTURE2 0x84C2 @@ -238,9 +181,6 @@ extern "C" { #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 #define GL_CLAMP_TO_BORDER 0x812D -#endif - -#ifndef GL_VERSION_1_3_DEPRECATED #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 #define GL_MAX_TEXTURE_UNITS 0x84E2 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 @@ -278,9 +218,104 @@ extern "C" { #define GL_PREVIOUS 0x8578 #define GL_DOT3_RGB 0x86AE #define GL_DOT3_RGBA 0x86AF +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); #endif +#endif /* GL_VERSION_1_3 */ #ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 #define GL_BLEND_DST_RGB 0x80C8 #define GL_BLEND_SRC_RGB 0x80C9 #define GL_BLEND_DST_ALPHA 0x80CA @@ -297,9 +332,6 @@ extern "C" { #define GL_TEXTURE_DEPTH_SIZE 0x884A #define GL_TEXTURE_COMPARE_MODE 0x884C #define GL_TEXTURE_COMPARE_FUNC 0x884D -#endif - -#ifndef GL_VERSION_1_4_DEPRECATED #define GL_POINT_SIZE_MIN 0x8126 #define GL_POINT_SIZE_MAX 0x8127 #define GL_POINT_DISTANCE_ATTENUATION 0x8129 @@ -323,9 +355,118 @@ extern "C" { #define GL_TEXTURE_FILTER_CONTROL 0x8500 #define GL_DEPTH_TEXTURE_MODE 0x884B #define GL_COMPARE_R_TO_TEXTURE 0x884E +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFogCoordf (GLfloat coord); +GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); +GLAPI void APIENTRY glFogCoordd (GLdouble coord); +GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2iv (const GLint *v); +GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); +GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3iv (const GLint *v); +GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); +GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glBlendEquation (GLenum mode); #endif +#endif /* GL_VERSION_1_4 */ #ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#include +typedef ptrdiff_t GLsizeiptr; +typedef ptrdiff_t GLintptr; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 #define GL_QUERY_COUNTER_BITS 0x8864 @@ -353,9 +494,7 @@ extern "C" { #define GL_DYNAMIC_READ 0x88E9 #define GL_DYNAMIC_COPY 0x88EA #define GL_SAMPLES_PASSED 0x8914 -#endif - -#ifndef GL_VERSION_1_5_DEPRECATED +#define GL_SRC1_ALPHA 0x8589 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 @@ -377,11 +516,52 @@ extern "C" { #define GL_SRC1_RGB 0x8581 #define GL_SRC2_RGB 0x8582 #define GL_SRC0_ALPHA 0x8588 -#define GL_SRC1_ALPHA 0x8589 #define GL_SRC2_ALPHA 0x858A +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQuery (GLuint id); +GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQuery (GLenum target); +GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); +GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); #endif +#endif /* GL_VERSION_1_5 */ #ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +typedef char GLchar; #define GL_BLEND_EQUATION_RGB 0x8009 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 @@ -462,16 +642,202 @@ extern "C" { #define GL_STENCIL_BACK_REF 0x8CA3 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#endif - -#ifndef GL_VERSION_2_0_DEPRECATED #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 #define GL_POINT_SPRITE 0x8861 #define GL_COORD_REPLACE 0x8862 #define GL_MAX_TEXTURE_COORDS 0x8871 +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GLAPI void APIENTRY glCompileShader (GLuint shader); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum type); +GLAPI void APIENTRY glDeleteProgram (GLuint program); +GLAPI void APIENTRY glDeleteShader (GLuint shader); +GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GLAPI GLboolean APIENTRY glIsProgram (GLuint program); +GLAPI GLboolean APIENTRY glIsShader (GLuint shader); +GLAPI void APIENTRY glLinkProgram (GLuint program); +GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GLAPI void APIENTRY glUseProgram (GLuint program); +GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glValidateProgram (GLuint program); +GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); #endif +#endif /* GL_VERSION_2_0 */ #ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 #define GL_PIXEL_PACK_BUFFER 0x88EB #define GL_PIXEL_UNPACK_BUFFER 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED @@ -488,9 +854,6 @@ extern "C" { #define GL_SRGB8_ALPHA8 0x8C43 #define GL_COMPRESSED_SRGB 0x8C48 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#endif - -#ifndef GL_VERSION_2_1_DEPRECATED #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F #define GL_SLUMINANCE_ALPHA 0x8C44 #define GL_SLUMINANCE8_ALPHA8 0x8C45 @@ -498,9 +861,25 @@ extern "C" { #define GL_SLUMINANCE8 0x8C47 #define GL_COMPRESSED_SLUMINANCE 0x8C4A #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); #endif +#endif /* GL_VERSION_2_1 */ #ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +typedef unsigned short GLhalf; #define GL_COMPARE_REF_TO_TEXTURE 0x884E #define GL_CLIP_DISTANCE0 0x3000 #define GL_CLIP_DISTANCE1 0x3001 @@ -517,7 +896,7 @@ extern "C" { #define GL_CONTEXT_FLAGS 0x821E #define GL_COMPRESSED_RED 0x8225 #define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 #define GL_RGBA32F 0x8814 #define GL_RGB32F 0x8815 #define GL_RGBA16F 0x881A @@ -601,1078 +980,9 @@ extern "C" { #define GL_BUFFER_ACCESS_FLAGS 0x911F #define GL_BUFFER_MAP_LENGTH 0x9120 #define GL_BUFFER_MAP_OFFSET 0x9121 -/* Reuse tokens from ARB_depth_buffer_float */ -/* reuse GL_DEPTH_COMPONENT32F */ -/* reuse GL_DEPTH32F_STENCIL8 */ -/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ -/* Reuse tokens from ARB_framebuffer_object */ -/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ -/* reuse GL_FRAMEBUFFER_DEFAULT */ -/* reuse GL_FRAMEBUFFER_UNDEFINED */ -/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ -/* reuse GL_INDEX */ -/* reuse GL_MAX_RENDERBUFFER_SIZE */ -/* reuse GL_DEPTH_STENCIL */ -/* reuse GL_UNSIGNED_INT_24_8 */ -/* reuse GL_DEPTH24_STENCIL8 */ -/* reuse GL_TEXTURE_STENCIL_SIZE */ -/* reuse GL_TEXTURE_RED_TYPE */ -/* reuse GL_TEXTURE_GREEN_TYPE */ -/* reuse GL_TEXTURE_BLUE_TYPE */ -/* reuse GL_TEXTURE_ALPHA_TYPE */ -/* reuse GL_TEXTURE_DEPTH_TYPE */ -/* reuse GL_UNSIGNED_NORMALIZED */ -/* reuse GL_FRAMEBUFFER_BINDING */ -/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ -/* reuse GL_RENDERBUFFER_BINDING */ -/* reuse GL_READ_FRAMEBUFFER */ -/* reuse GL_DRAW_FRAMEBUFFER */ -/* reuse GL_READ_FRAMEBUFFER_BINDING */ -/* reuse GL_RENDERBUFFER_SAMPLES */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -/* reuse GL_FRAMEBUFFER_COMPLETE */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ -/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ -/* reuse GL_MAX_COLOR_ATTACHMENTS */ -/* reuse GL_COLOR_ATTACHMENT0 */ -/* reuse GL_COLOR_ATTACHMENT1 */ -/* reuse GL_COLOR_ATTACHMENT2 */ -/* reuse GL_COLOR_ATTACHMENT3 */ -/* reuse GL_COLOR_ATTACHMENT4 */ -/* reuse GL_COLOR_ATTACHMENT5 */ -/* reuse GL_COLOR_ATTACHMENT6 */ -/* reuse GL_COLOR_ATTACHMENT7 */ -/* reuse GL_COLOR_ATTACHMENT8 */ -/* reuse GL_COLOR_ATTACHMENT9 */ -/* reuse GL_COLOR_ATTACHMENT10 */ -/* reuse GL_COLOR_ATTACHMENT11 */ -/* reuse GL_COLOR_ATTACHMENT12 */ -/* reuse GL_COLOR_ATTACHMENT13 */ -/* reuse GL_COLOR_ATTACHMENT14 */ -/* reuse GL_COLOR_ATTACHMENT15 */ -/* reuse GL_DEPTH_ATTACHMENT */ -/* reuse GL_STENCIL_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER */ -/* reuse GL_RENDERBUFFER */ -/* reuse GL_RENDERBUFFER_WIDTH */ -/* reuse GL_RENDERBUFFER_HEIGHT */ -/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ -/* reuse GL_STENCIL_INDEX1 */ -/* reuse GL_STENCIL_INDEX4 */ -/* reuse GL_STENCIL_INDEX8 */ -/* reuse GL_STENCIL_INDEX16 */ -/* reuse GL_RENDERBUFFER_RED_SIZE */ -/* reuse GL_RENDERBUFFER_GREEN_SIZE */ -/* reuse GL_RENDERBUFFER_BLUE_SIZE */ -/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ -/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ -/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ -/* reuse GL_MAX_SAMPLES */ -/* Reuse tokens from ARB_framebuffer_sRGB */ -/* reuse GL_FRAMEBUFFER_SRGB */ -/* Reuse tokens from ARB_half_float_vertex */ -/* reuse GL_HALF_FLOAT */ -/* Reuse tokens from ARB_map_buffer_range */ -/* reuse GL_MAP_READ_BIT */ -/* reuse GL_MAP_WRITE_BIT */ -/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ -/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ -/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ -/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ -/* Reuse tokens from ARB_texture_compression_rgtc */ -/* reuse GL_COMPRESSED_RED_RGTC1 */ -/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ -/* reuse GL_COMPRESSED_RG_RGTC2 */ -/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ -/* Reuse tokens from ARB_texture_rg */ -/* reuse GL_RG */ -/* reuse GL_RG_INTEGER */ -/* reuse GL_R8 */ -/* reuse GL_R16 */ -/* reuse GL_RG8 */ -/* reuse GL_RG16 */ -/* reuse GL_R16F */ -/* reuse GL_R32F */ -/* reuse GL_RG16F */ -/* reuse GL_RG32F */ -/* reuse GL_R8I */ -/* reuse GL_R8UI */ -/* reuse GL_R16I */ -/* reuse GL_R16UI */ -/* reuse GL_R32I */ -/* reuse GL_R32UI */ -/* reuse GL_RG8I */ -/* reuse GL_RG8UI */ -/* reuse GL_RG16I */ -/* reuse GL_RG16UI */ -/* reuse GL_RG32I */ -/* reuse GL_RG32UI */ -/* Reuse tokens from ARB_vertex_array_object */ -/* reuse GL_VERTEX_ARRAY_BINDING */ -#endif - -#ifndef GL_VERSION_3_0_DEPRECATED -#define GL_CLAMP_VERTEX_COLOR 0x891A -#define GL_CLAMP_FRAGMENT_COLOR 0x891B -#define GL_ALPHA_INTEGER 0x8D97 -/* Reuse tokens from ARB_framebuffer_object */ -/* reuse GL_TEXTURE_LUMINANCE_TYPE */ -/* reuse GL_TEXTURE_INTENSITY_TYPE */ -#endif - -#ifndef GL_VERSION_3_1 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_RED_SNORM 0x8F90 -#define GL_RG_SNORM 0x8F91 -#define GL_RGB_SNORM 0x8F92 -#define GL_RGBA_SNORM 0x8F93 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -/* Reuse tokens from ARB_copy_buffer */ -/* reuse GL_COPY_READ_BUFFER */ -/* reuse GL_COPY_WRITE_BUFFER */ -/* Reuse tokens from ARB_draw_instanced (none) */ -/* Reuse tokens from ARB_uniform_buffer_object */ -/* reuse GL_UNIFORM_BUFFER */ -/* reuse GL_UNIFORM_BUFFER_BINDING */ -/* reuse GL_UNIFORM_BUFFER_START */ -/* reuse GL_UNIFORM_BUFFER_SIZE */ -/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */ -/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */ -/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */ -/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */ -/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */ -/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */ -/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */ -/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */ -/* reuse GL_ACTIVE_UNIFORM_BLOCKS */ -/* reuse GL_UNIFORM_TYPE */ -/* reuse GL_UNIFORM_SIZE */ -/* reuse GL_UNIFORM_NAME_LENGTH */ -/* reuse GL_UNIFORM_BLOCK_INDEX */ -/* reuse GL_UNIFORM_OFFSET */ -/* reuse GL_UNIFORM_ARRAY_STRIDE */ -/* reuse GL_UNIFORM_MATRIX_STRIDE */ -/* reuse GL_UNIFORM_IS_ROW_MAJOR */ -/* reuse GL_UNIFORM_BLOCK_BINDING */ -/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */ -/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */ -/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */ -/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */ -/* reuse GL_INVALID_INDEX */ -#endif - -#ifndef GL_VERSION_3_2 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -/* reuse GL_MAX_VARYING_COMPONENTS */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -/* Reuse tokens from ARB_depth_clamp */ -/* reuse GL_DEPTH_CLAMP */ -/* Reuse tokens from ARB_draw_elements_base_vertex (none) */ -/* Reuse tokens from ARB_fragment_coord_conventions (none) */ -/* Reuse tokens from ARB_provoking_vertex */ -/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ -/* reuse GL_FIRST_VERTEX_CONVENTION */ -/* reuse GL_LAST_VERTEX_CONVENTION */ -/* reuse GL_PROVOKING_VERTEX */ -/* Reuse tokens from ARB_seamless_cube_map */ -/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ -/* Reuse tokens from ARB_sync */ -/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */ -/* reuse GL_OBJECT_TYPE */ -/* reuse GL_SYNC_CONDITION */ -/* reuse GL_SYNC_STATUS */ -/* reuse GL_SYNC_FLAGS */ -/* reuse GL_SYNC_FENCE */ -/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */ -/* reuse GL_UNSIGNALED */ -/* reuse GL_SIGNALED */ -/* reuse GL_ALREADY_SIGNALED */ -/* reuse GL_TIMEOUT_EXPIRED */ -/* reuse GL_CONDITION_SATISFIED */ -/* reuse GL_WAIT_FAILED */ -/* reuse GL_TIMEOUT_IGNORED */ -/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */ -/* reuse GL_TIMEOUT_IGNORED */ -/* Reuse tokens from ARB_texture_multisample */ -/* reuse GL_SAMPLE_POSITION */ -/* reuse GL_SAMPLE_MASK */ -/* reuse GL_SAMPLE_MASK_VALUE */ -/* reuse GL_MAX_SAMPLE_MASK_WORDS */ -/* reuse GL_TEXTURE_2D_MULTISAMPLE */ -/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */ -/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */ -/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_TEXTURE_SAMPLES */ -/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */ -/* reuse GL_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */ -/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */ -/* reuse GL_MAX_INTEGER_SAMPLES */ -/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ -#endif - -#ifndef GL_VERSION_3_3 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -/* Reuse tokens from ARB_blend_func_extended */ -/* reuse GL_SRC1_COLOR */ -/* reuse GL_ONE_MINUS_SRC1_COLOR */ -/* reuse GL_ONE_MINUS_SRC1_ALPHA */ -/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ -/* Reuse tokens from ARB_explicit_attrib_location (none) */ -/* Reuse tokens from ARB_occlusion_query2 */ -/* reuse GL_ANY_SAMPLES_PASSED */ -/* Reuse tokens from ARB_sampler_objects */ -/* reuse GL_SAMPLER_BINDING */ -/* Reuse tokens from ARB_shader_bit_encoding (none) */ -/* Reuse tokens from ARB_texture_rgb10_a2ui */ -/* reuse GL_RGB10_A2UI */ -/* Reuse tokens from ARB_texture_swizzle */ -/* reuse GL_TEXTURE_SWIZZLE_R */ -/* reuse GL_TEXTURE_SWIZZLE_G */ -/* reuse GL_TEXTURE_SWIZZLE_B */ -/* reuse GL_TEXTURE_SWIZZLE_A */ -/* reuse GL_TEXTURE_SWIZZLE_RGBA */ -/* Reuse tokens from ARB_timer_query */ -/* reuse GL_TIME_ELAPSED */ -/* reuse GL_TIMESTAMP */ -/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ -/* reuse GL_INT_2_10_10_10_REV */ -#endif - -#ifndef GL_VERSION_4_0 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -/* Reuse tokens from ARB_texture_query_lod (none) */ -/* Reuse tokens from ARB_draw_buffers_blend (none) */ -/* Reuse tokens from ARB_draw_indirect */ -/* reuse GL_DRAW_INDIRECT_BUFFER */ -/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ -/* Reuse tokens from ARB_gpu_shader5 */ -/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */ -/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */ -/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */ -/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */ -/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */ -/* reuse GL_MAX_VERTEX_STREAMS */ -/* Reuse tokens from ARB_gpu_shader_fp64 */ -/* reuse GL_DOUBLE_VEC2 */ -/* reuse GL_DOUBLE_VEC3 */ -/* reuse GL_DOUBLE_VEC4 */ -/* reuse GL_DOUBLE_MAT2 */ -/* reuse GL_DOUBLE_MAT3 */ -/* reuse GL_DOUBLE_MAT4 */ -/* reuse GL_DOUBLE_MAT2x3 */ -/* reuse GL_DOUBLE_MAT2x4 */ -/* reuse GL_DOUBLE_MAT3x2 */ -/* reuse GL_DOUBLE_MAT3x4 */ -/* reuse GL_DOUBLE_MAT4x2 */ -/* reuse GL_DOUBLE_MAT4x3 */ -/* Reuse tokens from ARB_shader_subroutine */ -/* reuse GL_ACTIVE_SUBROUTINES */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */ -/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */ -/* reuse GL_MAX_SUBROUTINES */ -/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */ -/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ -/* reuse GL_COMPATIBLE_SUBROUTINES */ -/* Reuse tokens from ARB_tessellation_shader */ -/* reuse GL_PATCHES */ -/* reuse GL_PATCH_VERTICES */ -/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */ -/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */ -/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */ -/* reuse GL_TESS_GEN_MODE */ -/* reuse GL_TESS_GEN_SPACING */ -/* reuse GL_TESS_GEN_VERTEX_ORDER */ -/* reuse GL_TESS_GEN_POINT_MODE */ -/* reuse GL_ISOLINES */ -/* reuse GL_FRACTIONAL_ODD */ -/* reuse GL_FRACTIONAL_EVEN */ -/* reuse GL_MAX_PATCH_VERTICES */ -/* reuse GL_MAX_TESS_GEN_LEVEL */ -/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */ -/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */ -/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_PATCH_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */ -/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */ -/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */ -/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ -/* reuse GL_TESS_EVALUATION_SHADER */ -/* reuse GL_TESS_CONTROL_SHADER */ -/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ -/* Reuse tokens from ARB_transform_feedback2 */ -/* reuse GL_TRANSFORM_FEEDBACK */ -/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ -/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ -/* reuse GL_TRANSFORM_FEEDBACK_BINDING */ -/* Reuse tokens from ARB_transform_feedback3 */ -/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */ -/* reuse GL_MAX_VERTEX_STREAMS */ -#endif - -#ifndef GL_VERSION_4_1 -/* Reuse tokens from ARB_ES2_compatibility */ -/* reuse GL_FIXED */ -/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ -/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ -/* reuse GL_LOW_FLOAT */ -/* reuse GL_MEDIUM_FLOAT */ -/* reuse GL_HIGH_FLOAT */ -/* reuse GL_LOW_INT */ -/* reuse GL_MEDIUM_INT */ -/* reuse GL_HIGH_INT */ -/* reuse GL_SHADER_COMPILER */ -/* reuse GL_NUM_SHADER_BINARY_FORMATS */ -/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ -/* reuse GL_MAX_VARYING_VECTORS */ -/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ -/* reuse GL_RGB565 */ -/* Reuse tokens from ARB_get_program_binary */ -/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ -/* reuse GL_PROGRAM_BINARY_LENGTH */ -/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ -/* reuse GL_PROGRAM_BINARY_FORMATS */ -/* Reuse tokens from ARB_separate_shader_objects */ -/* reuse GL_VERTEX_SHADER_BIT */ -/* reuse GL_FRAGMENT_SHADER_BIT */ -/* reuse GL_GEOMETRY_SHADER_BIT */ -/* reuse GL_TESS_CONTROL_SHADER_BIT */ -/* reuse GL_TESS_EVALUATION_SHADER_BIT */ -/* reuse GL_ALL_SHADER_BITS */ -/* reuse GL_PROGRAM_SEPARABLE */ -/* reuse GL_ACTIVE_PROGRAM */ -/* reuse GL_PROGRAM_PIPELINE_BINDING */ -/* Reuse tokens from ARB_shader_precision (none) */ -/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ -/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ -/* reuse GL_MAX_VIEWPORTS */ -/* reuse GL_VIEWPORT_SUBPIXEL_BITS */ -/* reuse GL_VIEWPORT_BOUNDS_RANGE */ -/* reuse GL_LAYER_PROVOKING_VERTEX */ -/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ -/* reuse GL_UNDEFINED_VERTEX */ -#endif - -#ifndef GL_VERSION_4_2 -/* Reuse tokens from ARB_base_instance (none) */ -/* Reuse tokens from ARB_shading_language_420pack (none) */ -/* Reuse tokens from ARB_transform_feedback_instanced (none) */ -/* Reuse tokens from ARB_compressed_texture_pixel_storage */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */ -/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */ -/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */ -/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */ -/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */ -/* Reuse tokens from ARB_conservative_depth (none) */ -/* Reuse tokens from ARB_internalformat_query */ -/* reuse GL_NUM_SAMPLE_COUNTS */ -/* Reuse tokens from ARB_map_buffer_alignment */ -/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */ -/* Reuse tokens from ARB_shader_atomic_counters */ -/* reuse GL_ATOMIC_COUNTER_BUFFER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_START */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */ -/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */ -/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */ -/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */ -/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */ -/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */ -/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */ -/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */ -/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */ -/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */ -/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */ -/* Reuse tokens from ARB_shader_image_load_store */ -/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */ -/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */ -/* reuse GL_UNIFORM_BARRIER_BIT */ -/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */ -/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */ -/* reuse GL_COMMAND_BARRIER_BIT */ -/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */ -/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */ -/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */ -/* reuse GL_FRAMEBUFFER_BARRIER_BIT */ -/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */ -/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */ -/* reuse GL_ALL_BARRIER_BITS */ -/* reuse GL_MAX_IMAGE_UNITS */ -/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ -/* reuse GL_IMAGE_BINDING_NAME */ -/* reuse GL_IMAGE_BINDING_LEVEL */ -/* reuse GL_IMAGE_BINDING_LAYERED */ -/* reuse GL_IMAGE_BINDING_LAYER */ -/* reuse GL_IMAGE_BINDING_ACCESS */ -/* reuse GL_IMAGE_1D */ -/* reuse GL_IMAGE_2D */ -/* reuse GL_IMAGE_3D */ -/* reuse GL_IMAGE_2D_RECT */ -/* reuse GL_IMAGE_CUBE */ -/* reuse GL_IMAGE_BUFFER */ -/* reuse GL_IMAGE_1D_ARRAY */ -/* reuse GL_IMAGE_2D_ARRAY */ -/* reuse GL_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_INT_IMAGE_1D */ -/* reuse GL_INT_IMAGE_2D */ -/* reuse GL_INT_IMAGE_3D */ -/* reuse GL_INT_IMAGE_2D_RECT */ -/* reuse GL_INT_IMAGE_CUBE */ -/* reuse GL_INT_IMAGE_BUFFER */ -/* reuse GL_INT_IMAGE_1D_ARRAY */ -/* reuse GL_INT_IMAGE_2D_ARRAY */ -/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_1D */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D */ -/* reuse GL_UNSIGNED_INT_IMAGE_3D */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */ -/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */ -/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */ -/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_MAX_IMAGE_SAMPLES */ -/* reuse GL_IMAGE_BINDING_FORMAT */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */ -/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */ -/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */ -/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */ -/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */ -/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */ -/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */ -/* Reuse tokens from ARB_shading_language_packing (none) */ -/* Reuse tokens from ARB_texture_storage */ -/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */ -#endif - -#ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#endif - -#ifndef GL_ARB_multitexture -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -#endif - -#ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#endif - -#ifndef GL_ARB_texture_env_add -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif - -#ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif - -#ifndef GL_ARB_point_parameters -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - -#ifndef GL_ARB_shadow -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif - -#ifndef GL_ARB_window_pos -#endif - -#ifndef GL_ARB_vertex_program -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#endif - -#ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 -#endif - -#ifndef GL_ARB_shader_objects -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#endif - -#ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_HALF_FLOAT_ARB 0x140B -#endif - -#ifndef GL_ARB_texture_float -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif - -#ifndef GL_ARB_depth_buffer_float #define GL_DEPTH_COMPONENT32F 0x8CAC #define GL_DEPTH32F_STENCIL8 0x8CAD #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#endif - -#ifndef GL_ARB_draw_instanced -#endif - -#ifndef GL_ARB_framebuffer_object #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 @@ -1697,7 +1007,7 @@ extern "C" { #define GL_TEXTURE_DEPTH_TYPE 0x8C16 #define GL_UNSIGNED_NORMALIZED 0x8C17 #define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 #define GL_RENDERBUFFER_BINDING 0x8CA7 #define GL_READ_FRAMEBUFFER 0x8CA8 #define GL_DRAW_FRAMEBUFFER 0x8CA9 @@ -1731,6 +1041,22 @@ extern "C" { #define GL_COLOR_ATTACHMENT13 0x8CED #define GL_COLOR_ATTACHMENT14 0x8CEE #define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF #define GL_DEPTH_ATTACHMENT 0x8D00 #define GL_STENCIL_ATTACHMENT 0x8D20 #define GL_FRAMEBUFFER 0x8D40 @@ -1750,74 +1076,21 @@ extern "C" { #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 #define GL_MAX_SAMPLES 0x8D57 -#endif - -#ifndef GL_ARB_framebuffer_object_DEPRECATED #define GL_INDEX 0x8222 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15 -#endif - -#ifndef GL_ARB_framebuffer_sRGB #define GL_FRAMEBUFFER_SRGB 0x8DB9 -#endif - -#ifndef GL_ARB_geometry_shader4 -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 -/* reuse GL_MAX_VARYING_COMPONENTS */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -#endif - -#ifndef GL_ARB_half_float_vertex #define GL_HALF_FLOAT 0x140B -#endif - -#ifndef GL_ARB_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE -#endif - -#ifndef GL_ARB_map_buffer_range #define GL_MAP_READ_BIT 0x0001 #define GL_MAP_WRITE_BIT 0x0002 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#endif - -#ifndef GL_ARB_texture_buffer_object -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E -#endif - -#ifndef GL_ARB_texture_compression_rgtc #define GL_COMPRESSED_RED_RGTC1 0x8DBB #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC #define GL_COMPRESSED_RG_RGTC2 0x8DBD #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#endif - -#ifndef GL_ARB_texture_rg #define GL_RG 0x8227 #define GL_RG_INTEGER 0x8228 #define GL_R8 0x8229 @@ -1840,13 +1113,212 @@ extern "C" { #define GL_RG16UI 0x823A #define GL_RG32I 0x823B #define GL_RG32UI 0x823C -#endif - -#ifndef GL_ARB_vertex_array_object #define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_ALPHA_INTEGER 0x8D97 +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); +GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); +GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index); +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmap (GLenum target); +GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glBindVertexArray (GLuint array); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); #endif +#endif /* GL_VERSION_3_0 */ -#ifndef GL_ARB_uniform_buffer_object +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 #define GL_UNIFORM_BUFFER 0x8A11 #define GL_UNIFORM_BUFFER_BINDING 0x8A28 #define GL_UNIFORM_BUFFER_START 0x8A29 @@ -1880,44 +1352,104 @@ extern "C" { #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 #define GL_INVALID_INDEX 0xFFFFFFFFu +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); +GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); #endif +#endif /* GL_VERSION_3_1 */ -#ifndef GL_ARB_compatibility -/* ARB_compatibility just defines tokens from core 3.0 */ +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +typedef struct __GLsync *GLsync; +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glxext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GL_EXT_timer_query extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +#elif defined(__sun__) || defined(__digital__) +#include +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include +#elif defined(__SCO__) || defined(__USLC__) +#include +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include #endif - -#ifndef GL_ARB_copy_buffer -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_READ_BUFFER GL_COPY_READ_BUFFER_BINDING -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_COPY_WRITE_BUFFER GL_COPY_WRITE_BUFFER_BINDING #endif - -#ifndef GL_ARB_shader_texture_lod -#endif - -#ifndef GL_ARB_depth_clamp +typedef uint64_t GLuint64; +typedef int64_t GLint64; +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 #define GL_DEPTH_CLAMP 0x864F -#endif - -#ifndef GL_ARB_draw_elements_base_vertex -#endif - -#ifndef GL_ARB_fragment_coord_conventions -#endif - -#ifndef GL_ARB_provoking_vertex #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C #define GL_FIRST_VERTEX_CONVENTION 0x8E4D #define GL_LAST_VERTEX_CONVENTION 0x8E4E #define GL_PROVOKING_VERTEX 0x8E4F -#endif - -#ifndef GL_ARB_seamless_cube_map #define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#endif - -#ifndef GL_ARB_sync #define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 #define GL_OBJECT_TYPE 0x9112 #define GL_SYNC_CONDITION 0x9113 @@ -1931,11 +1463,8 @@ extern "C" { #define GL_TIMEOUT_EXPIRED 0x911B #define GL_CONDITION_SATISFIED 0x911C #define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#endif - -#ifndef GL_ARB_texture_multisample +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 #define GL_SAMPLE_POSITION 0x8E50 #define GL_SAMPLE_MASK 0x8E51 #define GL_SAMPLE_MASK_VALUE 0x8E52 @@ -1957,111 +1486,207 @@ extern "C" { #define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E #define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F #define GL_MAX_INTEGER_SAMPLES 0x9110 +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +GLAPI void APIENTRY glProvokingVertex (GLenum mode); +GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +GLAPI void APIENTRY glDeleteSync (GLsync sync); +GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); #endif +#endif /* GL_VERSION_3_2 */ -#ifndef GL_ARB_vertex_array_bgra -/* reuse GL_BGRA */ -#endif - -#ifndef GL_ARB_draw_buffers_blend -#endif - -#ifndef GL_ARB_sample_shading -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 -#endif - -#ifndef GL_ARB_texture_cube_map_array -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F -#endif - -#ifndef GL_ARB_texture_gather -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#endif - -#ifndef GL_ARB_texture_query_lod -#endif - -#ifndef GL_ARB_shading_language_include -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA -#endif - -#ifndef GL_ARB_texture_compression_bptc -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F -#endif - -#ifndef GL_ARB_blend_func_extended +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE #define GL_SRC1_COLOR 0x88F9 -/* reuse GL_SRC1_ALPHA */ #define GL_ONE_MINUS_SRC1_COLOR 0x88FA #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#endif - -#ifndef GL_ARB_explicit_attrib_location -#endif - -#ifndef GL_ARB_occlusion_query2 #define GL_ANY_SAMPLES_PASSED 0x8C2F -#endif - -#ifndef GL_ARB_sampler_objects #define GL_SAMPLER_BINDING 0x8919 -#endif - -#ifndef GL_ARB_shader_bit_encoding -#endif - -#ifndef GL_ARB_texture_rgb10_a2ui #define GL_RGB10_A2UI 0x906F -#endif - -#ifndef GL_ARB_texture_swizzle #define GL_TEXTURE_SWIZZLE_R 0x8E42 #define GL_TEXTURE_SWIZZLE_G 0x8E43 #define GL_TEXTURE_SWIZZLE_B 0x8E44 #define GL_TEXTURE_SWIZZLE_A 0x8E45 #define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#endif - -#ifndef GL_ARB_timer_query #define GL_TIME_ELAPSED 0x88BF #define GL_TIMESTAMP 0x8E28 -#endif - -#ifndef GL_ARB_vertex_type_2_10_10_10_rev -/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ #define GL_INT_2_10_10_10_REV 0x8D9F +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); +GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); #endif +#endif /* GL_VERSION_3_3 */ -#ifndef GL_ARB_draw_indirect +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F #define GL_DRAW_INDIRECT_BUFFER 0x8F3F #define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#endif - -#ifndef GL_ARB_gpu_shader5 #define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -/* reuse GL_MAX_VERTEX_STREAMS */ -#endif - -#ifndef GL_ARB_gpu_shader_fp64 -/* reuse GL_DOUBLE */ +#define GL_MAX_VERTEX_STREAMS 0x8E71 #define GL_DOUBLE_VEC2 0x8FFC #define GL_DOUBLE_VEC3 0x8FFD #define GL_DOUBLE_VEC4 0x8FFE @@ -2074,9 +1699,6 @@ extern "C" { #define GL_DOUBLE_MAT3x4 0x8F4C #define GL_DOUBLE_MAT4x2 0x8F4D #define GL_DOUBLE_MAT4x3 0x8F4E -#endif - -#ifndef GL_ARB_shader_subroutine #define GL_ACTIVE_SUBROUTINES 0x8DE5 #define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 #define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 @@ -2086,11 +1708,6 @@ extern "C" { #define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 #define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A #define GL_COMPATIBLE_SUBROUTINES 0x8E4B -/* reuse GL_UNIFORM_SIZE */ -/* reuse GL_UNIFORM_NAME_LENGTH */ -#endif - -#ifndef GL_ARB_tessellation_shader #define GL_PATCHES 0x000E #define GL_PATCH_VERTICES 0x8E72 #define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 @@ -2100,14 +1717,9 @@ extern "C" { #define GL_TESS_GEN_SPACING 0x8E77 #define GL_TESS_GEN_VERTEX_ORDER 0x8E78 #define GL_TESS_GEN_POINT_MODE 0x8E79 -/* reuse GL_TRIANGLES */ -/* reuse GL_QUADS */ #define GL_ISOLINES 0x8E7A -/* reuse GL_EQUAL */ #define GL_FRACTIONAL_ODD 0x8E7B #define GL_FRACTIONAL_EVEN 0x8E7C -/* reuse GL_CCW */ -/* reuse GL_CW */ #define GL_MAX_PATCH_VERTICES 0x8E7D #define GL_MAX_TESS_GEN_LEVEL 0x8E7E #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F @@ -2128,29 +1740,109 @@ extern "C" { #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 #define GL_TESS_EVALUATION_SHADER 0x8E87 #define GL_TESS_CONTROL_SHADER 0x8E88 -#endif - -#ifndef GL_ARB_texture_buffer_object_rgb32 -/* reuse GL_RGB32F */ -/* reuse GL_RGB32UI */ -/* reuse GL_RGB32I */ -#endif - -#ifndef GL_ARB_transform_feedback2 #define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#endif - -#ifndef GL_ARB_transform_feedback3 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_MAX_VERTEX_STREAMS 0x8E71 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); +typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLfloat value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); +GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); +GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); +GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); +GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); +GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); +GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedback (void); +GLAPI void APIENTRY glResumeTransformFeedback (void); +GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); +GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); +GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); #endif +#endif /* GL_VERSION_4_0 */ -#ifndef GL_ARB_ES2_compatibility +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 #define GL_FIXED 0x140C #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B @@ -2161,21 +1853,16 @@ extern "C" { #define GL_MEDIUM_INT 0x8DF4 #define GL_HIGH_INT 0x8DF5 #define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VARYING_VECTORS 0x8DFC #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD #define GL_RGB565 0x8D62 -#endif - -#ifndef GL_ARB_get_program_binary #define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 #define GL_PROGRAM_BINARY_LENGTH 0x8741 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE #define GL_PROGRAM_BINARY_FORMATS 0x87FF -#endif - -#ifndef GL_ARB_separate_shader_objects #define GL_VERTEX_SHADER_BIT 0x00000001 #define GL_FRAGMENT_SHADER_BIT 0x00000002 #define GL_GEOMETRY_SHADER_BIT 0x00000004 @@ -2185,97 +1872,198 @@ extern "C" { #define GL_PROGRAM_SEPARABLE 0x8258 #define GL_ACTIVE_PROGRAM 0x8259 #define GL_PROGRAM_PIPELINE_BINDING 0x825A -#endif - -#ifndef GL_ARB_shader_precision -#endif - -#ifndef GL_ARB_vertex_attrib_64bit -/* reuse GL_RGB32I */ -/* reuse GL_DOUBLE_VEC2 */ -/* reuse GL_DOUBLE_VEC3 */ -/* reuse GL_DOUBLE_VEC4 */ -/* reuse GL_DOUBLE_MAT2 */ -/* reuse GL_DOUBLE_MAT3 */ -/* reuse GL_DOUBLE_MAT4 */ -/* reuse GL_DOUBLE_MAT2x3 */ -/* reuse GL_DOUBLE_MAT2x4 */ -/* reuse GL_DOUBLE_MAT3x2 */ -/* reuse GL_DOUBLE_MAT3x4 */ -/* reuse GL_DOUBLE_MAT4x2 */ -/* reuse GL_DOUBLE_MAT4x3 */ -#endif - -#ifndef GL_ARB_viewport_array -/* reuse GL_SCISSOR_BOX */ -/* reuse GL_VIEWPORT */ -/* reuse GL_DEPTH_RANGE */ -/* reuse GL_SCISSOR_TEST */ #define GL_MAX_VIEWPORTS 0x825B #define GL_VIEWPORT_SUBPIXEL_BITS 0x825C #define GL_VIEWPORT_BOUNDS_RANGE 0x825D #define GL_LAYER_PROVOKING_VERTEX 0x825E #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F #define GL_UNDEFINED_VERTEX 0x8260 -/* reuse GL_FIRST_VERTEX_CONVENTION */ -/* reuse GL_LAST_VERTEX_CONVENTION */ -/* reuse GL_PROVOKING_VERTEX */ +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GLAPI void APIENTRY glClearDepthf (GLfloat d); +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); #endif +#endif /* GL_VERSION_4_1 */ -#ifndef GL_ARB_cl_event -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 -#endif - -#ifndef GL_ARB_debug_output -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -#endif - -#ifndef GL_ARB_robustness -/* reuse GL_NO_ERROR */ -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -#endif - -#ifndef GL_ARB_shader_stencil_export -#endif - -#ifndef GL_ARB_base_instance -#endif - -#ifndef GL_ARB_shading_language_420pack -#endif - -#ifndef GL_ARB_transform_feedback_instanced -#endif - -#ifndef GL_ARB_compressed_texture_pixel_storage +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 @@ -2284,20 +2072,8 @@ extern "C" { #define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C #define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D #define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#endif - -#ifndef GL_ARB_conservative_depth -#endif - -#ifndef GL_ARB_internalformat_query #define GL_NUM_SAMPLE_COUNTS 0x9380 -#endif - -#ifndef GL_ARB_map_buffer_alignment #define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#endif - -#ifndef GL_ARB_shader_atomic_counters #define GL_ATOMIC_COUNTER_BUFFER 0x92C0 #define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 #define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 @@ -2327,9 +2103,6 @@ extern "C" { #define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 #define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#endif - -#ifndef GL_ARB_shader_image_load_store #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 #define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 #define GL_UNIFORM_BARRIER_BIT 0x00000004 @@ -2394,16 +2167,75 @@ extern "C" { #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#endif - -#ifndef GL_ARB_shading_language_packing -#endif - -#ifndef GL_ARB_texture_storage +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); +GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); #endif +#endif /* GL_VERSION_4_2 */ -#ifndef GL_KHR_debug +#ifndef GL_VERSION_4_3 +#define GL_VERSION_4_3 1 +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244 @@ -2420,6 +2252,12 @@ extern "C" { #define GL_DEBUG_TYPE_PORTABILITY 0x824F #define GL_DEBUG_TYPE_PERFORMANCE 0x8250 #define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 #define GL_DEBUG_TYPE_MARKER 0x8268 #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 #define GL_DEBUG_TYPE_POP_GROUP 0x826A @@ -2432,1521 +2270,3491 @@ extern "C" { #define GL_QUERY 0x82E3 #define GL_PROGRAM_PIPELINE 0x82E4 #define GL_SAMPLER 0x82E6 -#define GL_DISPLAY_LIST 0x82E7 -/* DISPLAY_LIST used in compatibility profile only */ #define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 #define GL_DEBUG_OUTPUT 0x92E0 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -/* reuse GL_STACK_UNDERFLOW */ -/* reuse GL_STACK_OVERFLOW */ +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_MIPMAP 0x8293 +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_COLOR_ENCODING 0x8296 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_FILTER 0x829A +#define GL_VERTEX_TEXTURE 0x829B +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_LOCATION_INDEX 0x930F +#define GL_IS_PER_PATCH 0x92E7 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_DISPLAY_LIST 0x82E7 +typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (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); +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); +GLAPI void APIENTRY 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); +GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); +GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); +GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GLAPI void APIENTRY glPopDebugGroup (void); +GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); #endif +#endif /* GL_VERSION_4_3 */ + +#ifndef GL_VERSION_4_4 +#define GL_VERSION_4_4 1 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_LOCATION_COMPONENT 0x934A +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers); +GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#endif +#endif /* GL_VERSION_4_4 */ + +#ifndef GL_VERSION_4_5 +#define GL_VERSION_4_5 1 +#define GL_CONTEXT_LOST 0x0507 +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_ZERO_TO_ONE 0x935F +#define GL_CLIP_ORIGIN 0x935C +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_TEXTURE_TARGET 0x1006 +#define GL_QUERY_TARGET 0x82EA +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth); +typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil); +typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers); +typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLGETNMAPDVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLGETNMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth); +GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers); +GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access); +GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer); +GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf); +GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src); +GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil); +GLAPI void APIENTRY 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); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures); +GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param); +GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture); +GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture); +GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays); +GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer); +GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers); +GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids); +GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); +GLAPI void APIENTRY 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); +GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void); +GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glGetnMapdv (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfv (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapiv (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfv (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuiv (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusv (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStipple (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTable (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +GLAPI void APIENTRY glGetnConvolutionFilter (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +GLAPI void APIENTRY glGetnSeparableFilter (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +GLAPI void APIENTRY glGetnHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glGetnMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glTextureBarrier (void); +#endif +#endif /* GL_VERSION_4_5 */ + +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#endif /* GL_ARB_ES2_compatibility */ + +#ifndef GL_ARB_ES3_1_compatibility +#define GL_ARB_ES3_1_compatibility 1 +#endif /* GL_ARB_ES3_1_compatibility */ + +#ifndef GL_ARB_ES3_compatibility +#define GL_ARB_ES3_compatibility 1 +#endif /* GL_ARB_ES3_compatibility */ + +#ifndef GL_ARB_arrays_of_arrays +#define GL_ARB_arrays_of_arrays 1 +#endif /* GL_ARB_arrays_of_arrays */ + +#ifndef GL_ARB_base_instance +#define GL_ARB_base_instance 1 +#endif /* GL_ARB_base_instance */ + +#ifndef GL_ARB_bindless_texture +#define GL_ARB_bindless_texture 1 +typedef uint64_t GLuint64EXT; +#define GL_UNSIGNED_INT64_ARB 0x140F +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params); +#endif +#endif /* GL_ARB_bindless_texture */ + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended 1 +#endif /* GL_ARB_blend_func_extended */ + +#ifndef GL_ARB_buffer_storage +#define GL_ARB_buffer_storage 1 +#endif /* GL_ARB_buffer_storage */ + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +struct _cl_context; +struct _cl_event; +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#endif +#endif /* GL_ARB_cl_event */ + +#ifndef GL_ARB_clear_buffer_object +#define GL_ARB_clear_buffer_object 1 +#endif /* GL_ARB_clear_buffer_object */ + +#ifndef GL_ARB_clear_texture +#define GL_ARB_clear_texture 1 +#endif /* GL_ARB_clear_texture */ + +#ifndef GL_ARB_clip_control +#define GL_ARB_clip_control 1 +#endif /* GL_ARB_clip_control */ + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); +#endif +#endif /* GL_ARB_color_buffer_float */ + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility 1 +#endif /* GL_ARB_compatibility */ + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_ARB_compressed_texture_pixel_storage 1 +#endif /* GL_ARB_compressed_texture_pixel_storage */ #ifndef GL_ARB_compute_shader -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_LOCAL_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_LOCAL_WORK_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#endif - -#ifndef GL_EXT_abgr -#define GL_ABGR_EXT 0x8000 -#endif - -#ifndef GL_EXT_blend_color -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -#endif - -#ifndef GL_EXT_texture -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#endif - -#ifndef GL_EXT_texture3D -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -#endif - -#ifndef GL_EXT_subtexture -#endif - -#ifndef GL_EXT_copy_texture -#endif - -#ifndef GL_EXT_histogram -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#endif - -#ifndef GL_EXT_convolution -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -#endif - -#ifndef GL_SGI_color_matrix -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#endif - -#ifndef GL_SGI_color_table -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -#endif - -#ifndef GL_SGIS_texture4D -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#endif - -#ifndef GL_EXT_cmyka -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#endif - -#ifndef GL_EXT_texture_object -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#endif - -#ifndef GL_SGIS_multisample -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_RESCALE_NORMAL_EXT 0x803A -#endif - -#ifndef GL_EXT_vertex_array -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -#endif - -#ifndef GL_EXT_misc_attribute -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#endif - -#ifndef GL_SGIX_shadow -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#endif - -#ifndef GL_EXT_blend_logic_op -#endif - -#ifndef GL_SGIX_interlace -#define GL_INTERLACE_SGIX 0x8094 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#endif - -#ifndef GL_SGIS_texture_select -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#endif - -#ifndef GL_EXT_point_parameters -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -#endif - -#ifndef GL_SGIX_instruments -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#endif - -#ifndef GL_SGIX_framezoom -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#endif - -#ifndef GL_FfdMaskSGIX -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -#endif - -#ifndef GL_SGIX_flush_raster -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#endif - -#ifndef GL_HP_image_transform -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#endif - -#ifndef GL_INGR_palette_buffer -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#endif - -#ifndef GL_EXT_color_subtable -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_LIST_PRIORITY_SGIX 0x8182 -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#endif - -#ifndef GL_EXT_index_texture -#endif - -#ifndef GL_EXT_index_material -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -#endif - -#ifndef GL_EXT_index_func -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -#endif - -#ifndef GL_WIN_phong_shading -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB -#endif - -#ifndef GL_WIN_specular_fog -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#endif - -#ifndef GL_EXT_light_texture -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -/* reuse GL_FRAGMENT_DEPTH_EXT */ -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif - -#ifndef GL_SGIX_impact_pixel_texture -#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 -#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 -#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 -#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 -#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 -#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 -#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A -#endif - -#ifndef GL_EXT_bgra -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_SGIX_async -#define GL_ASYNC_MARKER_SGIX 0x8329 -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#endif - -#ifndef GL_INTEL_texture_scissor -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -#endif - -#ifndef GL_HP_occlusion_test -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif - -#ifndef GL_EXT_secondary_color -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF -#endif - -#ifndef GL_EXT_multi_draw_arrays -#endif - -#ifndef GL_EXT_fog_coord -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_FOG_SCALE_SGIX 0x81FC -#define GL_FOG_SCALE_VALUE_SGIX 0x81FD -#endif - -#ifndef GL_SUNX_constant_data -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -#endif - -#ifndef GL_SUN_global_alpha -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -#endif - -#ifndef GL_SUN_triangle_list -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -#endif - -#ifndef GL_SUN_vertex -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -#endif - -#ifndef GL_INGR_color_clamp -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INTERLACE_READ_INGR 0x8568 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 -#endif - -#ifndef GL_EXT_texture_cube_map -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_WRAP_BORDER_SUN 0x81D4 -#endif - -#ifndef GL_EXT_texture_env_add -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT GL_MODELVIEW -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -#endif - -#ifndef GL_NV_register_combiners -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -/* reuse GL_TEXTURE0_ARB */ -/* reuse GL_TEXTURE1_ARB */ -/* reuse GL_ZERO */ -/* reuse GL_NONE */ -/* reuse GL_FOG */ -#endif - -#ifndef GL_NV_fog_distance -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -/* reuse GL_EYE_PLANE */ -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F -#endif - -#ifndef GL_NV_blend_square -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B -#endif - -#ifndef GL_MESA_resize_buffers -#endif - -#ifndef GL_MESA_window_pos -#endif - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_CULL_VERTEX_IBM 103050 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -#endif - -#ifndef GL_SGIX_subsample -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 -#endif - -#ifndef GL_SGI_depth_pass_instrument -#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 -#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 -#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#endif +#define GL_ARB_compute_shader 1 +#endif /* GL_ARB_compute_shader */ + +#ifndef GL_ARB_compute_variable_group_size +#define GL_ARB_compute_variable_group_size 1 +#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 +#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB +#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 +#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); +#endif +#endif /* GL_ARB_compute_variable_group_size */ + +#ifndef GL_ARB_conditional_render_inverted +#define GL_ARB_conditional_render_inverted 1 +#endif /* GL_ARB_conditional_render_inverted */ + +#ifndef GL_ARB_conservative_depth +#define GL_ARB_conservative_depth 1 +#endif /* GL_ARB_conservative_depth */ + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#endif /* GL_ARB_copy_buffer */ + +#ifndef GL_ARB_copy_image +#define GL_ARB_copy_image 1 +#endif /* GL_ARB_copy_image */ + +#ifndef GL_ARB_cull_distance +#define GL_ARB_cull_distance 1 +#endif /* GL_ARB_cull_distance */ + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif +#endif /* GL_ARB_debug_output */ + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif /* GL_ARB_depth_buffer_float */ + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp 1 +#endif /* GL_ARB_depth_clamp */ + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif /* GL_ARB_depth_texture */ + +#ifndef GL_ARB_derivative_control +#define GL_ARB_derivative_control 1 +#endif /* GL_ARB_derivative_control */ + +#ifndef GL_ARB_direct_state_access +#define GL_ARB_direct_state_access 1 +#endif /* GL_ARB_direct_state_access */ + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_ARB_draw_buffers */ + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend 1 +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +#endif /* GL_ARB_draw_buffers_blend */ + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +#endif /* GL_ARB_draw_elements_base_vertex */ + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect 1 +#endif /* GL_ARB_draw_indirect */ + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_ARB_draw_instanced */ + +#ifndef GL_ARB_enhanced_layouts +#define GL_ARB_enhanced_layouts 1 +#endif /* GL_ARB_enhanced_layouts */ + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif /* GL_ARB_explicit_attrib_location */ + +#ifndef GL_ARB_explicit_uniform_location +#define GL_ARB_explicit_uniform_location 1 +#endif /* GL_ARB_explicit_uniform_location */ + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions 1 +#endif /* GL_ARB_fragment_coord_conventions */ + +#ifndef GL_ARB_fragment_layer_viewport +#define GL_ARB_fragment_layer_viewport 1 +#endif /* GL_ARB_fragment_layer_viewport */ + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string); +GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); +GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string); +GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); +#endif +#endif /* GL_ARB_fragment_program */ + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif /* GL_ARB_fragment_program_shadow */ + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif /* GL_ARB_fragment_shader */ + +#ifndef GL_ARB_framebuffer_no_attachments +#define GL_ARB_framebuffer_no_attachments 1 +#endif /* GL_ARB_framebuffer_no_attachments */ + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#endif /* GL_ARB_framebuffer_object */ + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif /* GL_ARB_framebuffer_sRGB */ + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif +#endif /* GL_ARB_geometry_shader4 */ + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#endif /* GL_ARB_get_program_binary */ + +#ifndef GL_ARB_get_texture_sub_image +#define GL_ARB_get_texture_sub_image 1 +#endif /* GL_ARB_get_texture_sub_image */ + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif /* GL_ARB_gpu_shader5 */ + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 1 +#endif /* GL_ARB_gpu_shader_fp64 */ + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +typedef unsigned short GLhalfARB; +#define GL_HALF_FLOAT_ARB 0x140B +#endif /* GL_ARB_half_float_pixel */ + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif /* GL_ARB_half_float_vertex */ + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging 1 +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_EQUATION 0x8009 +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table); +GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image); +GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogram (GLenum target); +GLAPI void APIENTRY glResetMinmax (GLenum target); +#endif +#endif /* GL_ARB_imaging */ + +#ifndef GL_ARB_indirect_parameters +#define GL_ARB_indirect_parameters 1 +#define GL_PARAMETER_BUFFER_ARB 0x80EE +#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_ARB_indirect_parameters */ + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); +#endif +#endif /* GL_ARB_instanced_arrays */ + +#ifndef GL_ARB_internalformat_query +#define GL_ARB_internalformat_query 1 +#endif /* GL_ARB_internalformat_query */ + +#ifndef GL_ARB_internalformat_query2 +#define GL_ARB_internalformat_query2 1 +#define GL_SRGB_DECODE_ARB 0x8299 +#endif /* GL_ARB_internalformat_query2 */ + +#ifndef GL_ARB_invalidate_subdata +#define GL_ARB_invalidate_subdata 1 +#endif /* GL_ARB_invalidate_subdata */ + +#ifndef GL_ARB_map_buffer_alignment +#define GL_ARB_map_buffer_alignment 1 +#endif /* GL_ARB_map_buffer_alignment */ + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#endif /* GL_ARB_map_buffer_range */ + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); +GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); +GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); +GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); +GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_ARB_matrix_palette */ + +#ifndef GL_ARB_multi_bind +#define GL_ARB_multi_bind 1 +#endif /* GL_ARB_multi_bind */ + +#ifndef GL_ARB_multi_draw_indirect +#define GL_ARB_multi_draw_indirect 1 +#endif /* GL_ARB_multi_draw_indirect */ + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); +#endif +#endif /* GL_ARB_multisample */ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); +#endif +#endif /* GL_ARB_multitexture */ + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); +GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQueryARB (GLenum target); +GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); +#endif +#endif /* GL_ARB_occlusion_query */ + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif /* GL_ARB_occlusion_query2 */ + +#ifndef GL_ARB_pipeline_statistics_query +#define GL_ARB_pipeline_statistics_query 1 +#define GL_VERTICES_SUBMITTED_ARB 0x82EE +#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 +#endif /* GL_ARB_pipeline_statistics_query */ + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif /* GL_ARB_pixel_buffer_object */ + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); +#endif +#endif /* GL_ARB_point_parameters */ + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif /* GL_ARB_point_sprite */ + +#ifndef GL_ARB_program_interface_query +#define GL_ARB_program_interface_query 1 +#endif /* GL_ARB_program_interface_query */ + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex 1 +#endif /* GL_ARB_provoking_vertex */ + +#ifndef GL_ARB_query_buffer_object +#define GL_ARB_query_buffer_object 1 +#endif /* GL_ARB_query_buffer_object */ + +#ifndef GL_ARB_robust_buffer_access_behavior +#define GL_ARB_robust_buffer_access_behavior 1 +#endif /* GL_ARB_robust_buffer_access_behavior */ + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +#endif +#endif /* GL_ARB_robustness */ + +#ifndef GL_ARB_robustness_isolation +#define GL_ARB_robustness_isolation 1 +#endif /* GL_ARB_robustness_isolation */ + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading 1 +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); +#endif +#endif /* GL_ARB_sample_shading */ + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects 1 +#endif /* GL_ARB_sampler_objects */ + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map 1 +#endif /* GL_ARB_seamless_cube_map */ + +#ifndef GL_ARB_seamless_cubemap_per_texture +#define GL_ARB_seamless_cubemap_per_texture 1 +#endif /* GL_ARB_seamless_cubemap_per_texture */ + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#endif /* GL_ARB_separate_shader_objects */ + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ARB_shader_atomic_counters 1 +#endif /* GL_ARB_shader_atomic_counters */ + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding 1 +#endif /* GL_ARB_shader_bit_encoding */ + +#ifndef GL_ARB_shader_draw_parameters +#define GL_ARB_shader_draw_parameters 1 +#endif /* GL_ARB_shader_draw_parameters */ + +#ifndef GL_ARB_shader_group_vote +#define GL_ARB_shader_group_vote 1 +#endif /* GL_ARB_shader_group_vote */ + +#ifndef GL_ARB_shader_image_load_store +#define GL_ARB_shader_image_load_store 1 +#endif /* GL_ARB_shader_image_load_store */ + +#ifndef GL_ARB_shader_image_size +#define GL_ARB_shader_image_size 1 +#endif /* GL_ARB_shader_image_size */ + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif +typedef char GLcharARB; +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif +#endif /* GL_ARB_shader_objects */ + +#ifndef GL_ARB_shader_precision +#define GL_ARB_shader_precision 1 +#endif /* GL_ARB_shader_precision */ + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif /* GL_ARB_shader_stencil_export */ + +#ifndef GL_ARB_shader_storage_buffer_object +#define GL_ARB_shader_storage_buffer_object 1 +#endif /* GL_ARB_shader_storage_buffer_object */ + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine 1 +#endif /* GL_ARB_shader_subroutine */ + +#ifndef GL_ARB_shader_texture_image_samples +#define GL_ARB_shader_texture_image_samples 1 +#endif /* GL_ARB_shader_texture_image_samples */ + +#ifndef GL_ARB_shader_texture_lod +#define GL_ARB_shader_texture_lod 1 +#endif /* GL_ARB_shader_texture_lod */ + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif /* GL_ARB_shading_language_100 */ + +#ifndef GL_ARB_shading_language_420pack +#define GL_ARB_shading_language_420pack 1 +#endif /* GL_ARB_shading_language_420pack */ + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include 1 +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif +#endif /* GL_ARB_shading_language_include */ + +#ifndef GL_ARB_shading_language_packing +#define GL_ARB_shading_language_packing 1 +#endif /* GL_ARB_shading_language_packing */ + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif /* GL_ARB_shadow */ + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif /* GL_ARB_shadow_ambient */ + +#ifndef GL_ARB_sparse_buffer +#define GL_ARB_sparse_buffer 1 +#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 +#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_buffer */ + +#ifndef GL_ARB_sparse_texture +#define GL_ARB_sparse_texture 1 +#define GL_TEXTURE_SPARSE_ARB 0x91A6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 +#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA +#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 +#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_texture */ + +#ifndef GL_ARB_stencil_texturing +#define GL_ARB_stencil_texturing 1 +#endif /* GL_ARB_stencil_texturing */ + +#ifndef GL_ARB_sync +#define GL_ARB_sync 1 +#endif /* GL_ARB_sync */ + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader 1 +#endif /* GL_ARB_tessellation_shader */ + +#ifndef GL_ARB_texture_barrier +#define GL_ARB_texture_barrier 1 +#endif /* GL_ARB_texture_barrier */ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif /* GL_ARB_texture_border_clamp */ + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +#endif +#endif /* GL_ARB_texture_buffer_object */ + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif /* GL_ARB_texture_buffer_object_rgb32 */ + +#ifndef GL_ARB_texture_buffer_range +#define GL_ARB_texture_buffer_range 1 +#endif /* GL_ARB_texture_buffer_range */ + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img); +#endif +#endif /* GL_ARB_texture_compression */ + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif /* GL_ARB_texture_compression_bptc */ + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif /* GL_ARB_texture_compression_rgtc */ + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif /* GL_ARB_texture_cube_map */ + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#endif /* GL_ARB_texture_cube_map_array */ + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#endif /* GL_ARB_texture_env_add */ + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif /* GL_ARB_texture_env_combine */ + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#endif /* GL_ARB_texture_env_crossbar */ + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif /* GL_ARB_texture_env_dot3 */ + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif /* GL_ARB_texture_float */ + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather 1 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +#endif /* GL_ARB_texture_gather */ + +#ifndef GL_ARB_texture_mirror_clamp_to_edge +#define GL_ARB_texture_mirror_clamp_to_edge 1 +#endif /* GL_ARB_texture_mirror_clamp_to_edge */ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif /* GL_ARB_texture_mirrored_repeat */ + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample 1 +#endif /* GL_ARB_texture_multisample */ + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif /* GL_ARB_texture_non_power_of_two */ + +#ifndef GL_ARB_texture_query_levels +#define GL_ARB_texture_query_levels 1 +#endif /* GL_ARB_texture_query_levels */ + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod 1 +#endif /* GL_ARB_texture_query_lod */ + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif /* GL_ARB_texture_rectangle */ + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif /* GL_ARB_texture_rg */ + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif /* GL_ARB_texture_rgb10_a2ui */ + +#ifndef GL_ARB_texture_stencil8 +#define GL_ARB_texture_stencil8 1 +#endif /* GL_ARB_texture_stencil8 */ + +#ifndef GL_ARB_texture_storage +#define GL_ARB_texture_storage 1 +#endif /* GL_ARB_texture_storage */ + +#ifndef GL_ARB_texture_storage_multisample +#define GL_ARB_texture_storage_multisample 1 +#endif /* GL_ARB_texture_storage_multisample */ + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 +#endif /* GL_ARB_texture_swizzle */ + +#ifndef GL_ARB_texture_view +#define GL_ARB_texture_view 1 +#endif /* GL_ARB_texture_view */ + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query 1 +#endif /* GL_ARB_timer_query */ + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 1 +#endif /* GL_ARB_transform_feedback2 */ + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 1 +#endif /* GL_ARB_transform_feedback3 */ + +#ifndef GL_ARB_transform_feedback_instanced +#define GL_ARB_transform_feedback_instanced 1 +#endif /* GL_ARB_transform_feedback_instanced */ + +#ifndef GL_ARB_transform_feedback_overflow_query +#define GL_ARB_transform_feedback_overflow_query 1 +#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED +#endif /* GL_ARB_transform_feedback_overflow_query */ + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); +#endif +#endif /* GL_ARB_transpose_matrix */ + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#endif /* GL_ARB_uniform_buffer_object */ + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra 1 +#endif /* GL_ARB_vertex_array_bgra */ + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#endif /* GL_ARB_vertex_array_object */ + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#endif /* GL_ARB_vertex_attrib_64bit */ + +#ifndef GL_ARB_vertex_attrib_binding +#define GL_ARB_vertex_attrib_binding 1 +#endif /* GL_ARB_vertex_attrib_binding */ + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); +GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); +GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); +GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); +GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); +GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); +GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); +GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); +GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glVertexBlendARB (GLint count); +#endif +#endif /* GL_ARB_vertex_blend */ + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +typedef ptrdiff_t GLsizeiptrARB; +typedef ptrdiff_t GLintptrARB; +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); +typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); +GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); +GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); +GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_ARB_vertex_buffer_object */ + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer); +#endif +#endif /* GL_ARB_vertex_program */ + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); +#endif +#endif /* GL_ARB_vertex_shader */ + +#ifndef GL_ARB_vertex_type_10f_11f_11f_rev +#define GL_ARB_vertex_type_10f_11f_11f_rev 1 +#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */ + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#endif /* GL_ARB_vertex_type_2_10_10_10_rev */ + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +#endif /* GL_ARB_viewport_array */ + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); +#endif +#endif /* GL_ARB_window_pos */ + +#ifndef GL_KHR_blend_equation_advanced +#define GL_KHR_blend_equation_advanced 1 +#define GL_MULTIPLY_KHR 0x9294 +#define GL_SCREEN_KHR 0x9295 +#define GL_OVERLAY_KHR 0x9296 +#define GL_DARKEN_KHR 0x9297 +#define GL_LIGHTEN_KHR 0x9298 +#define GL_COLORDODGE_KHR 0x9299 +#define GL_COLORBURN_KHR 0x929A +#define GL_HARDLIGHT_KHR 0x929B +#define GL_SOFTLIGHT_KHR 0x929C +#define GL_DIFFERENCE_KHR 0x929E +#define GL_EXCLUSION_KHR 0x92A0 +#define GL_HSL_HUE_KHR 0x92AD +#define GL_HSL_SATURATION_KHR 0x92AE +#define GL_HSL_COLOR_KHR 0x92AF +#define GL_HSL_LUMINOSITY_KHR 0x92B0 +typedef void (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendBarrierKHR (void); +#endif +#endif /* GL_KHR_blend_equation_advanced */ + +#ifndef GL_KHR_blend_equation_advanced_coherent +#define GL_KHR_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +#endif /* GL_KHR_blend_equation_advanced_coherent */ + +#ifndef GL_KHR_context_flush_control +#define GL_KHR_context_flush_control 1 +#endif /* GL_KHR_context_flush_control */ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#endif /* GL_KHR_debug */ + +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + +#ifndef GL_KHR_robust_buffer_access_behavior +#define GL_KHR_robust_buffer_access_behavior 1 +#endif /* GL_KHR_robust_buffer_access_behavior */ + +#ifndef GL_KHR_robustness +#define GL_KHR_robustness 1 +#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +#endif /* GL_KHR_robustness */ + +#ifndef GL_KHR_texture_compression_astc_hdr +#define GL_KHR_texture_compression_astc_hdr 1 +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif /* GL_KHR_texture_compression_astc_hdr */ + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif /* GL_KHR_texture_compression_astc_ldr */ + +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s); +typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t); +typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r); +typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x, GLbyte y); +typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y, GLbyte z); +typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z, GLbyte w); +typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s); +GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t); +GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r); +GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); +GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glTexCoord1bOES (GLbyte s); +GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t); +GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r); +GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q); +GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex2bOES (GLbyte x, GLbyte y); +GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y, GLbyte z); +GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z, GLbyte w); +GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords); +#endif +#endif /* GL_OES_byte_coordinates */ + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif /* GL_OES_compressed_paletted_texture */ + +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point 1 +typedef GLint GLfixed; +#define GL_FIXED_OES 0x140C +typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref); +typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth); +typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); +typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation); +typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); +typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); +typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); +typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value); +typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); +typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue); +typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components); +typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u); +typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v); +typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v); +typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values); +typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component); +typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); +typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); +typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2); +typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token); +typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values); +typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities); +typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y); +typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w); +typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); +typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2); +typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s); +typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t); +typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r); +typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x); +typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y); +typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref); +GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glClearDepthxOES (GLfixed depth); +GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); +GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f); +GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation); +GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glLineWidthxOES (GLfixed width); +GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); +GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glPointSizexOES (GLfixed size); +GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); +GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value); +GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); +GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue); +GLAPI void APIENTRY glColor3xvOES (const GLfixed *components); +GLAPI void APIENTRY glColor4xvOES (const GLfixed *components); +GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u); +GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords); +GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v); +GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer); +GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v); +GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values); +GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glIndexxOES (GLfixed component); +GLAPI void APIENTRY glIndexxvOES (const GLfixed *component); +GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); +GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); +GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2); +GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); +GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s); +GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t); +GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r); +GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glPassThroughxOES (GLfixed token); +GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values); +GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param); +GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor); +GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities); +GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y); +GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w); +GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); +GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2); +GLAPI void APIENTRY glTexCoord1xOES (GLfixed s); +GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t); +GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r); +GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glVertex2xOES (GLfixed x); +GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y); +GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords); +#endif +#endif /* GL_OES_fixed_point */ + +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix 1 +typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent); +#endif +#endif /* GL_OES_query_matrix */ + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif /* GL_OES_read_format */ + +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); +typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); +typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); +typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation); +typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearDepthfOES (GLclampf depth); +GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); +GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f); +GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation); +GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#endif +#endif /* GL_OES_single_precision */ #ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 #define GL_MULTISAMPLE_3DFX 0x86B2 #define GL_SAMPLE_BUFFERS_3DFX 0x86B3 #define GL_SAMPLES_3DFX 0x86B4 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#endif +#endif /* GL_3DFX_multisample */ #ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); #endif +#endif /* GL_3DFX_tbuffer */ -#ifndef GL_EXT_multisample -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -#endif +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif /* GL_3DFX_texture_compression_FXT1 */ -#ifndef GL_SGIX_vertex_preclip -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#endif +#ifndef GL_AMD_blend_minmax_factor +#define GL_AMD_blend_minmax_factor 1 +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif /* GL_AMD_blend_minmax_factor */ -#ifndef GL_SGIX_convolution_accuracy -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#endif +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth 1 +#endif /* GL_AMD_conservative_depth */ -#ifndef GL_SGIX_resample -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#ifndef GL_AMD_debug_output +#define GL_AMD_debug_output 1 +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); +#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); #endif +#endif /* GL_AMD_debug_output */ -#ifndef GL_SGIS_point_line_texgen -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#endif +#ifndef GL_AMD_depth_clamp_separate +#define GL_AMD_depth_clamp_separate 1 +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +#endif /* GL_AMD_depth_clamp_separate */ -#ifndef GL_SGIS_texture_color_mask -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#ifndef GL_AMD_draw_buffers_blend +#define GL_AMD_draw_buffers_blend 1 +typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); #endif +#endif /* GL_AMD_draw_buffers_blend */ -#ifndef GL_EXT_texture_env_dot3 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 -#endif +#ifndef GL_AMD_gcn_shader +#define GL_AMD_gcn_shader 1 +#endif /* GL_AMD_gcn_shader */ -#ifndef GL_ATI_texture_mirror_once -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#ifndef GL_AMD_gpu_shader_int64 +#define GL_AMD_gpu_shader_int64 1 +typedef int64_t GLint64EXT; +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); #endif +#endif /* GL_AMD_gpu_shader_int64 */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 +#ifndef GL_AMD_interleaved_elements +#define GL_AMD_interleaved_elements 1 +#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 +#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 +typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param); #endif +#endif /* GL_AMD_interleaved_elements */ -#ifndef GL_IBM_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_IBM 0x8370 +#ifndef GL_AMD_multi_draw_indirect +#define GL_AMD_multi_draw_indirect 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); #endif +#endif /* GL_AMD_multi_draw_indirect */ -#ifndef GL_NV_evaluators -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#ifndef GL_AMD_name_gen_delete +#define GL_AMD_name_gen_delete 1 +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); #endif +#endif /* GL_AMD_name_gen_delete */ -#ifndef GL_NV_packed_depth_stencil -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#ifndef GL_AMD_occlusion_query_event +#define GL_AMD_occlusion_query_event 1 +#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F +#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 +#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 +#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 +#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 +#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); #endif +#endif /* GL_AMD_occlusion_query_event */ -#ifndef GL_NV_register_combiners2 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); +typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); #endif +#endif /* GL_AMD_performance_monitor */ -#ifndef GL_NV_texture_compression_vtc -#endif +#ifndef GL_AMD_pinned_memory +#define GL_AMD_pinned_memory 1 +#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 +#endif /* GL_AMD_pinned_memory */ -#ifndef GL_NV_texture_rectangle -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#endif +#ifndef GL_AMD_query_buffer_object +#define GL_AMD_query_buffer_object 1 +#define GL_QUERY_BUFFER_AMD 0x9192 +#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 +#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 +#endif /* GL_AMD_query_buffer_object */ -#ifndef GL_NV_texture_shader -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV -#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV -#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#ifndef GL_AMD_sample_positions +#define GL_AMD_sample_positions 1 +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); #endif +#endif /* GL_AMD_sample_positions */ -#ifndef GL_NV_texture_shader2 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#endif +#ifndef GL_AMD_seamless_cubemap_per_texture +#define GL_AMD_seamless_cubemap_per_texture 1 +#endif /* GL_AMD_seamless_cubemap_per_texture */ -#ifndef GL_NV_vertex_array_range2 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#endif +#ifndef GL_AMD_shader_atomic_counter_ops +#define GL_AMD_shader_atomic_counter_ops 1 +#endif /* GL_AMD_shader_atomic_counter_ops */ -#ifndef GL_NV_vertex_program -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -#endif +#ifndef GL_AMD_shader_stencil_export +#define GL_AMD_shader_stencil_export 1 +#endif /* GL_AMD_shader_stencil_export */ -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#endif +#ifndef GL_AMD_shader_trinary_minmax +#define GL_AMD_shader_trinary_minmax 1 +#endif /* GL_AMD_shader_trinary_minmax */ -#ifndef GL_SGIX_scalebias_hint -#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#ifndef GL_AMD_sparse_texture +#define GL_AMD_sparse_texture 1 +#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A +#define GL_MIN_SPARSE_LEVEL_AMD 0x919B +#define GL_MIN_LOD_WARNING_AMD 0x919C +#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 +typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); #endif +#endif /* GL_AMD_sparse_texture */ -#ifndef GL_OML_interlace -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 +#ifndef GL_AMD_stencil_operation_extended +#define GL_AMD_stencil_operation_extended 1 +#define GL_SET_AMD 0x874A +#define GL_REPLACE_VALUE_AMD 0x874B +#define GL_STENCIL_OP_VALUE_AMD 0x874C +#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); #endif +#endif /* GL_AMD_stencil_operation_extended */ -#ifndef GL_OML_subsample -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#endif +#ifndef GL_AMD_texture_texture4 +#define GL_AMD_texture_texture4 1 +#endif /* GL_AMD_texture_texture4 */ -#ifndef GL_OML_resample -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#endif +#ifndef GL_AMD_transform_feedback3_lines_triangles +#define GL_AMD_transform_feedback3_lines_triangles 1 +#endif /* GL_AMD_transform_feedback3_lines_triangles */ -#ifndef GL_NV_copy_depth_to_color -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#ifndef GL_AMD_transform_feedback4 +#define GL_AMD_transform_feedback4 1 +#define GL_STREAM_RASTERIZATION_AMD 0x91A0 +#endif /* GL_AMD_transform_feedback4 */ + +#ifndef GL_AMD_vertex_shader_layer +#define GL_AMD_vertex_shader_layer 1 +#endif /* GL_AMD_vertex_shader_layer */ + +#ifndef GL_AMD_vertex_shader_tessellator +#define GL_AMD_vertex_shader_tessellator 1 +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_DISCRETE_AMD 0x9006 +#define GL_CONTINUOUS_AMD 0x9007 +typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); +GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); #endif +#endif /* GL_AMD_vertex_shader_tessellator */ + +#ifndef GL_AMD_vertex_shader_viewport_index +#define GL_AMD_vertex_shader_viewport_index 1 +#endif /* GL_AMD_vertex_shader_viewport_index */ + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_APPLE_aux_depth_stencil 1 +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#endif /* GL_APPLE_aux_depth_stencil */ + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif /* GL_APPLE_client_storage */ + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif +#endif /* GL_APPLE_element_array */ + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); +#endif +#endif /* GL_APPLE_fence */ + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels 1 +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#endif /* GL_APPLE_float_pixels */ + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range 1 +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); +#endif +#endif /* GL_APPLE_flush_buffer_range */ + +#ifndef GL_APPLE_object_purgeable +#define GL_APPLE_object_purgeable 1 +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_RETAINED_APPLE 0x8A1B +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_PURGEABLE_APPLE 0x8A1D +typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif +#endif /* GL_APPLE_object_purgeable */ + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#define GL_RGB_RAW_422_APPLE 0x8A51 +#endif /* GL_APPLE_rgb_422 */ + +#ifndef GL_APPLE_row_bytes +#define GL_APPLE_row_bytes 1 +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#endif /* GL_APPLE_row_bytes */ + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif /* GL_APPLE_specular_vector */ + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range 1 +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer); +GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_APPLE_texture_range */ + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif /* GL_APPLE_transform_hint */ + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); +#endif +#endif /* GL_APPLE_vertex_array_object */ + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CLIENT_APPLE 0x85B4 +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); +#endif +#endif /* GL_APPLE_vertex_array_range */ + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_APPLE_vertex_program_evaluators 1 +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#endif +#endif /* GL_APPLE_vertex_program_evaluators */ + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#define GL_YCBCR_422_APPLE 0x85B9 +#endif /* GL_APPLE_ycbcr_422 */ + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_ATI_draw_buffers */ + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif +#endif /* GL_ATI_element_array */ #ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 #define GL_BUMP_ROT_MATRIX_ATI 0x8775 #define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 #define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 @@ -3955,9 +5763,20 @@ extern "C" { #define GL_DU8DV8_ATI 0x877A #define GL_BUMP_ENVMAP_ATI 0x877B #define GL_BUMP_TARGET_ATI 0x877C +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); +GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); #endif +#endif /* GL_ATI_envmap_bumpmap */ #ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 #define GL_FRAGMENT_SHADER_ATI 0x8920 #define GL_REG_0_ATI 0x8921 #define GL_REG_1_ATI 0x8922 @@ -4062,9 +5881,63 @@ extern "C" { #define GL_COMP_BIT_ATI 0x00000002 #define GL_NEGATE_BIT_ATI 0x00000004 #define GL_BIAS_BIT_ATI 0x00000008 +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); +GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glBeginFragmentShaderATI (void); +GLAPI void APIENTRY glEndFragmentShaderATI (void); +GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); #endif +#endif /* GL_ATI_fragment_shader */ + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); +#endif +#endif /* GL_ATI_map_object_buffer */ + +#ifndef GL_ATI_meminfo +#define GL_ATI_meminfo 1 +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#endif /* GL_ATI_meminfo */ + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +#define GL_RGBA_FLOAT_MODE_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif /* GL_ATI_pixel_format_float */ #ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 #define GL_PN_TRIANGLES_ATI 0x87F0 #define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 #define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 @@ -4074,9 +5947,64 @@ extern "C" { #define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 #define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 #define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); +GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); #endif +#endif /* GL_ATI_pn_triangles */ + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif +#endif /* GL_ATI_separate_stencil */ + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif /* GL_ATI_text_fragment_shader */ + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif /* GL_ATI_texture_env_combine3 */ + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif /* GL_ATI_texture_float */ + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif /* GL_ATI_texture_mirror_once */ #ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 #define GL_STATIC_ATI 0x8760 #define GL_DYNAMIC_ATI 0x8761 #define GL_PRESERVE_ATI 0x8762 @@ -4085,9 +6013,2238 @@ extern "C" { #define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 #define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 #define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage); +GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); +GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); #endif +#endif /* GL_ATI_vertex_array_object */ + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); +#endif +#endif /* GL_ATI_vertex_attrib_array_object */ + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); +GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); +#endif +#endif /* GL_ATI_vertex_streams */ + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif /* GL_EXT_422_pixels */ + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#define GL_ABGR_EXT 0x8000 +#endif /* GL_EXT_abgr */ + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif /* GL_EXT_bgra */ + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); +#endif +#endif /* GL_EXT_bindable_uniform */ + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#endif +#endif /* GL_EXT_blend_color */ + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); +#endif +#endif /* GL_EXT_blend_equation_separate */ + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif +#endif /* GL_EXT_blend_func_separate */ + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#endif /* GL_EXT_blend_logic_op */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_BLEND_EQUATION_EXT 0x8009 +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); +#endif +#endif /* GL_EXT_blend_minmax */ + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif /* GL_EXT_blend_subtract */ + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif /* GL_EXT_clip_volume_hint */ + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif /* GL_EXT_cmyka */ + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif +#endif /* GL_EXT_color_subtable */ + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); +GLAPI void APIENTRY glUnlockArraysEXT (void); +#endif +#endif /* GL_EXT_compiled_vertex_array */ + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +#endif +#endif /* GL_EXT_convolution */ + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); +GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); +GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); +GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); +GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); +GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); +GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_coordinate_frame */ + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_EXT_copy_texture */ + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); +GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_cull_vertex */ + +#ifndef GL_EXT_debug_label +#define GL_EXT_debug_label 1 +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_EXT_debug_label */ + +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPopGroupMarkerEXT (void); +#endif +#endif /* GL_EXT_debug_marker */ + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); +#endif +#endif /* GL_EXT_depth_bounds_test */ + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); +GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param); +GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param); +GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); +#endif +#endif /* GL_EXT_direct_state_access */ + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +#endif +#endif /* GL_EXT_draw_buffers2 */ + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_EXT_draw_instanced */ + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +#endif +#endif /* GL_EXT_draw_range_elements */ + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); +GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); +GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); +GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_fog_coord */ + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* GL_EXT_framebuffer_blit */ + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_EXT_framebuffer_multisample */ + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_EXT_framebuffer_multisample_blit_scaled 1 +#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +#endif /* GL_EXT_framebuffer_multisample_blit_scaled */ + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); +#endif +#endif /* GL_EXT_framebuffer_object */ + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif /* GL_EXT_framebuffer_sRGB */ + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +#endif +#endif /* GL_EXT_geometry_shader4 */ + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 1 +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif +#endif /* GL_EXT_gpu_program_parameters */ + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); +#endif +#endif /* GL_EXT_gpu_shader4 */ + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogramEXT (GLenum target); +GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); +#endif +#endif /* GL_EXT_histogram */ + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif /* GL_EXT_index_array_formats */ + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); +#endif +#endif /* GL_EXT_index_func */ + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); +#endif +#endif /* GL_EXT_index_material */ + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#endif /* GL_EXT_index_texture */ + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); +GLAPI void APIENTRY glTextureLightEXT (GLenum pname); +GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); +#endif +#endif /* GL_EXT_light_texture */ + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#endif /* GL_EXT_misc_attribute */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#endif +#endif /* GL_EXT_multi_draw_arrays */ + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); +#endif +#endif /* GL_EXT_multisample */ + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif /* GL_EXT_packed_depth_stencil */ + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif /* GL_EXT_packed_float */ + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif /* GL_EXT_packed_pixels */ + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_paletted_texture */ + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif /* GL_EXT_pixel_buffer_object */ + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_pixel_transform */ + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#endif /* GL_EXT_pixel_transform_color_table */ + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); +#endif +#endif /* GL_EXT_point_parameters */ + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); +#endif +#endif /* GL_EXT_polygon_offset */ + +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + +#ifndef GL_EXT_provoking_vertex +#define GL_EXT_provoking_vertex 1 +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); +#endif +#endif /* GL_EXT_provoking_vertex */ + +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif /* GL_EXT_rescale_normal */ + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_secondary_color */ + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); +GLAPI void APIENTRY glActiveProgramEXT (GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); +#endif +#endif /* GL_EXT_separate_shader_objects */ + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif /* GL_EXT_separate_specular_color */ + +#ifndef GL_EXT_shader_image_load_formatted +#define GL_EXT_shader_image_load_formatted 1 +#endif /* GL_EXT_shader_image_load_formatted */ + +#ifndef GL_EXT_shader_image_load_store +#define GL_EXT_shader_image_load_store 1 +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); +#endif +#endif /* GL_EXT_shader_image_load_store */ + +#ifndef GL_EXT_shader_integer_mix +#define GL_EXT_shader_integer_mix 1 +#endif /* GL_EXT_shader_integer_mix */ + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#endif /* GL_EXT_shadow_funcs */ + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif /* GL_EXT_shared_texture_palette */ + +#ifndef GL_EXT_sparse_texture2 +#define GL_EXT_sparse_texture2 1 +#endif /* GL_EXT_sparse_texture2 */ + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif +#endif /* GL_EXT_stencil_clear_tag */ + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); +#endif +#endif /* GL_EXT_stencil_two_side */ + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif /* GL_EXT_stencil_wrap */ + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +#endif +#endif /* GL_EXT_subtexture */ + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif /* GL_EXT_texture */ + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +#endif +#endif /* GL_EXT_texture3D */ + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif +#endif /* GL_EXT_texture_array */ + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +#endif +#endif /* GL_EXT_texture_buffer_object */ + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif /* GL_EXT_texture_compression_latc */ + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif /* GL_EXT_texture_compression_rgtc */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifndef GL_EXT_texture_cube_map +#define GL_EXT_texture_cube_map 1 +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif /* GL_EXT_texture_cube_map */ + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#endif /* GL_EXT_texture_env_add */ + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif /* GL_EXT_texture_env_combine */ + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif /* GL_EXT_texture_env_dot3 */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif /* GL_EXT_texture_filter_anisotropic */ + +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#endif /* GL_EXT_texture_filter_minmax */ + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif +#endif /* GL_EXT_texture_integer */ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif /* GL_EXT_texture_lod_bias */ + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif /* GL_EXT_texture_mirror_clamp */ + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); +GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); +GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); +GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif +#endif /* GL_EXT_texture_object */ + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); +#endif +#endif /* GL_EXT_texture_perturb_normal */ + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif /* GL_EXT_texture_sRGB */ + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif /* GL_EXT_texture_sRGB_decode */ + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif /* GL_EXT_texture_shared_exponent */ + +#ifndef GL_EXT_texture_snorm +#define GL_EXT_texture_snorm 1 +#define GL_ALPHA_SNORM 0x9010 +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_ALPHA8_SNORM 0x9014 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_ALPHA16_SNORM 0x9018 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_INTENSITY16_SNORM 0x901B +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#endif /* GL_EXT_texture_snorm */ + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif /* GL_EXT_texture_swizzle */ + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#define GL_TIME_ELAPSED_EXT 0x88BF +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); +#endif +#endif /* GL_EXT_timer_query */ + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback 1 +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackEXT (void); +GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif +#endif /* GL_EXT_transform_feedback */ + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT (GLint i); +GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params); +GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +#endif +#endif /* GL_EXT_vertex_array */ + +#ifndef GL_EXT_vertex_array_bgra +#define GL_EXT_vertex_array_bgra 1 +#endif /* GL_EXT_vertex_array_bgra */ + +#ifndef GL_EXT_vertex_attrib_64bit +#define GL_EXT_vertex_attrib_64bit 1 +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +#endif +#endif /* GL_EXT_vertex_attrib_64bit */ #ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 #define GL_VERTEX_SHADER_EXT 0x8780 #define GL_VERTEX_SHADER_BINDING_EXT 0x8781 #define GL_OP_INDEX_EXT 0x8782 @@ -4198,181 +8355,855 @@ extern "C" { #define GL_INVARIANT_DATATYPE_EXT 0x87EB #define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC #define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT (void); +GLAPI void APIENTRY glEndVertexShaderEXT (void); +GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); +GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); +GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); +GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr); +GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); +GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); +GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); +GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); +GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); +GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); +GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); +GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); +GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr); +GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); +GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); +GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); +GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data); +GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); #endif +#endif /* GL_EXT_vertex_shader */ -#ifndef GL_ATI_vertex_streams -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT 0x1700 +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); +GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); +GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); #endif +#endif /* GL_EXT_vertex_weighting */ -#ifndef GL_ATI_element_array -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#ifndef GL_EXT_x11_sync_object +#define GL_EXT_x11_sync_object 1 +#define GL_SYNC_X11_FENCE_EXT 0x90E1 +typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); #endif +#endif /* GL_EXT_x11_sync_object */ -#ifndef GL_SUN_mesh_array -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator 1 +typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); #endif +#endif /* GL_GREMEDY_frame_terminator */ -#ifndef GL_SUN_slice_accum -#define GL_SLICE_ACCUM_SUN 0x85CC +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string); #endif +#endif /* GL_GREMEDY_string_marker */ -#ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif /* GL_HP_convolution_border_modes */ + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); #endif +#endif /* GL_HP_image_transform */ + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif /* GL_HP_occlusion_test */ + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif /* GL_HP_texture_lighting */ + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#define GL_CULL_VERTEX_IBM 103050 +#endif /* GL_IBM_cull_vertex */ + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); +#endif +#endif /* GL_IBM_multimode_draw_arrays */ + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif /* GL_IBM_rasterpos_clip */ + +#ifndef GL_IBM_static_data +#define GL_IBM_static_data 1 +#define GL_ALL_STATIC_DATA_IBM 103060 +#define GL_STATIC_VERTEX_ARRAY_IBM 103061 +typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target); +#endif +#endif /* GL_IBM_static_data */ + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_IBM_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif /* GL_IBM_texture_mirrored_repeat */ + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride); +GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +#endif +#endif /* GL_IBM_vertex_array_lists */ + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif +#endif /* GL_INGR_blend_func_separate */ + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif /* GL_INGR_color_clamp */ + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#define GL_INTERLACE_READ_INGR 0x8568 +#endif /* GL_INGR_interlace_read */ + +#ifndef GL_INTEL_fragment_shader_ordering +#define GL_INTEL_fragment_shader_ordering 1 +#endif /* GL_INTEL_fragment_shader_ordering */ + +#ifndef GL_INTEL_map_texture +#define GL_INTEL_map_texture 1 +#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF +#define GL_LAYOUT_DEFAULT_INTEL 0 +#define GL_LAYOUT_LINEAR_INTEL 1 +#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 +typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level); +typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture); +GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level); +GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); +#endif +#endif /* GL_INTEL_map_texture */ + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer); +GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer); +GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer); +GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer); +#endif +#endif /* GL_INTEL_parallel_arrays */ + +#ifndef GL_INTEL_performance_query +#define GL_INTEL_performance_query 1 +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); +typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); +typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); +typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); +GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); +GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); +GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#endif +#endif /* GL_INTEL_performance_query */ + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif /* GL_MESAX_texture_stack */ + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#define GL_PACK_INVERT_MESA 0x8758 +#endif /* GL_MESA_pack_invert */ + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA (void); +#endif +#endif /* GL_MESA_resize_buffers */ + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); +#endif +#endif /* GL_MESA_window_pos */ + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif /* GL_MESA_ycbcr_texture */ + +#ifndef GL_NVX_conditional_render +#define GL_NVX_conditional_render 1 +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id); +GLAPI void APIENTRY glEndConditionalRenderNVX (void); +#endif +#endif /* GL_NVX_conditional_render */ + +#ifndef GL_NVX_gpu_memory_info +#define GL_NVX_gpu_memory_info 1 +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B +#endif /* GL_NVX_gpu_memory_info */ + +#ifndef GL_NV_bindless_multi_draw_indirect +#define GL_NV_bindless_multi_draw_indirect 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect */ + +#ifndef GL_NV_bindless_multi_draw_indirect_count +#define GL_NV_bindless_multi_draw_indirect_count 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect_count */ + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif +#endif /* GL_NV_bindless_texture */ + +#ifndef GL_NV_blend_equation_advanced +#define GL_NV_blend_equation_advanced 1 +#define GL_BLEND_OVERLAP_NV 0x9281 +#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 +#define GL_COLORBURN_NV 0x929A +#define GL_COLORDODGE_NV 0x9299 +#define GL_CONJOINT_NV 0x9284 +#define GL_CONTRAST_NV 0x92A1 +#define GL_DARKEN_NV 0x9297 +#define GL_DIFFERENCE_NV 0x929E +#define GL_DISJOINT_NV 0x9283 +#define GL_DST_ATOP_NV 0x928F +#define GL_DST_IN_NV 0x928B +#define GL_DST_NV 0x9287 +#define GL_DST_OUT_NV 0x928D +#define GL_DST_OVER_NV 0x9289 +#define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 +#define GL_HARDLIGHT_NV 0x929B +#define GL_HARDMIX_NV 0x92A9 +#define GL_HSL_COLOR_NV 0x92AF +#define GL_HSL_HUE_NV 0x92AD +#define GL_HSL_LUMINOSITY_NV 0x92B0 +#define GL_HSL_SATURATION_NV 0x92AE +#define GL_INVERT_OVG_NV 0x92B4 +#define GL_INVERT_RGB_NV 0x92A3 +#define GL_LIGHTEN_NV 0x9298 +#define GL_LINEARBURN_NV 0x92A5 +#define GL_LINEARDODGE_NV 0x92A4 +#define GL_LINEARLIGHT_NV 0x92A7 +#define GL_MINUS_CLAMPED_NV 0x92B3 +#define GL_MINUS_NV 0x929F +#define GL_MULTIPLY_NV 0x9294 +#define GL_OVERLAY_NV 0x9296 +#define GL_PINLIGHT_NV 0x92A8 +#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +#define GL_PLUS_CLAMPED_NV 0x92B1 +#define GL_PLUS_DARKER_NV 0x9292 +#define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 +#define GL_SCREEN_NV 0x9295 +#define GL_SOFTLIGHT_NV 0x929C +#define GL_SRC_ATOP_NV 0x928E +#define GL_SRC_IN_NV 0x928A +#define GL_SRC_NV 0x9286 +#define GL_SRC_OUT_NV 0x928C +#define GL_SRC_OVER_NV 0x9288 +#define GL_UNCORRELATED_NV 0x9282 +#define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 +typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value); +GLAPI void APIENTRY glBlendBarrierNV (void); +#endif +#endif /* GL_NV_blend_equation_advanced */ + +#ifndef GL_NV_blend_equation_advanced_coherent +#define GL_NV_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +#endif /* GL_NV_blend_equation_advanced_coherent */ + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#endif /* GL_NV_blend_square */ + +#ifndef GL_NV_command_list +#define GL_NV_command_list 1 +#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +#define GL_NOP_COMMAND_NV 0x0001 +#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +#define GL_BLEND_COLOR_COMMAND_NV 0x000B +#define GL_STENCIL_REF_COMMAND_NV 0x000C +#define GL_LINE_WIDTH_COMMAND_NV 0x000D +#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +#define GL_ALPHA_REF_COMMAND_NV 0x000F +#define GL_VIEWPORT_COMMAND_NV 0x0010 +#define GL_SCISSOR_COMMAND_NV 0x0011 +#define GL_FRONT_FACE_COMMAND_NV 0x0012 +typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states); +typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states); +typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state); +typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode); +typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size); +typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists); +typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists); +typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments); +typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states); +GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states); +GLAPI GLboolean APIENTRY glIsStateNV (GLuint state); +GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode); +GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size); +GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype); +GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists); +GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists); +GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list); +GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments); +GLAPI void APIENTRY glCompileCommandListNV (GLuint list); +GLAPI void APIENTRY glCallCommandListNV (GLuint list); +#endif +#endif /* GL_NV_command_list */ + +#ifndef GL_NV_compute_program5 +#define GL_NV_compute_program5 1 +#define GL_COMPUTE_PROGRAM_NV 0x90FB +#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC +#endif /* GL_NV_compute_program5 */ + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif +#endif /* GL_NV_conditional_render */ + +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_dilate +#define GL_NV_conservative_raster_dilate 1 +#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value); +#endif +#endif /* GL_NV_conservative_raster_dilate */ + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif /* GL_NV_copy_depth_to_color */ + +#ifndef GL_NV_copy_image +#define GL_NV_copy_image 1 +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (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 width, GLsizei height, GLsizei depth); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubDataNV (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 width, GLsizei height, GLsizei depth); +#endif +#endif /* GL_NV_copy_image */ + +#ifndef GL_NV_deep_texture3D +#define GL_NV_deep_texture3D 1 +#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 +#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 +#endif /* GL_NV_deep_texture3D */ + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +#endif +#endif /* GL_NV_depth_buffer_float */ #ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 #define GL_DEPTH_CLAMP_NV 0x864F -#endif +#endif /* GL_NV_depth_clamp */ -#ifndef GL_NV_occlusion_query -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#ifndef GL_NV_draw_texture +#define GL_NV_draw_texture 1 +typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); #endif +#endif /* GL_NV_draw_texture */ -#ifndef GL_NV_point_sprite -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); +GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); +GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); #endif +#endif /* GL_NV_evaluators */ -#ifndef GL_NV_texture_shader3 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); #endif +#endif /* GL_NV_explicit_multisample */ -#ifndef GL_NV_vertex_program1_1 +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); +GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GLAPI void APIENTRY glFinishFenceNV (GLuint fence); +GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #endif +#endif /* GL_NV_fence */ -#ifndef GL_EXT_shadow_funcs -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#endif - -#ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8A0C -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E -#endif - -#ifndef GL_APPLE_fence -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CLIENT_APPLE 0x85B4 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -#ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif - -#ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ #ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 #define GL_FLOAT_R_NV 0x8880 #define GL_FLOAT_RG_NV 0x8881 #define GL_FLOAT_RGB_NV 0x8882 @@ -4388,236 +9219,127 @@ extern "C" { #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D #define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif /* GL_NV_float_buffer */ + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +#endif /* GL_NV_fog_distance */ + +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color); #endif +#endif /* GL_NV_fragment_coverage_to_color */ #ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 #define GL_FRAGMENT_PROGRAM_NV 0x8870 #define GL_MAX_TEXTURE_COORDS_NV 0x8871 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 #define GL_PROGRAM_ERROR_STRING_NV 0x8874 +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); #endif - -#ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -#endif - -#ifndef GL_NV_primitive_restart -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#endif - -#ifndef GL_NV_vertex_program2 -#endif - -#ifndef GL_ATI_map_object_buffer -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#endif - -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_BLEND_EQUATION_RGB_EXT 0x8009 -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -#endif - -#ifndef GL_MESA_pack_invert -#define GL_PACK_INVERT_MESA 0x8758 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#endif - -#ifndef GL_NV_fragment_program_option -#endif +#endif /* GL_NV_fragment_program */ #ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 #define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 #define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 #define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 #define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 #define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#endif +#endif /* GL_NV_fragment_program2 */ -#ifndef GL_NV_vertex_program2_option -/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ -/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ -#endif +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 1 +#endif /* GL_NV_fragment_program4 */ -#ifndef GL_NV_vertex_program3 -/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ -#endif +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif /* GL_NV_fragment_program_option */ -#ifndef GL_EXT_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#endif +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ -#ifndef GL_GREMEDY_string_marker +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v); +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v); +GLAPI void APIENTRY glCoverageModulationNV (GLenum components); #endif +#endif /* GL_NV_framebuffer_mixed_samples */ -#ifndef GL_EXT_packed_depth_stencil -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); #endif +#endif /* GL_NV_framebuffer_multisample_coverage */ -#ifndef GL_EXT_stencil_clear_tag -#define GL_STENCIL_TAG_BITS_EXT 0x88F2 -#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); +GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); #endif +#endif /* GL_NV_geometry_program4 */ -#ifndef GL_EXT_texture_sRGB -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB8_EXT 0x8C41 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 -#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 -#define GL_SLUMINANCE_EXT 0x8C46 -#define GL_SLUMINANCE8_EXT 0x8C47 -#define GL_COMPRESSED_SRGB_EXT 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 -#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B -#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F -#endif +#ifndef GL_NV_geometry_shader4 +#define GL_NV_geometry_shader4 1 +#endif /* GL_NV_geometry_shader4 */ -#ifndef GL_EXT_framebuffer_blit -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA -#endif - -#ifndef GL_EXT_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -#ifndef GL_MESAX_texture_stack -#define GL_TEXTURE_1D_STACK_MESAX 0x8759 -#define GL_TEXTURE_2D_STACK_MESAX 0x875A -#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B -#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C -#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D -#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E -#endif - -#ifndef GL_EXT_timer_query -#define GL_TIME_ELAPSED_EXT 0x88BF -#endif - -#ifndef GL_EXT_gpu_program_parameters -#endif - -#ifndef GL_APPLE_flush_buffer_range -#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 -#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 -#endif +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ #ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 @@ -4626,629 +9348,44 @@ extern "C" { #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); #endif - -#ifndef GL_NV_geometry_program4 -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_GEOMETRY_PROGRAM_NV 0x8C26 -#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 -#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 -#endif - -#ifndef GL_EXT_geometry_shader4 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ -/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ -/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ -/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -/* reuse GL_LINES_ADJACENCY_EXT */ -/* reuse GL_LINE_STRIP_ADJACENCY_EXT */ -/* reuse GL_TRIANGLES_ADJACENCY_EXT */ -/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ -/* reuse GL_PROGRAM_POINT_SIZE_EXT */ -#endif - -#ifndef GL_NV_vertex_program4 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD -#endif - -#ifndef GL_EXT_gpu_shader4 -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#endif - -#ifndef GL_EXT_draw_instanced -#endif - -#ifndef GL_EXT_packed_float -#define GL_R11F_G11F_B10F_EXT 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B -#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C -#endif - -#ifndef GL_EXT_texture_array -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ -#endif - -#ifndef GL_EXT_texture_buffer_object -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E -#endif - -#ifndef GL_EXT_texture_compression_latc -#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 -#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 -#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 -#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 -#endif - -#ifndef GL_EXT_texture_compression_rgtc -#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC -#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD -#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE -#endif - -#ifndef GL_EXT_texture_shared_exponent -#define GL_RGB9_E5_EXT 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E -#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F -#endif - -#ifndef GL_NV_depth_buffer_float -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#define GL_DEPTH32F_STENCIL8_NV 0x8DAC -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD -#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF -#endif - -#ifndef GL_NV_fragment_program4 -#endif - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -#endif - -#ifndef GL_EXT_framebuffer_sRGB -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA -#endif - -#ifndef GL_NV_geometry_shader4 -#endif - -#ifndef GL_NV_parameter_buffer_object -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 -#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 -#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 -#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 -#endif - -#ifndef GL_EXT_draw_buffers2 -#endif - -#ifndef GL_NV_transform_feedback -#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 -#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 -#define GL_TEXTURE_COORD_NV 0x8C79 -#define GL_CLIP_DISTANCE_NV 0x8C7A -#define GL_VERTEX_ID_NV 0x8C7B -#define GL_PRIMITIVE_ID_NV 0x8C7C -#define GL_GENERIC_ATTRIB_NV 0x8C7D -#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 -#define GL_ACTIVE_VARYINGS_NV 0x8C81 -#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 -#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 -#define GL_PRIMITIVES_GENERATED_NV 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 -#define GL_RASTERIZER_DISCARD_NV 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B -#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C -#define GL_SEPARATE_ATTRIBS_NV 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F -#define GL_LAYER_NV 0x8DAA -#define GL_NEXT_BUFFER_NV -2 -#define GL_SKIP_COMPONENTS4_NV -3 -#define GL_SKIP_COMPONENTS3_NV -4 -#define GL_SKIP_COMPONENTS2_NV -5 -#define GL_SKIP_COMPONENTS1_NV -6 -#endif - -#ifndef GL_EXT_bindable_uniform -#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 -#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 -#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 -#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED -#define GL_UNIFORM_BUFFER_EXT 0x8DEE -#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF -#endif - -#ifndef GL_EXT_texture_integer -#define GL_RGBA32UI_EXT 0x8D70 -#define GL_RGB32UI_EXT 0x8D71 -#define GL_ALPHA32UI_EXT 0x8D72 -#define GL_INTENSITY32UI_EXT 0x8D73 -#define GL_LUMINANCE32UI_EXT 0x8D74 -#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 -#define GL_RGBA16UI_EXT 0x8D76 -#define GL_RGB16UI_EXT 0x8D77 -#define GL_ALPHA16UI_EXT 0x8D78 -#define GL_INTENSITY16UI_EXT 0x8D79 -#define GL_LUMINANCE16UI_EXT 0x8D7A -#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B -#define GL_RGBA8UI_EXT 0x8D7C -#define GL_RGB8UI_EXT 0x8D7D -#define GL_ALPHA8UI_EXT 0x8D7E -#define GL_INTENSITY8UI_EXT 0x8D7F -#define GL_LUMINANCE8UI_EXT 0x8D80 -#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 -#define GL_RGBA32I_EXT 0x8D82 -#define GL_RGB32I_EXT 0x8D83 -#define GL_ALPHA32I_EXT 0x8D84 -#define GL_INTENSITY32I_EXT 0x8D85 -#define GL_LUMINANCE32I_EXT 0x8D86 -#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 -#define GL_RGBA16I_EXT 0x8D88 -#define GL_RGB16I_EXT 0x8D89 -#define GL_ALPHA16I_EXT 0x8D8A -#define GL_INTENSITY16I_EXT 0x8D8B -#define GL_LUMINANCE16I_EXT 0x8D8C -#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D -#define GL_RGBA8I_EXT 0x8D8E -#define GL_RGB8I_EXT 0x8D8F -#define GL_ALPHA8I_EXT 0x8D90 -#define GL_INTENSITY8I_EXT 0x8D91 -#define GL_LUMINANCE8I_EXT 0x8D92 -#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 -#define GL_RED_INTEGER_EXT 0x8D94 -#define GL_GREEN_INTEGER_EXT 0x8D95 -#define GL_BLUE_INTEGER_EXT 0x8D96 -#define GL_ALPHA_INTEGER_EXT 0x8D97 -#define GL_RGB_INTEGER_EXT 0x8D98 -#define GL_RGBA_INTEGER_EXT 0x8D99 -#define GL_BGR_INTEGER_EXT 0x8D9A -#define GL_BGRA_INTEGER_EXT 0x8D9B -#define GL_LUMINANCE_INTEGER_EXT 0x8D9C -#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D -#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E -#endif - -#ifndef GL_GREMEDY_frame_terminator -#endif - -#ifndef GL_NV_conditional_render -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -#endif - -#ifndef GL_NV_present_video -#define GL_FRAME_NV 0x8E26 -#define GL_FIELDS_NV 0x8E27 -#define GL_CURRENT_TIME_NV 0x8E28 -#define GL_NUM_FILL_STREAMS_NV 0x8E29 -#define GL_PRESENT_TIME_NV 0x8E2A -#define GL_PRESENT_DURATION_NV 0x8E2B -#endif - -#ifndef GL_EXT_transform_feedback -#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F -#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C -#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 -#define GL_RASTERIZER_DISCARD_EXT 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 -#endif - -#ifndef GL_EXT_direct_state_access -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F -#endif - -#ifndef GL_EXT_vertex_array_bgra -/* reuse GL_BGRA */ -#endif - -#ifndef GL_EXT_texture_swizzle -#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 -#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 -#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 -#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 -#endif - -#ifndef GL_NV_explicit_multisample -#define GL_SAMPLE_POSITION_NV 0x8E50 -#define GL_SAMPLE_MASK_NV 0x8E51 -#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 -#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 -#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 -#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 -#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 -#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 -#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 -#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 -#endif - -#ifndef GL_NV_transform_feedback2 -#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 -#endif - -#ifndef GL_ATI_meminfo -#define GL_VBO_FREE_MEMORY_ATI 0x87FB -#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC -#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD -#endif - -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -#ifndef GL_AMD_texture_texture4 -#endif - -#ifndef GL_AMD_vertex_shader_tesselator -#define GL_SAMPLER_BUFFER_AMD 0x9001 -#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 -#define GL_TESSELLATION_MODE_AMD 0x9004 -#define GL_TESSELLATION_FACTOR_AMD 0x9005 -#define GL_DISCRETE_AMD 0x9006 -#define GL_CONTINUOUS_AMD 0x9007 -#endif - -#ifndef GL_EXT_provoking_vertex -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_PROVOKING_VERTEX_EXT 0x8E4F -#endif - -#ifndef GL_EXT_texture_snorm -#define GL_ALPHA_SNORM 0x9010 -#define GL_LUMINANCE_SNORM 0x9011 -#define GL_LUMINANCE_ALPHA_SNORM 0x9012 -#define GL_INTENSITY_SNORM 0x9013 -#define GL_ALPHA8_SNORM 0x9014 -#define GL_LUMINANCE8_SNORM 0x9015 -#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 -#define GL_INTENSITY8_SNORM 0x9017 -#define GL_ALPHA16_SNORM 0x9018 -#define GL_LUMINANCE16_SNORM 0x9019 -#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A -#define GL_INTENSITY16_SNORM 0x901B -/* reuse GL_RED_SNORM */ -/* reuse GL_RG_SNORM */ -/* reuse GL_RGB_SNORM */ -/* reuse GL_RGBA_SNORM */ -/* reuse GL_R8_SNORM */ -/* reuse GL_RG8_SNORM */ -/* reuse GL_RGB8_SNORM */ -/* reuse GL_RGBA8_SNORM */ -/* reuse GL_R16_SNORM */ -/* reuse GL_RG16_SNORM */ -/* reuse GL_RGB16_SNORM */ -/* reuse GL_RGBA16_SNORM */ -/* reuse GL_SIGNED_NORMALIZED */ -#endif - -#ifndef GL_AMD_draw_buffers_blend -#endif - -#ifndef GL_APPLE_texture_range -#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 -#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC -#define GL_STORAGE_PRIVATE_APPLE 0x85BD -/* reuse GL_STORAGE_CACHED_APPLE */ -/* reuse GL_STORAGE_SHARED_APPLE */ -#endif - -#ifndef GL_APPLE_float_pixels -#define GL_HALF_APPLE 0x140B -#define GL_RGBA_FLOAT32_APPLE 0x8814 -#define GL_RGB_FLOAT32_APPLE 0x8815 -#define GL_ALPHA_FLOAT32_APPLE 0x8816 -#define GL_INTENSITY_FLOAT32_APPLE 0x8817 -#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 -#define GL_RGBA_FLOAT16_APPLE 0x881A -#define GL_RGB_FLOAT16_APPLE 0x881B -#define GL_ALPHA_FLOAT16_APPLE 0x881C -#define GL_INTENSITY_FLOAT16_APPLE 0x881D -#define GL_LUMINANCE_FLOAT16_APPLE 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F -#define GL_COLOR_FLOAT_APPLE 0x8A0F -#endif - -#ifndef GL_APPLE_vertex_program_evaluators -#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 -#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 -#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 -#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 -#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 -#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 -#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 -#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 -#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 -#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 -#endif - -#ifndef GL_APPLE_aux_depth_stencil -#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 -#endif - -#ifndef GL_APPLE_object_purgeable -#define GL_BUFFER_OBJECT_APPLE 0x85B3 -#define GL_RELEASED_APPLE 0x8A19 -#define GL_VOLATILE_APPLE 0x8A1A -#define GL_RETAINED_APPLE 0x8A1B -#define GL_UNDEFINED_APPLE 0x8A1C -#define GL_PURGEABLE_APPLE 0x8A1D -#endif - -#ifndef GL_APPLE_row_bytes -#define GL_PACK_ROW_BYTES_APPLE 0x8A15 -#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 -#endif - -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ -/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ -#endif - -#ifndef GL_NV_video_capture -#define GL_VIDEO_BUFFER_NV 0x9020 -#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 -#define GL_FIELD_UPPER_NV 0x9022 -#define GL_FIELD_LOWER_NV 0x9023 -#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 -#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 -#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 -#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 -#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 -#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 -#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A -#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B -#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C -#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D -#define GL_PARTIAL_SUCCESS_NV 0x902E -#define GL_SUCCESS_NV 0x902F -#define GL_FAILURE_NV 0x9030 -#define GL_YCBYCR8_422_NV 0x9031 -#define GL_YCBAYCR8A_4224_NV 0x9032 -#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 -#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 -#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 -#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 -#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 -#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 -#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 -#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A -#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B -#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C -#endif - -#ifndef GL_NV_copy_image -#endif - -#ifndef GL_EXT_separate_shader_objects -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D -#endif - -#ifndef GL_NV_parameter_buffer_object2 -#endif - -#ifndef GL_NV_shader_buffer_load -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 -#endif - -#ifndef GL_NV_vertex_buffer_unified_memory -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 -#endif - -#ifndef GL_NV_texture_barrier -#endif - -#ifndef GL_AMD_shader_stencil_export -#endif - -#ifndef GL_AMD_seamless_cubemap_per_texture -/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ -#endif - -#ifndef GL_AMD_conservative_depth -#endif - -#ifndef GL_EXT_shader_image_load_store -#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 -#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A -#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B -#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C -#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D -#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E -#define GL_IMAGE_1D_EXT 0x904C -#define GL_IMAGE_2D_EXT 0x904D -#define GL_IMAGE_3D_EXT 0x904E -#define GL_IMAGE_2D_RECT_EXT 0x904F -#define GL_IMAGE_CUBE_EXT 0x9050 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_IMAGE_1D_ARRAY_EXT 0x9052 -#define GL_IMAGE_2D_ARRAY_EXT 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 -#define GL_INT_IMAGE_1D_EXT 0x9057 -#define GL_INT_IMAGE_2D_EXT 0x9058 -#define GL_INT_IMAGE_3D_EXT 0x9059 -#define GL_INT_IMAGE_2D_RECT_EXT 0x905A -#define GL_INT_IMAGE_CUBE_EXT 0x905B -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D -#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C -#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D -#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 -#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 -#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF -#endif - -#ifndef GL_EXT_vertex_attrib_64bit -/* reuse GL_DOUBLE */ -#define GL_DOUBLE_VEC2_EXT 0x8FFC -#define GL_DOUBLE_VEC3_EXT 0x8FFD -#define GL_DOUBLE_VEC4_EXT 0x8FFE -#define GL_DOUBLE_MAT2_EXT 0x8F46 -#define GL_DOUBLE_MAT3_EXT 0x8F47 -#define GL_DOUBLE_MAT4_EXT 0x8F48 -#define GL_DOUBLE_MAT2x3_EXT 0x8F49 -#define GL_DOUBLE_MAT2x4_EXT 0x8F4A -#define GL_DOUBLE_MAT3x2_EXT 0x8F4B -#define GL_DOUBLE_MAT3x4_EXT 0x8F4C -#define GL_DOUBLE_MAT4x2_EXT 0x8F4D -#define GL_DOUBLE_MAT4x3_EXT 0x8F4E -#endif +#endif /* GL_NV_gpu_program4 */ #ifndef GL_NV_gpu_program5 +#define GL_NV_gpu_program5 1 #define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C @@ -5257,136 +9394,202 @@ extern "C" { #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F #define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 #define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); #endif +#endif /* GL_NV_gpu_program5 */ + +#ifndef GL_NV_gpu_program5_mem_extended +#define GL_NV_gpu_program5_mem_extended 1 +#endif /* GL_NV_gpu_program5_mem_extended */ #ifndef GL_NV_gpu_shader5 -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -/* reuse GL_PATCHES */ -#endif +#define GL_NV_gpu_shader5 1 +#endif /* GL_NV_gpu_shader5 */ -#ifndef GL_NV_shader_buffer_store -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 -/* reuse GL_READ_WRITE */ -/* reuse GL_WRITE_ONLY */ +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +typedef unsigned short GLhalfNV; +#define GL_HALF_FLOAT_NV 0x140B +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); #endif +#endif /* GL_NV_half_float */ -#ifndef GL_NV_tessellation_program5 -#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 -#define GL_TESS_CONTROL_PROGRAM_NV 0x891E -#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F -#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 -#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); #endif +#endif /* GL_NV_internalformat_sample_query */ -#ifndef GL_NV_vertex_attrib_integer_64bit -/* reuse GL_INT64_NV */ -/* reuse GL_UNSIGNED_INT64_NV */ -#endif +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif /* GL_NV_light_max_exponent */ #ifndef GL_NV_multisample_coverage -#define GL_COVERAGE_SAMPLES_NV 0x80A9 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#endif +#define GL_NV_multisample_coverage 1 +#endif /* GL_NV_multisample_coverage */ -#ifndef GL_AMD_name_gen_delete -#define GL_DATA_BUFFER_AMD 0x9151 -#define GL_PERFORMANCE_MONITOR_AMD 0x9152 -#define GL_QUERY_OBJECT_AMD 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 -#define GL_SAMPLER_OBJECT_AMD 0x9155 -#endif +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif /* GL_NV_multisample_filter_hint */ -#ifndef GL_AMD_debug_output -#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 -#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 -#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 -#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A -#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B -#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C -#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D -#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E -#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F -#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); #endif +#endif /* GL_NV_occlusion_query */ -#ifndef GL_NV_vdpau_interop -#define GL_SURFACE_STATE_NV 0x86EB -#define GL_SURFACE_REGISTERED_NV 0x86FD -#define GL_SURFACE_MAPPED_NV 0x8700 -#define GL_WRITE_DISCARD_NV 0x88BE -#endif +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif /* GL_NV_packed_depth_stencil */ -#ifndef GL_AMD_transform_feedback3_lines_triangles +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); #endif +#endif /* GL_NV_parameter_buffer_object */ -#ifndef GL_AMD_depth_clamp_separate -#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E -#define GL_DEPTH_CLAMP_FAR_AMD 0x901F -#endif - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A -#endif - -#ifndef GL_NV_texture_multisample -#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 -#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 -#endif - -#ifndef GL_AMD_blend_minmax_factor -#define GL_FACTOR_MIN_AMD 0x901C -#define GL_FACTOR_MAX_AMD 0x901D -#endif - -#ifndef GL_AMD_sample_positions -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F -#endif - -#ifndef GL_EXT_x11_sync_object -#define GL_SYNC_X11_FENCE_EXT 0x90E1 -#endif - -#ifndef GL_AMD_multi_draw_indirect -#endif - -#ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA -#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB -#endif +#ifndef GL_NV_parameter_buffer_object2 +#define GL_NV_parameter_buffer_object2 1 +#endif /* GL_NV_parameter_buffer_object2 */ #ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 #define GL_PATH_FORMAT_SVG_NV 0x9070 #define GL_PATH_FORMAT_PS_NV 0x9071 #define GL_STANDARD_FONT_NAME_NV 0x9072 @@ -5408,27 +9611,19 @@ extern "C" { #define GL_PATH_FILL_COVER_MODE_NV 0x9082 #define GL_PATH_STROKE_COVER_MODE_NV 0x9083 #define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_PATH_SAMPLE_QUALITY_NV 0x9085 -#define GL_PATH_STROKE_BOUND_NV 0x9086 -#define GL_PATH_STROKE_OVERSAMPLE_COUNT_NV 0x9087 #define GL_COUNT_UP_NV 0x9088 #define GL_COUNT_DOWN_NV 0x9089 #define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A #define GL_CONVEX_HULL_NV 0x908B -#define GL_MULTI_HULLS_NV 0x908C #define GL_BOUNDING_BOX_NV 0x908D #define GL_TRANSLATE_X_NV 0x908E #define GL_TRANSLATE_Y_NV 0x908F #define GL_TRANSLATE_2D_NV 0x9090 #define GL_TRANSLATE_3D_NV 0x9091 #define GL_AFFINE_2D_NV 0x9092 -#define GL_PROJECTIVE_2D_NV 0x9093 #define GL_AFFINE_3D_NV 0x9094 -#define GL_PROJECTIVE_3D_NV 0x9095 #define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_PROJECTIVE_2D_NV 0x9097 #define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_TRANSPOSE_PROJECTIVE_3D_NV 0x9099 #define GL_UTF8_NV 0x909A #define GL_UTF16_NV 0x909B #define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C @@ -5447,13 +9642,11 @@ extern "C" { #define GL_SKIP_MISSING_GLYPH_NV 0x90A9 #define GL_USE_MISSING_GLYPH_NV 0x90AA #define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_PATH_FOG_GEN_MODE_NV 0x90AC #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD #define GL_ADJACENT_PAIRS_NV 0x90AE #define GL_FIRST_TO_REST_NV 0x90AF #define GL_PATH_GEN_MODE_NV 0x90B0 #define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3 #define GL_PATH_STENCIL_FUNC_NV 0x90B7 #define GL_PATH_STENCIL_REF_NV 0x90B8 @@ -5508,2656 +9701,1399 @@ extern "C" { #define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 #define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 #define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_HAS_KERNING_NV 0x100 -#define GL_FONT_X_MIN_BOUNDS_NV 0x00010000 -#define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000 -#define GL_FONT_X_MAX_BOUNDS_NV 0x00040000 -#define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000 -#define GL_FONT_UNITS_PER_EM_NV 0x00100000 -#define GL_FONT_ASCENDER_NV 0x00200000 -#define GL_FONT_DESCENDER_NV 0x00400000 -#define GL_FONT_HEIGHT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000 -#define GL_FONT_UNDERLINE_POSITION_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000 -#define GL_FONT_HAS_KERNING_NV 0x10000000 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_2_BYTES_NV 0x1407 +#define GL_3_BYTES_NV 0x1408 +#define GL_4_BYTES_NV 0x1409 +#define GL_EYE_LINEAR_NV 0x2400 +#define GL_OBJECT_LINEAR_NV 0x2401 +#define GL_CONSTANT_NV 0x8576 +#define GL_PATH_FOG_GEN_MODE_NV 0x90AC +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); +typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); +GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); +GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); +GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); +GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); +GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); #endif +#endif /* GL_NV_path_rendering */ -#ifndef GL_AMD_pinned_memory -#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 -#endif +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ -#ifndef GL_AMD_stencil_operation_extended -#define GL_SET_AMD 0x874A -#define GL_REPLACE_VALUE_AMD 0x874B -#define GL_STENCIL_OP_VALUE_AMD 0x874C -#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); #endif +#endif /* GL_NV_pixel_data_range */ -#ifndef GL_AMD_vertex_shader_viewport_index +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); #endif +#endif /* GL_NV_point_sprite */ -#ifndef GL_AMD_vertex_shader_layer +#ifndef GL_NV_present_video +#define GL_NV_present_video 1 +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); #endif +#endif /* GL_NV_present_video */ -#ifndef GL_NV_bindless_texture +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); #endif +#endif /* GL_NV_primitive_restart */ + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); +GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); +GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); +#endif +#endif /* GL_NV_register_combiners */ + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); +#endif +#endif /* GL_NV_register_combiners2 */ + +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + +#ifndef GL_NV_shader_atomic_counters +#define GL_NV_shader_atomic_counters 1 +#endif /* GL_NV_shader_atomic_counters */ #ifndef GL_NV_shader_atomic_float -#endif +#define GL_NV_shader_atomic_float 1 +#endif /* GL_NV_shader_atomic_float */ +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ -/*************************************************************/ +#ifndef GL_NV_shader_atomic_int64 +#define GL_NV_shader_atomic_int64 1 +#endif /* GL_NV_shader_atomic_int64 */ -#include -#ifndef GL_VERSION_2_0 -/* GL type for program/shader text */ -typedef char GLchar; +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load 1 +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); +GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); +GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); +GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); +GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); +GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); #endif +#endif /* GL_NV_shader_buffer_load */ -#ifndef GL_VERSION_1_5 -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -#endif +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +#endif /* GL_NV_shader_buffer_store */ -#ifndef GL_ARB_vertex_buffer_object -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif +#ifndef GL_NV_shader_storage_buffer_object +#define GL_NV_shader_storage_buffer_object 1 +#endif /* GL_NV_shader_storage_buffer_object */ -#ifndef GL_ARB_shader_objects -/* GL types for program/shader text and shader object handles */ -typedef char GLcharARB; -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -#endif +#ifndef GL_NV_shader_thread_group +#define GL_NV_shader_thread_group 1 +#define GL_WARP_SIZE_NV 0x9339 +#define GL_WARPS_PER_SM_NV 0x933A +#define GL_SM_COUNT_NV 0x933B +#endif /* GL_NV_shader_thread_group */ -/* GL type for "half" precision (s10e5) float data in host memory */ -#ifndef GL_ARB_half_float_pixel -typedef unsigned short GLhalfARB; -#endif +#ifndef GL_NV_shader_thread_shuffle +#define GL_NV_shader_thread_shuffle 1 +#endif /* GL_NV_shader_thread_shuffle */ -#ifndef GL_NV_half_float -typedef unsigned short GLhalfNV; -#endif +#ifndef GL_NV_tessellation_program5 +#define GL_NV_tessellation_program5 1 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#endif /* GL_NV_tessellation_program5 */ -#ifndef GLEXT_64_TYPES_DEFINED -/* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include -#endif -#endif +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif /* GL_NV_texgen_emboss */ -#ifndef GL_EXT_timer_query -typedef int64_t GLint64EXT; -typedef uint64_t GLuint64EXT; -#endif +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif /* GL_NV_texgen_reflection */ -#ifndef GL_ARB_sync -typedef int64_t GLint64; -typedef uint64_t GLuint64; -typedef struct __GLsync *GLsync; +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier 1 +typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV (void); #endif +#endif /* GL_NV_texture_barrier */ -#ifndef GL_ARB_cl_event -/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ -struct _cl_context; -struct _cl_event; -#endif +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#endif /* GL_NV_texture_compression_vtc */ -#ifndef GL_ARB_debug_output -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif /* GL_NV_texture_env_combine4 */ -#ifndef GL_AMD_debug_output -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif /* GL_NV_texture_expand_normal */ -#ifndef GL_KHR_debug -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#ifndef GL_NV_texture_multisample +#define GL_NV_texture_multisample 1 +#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); #endif +#endif /* GL_NV_texture_multisample */ + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif /* GL_NV_texture_rectangle */ + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif /* GL_NV_texture_shader */ + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif /* GL_NV_texture_shader2 */ + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif /* GL_NV_texture_shader3 */ + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_LAYER_NV 0x8DAA +#define GL_NEXT_BUFFER_NV -2 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS1_NV -6 +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackNV (void); +GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLsizei count, const GLint *attribs, GLenum bufferMode); +GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); +GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif +#endif /* GL_NV_transform_feedback */ + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); +#endif +#endif /* GL_NV_transform_feedback2 */ + +#ifndef GL_NV_uniform_buffer_unified_memory +#define GL_NV_uniform_buffer_unified_memory 1 +#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +#endif /* GL_NV_uniform_buffer_unified_memory */ #ifndef GL_NV_vdpau_interop +#define GL_NV_vdpau_interop 1 typedef GLintptr GLvdpauSurfaceNV; -#endif - -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY glBlendEquation (GLenum mode); -GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_VERSION_1_2_DEPRECATED -#define GL_VERSION_1_2_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogram (GLenum target); -GLAPI void APIENTRY glResetMinmax (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); -#endif - -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum texture); -GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_VERSION_1_3_DEPRECATED -#define GL_VERSION_1_3_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClientActiveTexture (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -#endif - -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount); -GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_VERSION_1_4_DEPRECATED -#define GL_VERSION_1_4_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordf (GLfloat coord); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); -GLAPI void APIENTRY glFogCoordd (GLdouble coord); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2iv (const GLint *v); -GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); -GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3iv (const GLint *v); -GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); -#endif - -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQuery (GLuint id); -GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQuery (GLenum target); -GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); -GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY glCompileShader (GLuint shader); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum type); -GLAPI void APIENTRY glDeleteProgram (GLuint program); -GLAPI void APIENTRY glDeleteShader (GLuint shader); -GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgram (GLuint program); -GLAPI GLboolean APIENTRY glIsShader (GLuint shader); -GLAPI void APIENTRY glLinkProgram (GLuint program); -GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar **string, const GLint *length); -GLAPI void APIENTRY glUseProgram (GLuint program); -GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glValidateProgram (GLuint program); -GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar **string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif - -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -/* OpenGL 3.0 also reuses entry points from these extensions: */ -/* ARB_framebuffer_object */ -/* ARB_map_buffer_range */ -/* ARB_vertex_array_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); -GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); -GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedback (void); -GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); -GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRender (void); -GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -#endif - -#ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -/* OpenGL 3.1 also reuses entry points from these extensions: */ -/* ARB_copy_buffer */ -/* ARB_uniform_buffer_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); -#endif - -#ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 -/* OpenGL 3.2 also reuses entry points from these extensions: */ -/* ARB_draw_elements_base_vertex */ -/* ARB_provoking_vertex */ -/* ARB_sync */ -/* ARB_texture_multisample */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif - -#ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -/* OpenGL 3.3 also reuses entry points from these extensions: */ -/* ARB_blend_func_extended */ -/* ARB_sampler_objects */ -/* ARB_explicit_attrib_location, but it has none */ -/* ARB_occlusion_query2 (no entry points) */ -/* ARB_shader_bit_encoding (no entry points) */ -/* ARB_texture_rgb10_a2ui (no entry points) */ -/* ARB_texture_swizzle (no entry points) */ -/* ARB_timer_query */ -/* ARB_vertex_type_2_10_10_10_rev */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -#endif - -#ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -/* OpenGL 4.0 also reuses entry points from these extensions: */ -/* ARB_texture_query_lod (no entry points) */ -/* ARB_draw_indirect */ -/* ARB_gpu_shader5 (no entry points) */ -/* ARB_gpu_shader_fp64 */ -/* ARB_shader_subroutine */ -/* ARB_tessellation_shader */ -/* ARB_texture_buffer_object_rgb32 (no entry points) */ -/* ARB_texture_cube_map_array (no entry points) */ -/* ARB_texture_gather (no entry points) */ -/* ARB_transform_feedback2 */ -/* ARB_transform_feedback3 */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLfloat value); -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -#ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -/* OpenGL 4.1 reuses entry points from these extensions: */ -/* ARB_ES2_compatibility */ -/* ARB_get_program_binary */ -/* ARB_separate_shader_objects */ -/* ARB_shader_precision (no entry points) */ -/* ARB_vertex_attrib_64bit */ -/* ARB_viewport_array */ -#endif - -#ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -/* OpenGL 4.2 reuses entry points from these extensions: */ -/* ARB_base_instance */ -/* ARB_shading_language_420pack (no entry points) */ -/* ARB_transform_feedback_instanced */ -/* ARB_compressed_texture_pixel_storage (no entry points) */ -/* ARB_conservative_depth (no entry points) */ -/* ARB_internalformat_query */ -/* ARB_map_buffer_alignment (no entry points) */ -/* ARB_shader_atomic_counters */ -/* ARB_shader_image_load_store */ -/* ARB_shading_language_packing (no entry points) */ -/* ARB_texture_storage */ -#endif - -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -#endif - -#ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); -#endif - -#ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 -#endif - -#ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#endif - -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); -GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); -GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); -GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); -GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); -GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); -GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); -GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); -GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexBlendARB (GLint count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 -#endif - -#ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 -#endif - -#ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); -#endif - -#ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); -#endif - -#ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 -/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); -GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); -GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQueryARB (GLenum target); -GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 -#endif - -#ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 -#endif - -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#endif - -#ifndef GL_ARB_depth_buffer_float -#define GL_ARB_depth_buffer_float 1 -#endif - -#ifndef GL_ARB_draw_instanced -#define GL_ARB_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -#ifndef GL_ARB_framebuffer_object -#define GL_ARB_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmap (GLenum target); -GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif - -#ifndef GL_ARB_framebuffer_sRGB -#define GL_ARB_framebuffer_sRGB 1 -#endif - -#ifndef GL_ARB_geometry_shader4 -#define GL_ARB_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif - -#ifndef GL_ARB_half_float_vertex -#define GL_ARB_half_float_vertex 1 -#endif - -#ifndef GL_ARB_instanced_arrays -#define GL_ARB_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); -#endif - -#ifndef GL_ARB_map_buffer_range -#define GL_ARB_map_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#endif - -#ifndef GL_ARB_texture_buffer_object -#define GL_ARB_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#endif - -#ifndef GL_ARB_texture_compression_rgtc -#define GL_ARB_texture_compression_rgtc 1 -#endif - -#ifndef GL_ARB_texture_rg -#define GL_ARB_texture_rg 1 -#endif - -#ifndef GL_ARB_vertex_array_object -#define GL_ARB_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArray (GLuint array); -GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -#endif - -#ifndef GL_ARB_uniform_buffer_object -#define GL_ARB_uniform_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); -GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif - -#ifndef GL_ARB_compatibility -#define GL_ARB_compatibility 1 -#endif - -#ifndef GL_ARB_copy_buffer -#define GL_ARB_copy_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif - -#ifndef GL_ARB_shader_texture_lod -#define GL_ARB_shader_texture_lod 1 -#endif - -#ifndef GL_ARB_depth_clamp -#define GL_ARB_depth_clamp 1 -#endif - -#ifndef GL_ARB_draw_elements_base_vertex -#define GL_ARB_draw_elements_base_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); -GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, const GLint *basevertex); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, const GLint *basevertex); -#endif - -#ifndef GL_ARB_fragment_coord_conventions -#define GL_ARB_fragment_coord_conventions 1 -#endif - -#ifndef GL_ARB_provoking_vertex -#define GL_ARB_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertex (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); -#endif - -#ifndef GL_ARB_seamless_cube_map -#define GL_ARB_seamless_cube_map 1 -#endif - -#ifndef GL_ARB_sync -#define GL_ARB_sync 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GLAPI GLboolean APIENTRY glIsSync (GLsync sync); -GLAPI void APIENTRY glDeleteSync (GLsync sync); -GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif - -#ifndef GL_ARB_texture_multisample -#define GL_ARB_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); -#endif - -#ifndef GL_ARB_vertex_array_bgra -#define GL_ARB_vertex_array_bgra 1 -#endif - -#ifndef GL_ARB_draw_buffers_blend -#define GL_ARB_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -#ifndef GL_ARB_sample_shading -#define GL_ARB_sample_shading 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); -#endif - -#ifndef GL_ARB_texture_cube_map_array -#define GL_ARB_texture_cube_map_array 1 -#endif - -#ifndef GL_ARB_texture_gather -#define GL_ARB_texture_gather 1 -#endif - -#ifndef GL_ARB_texture_query_lod -#define GL_ARB_texture_query_lod 1 -#endif - -#ifndef GL_ARB_shading_language_include -#define GL_ARB_shading_language_include 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_texture_compression_bptc -#define GL_ARB_texture_compression_bptc 1 -#endif - -#ifndef GL_ARB_blend_func_extended -#define GL_ARB_blend_func_extended 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); -#endif - -#ifndef GL_ARB_explicit_attrib_location -#define GL_ARB_explicit_attrib_location 1 -#endif - -#ifndef GL_ARB_occlusion_query2 -#define GL_ARB_occlusion_query2 1 -#endif - -#ifndef GL_ARB_sampler_objects -#define GL_ARB_sampler_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_bit_encoding -#define GL_ARB_shader_bit_encoding 1 -#endif - -#ifndef GL_ARB_texture_rgb10_a2ui -#define GL_ARB_texture_rgb10_a2ui 1 -#endif - -#ifndef GL_ARB_texture_swizzle -#define GL_ARB_texture_swizzle 1 -#endif - -#ifndef GL_ARB_timer_query -#define GL_ARB_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); -GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); -#endif - -#ifndef GL_ARB_vertex_type_2_10_10_10_rev -#define GL_ARB_vertex_type_2_10_10_10_rev 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif - -#ifndef GL_ARB_draw_indirect -#define GL_ARB_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); -GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); -#endif - -#ifndef GL_ARB_gpu_shader5 -#define GL_ARB_gpu_shader5 1 -#endif - -#ifndef GL_ARB_gpu_shader_fp64 -#define GL_ARB_gpu_shader_fp64 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); -GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); -#endif - -#ifndef GL_ARB_shader_subroutine -#define GL_ARB_shader_subroutine 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); -GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -#endif - -#ifndef GL_ARB_tessellation_shader -#define GL_ARB_tessellation_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); -GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); -#endif - -#ifndef GL_ARB_texture_buffer_object_rgb32 -#define GL_ARB_texture_buffer_object_rgb32 1 -#endif - -#ifndef GL_ARB_transform_feedback2 -#define GL_ARB_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedback (void); -GLAPI void APIENTRY glResumeTransformFeedback (void); -GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); -#endif - -#ifndef GL_ARB_transform_feedback3 -#define GL_ARB_transform_feedback3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); -GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); -GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); -GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_ES2_compatibility -#define GL_ARB_ES2_compatibility 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReleaseShaderCompiler (void); -GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GLAPI void APIENTRY glClearDepthf (GLfloat d); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -#endif - -#ifndef GL_ARB_get_program_binary -#define GL_ARB_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -#endif - -#ifndef GL_ARB_separate_shader_objects -#define GL_ARB_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* const *strings); -GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); -GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* const *strings); -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif - -#ifndef GL_ARB_vertex_attrib_64bit -#define GL_ARB_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); -#endif - -#ifndef GL_ARB_viewport_array -#define GL_ARB_viewport_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); -GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); -GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); -GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); -#endif - -#ifndef GL_ARB_cl_event -#define GL_ARB_cl_event 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); -#endif - -#ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif - -#ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); -GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); -GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); -GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); -typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif - -#ifndef GL_ARB_shader_stencil_export -#define GL_ARB_shader_stencil_export 1 -#endif - -#ifndef GL_ARB_base_instance -#define GL_ARB_base_instance 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); -#endif - -#ifndef GL_ARB_shading_language_420pack -#define GL_ARB_shading_language_420pack 1 -#endif - -#ifndef GL_ARB_transform_feedback_instanced -#define GL_ARB_transform_feedback_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei primcount); -GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); -#endif - -#ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_ARB_compressed_texture_pixel_storage 1 -#endif - -#ifndef GL_ARB_conservative_depth -#define GL_ARB_conservative_depth 1 -#endif - -#ifndef GL_ARB_internalformat_query -#define GL_ARB_internalformat_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif - -#ifndef GL_ARB_map_buffer_alignment -#define GL_ARB_map_buffer_alignment 1 -#endif - -#ifndef GL_ARB_shader_atomic_counters -#define GL_ARB_shader_atomic_counters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_shader_image_load_store -#define GL_ARB_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -#endif - -#ifndef GL_ARB_shading_language_packing -#define GL_ARB_shading_language_packing 1 -#endif - -#ifndef GL_ARB_texture_storage -#define GL_ARB_texture_storage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif - -#ifndef GL_KHR_debug -#define GL_KHR_debug 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI void APIENTRY glPopDebugGroup (void); -GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif - -#ifndef GL_ARB_compute_shader -#define GL_ARB_compute_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); -#endif - -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 -#endif - -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); -#endif - -#ifndef GL_EXT_texture -#define GL_EXT_texture 1 -#endif - -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif - -#ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogramEXT (GLenum target); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); -#endif - -#ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif - -#ifndef GL_SGI_color_matrix -#define GL_SGI_color_matrix 1 -#endif - -#ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); -#endif +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_WRITE_DISCARD_NV 0x88BE +typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress); +typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress); +GLAPI void APIENTRY glVDPAUFiniNV (void); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif +#endif /* GL_NV_vdpau_interop */ + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); +GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer); +#endif +#endif /* GL_NV_vertex_array_range */ + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif /* GL_NV_vertex_array_range2 */ + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif +#endif /* GL_NV_vertex_attrib_integer_64bit */ + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory 1 +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); +GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +#endif +#endif /* GL_NV_vertex_buffer_unified_memory */ + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer); +GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); +GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); +#endif +#endif /* GL_NV_vertex_program */ + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#endif /* GL_NV_vertex_program1_1 */ + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif /* GL_NV_vertex_program2 */ + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif /* GL_NV_vertex_program2_option */ + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#endif /* GL_NV_vertex_program3 */ + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 1 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); +#endif +#endif /* GL_NV_vertex_program4 */ + +#ifndef GL_NV_video_capture +#define GL_NV_video_capture 1 +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_SUCCESS_NV 0x902F +#define GL_FAILURE_NV 0x9030 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif +#endif /* GL_NV_video_capture */ + +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif /* GL_OML_interlace */ + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif /* GL_OML_resample */ + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif /* GL_OML_subsample */ + +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); +#endif +#endif /* GL_PGI_misc_hints */ + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif /* GL_PGI_vertex_hints */ + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif /* GL_REND_screen_coordinates */ + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#define GL_RGBA_DXT5_S3TC 0x83A4 +#define GL_RGBA4_DXT5_S3TC 0x83A5 +#endif /* GL_S3_s3tc */ + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); +#endif +#endif /* GL_SGIS_detail_texture */ + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); +#endif +#endif /* GL_SGIS_fog_function */ + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif /* GL_SGIS_generate_mipmap */ + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); +#endif +#endif /* GL_SGIS_multisample */ #ifndef GL_SGIS_pixel_texture #define GL_SGIS_pixel_texture 1 +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); @@ -8165,443 +11101,266 @@ GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); #endif +#endif /* GL_SGIS_pixel_texture */ -#ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 -#endif - -#ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 -#endif - -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 -#endif - -#ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 -#endif - -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint i); -GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); -GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 -#endif - -#ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 -#endif - -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 -#endif - -#ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 -#endif - -#ifndef GL_SGIX_texture_select -#define GL_SGIX_texture_select 1 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 -#endif - -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); -#endif +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif /* GL_SGIS_point_line_texgen */ #ifndef GL_SGIS_point_parameters #define GL_SGIS_point_parameters 1 +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); #endif +#endif /* GL_SGIS_point_parameters */ -#ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); #ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); #endif +#endif /* GL_SGIS_sharpen_texture */ -#ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 -#endif - -#ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels); #endif +#endif /* GL_SGIS_texture4D */ -#ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif /* GL_SGIS_texture_border_clamp */ + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); #endif +#endif /* GL_SGIS_texture_color_mask */ -#ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif /* GL_SGIS_texture_edge_clamp */ + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); #endif +#endif /* GL_SGIS_texture_filter4 */ -#ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif /* GL_SGIS_texture_lod */ + +#ifndef GL_SGIS_texture_select +#define GL_SGIS_texture_select 1 +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif /* GL_SGIS_texture_select */ + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#define GL_ASYNC_MARKER_SGIX 0x8329 +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); +GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); +GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); #endif +#endif /* GL_SGIX_async */ -#ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); -#endif +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif /* GL_SGIX_async_histogram */ -#ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 -#endif +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif /* GL_SGIX_async_pixel */ -#ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 -#endif - -#ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 -#endif - -#ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); -GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); -GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 -#endif +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif /* GL_SGIX_blend_alpha_minmax */ #ifndef GL_SGIX_calligraphic_fragment #define GL_SGIX_calligraphic_fragment 1 -#endif +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif /* GL_SGIX_calligraphic_fragment */ -#ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 -#endif +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif /* GL_SGIX_clipmap */ -#ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 -#endif +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif /* GL_SGIX_convolution_accuracy */ -#ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 -#endif +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#endif /* GL_SGIX_depth_pass_instrument */ -#ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif /* GL_SGIX_depth_texture */ + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +GLAPI void APIENTRY glFlushRasterSGIX (void); #endif +#endif /* GL_SGIX_flush_raster */ -#ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 -#endif +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif /* GL_SGIX_fog_offset */ #ifndef GL_SGIX_fragment_lighting #define GL_SGIX_fragment_lighting 1 +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); @@ -8621,295 +11380,332 @@ GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); #endif +#endif /* GL_SGIX_fragment_lighting */ -#ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); #endif +#endif /* GL_SGIX_framezoom */ -#ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 -#endif - -#ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 -#endif - -#ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); -GLAPI void APIENTRY glTextureLightEXT (GLenum pname); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params); #endif +#endif /* GL_SGIX_igloo_interface */ -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 -#endif - -#ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 -#endif - -#ifndef GL_SGIX_async -#define GL_SGIX_async 1 +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); +GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); +GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); +GLAPI void APIENTRY glStartInstrumentsSGIX (void); +GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); #endif +#endif /* GL_SGIX_instruments */ -#ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 -#endif +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#define GL_INTERLACE_SGIX 0x8094 +#endif /* GL_SGIX_interlace */ -#ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 -#endif +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif /* GL_SGIX_ir_instrument1 */ -#ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#define GL_LIST_PRIORITY_SGIX 0x8182 +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); #endif +#endif /* GL_SGIX_list_priority */ -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); #endif +#endif /* GL_SGIX_pixel_texture */ -#ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 -#endif +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif /* GL_SGIX_pixel_tiles */ -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#endif - -#ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); #endif +#endif /* GL_SGIX_polynomial_ffd */ -#ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); #endif +#endif /* GL_SGIX_reference_plane */ -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#define GL_PACK_RESAMPLE_SGIX 0x842E +#define GL_UNPACK_RESAMPLE_SGIX 0x842F +#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif /* GL_SGIX_resample */ + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif /* GL_SGIX_scalebias_hint */ + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif /* GL_SGIX_shadow */ + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif /* GL_SGIX_shadow_ambient */ + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); #endif +#endif /* GL_SGIX_sprite */ -#ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif /* GL_SGIX_subsample */ + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glTagSampleBufferSGIX (void); #endif +#endif /* GL_SGIX_tag_sample_buffer */ -#ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 -#endif +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif /* GL_SGIX_texture_add_env */ -#ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif /* GL_SGIX_texture_coordinate_clamp */ + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif /* GL_SGIX_texture_lod_bias */ + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif /* GL_SGIX_texture_multi_buffer */ + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif /* GL_SGIX_texture_scale_bias */ + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif /* GL_SGIX_vertex_preclip */ + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif /* GL_SGIX_ycrcb */ + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#endif /* GL_SGIX_ycrcb_subsample */ + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif /* GL_SGIX_ycrcba */ + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif /* GL_SGI_color_matrix */ + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); -GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); -GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); -GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table); +GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); #endif +#endif /* GL_SGI_color_table */ -#ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_SGIX_fog_scale 1 -#endif +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif /* GL_SGI_texture_color_table */ #ifndef GL_SUNX_constant_data #define GL_SUNX_constant_data 1 +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); #endif +#endif /* GL_SUNX_constant_data */ + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif /* GL_SUN_convolution_border_modes */ #ifndef GL_SUN_global_alpha #define GL_SUN_global_alpha 1 +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); @@ -8919,19 +11715,50 @@ GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); #endif +#endif /* GL_SUN_global_alpha */ + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif +#endif /* GL_SUN_mesh_array */ + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif /* GL_SUN_slice_accum */ #ifndef GL_SUN_triangle_list #define GL_SUN_triangle_list 1 +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); @@ -8939,19 +11766,52 @@ GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer); #endif +#endif /* GL_SUN_triangle_list */ #ifndef GL_SUN_vertex #define GL_SUN_vertex 1 +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); @@ -8993,2931 +11853,19 @@ GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); #endif +#endif /* GL_SUN_vertex */ -#ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 -#endif - -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); -#endif - -#ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); -#endif - -#ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 -#endif - -#ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 -#endif - -#ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); -#endif - -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif - -#ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 -#endif - -#ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 -#endif - -#ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); -#endif - -#ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 -#endif - -#ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif - -#ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 -#endif - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); -GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GLAPI void APIENTRY glFinishFenceNV (GLuint fence); -GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -#ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 -#endif - -#ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 -#endif - -#ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); -GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); -GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); -GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 -#endif - -#ifndef GL_OML_interlace -#define GL_OML_interlace 1 -#endif - -#ifndef GL_OML_subsample -#define GL_OML_subsample 1 -#endif - -#ifndef GL_OML_resample -#define GL_OML_resample 1 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); -GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); -GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); -GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); -GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); -GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); -GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); -GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); -GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); -GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); -GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); -GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); -GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); -GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif - -#ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 -#endif - -#ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 -#endif - -#ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 -#endif - -#ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 -#endif - -#ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif - -#ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 -#endif - -#ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 -/* This is really a WGL extension, but defines some associated GL enums. - * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. - */ -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#endif - -#ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 -#endif - -#ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 -#endif - -#ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 -/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif - -#ifndef GL_NV_half_float -#define GL_NV_half_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); -#endif - -#ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 -#endif - -#ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 -#endif - -#ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 -#endif - -#ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 -#endif - -#ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 -#endif - -#ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); -#endif - -#ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); -#endif - -#ifndef GL_EXT_packed_depth_stencil -#define GL_EXT_packed_depth_stencil 1 -#endif - -#ifndef GL_EXT_stencil_clear_tag -#define GL_EXT_stencil_clear_tag 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif - -#ifndef GL_EXT_texture_sRGB -#define GL_EXT_texture_sRGB 1 -#endif - -#ifndef GL_EXT_framebuffer_blit -#define GL_EXT_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -#ifndef GL_EXT_framebuffer_multisample -#define GL_EXT_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_MESAX_texture_stack -#define GL_MESAX_texture_stack 1 -#endif - -#ifndef GL_EXT_timer_query -#define GL_EXT_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); -#endif - -#ifndef GL_EXT_gpu_program_parameters -#define GL_EXT_gpu_program_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif - -#ifndef GL_APPLE_flush_buffer_range -#define GL_APPLE_flush_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); -#endif - -#ifndef GL_NV_gpu_program4 -#define GL_NV_gpu_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -#endif - -#ifndef GL_NV_geometry_program4 -#define GL_NV_geometry_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); -GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif - -#ifndef GL_EXT_geometry_shader4 -#define GL_EXT_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -#endif - -#ifndef GL_NV_vertex_program4 -#define GL_NV_vertex_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); -#endif - -#ifndef GL_EXT_gpu_shader4 -#define GL_EXT_gpu_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -#endif - -#ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -#ifndef GL_EXT_packed_float -#define GL_EXT_packed_float 1 -#endif - -#ifndef GL_EXT_texture_array -#define GL_EXT_texture_array 1 -#endif - -#ifndef GL_EXT_texture_buffer_object -#define GL_EXT_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#endif - -#ifndef GL_EXT_texture_compression_latc -#define GL_EXT_texture_compression_latc 1 -#endif - -#ifndef GL_EXT_texture_compression_rgtc -#define GL_EXT_texture_compression_rgtc 1 -#endif - -#ifndef GL_EXT_texture_shared_exponent -#define GL_EXT_texture_shared_exponent 1 -#endif - -#ifndef GL_NV_depth_buffer_float -#define GL_NV_depth_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); -GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); -typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); -#endif - -#ifndef GL_NV_fragment_program4 -#define GL_NV_fragment_program4 1 -#endif - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_framebuffer_sRGB -#define GL_EXT_framebuffer_sRGB 1 -#endif - -#ifndef GL_NV_geometry_shader4 -#define GL_NV_geometry_shader4 1 -#endif - -#ifndef GL_NV_parameter_buffer_object -#define GL_NV_parameter_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); -#endif - -#ifndef GL_EXT_draw_buffers2 -#define GL_EXT_draw_buffers2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); -#endif - -#ifndef GL_NV_transform_feedback -#define GL_NV_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackNV (void); -GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); -GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); -GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); -GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif - -#ifndef GL_EXT_bindable_uniform -#define GL_EXT_bindable_uniform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); -GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); -GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); -typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); -typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); -#endif - -#ifndef GL_EXT_texture_integer -#define GL_EXT_texture_integer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); -GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); -typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif - -#ifndef GL_GREMEDY_frame_terminator -#define GL_GREMEDY_frame_terminator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); -#endif - -#ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRenderNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); -#endif - -#ifndef GL_NV_present_video -#define GL_NV_present_video 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); -GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif - -#ifndef GL_EXT_transform_feedback -#define GL_EXT_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackEXT (void); -GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif - -#ifndef GL_EXT_direct_state_access -#define GL_EXT_direct_state_access 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); -GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); -GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); -GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); -GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); -GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); -GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); -GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); -GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); -GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); -GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); -typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); -typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -#endif - -#ifndef GL_EXT_vertex_array_bgra -#define GL_EXT_vertex_array_bgra 1 -#endif - -#ifndef GL_EXT_texture_swizzle -#define GL_EXT_texture_swizzle 1 -#endif - -#ifndef GL_NV_explicit_multisample -#define GL_NV_explicit_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); -GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); -#endif - -#ifndef GL_NV_transform_feedback2 -#define GL_NV_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedbackNV (void); -GLAPI void APIENTRY glResumeTransformFeedbackNV (void); -GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); -#endif - -#ifndef GL_ATI_meminfo -#define GL_ATI_meminfo 1 -#endif - -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -#ifndef GL_AMD_texture_texture4 -#define GL_AMD_texture_texture4 1 -#endif - -#ifndef GL_AMD_vertex_shader_tesselator -#define GL_AMD_vertex_shader_tesselator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); -GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_provoking_vertex -#define GL_EXT_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_texture_snorm -#define GL_EXT_texture_snorm 1 -#endif - -#ifndef GL_AMD_draw_buffers_blend -#define GL_AMD_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_APPLE_texture_range -#define GL_APPLE_texture_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); -GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_APPLE_float_pixels -#define GL_APPLE_float_pixels 1 -#endif - -#ifndef GL_APPLE_vertex_program_evaluators -#define GL_APPLE_vertex_program_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif - -#ifndef GL_APPLE_aux_depth_stencil -#define GL_APPLE_aux_depth_stencil 1 -#endif - -#ifndef GL_APPLE_object_purgeable -#define GL_APPLE_object_purgeable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif - -#ifndef GL_APPLE_row_bytes -#define GL_APPLE_row_bytes 1 -#endif - -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#endif - -#ifndef GL_NV_video_capture -#define GL_NV_video_capture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif - -#ifndef GL_NV_copy_image -#define GL_NV_copy_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyImageSubDataNV (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 width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (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 width, GLsizei height, GLsizei depth); -#endif - -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); -GLAPI void APIENTRY glActiveProgramEXT (GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); -typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); -#endif - -#ifndef GL_NV_parameter_buffer_object2 -#define GL_NV_parameter_buffer_object2 1 -#endif - -#ifndef GL_NV_shader_buffer_load -#define GL_NV_shader_buffer_load 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); -GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); -GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); -GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); -GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); -GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); -GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); -GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); -GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); -GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); -GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); -typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); -typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); -typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); -typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif - -#ifndef GL_NV_vertex_buffer_unified_memory -#define GL_NV_vertex_buffer_unified_memory 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); -GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); -#endif - -#ifndef GL_NV_texture_barrier -#define GL_NV_texture_barrier 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureBarrierNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); -#endif - -#ifndef GL_AMD_shader_stencil_export -#define GL_AMD_shader_stencil_export 1 -#endif - -#ifndef GL_AMD_seamless_cubemap_per_texture -#define GL_AMD_seamless_cubemap_per_texture 1 -#endif - -#ifndef GL_AMD_conservative_depth -#define GL_AMD_conservative_depth 1 -#endif - -#ifndef GL_EXT_shader_image_load_store -#define GL_EXT_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); -#endif - -#ifndef GL_EXT_vertex_attrib_64bit -#define GL_EXT_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -#endif - -#ifndef GL_NV_gpu_program5 -#define GL_NV_gpu_program5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); -#endif - -#ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif - -#ifndef GL_NV_shader_buffer_store -#define GL_NV_shader_buffer_store 1 -#endif - -#ifndef GL_NV_tessellation_program5 -#define GL_NV_tessellation_program5 1 -#endif - -#ifndef GL_NV_vertex_attrib_integer_64bit -#define GL_NV_vertex_attrib_integer_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); -GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif - -#ifndef GL_NV_multisample_coverage -#define GL_NV_multisample_coverage 1 -#endif - -#ifndef GL_AMD_name_gen_delete -#define GL_AMD_name_gen_delete 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); -GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); -GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); -typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); -typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); -#endif - -#ifndef GL_AMD_debug_output -#define GL_AMD_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif - -#ifndef GL_NV_vdpau_interop -#define GL_NV_vdpau_interop 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -GLAPI void APIENTRY glVDPAUFiniNV (void); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); -GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); -typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif - -#ifndef GL_AMD_transform_feedback3_lines_triangles -#define GL_AMD_transform_feedback3_lines_triangles 1 -#endif - -#ifndef GL_AMD_depth_clamp_separate -#define GL_AMD_depth_clamp_separate 1 -#endif - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#endif - -#ifndef GL_NV_texture_multisample -#define GL_NV_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif - -#ifndef GL_AMD_blend_minmax_factor -#define GL_AMD_blend_minmax_factor 1 -#endif - -#ifndef GL_AMD_sample_positions -#define GL_AMD_sample_positions 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); -#endif - -#ifndef GL_EXT_x11_sync_object -#define GL_EXT_x11_sync_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif - -#ifndef GL_AMD_multi_draw_indirect -#define GL_AMD_multi_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -#endif - -#ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_EXT_framebuffer_multisample_blit_scaled 1 -#endif - -#ifndef GL_NV_path_rendering -#define GL_NV_path_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); -GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); -GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); -GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); -GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); -GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); -GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); -GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); -GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); -GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); -GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); -GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); -GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); -GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); -GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); -GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); -GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); -GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); -GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); -GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); -GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); -GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); -typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); -typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); -typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); -typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); -typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); -typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); -typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); -typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); -typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); -typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); -typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -#endif - -#ifndef GL_AMD_pinned_memory -#define GL_AMD_pinned_memory 1 -#endif - -#ifndef GL_AMD_stencil_operation_extended -#define GL_AMD_stencil_operation_extended 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); -#endif - -#ifndef GL_AMD_vertex_shader_viewport_index -#define GL_AMD_vertex_shader_viewport_index 1 -#endif - -#ifndef GL_AMD_vertex_shader_layer -#define GL_AMD_vertex_shader_layer 1 -#endif - -#ifndef GL_NV_bindless_texture -#define GL_NV_bindless_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); -#endif - -#ifndef GL_NV_shader_atomic_float -#define GL_NV_shader_atomic_float 1 -#endif +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif /* GL_WIN_phong_shading */ +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif /* GL_WIN_specular_fog */ #ifdef __cplusplus } From 51e243deb5bfe245b388be13f9b5e1e66d1fe2ae Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 31 Jul 2015 13:28:16 +0200 Subject: [PATCH 042/200] Fix point size/line width setting regression in OpenGL --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index e05e1e2d8e..a1a2e7e7a9 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -6036,9 +6036,13 @@ do_issue_render_mode() { // The thickness affects both the line width and the point size. if (thickness != _point_size) { - glLineWidth(_point_size); + if (GLCAT.is_spam()) { + GLCAT.spam() << "setting thickness to " << thickness << "\n"; + } + + glLineWidth(thickness); #ifndef OPENGLES_2 - glPointSize(_point_size); + glPointSize(thickness); #endif _point_size = thickness; } From 6a782e8c3141cf26dcda14b43f0946ec6fd1f3b7 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 1 Aug 2015 19:13:45 +0200 Subject: [PATCH 043/200] Avoid accidentally getting a non-compat context on Windows Catalyst driver --- panda/src/wgldisplay/wglGraphicsStateGuardian.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx index 236ab57a77..b4b9f5f157 100644 --- a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx +++ b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx @@ -644,8 +644,10 @@ make_context(HDC hdc) { attrib_list[n++] = WGL_CONTEXT_FLAGS_ARB; attrib_list[n++] = WGL_CONTEXT_DEBUG_BIT_ARB; } +#ifndef SUPPORT_FIXED_FUNCTION attrib_list[n++] = WGL_CONTEXT_PROFILE_MASK_ARB; attrib_list[n++] = WGL_CONTEXT_CORE_PROFILE_BIT_ARB; +#endif attrib_list[n] = NULL; _context = _wglCreateContextAttribsARB(hdc, 0, attrib_list); From de715b5a0eed8e2e78460b30ba76ead3cb0041fd Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 4 Aug 2015 17:48:46 +0200 Subject: [PATCH 044/200] Fix inability for interrogate to parse /*c*//* and /*c*/// --- dtool/src/cppparser/cppPreprocessor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 52c758acd6..4f6384e89d 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -979,13 +979,14 @@ skip_whitespace(int c) { //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_comment(int c) { - if (c == '/') { + while (c == '/') { int next_c = get(); if (next_c == '*') { _last_cpp_comment = false; c = skip_c_comment(get()); } else if (next_c == '/') { c = skip_cpp_comment(get()); + break; } else { _last_cpp_comment = false; unget(next_c); From 9396f998fb386ab6749fa5d40c4675379e11e764 Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Fri, 31 Jul 2015 12:19:08 -0500 Subject: [PATCH 045/200] Avoid crash in p3tinydisplay when there is no initial window --- panda/src/tinydisplay/tinyXGraphicsWindow.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/tinydisplay/tinyXGraphicsWindow.cxx b/panda/src/tinydisplay/tinyXGraphicsWindow.cxx index 99e8e9777e..924ababedb 100644 --- a/panda/src/tinydisplay/tinyXGraphicsWindow.cxx +++ b/panda/src/tinydisplay/tinyXGraphicsWindow.cxx @@ -604,6 +604,10 @@ create_full_frame_buffer() { //////////////////////////////////////////////////////////////////// void TinyXGraphicsWindow:: create_reduced_frame_buffer() { + if (!_full_frame_buffer) { + return; + } + if (_reduced_frame_buffer != NULL) { ZB_close(_reduced_frame_buffer); _reduced_frame_buffer = NULL; From 22d5c2f8dd35eed6c9bc8f1c66fc56f4cc012903 Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Mon, 3 Aug 2015 08:11:52 -0500 Subject: [PATCH 046/200] For tinydisplay, don't lose color/alpha scale when lighting --- panda/src/tinydisplay/td_light.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/tinydisplay/td_light.cxx b/panda/src/tinydisplay/td_light.cxx index a7b03a3bc5..c49b47e4b4 100644 --- a/panda/src/tinydisplay/td_light.cxx +++ b/panda/src/tinydisplay/td_light.cxx @@ -127,9 +127,9 @@ void gl_shade_vertex(GLContext *c,GLVertex *v) B+=att * lB; } - v->color.v[0]=clampf(R,0,1); - v->color.v[1]=clampf(G,0,1); - v->color.v[2]=clampf(B,0,1); - v->color.v[3]=A; + v->color.v[0]=clampf(R*v->color.v[0],0,1); + v->color.v[1]=clampf(G*v->color.v[1],0,1); + v->color.v[2]=clampf(B*v->color.v[2],0,1); + v->color.v[3]=clampf(A*v->color.v[3],0,1); } From 29ef15db3f8615cecfcae2ae7667ebfa2f57fc4e Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 6 Aug 2015 14:16:51 +0200 Subject: [PATCH 047/200] Fix symbol visibility issue in p3d_plugin.so --- direct/src/plugin/p3d_plugin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/src/plugin/p3d_plugin.h b/direct/src/plugin/p3d_plugin.h index e053e6e21b..418d3c1143 100644 --- a/direct/src/plugin/p3d_plugin.h +++ b/direct/src/plugin/p3d_plugin.h @@ -53,7 +53,11 @@ #endif #else /* _WIN32 */ +#if defined(BUILDING_P3D_PLUGIN) && defined(__GNUC__) +#define EXPCL_P3D_PLUGIN __attribute__((visibility("default"))) +#else #define EXPCL_P3D_PLUGIN +#endif #endif /* _WIN32 */ From d66135f4b8f25ec6bdbf7f7756ad2f6131ccf2f4 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 6 Aug 2015 14:35:12 +0200 Subject: [PATCH 048/200] Add ability to change window icon after window has already opened on Windows --- panda/src/windisplay/winGraphicsWindow.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index a226dcde1b..0146f2f89c 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -284,6 +284,17 @@ set_properties_now(WindowProperties &properties) { properties.clear_title(); } + if (properties.has_icon_filename()) { + HICON icon = get_icon(properties.get_icon_filename()); + if (icon != 0) { + ::SendMessage(_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); + ::SendMessage(_hWnd, WM_SETICON, ICON_BIG, (LPARAM)icon); + + _properties.set_icon_filename(properties.get_icon_filename()); + properties.clear_icon_filename(); + } + } + if (properties.has_cursor_hidden()) { bool hide_cursor = properties.get_cursor_hidden(); _properties.set_cursor_hidden(hide_cursor); From 0e6092004dd327ca1488b3c8dd87892a06e4155d Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 6 Aug 2015 15:47:49 +0200 Subject: [PATCH 049/200] Fix perPlatform bug in pdeploy --- direct/src/p3d/DeploymentTools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/p3d/DeploymentTools.py b/direct/src/p3d/DeploymentTools.py index 10677cd5d4..5bb3f3a159 100644 --- a/direct/src/p3d/DeploymentTools.py +++ b/direct/src/p3d/DeploymentTools.py @@ -73,7 +73,7 @@ class Standalone: self.tempDir = Filename.temporary("", self.basename, "") + "/" self.tempDir.makeDir() - self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False) + self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False, perPlatform = True) self.http = HTTPClient.getGlobalPtr() if not self.host.hasContentsFile: @@ -233,7 +233,7 @@ class PackageTree: if hostUrl in self.hosts: return self.hosts[hostUrl] - host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False) + host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False, perPlatform = True) if not host.hasContentsFile: if not host.readContentsFile(): if not host.downloadContentsFile(self.http): From b50fbe8263ab56212f50759cce84cb8b0f7f0e9a Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 6 Aug 2015 15:49:26 +0200 Subject: [PATCH 050/200] Restore old packp3d behavior: main file should be considered relative to -d directory --- direct/src/p3d/packp3d.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index 7dbe3a30b9..3544022fd6 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -170,19 +170,20 @@ def makePackedApp(args): appDir = Filename('.') appBase = appFilename.getBasenameWoExtension() - if not main: + if main: + main = Filename.fromOsSpecific(main) + main.makeAbsolute(root) + else: main = Filename(root, 'main.py') - if main.exists(): - main = 'main.py' - else: + if not main.exists(): main = glob.glob(os.path.join(root.toOsSpecific(), '*.py')) if len(main) == 0: raise ArgumentError, 'No Python files in root directory.' elif len(main) > 1: raise ArgumentError, 'Multiple Python files in root directory; specify the main application with -m "main".' - main = os.path.split(main[0])[1] - main = Filename.fromOsSpecific(main) + main = Filename.fromOsSpecific(os.path.split(main[0])[1]) + main.makeAbsolute(root) packager.installDir = appDir packager.allowPythonDev = allowPythonDev From 0c7b65b1fd943ff4314281ab3b35a77376843859 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 6 Aug 2015 15:52:02 +0200 Subject: [PATCH 051/200] Fix issue where packp3d fails if import.xml is refreshed while contents.xml remains old --- direct/src/p3d/AppRunner.py | 2 +- direct/src/p3d/Packager.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/p3d/AppRunner.py b/direct/src/p3d/AppRunner.py index b9a1f17572..ff63e5aa8d 100644 --- a/direct/src/p3d/AppRunner.py +++ b/direct/src/p3d/AppRunner.py @@ -471,7 +471,7 @@ class AppRunner(DirectObject): file.unlink() return False - if not fileSpec.fullVerify(pathname = localPathname): + if not fileSpec.fullVerify(pathname = localPathname, notify = self.notify): # No good after download. self.notify.info("%s is still no good after downloading." % (url)) return False diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index d2166ec4f8..84448e23a7 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -3008,10 +3008,10 @@ class Packager: # environment. return None + # Make sure we have a fresh version of the contents file. host = appRunner.getHost(hostUrl) - if not host.readContentsFile(): - if not host.downloadContentsFile(appRunner.http): - return None + if not host.downloadContentsFile(appRunner.http): + return None packageInfos = [] packageInfo = host.getPackage(packageName, version, platform = platform) From b06ff60c10a5bf7a18af5da39321b4ae49d27e9f Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Thu, 6 Aug 2015 09:54:31 -0500 Subject: [PATCH 052/200] Fix DynamicTextFont.makeCopy() implementation --- panda/src/pnmtext/freetypeFont.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/pnmtext/freetypeFont.cxx b/panda/src/pnmtext/freetypeFont.cxx index c2a5d176b1..974787a331 100644 --- a/panda/src/pnmtext/freetypeFont.cxx +++ b/panda/src/pnmtext/freetypeFont.cxx @@ -68,6 +68,7 @@ FreetypeFont(const FreetypeFont ©) : _requested_scale_factor(copy._requested_scale_factor), _scale_factor(copy._scale_factor), _native_antialias(copy._native_antialias), + _font_pixels_per_unit(copy._font_pixels_per_unit), _line_height(copy._line_height), _space_advance(copy._space_advance), _face(copy._face), From f1df65034de12f8e75afe072964a1aada4c6ec79 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Aug 2015 17:29:03 +0200 Subject: [PATCH 053/200] Fix Mac 10.11 compile error --- panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm b/panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm index 63ee5dc244..01e4624015 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm @@ -210,7 +210,7 @@ choose_pixel_format(const FrameBufferProperties &properties, attribs.push_back(CGDisplayIDToOpenGLDisplayMask(display)); // End of the array - attribs.push_back((NSOpenGLPixelFormatAttribute) nil); + attribs.push_back((NSOpenGLPixelFormatAttribute)0); // Create the format. NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]]; From af8de103af1a34aee7467eed57f4d9f9ecd4cfed Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Aug 2015 17:40:01 +0200 Subject: [PATCH 054/200] Ignore non-required packages rather than erroring if their dependencies were missing --- direct/src/p3d/Packager.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 84448e23a7..36883ceb52 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -372,6 +372,9 @@ class Packager: self.requiredFilenames = [] self.requiredModules = [] + # A list of required packages that were missing. + self.missingPackages = [] + # This records the current list of modules we have added so # far. self.freezer = FreezeTool.Freezer(platform = self.packager.platform) @@ -495,6 +498,12 @@ class Packager: as a true package. Either is implemented with a Multifile. """ + if self.missingPackages: + missing = ', '.join([name for name, version in self.missingPackages]) + self.notify.warning("Cannot build package %s due to missing dependencies: %s" % (self.packageName, missing)) + self.cleanup() + return False + self.multifile = Multifile() # Write the multifile to a temporary filename until we @@ -3217,7 +3226,9 @@ class Packager: requires = self.currentPackage.requires) if not package: message = 'Unknown package %s, version "%s"' % (packageName, version) - raise PackagerError, message + self.notify.warning(message) + self.currentPackage.missingPackages.append((packageName, pversion)) + continue self.requirePackage(package) From 14bd992e77f31baf782fd9063f6b3127e2b74c5d Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Aug 2015 18:45:37 +0200 Subject: [PATCH 055/200] Remove use of deprecated "register" keyword --- panda/src/pnmimagetypes/colrops.c | 20 ++--- panda/src/pnmimagetypes/pnmFileTypePNM.cxx | 24 +++--- panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx | 14 +-- panda/src/tinydisplay/zbuffer.cxx | 2 +- panda/src/tinydisplay/zdither.cxx | 6 +- panda/src/tinydisplay/zline.h | 12 +-- panda/src/tinydisplay/ztriangle.h | 12 +-- panda/src/tinydisplay/ztriangle_two.h | 95 ++++++++++----------- 8 files changed, 92 insertions(+), 93 deletions(-) diff --git a/panda/src/pnmimagetypes/colrops.c b/panda/src/pnmimagetypes/colrops.c index 997c89f8d8..a82bf85399 100644 --- a/panda/src/pnmimagetypes/colrops.c +++ b/panda/src/pnmimagetypes/colrops.c @@ -47,7 +47,7 @@ int setcolrcor(double (*f)(double, double), double a2) /* set brightness correction */ { double mult; - register int i, j; + int i, j; /* allocate tables */ if (g_bval == NULL && (g_bval = (BYTE (*)[256])bmalloc((MAXGSHIFT+1)*256)) == NULL) @@ -67,7 +67,7 @@ int setcolrinv(double (*f)(double, double), double a2) /* set inverse brightness correction */ { double mult; - register int i, j; + int i, j; /* allocate tables */ if (g_mant == NULL && (g_mant = (BYTE *)bmalloc(256)) == NULL) return(-1); @@ -97,10 +97,10 @@ int setcolrgam(double g) /* set gamma conversion */ } -int colrs_gambs(register COLR *scan, int len) +int colrs_gambs(COLR *scan, int len) /* convert scanline of colrs to gamma bytes */ { - register int i, expo; + int i, expo; if (g_bval == NULL) return(-1); @@ -145,10 +145,10 @@ int colrs_gambs(register COLR *scan, int len) } -int gambs_colrs(register COLR *scan, int len) +int gambs_colrs(COLR *scan, int len) /* convert gamma bytes to colr scanline */ { - register int nexpo; + int nexpo; if (g_mant == NULL || g_nexp == NULL) return(-1); @@ -181,7 +181,7 @@ int gambs_colrs(register COLR *scan, int len) void -shiftcolrs(register COLR *scan, register int len, register int adjust) +shiftcolrs(COLR *scan, int len, int adjust) /* shift a scanline of colors by 2^adjust */ { int minexp; @@ -201,11 +201,11 @@ shiftcolrs(register COLR *scan, register int len, register int adjust) void -normcolrs(register COLR *scan, int len, int adjust) +normcolrs(COLR *scan, int len, int adjust) /* normalize a scanline of colrs */ { - register int c; - register int shift; + int c; + int shift; while (len-- > 0) { shift = scan[0][EXP] + adjust - COLXS; diff --git a/panda/src/pnmimagetypes/pnmFileTypePNM.cxx b/panda/src/pnmimagetypes/pnmFileTypePNM.cxx index 8a080fc953..6e800c3372 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNM.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypePNM.cxx @@ -317,8 +317,8 @@ getbit (istream * const file) { static void pbm_readpbmrow( istream *file, bit *bitrow, int cols, int format ) { - register int col, bitshift; - register bit* bP; + int col, bitshift; + bit* bP; switch ( format ) { @@ -328,7 +328,7 @@ pbm_readpbmrow( istream *file, bit *bitrow, int cols, int format ) { break; case RPBM_FORMAT: { - register unsigned char item; + unsigned char item; bitshift = -1; item = 0; /* item's value is meaningless here */ for ( col = 0, bP = bitrow; col < cols; ++col, ++bP ) { @@ -486,12 +486,12 @@ ppm_readppmrow(istream* const fileP, static void pnm_readpnmrow( istream* file, xel* xelrow, int cols, xelval maxval, int format ) { - register int col; - register xel* xP; + int col; + xel* xP; gray* grayrow; - register gray* gP; + gray* gP; bit* bitrow; - register bit* bP; + bit* bP; switch ( PNM_FORMAT_TYPE(format) ) { @@ -815,8 +815,8 @@ pgm_writepgmrow(ostream* const fileP, static void ppm_writeppmrowraw(ostream *file, pixel *pixelrow, int cols, pixval maxval ) { - register int col; - register pixval val; + int col; + pixval val; for ( col = 0; col < cols; ++col ) { @@ -843,9 +843,9 @@ ppm_writeppmrowraw(ostream *file, pixel *pixelrow, int cols, pixval maxval ) { static void ppm_writeppmrowplain(ostream *file, pixel *pixelrow, int cols, pixval maxval ) { - register int col, charcount; - register pixel* pP; - register pixval val; + int col, charcount; + pixel* pP; + pixval val; charcount = 0; for ( col = 0, pP = pixelrow; col < cols; ++col, ++pP ) diff --git a/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx b/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx index e16b857d61..ab09b1f034 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx @@ -1033,7 +1033,7 @@ write_data(xel *array, xelval *alpha) { grn[TIFF_COLORMAP_MAXCOLORS], blu[TIFF_COLORMAP_MAXCOLORS]; int row, colors, i; - register int col; + int col; int grayscale = false; struct tiff * tif; short photometric = 0; @@ -1064,7 +1064,7 @@ write_data(xel *array, xelval *alpha) { << colors << " colors found; writing an 8-bit palette file.\n"; grayscale = true; for ( i = 0; i < colors; ++i ) { - register xelval r, g, b; + xelval r, g, b; r = PPM_GETR( chv[i].color ); g = PPM_GETG( chv[i].color ); @@ -1203,7 +1203,7 @@ write_data(xel *array, xelval *alpha) { } else { tP = buf; for ( col = 0; col < _x_size; ++col ) { - register int s; + int s; s = ppm_lookupcolor( cht, (pixel *)(&row_data[col]) ); if ( s == -1 ) { @@ -1219,10 +1219,10 @@ write_data(xel *array, xelval *alpha) { } } } else { - register xelval bigger_maxval; - register int bitshift; - register unsigned char byte; - register xelval s; + xelval bigger_maxval; + int bitshift; + unsigned char byte; + xelval s; bigger_maxval = pm_bitstomaxval( bitspersample ); bitshift = 8 - bitspersample; diff --git a/panda/src/tinydisplay/zbuffer.cxx b/panda/src/tinydisplay/zbuffer.cxx index fa5677398d..4623a85353 100644 --- a/panda/src/tinydisplay/zbuffer.cxx +++ b/panda/src/tinydisplay/zbuffer.cxx @@ -358,7 +358,7 @@ memset_l(void *adr, int val, int count) { void memset_RGB24(void *adr,int r, int v, int b,long count) { long i, n; - register long v1,v2,v3,*pt=(long *)(adr); + long v1,v2,v3,*pt=(long *)(adr); unsigned char *p,R=(unsigned char)r,V=(unsigned char)v,B=(unsigned char)b; p=(unsigned char *)adr; diff --git a/panda/src/tinydisplay/zdither.cxx b/panda/src/tinydisplay/zdither.cxx index a2ae2838e9..37e826e1e8 100644 --- a/panda/src/tinydisplay/zdither.cxx +++ b/panda/src/tinydisplay/zdither.cxx @@ -89,7 +89,7 @@ ZDither_lookupColor(int r,int g,int b) { #define DITHER_PIXEL2(a) \ { \ - register int v,t,r,g,c; \ + int v,t,r,g,c; \ v=*(unsigned int *)(pp+(a)); \ g=(v & 0x07DF07DF) + g_d; \ r=(((v & 0xF800F800) >> 2) + r_d) & 0x70007000; \ @@ -110,8 +110,8 @@ ZB_ditherFrameBuffer(ZBuffer *zb,unsigned char *buf, unsigned short *pp1; int r_d,g_d,b_d; unsigned char *ctable=zb->dctable; - register unsigned char *dest; - register unsigned short *pp; + unsigned char *dest; + unsigned short *pp; assert( ((long)buf & 1) == 0 && (linesize & 1) == 0); diff --git a/panda/src/tinydisplay/zline.h b/panda/src/tinydisplay/zline.h index 8e162d54a4..b5a3284d59 100644 --- a/panda/src/tinydisplay/zline.h +++ b/panda/src/tinydisplay/zline.h @@ -1,17 +1,17 @@ { int n, dx, dy, sx, pp_inc_1, pp_inc_2; - register int a; - register PIXEL *pp; + int a; + PIXEL *pp; #if defined(INTERP_RGB) - register unsigned int r, g, b; + unsigned int r, g, b; #endif #ifdef INTERP_RGB - register unsigned int rinc, ginc, binc; + unsigned int rinc, ginc, binc; #endif #ifdef INTERP_Z - register ZPOINT *pz; + ZPOINT *pz; int zinc; - register int z, zz; + int z, zz; #endif if (p1->y > p2->y || (p1->y == p2->y && p1->x > p2->x)) { diff --git a/panda/src/tinydisplay/ztriangle.h b/panda/src/tinydisplay/ztriangle.h index 2c3e5c1d1f..c8fdfc4c53 100644 --- a/panda/src/tinydisplay/ztriangle.h +++ b/panda/src/tinydisplay/ztriangle.h @@ -344,17 +344,17 @@ #ifndef DRAW_LINE /* generic draw line */ { - register PIXEL *pp; - register int n; + PIXEL *pp; + int n; #ifdef INTERP_Z - register ZPOINT *pz; - register unsigned int z,zz; + ZPOINT *pz; + unsigned int z,zz; #endif #ifdef INTERP_RGB - register unsigned int or1,og1,ob1,oa1; + unsigned int or1,og1,ob1,oa1; #endif #ifdef INTERP_ST - register unsigned int s,t; + unsigned int s,t; #endif #ifdef INTERP_STZ PN_stdfloat sz,tz; diff --git a/panda/src/tinydisplay/ztriangle_two.h b/panda/src/tinydisplay/ztriangle_two.h index eade11cceb..d1c5a56916 100644 --- a/panda/src/tinydisplay/ztriangle_two.h +++ b/panda/src/tinydisplay/ztriangle_two.h @@ -326,13 +326,13 @@ FNAME(white_perspective) (ZBuffer *zb, #define DRAW_LINE() \ { \ - register ZPOINT *pz; \ - register PIXEL *pp; \ - register int s,t,z,zz; \ - register int n,dsdx,dtdx; \ - PN_stdfloat sz,tz,fz,zinv; \ + ZPOINT *pz; \ + PIXEL *pp; \ + int s,t,z,zz; \ + int n,dsdx,dtdx; \ + PN_stdfloat sz,tz,fz,zinv; \ n=(x2>>16)-x1; \ - fz=(PN_stdfloat)z1; \ + fz=(PN_stdfloat)z1; \ zinv=1.0f / fz; \ pp=(PIXEL *)((char *)pp1 + x1 * PSZB); \ pz=pz1+x1; \ @@ -341,7 +341,7 @@ FNAME(white_perspective) (ZBuffer *zb, tz=tz1; \ while (n>=(NB_INTERP-1)) { \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -452,14 +452,14 @@ FNAME(flat_perspective) (ZBuffer *zb, #define DRAW_LINE() \ { \ - register ZPOINT *pz; \ - register PIXEL *pp; \ - register int s,t,z,zz; \ - register int n,dsdx,dtdx; \ - register int or1,og1,ob1,oa1; \ - PN_stdfloat sz,tz,fz,zinv; \ + ZPOINT *pz; \ + PIXEL *pp; \ + int s,t,z,zz; \ + int n,dsdx,dtdx; \ + int or1,og1,ob1,oa1; \ + PN_stdfloat sz,tz,fz,zinv; \ n=(x2>>16)-x1; \ - fz=(PN_stdfloat)z1; \ + fz=(PN_stdfloat)z1; \ zinv=1.0f / fz; \ pp=(PIXEL *)((char *)pp1 + x1 * PSZB); \ pz=pz1+x1; \ @@ -472,7 +472,7 @@ FNAME(flat_perspective) (ZBuffer *zb, oa1 = a1; \ while (n>=(NB_INTERP-1)) { \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -592,14 +592,14 @@ FNAME(smooth_perspective) (ZBuffer *zb, #define DRAW_LINE() \ { \ - register ZPOINT *pz; \ - register PIXEL *pp; \ - register int s,t,z,zz; \ - register int n,dsdx,dtdx; \ - register int or1,og1,ob1,oa1; \ - PN_stdfloat sz,tz,fz,zinv; \ + ZPOINT *pz; \ + PIXEL *pp; \ + int s,t,z,zz; \ + int n,dsdx,dtdx; \ + int or1,og1,ob1,oa1; \ + PN_stdfloat sz,tz,fz,zinv; \ n=(x2>>16)-x1; \ - fz=(PN_stdfloat)z1; \ + fz=(PN_stdfloat)z1; \ zinv=1.0f / fz; \ pp=(PIXEL *)((char *)pp1 + x1 * PSZB); \ pz=pz1+x1; \ @@ -612,7 +612,7 @@ FNAME(smooth_perspective) (ZBuffer *zb, oa1 = a1; \ while (n>=(NB_INTERP-1)) { \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -723,14 +723,14 @@ FNAME(smooth_multitex2) (ZBuffer *zb, #define DRAW_LINE() \ { \ - register ZPOINT *pz; \ - register PIXEL *pp; \ - register int s,t,sa,ta,z,zz; \ - register int n,dsdx,dtdx,dsadx,dtadx; \ - register int or1,og1,ob1,oa1; \ - PN_stdfloat sz,tz,sza,tza,fz,zinv; \ + ZPOINT *pz; \ + PIXEL *pp; \ + int s,t,sa,ta,z,zz; \ + int n,dsdx,dtdx,dsadx,dtadx; \ + int or1,og1,ob1,oa1; \ + PN_stdfloat sz,tz,sza,tza,fz,zinv; \ n=(x2>>16)-x1; \ - fz=(PN_stdfloat)z1; \ + fz=(PN_stdfloat)z1; \ zinv=1.0f / fz; \ pp=(PIXEL *)((char *)pp1 + x1 * PSZB); \ pz=pz1+x1; \ @@ -745,7 +745,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb, oa1 = a1; \ while (n>=(NB_INTERP-1)) { \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -755,7 +755,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx); \ } \ { \ - PN_stdfloat ssa,tta; \ + PN_stdfloat ssa,tta; \ ssa=(sza * zinv); \ tta=(tza * zinv); \ sa=(int) ssa; \ @@ -783,7 +783,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb, tza+=ndtzadx; \ } \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -793,7 +793,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx); \ } \ { \ - PN_stdfloat ssa,tta; \ + PN_stdfloat ssa,tta; \ ssa=(sza * zinv); \ tta=(tza * zinv); \ sa=(int) ssa; \ @@ -884,14 +884,14 @@ FNAME(smooth_multitex3) (ZBuffer *zb, #define DRAW_LINE() \ { \ - register ZPOINT *pz; \ - register PIXEL *pp; \ - register int s,t,sa,ta,sb,tb,z,zz; \ - register int n,dsdx,dtdx,dsadx,dtadx,dsbdx,dtbdx; \ - register int or1,og1,ob1,oa1; \ - PN_stdfloat sz,tz,sza,tza,szb,tzb,fz,zinv; \ + ZPOINT *pz; \ + PIXEL *pp; \ + int s,t,sa,ta,sb,tb,z,zz; \ + int n,dsdx,dtdx,dsadx,dtadx,dsbdx,dtbdx; \ + int or1,og1,ob1,oa1; \ + PN_stdfloat sz,tz,sza,tza,szb,tzb,fz,zinv; \ n=(x2>>16)-x1; \ - fz=(PN_stdfloat)z1; \ + fz=(PN_stdfloat)z1; \ zinv=1.0f / fz; \ pp=(PIXEL *)((char *)pp1 + x1 * PSZB); \ pz=pz1+x1; \ @@ -908,7 +908,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, oa1 = a1; \ while (n>=(NB_INTERP-1)) { \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -918,7 +918,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx); \ } \ { \ - PN_stdfloat ssa,tta; \ + PN_stdfloat ssa,tta; \ ssa=(sza * zinv); \ tta=(tza * zinv); \ sa=(int) ssa; \ @@ -928,7 +928,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_levela, mipmap_dxa, dsadx, dtadx); \ } \ { \ - PN_stdfloat ssb,ttb; \ + PN_stdfloat ssb,ttb; \ ssb=(szb * zinv); \ ttb=(tzb * zinv); \ sb=(int) ssb; \ @@ -958,7 +958,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, tzb+=ndtzbdx; \ } \ { \ - PN_stdfloat ss,tt; \ + PN_stdfloat ss,tt; \ ss=(sz * zinv); \ tt=(tz * zinv); \ s=(int) ss; \ @@ -968,7 +968,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx); \ } \ { \ - PN_stdfloat ssa,tta; \ + PN_stdfloat ssa,tta; \ ssa=(sza * zinv); \ tta=(tza * zinv); \ sa=(int) ssa; \ @@ -978,7 +978,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, CALC_MIPMAP_LEVEL(mipmap_levela, mipmap_dxa, dsadx, dtadx); \ } \ { \ - PN_stdfloat ssb,ttb; \ + PN_stdfloat ssb,ttb; \ ssb=(szb * zinv); \ ttb=(tzb * zinv); \ sb=(int) ssb; \ @@ -1008,4 +1008,3 @@ FNAME(smooth_multitex3) (ZBuffer *zb, #undef INTERP_MIPMAP #undef CALC_MIPMAP_LEVEL #undef ZB_LOOKUP_TEXTURE - From c41a4120bcbe7ecf04430ca6a215b97c573c2d23 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Aug 2015 21:41:15 +0200 Subject: [PATCH 056/200] Fix OSX compile error due to Apple's broken glext.h --- panda/src/glstuff/glGraphicsStateGuardian_src.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index d83b585941..5272dfb771 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -222,6 +222,8 @@ typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTPROC) (GLuint64 handle); typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64PROC) (GLuint index, GLuint64EXT x); typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VPROC) (GLuint index, const GLuint64EXT *v); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); #endif // OPENGLES #endif // __EDG__ From 81801654a2941303d2e7c07a0a3490d75b77b039 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 8 Aug 2015 12:43:58 +0200 Subject: [PATCH 057/200] Fix finding extension modules ending in "module.so" with the VFS importer --- direct/src/showbase/VFSImporter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py index 6f8c76266f..31dd83523b 100644 --- a/direct/src/showbase/VFSImporter.py +++ b/direct/src/showbase/VFSImporter.py @@ -76,8 +76,7 @@ class VFSImporter: if desc[2] != imp.C_EXTENSION: continue - filename = Filename(path) - filename.setExtension(desc[0][1:]) + filename = Filename(path + desc[0]) vfile = vfs.getFile(filename, True) if vfile: return VFSLoader(dir_path, vfile, filename, FTExtensionModule, From 74190f9e5019f0e90f5f64f5e4d769fa23f81ced Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 8 Aug 2015 20:49:51 +0200 Subject: [PATCH 058/200] Work towards supporting Python 3 in the rtdist --- direct/src/p3d/Packager.py | 30 +++---- direct/src/p3d/coreapi.pdef | 2 +- direct/src/p3d/ppackage.py | 14 ++-- direct/src/plugin/p3dPythonRun.cxx | 64 ++++++++++++++- direct/src/plugin/p3dPythonRun.h | 9 ++- direct/src/showutil/FreezeTool.py | 13 +-- makepanda/makepanda.py | 2 + panda/src/downloader/stringStream.h | 24 ++++-- panda/src/downloader/stringStream_ext.cxx | 99 +++++++++++++++++++++++ panda/src/downloader/stringStream_ext.h | 43 ++++++++++ 10 files changed, 262 insertions(+), 38 deletions(-) create mode 100644 panda/src/downloader/stringStream_ext.cxx create mode 100644 panda/src/downloader/stringStream_ext.h diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 813fefa0b2..16ebdabbff 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -467,7 +467,7 @@ class Packager: if self.p3dApplication: allowPythonDev = self.configs.get('allow_python_dev', 0) if int(allowPythonDev): - print "\n*** Generating %s.p3d with allow_python_dev enabled ***\n" % (self.packageName) + print("\n*** Generating %s.p3d with allow_python_dev enabled ***\n" % (self.packageName)) return result @@ -721,7 +721,7 @@ class Packager: self.packageDesc = packageDir + self.packageDesc self.packageImportDesc = packageDir + self.packageImportDesc - print "Generating %s" % (self.packageFilename) + print("Generating %s" % (self.packageFilename)) if self.p3dApplication: self.packageFullpath = Filename(self.packager.p3dInstallDir, self.packageFilename) @@ -1251,13 +1251,13 @@ class Packager: elf.close() return None - if not ident.startswith("\177ELF"): + if not ident.startswith(b"\177ELF"): # No elf magic! Beware of orcs. return None # Make sure we read in the correct endianness and integer size - byteOrder = "<>"[ord(ident[5]) - 1] - elfClass = ord(ident[4]) - 1 # 0 = 32-bits, 1 = 64-bits + byteOrder = "<>"[ord(ident[5:6]) - 1] + elfClass = ord(ident[4:5]) - 1 # 0 = 32-bits, 1 = 64-bits headerStruct = byteOrder + ("HHIIIIIHHHHHH", "HHIQQQIHHHHHH")[elfClass] sectionStruct = byteOrder + ("4xI8xIII8xI", "4xI16xQQI12xQ")[elfClass] dynamicStruct = byteOrder + ("iI", "qQ")[elfClass] @@ -1291,17 +1291,17 @@ class Packager: elf.seek(offset) data = elf.read(entsize) tag, val = struct.unpack_from(dynamicStruct, data) - newSectionData = "" + newSectionData = b"" startReplace = None pad = 0 # Read tags until we find a NULL tag. while tag != 0: if tag == 1: # A NEEDED entry. Read it from the string table. - filenames.append(stringTables[link][val : stringTables[link].find('\0', val)]) + filenames.append(stringTables[link][val : stringTables[link].find(b'\0', val)]) elif tag == 15 or tag == 29: - rpath += stringTables[link][val : stringTables[link].find('\0', val)].split(':') + rpath += stringTables[link][val : stringTables[link].find(b'\0', val)].split(b':') # An RPATH or RUNPATH entry. if not startReplace: startReplace = elf.tell() - entsize @@ -1315,7 +1315,7 @@ class Packager: tag, val = struct.unpack_from(dynamicStruct, data) if startReplace is not None: - newSectionData += data + ("\0" * pad) + newSectionData += data + (b"\0" * pad) rewriteSections.append((startReplace, newSectionData)) elf.close() @@ -1348,7 +1348,7 @@ class Packager: for offset, data in rewriteSections: elf.seek(offset) elf.write(data) - elf.write("\0" * pad) + elf.write(b"\0" * pad) elf.close() return filenames @@ -2486,7 +2486,7 @@ class Packager: if not os.path.isfile('/sbin/ldconfig'): return False - handle = subprocess.Popen(['/sbin/ldconfig', '-p'], stdout=subprocess.PIPE) + handle = subprocess.Popen(['/sbin/ldconfig', '-p'], stdout=subprocess.PIPE, universal_newlines=True) out, err = handle.communicate() if handle.returncode != 0: @@ -3069,7 +3069,7 @@ class Packager: tuples = [] for package in packages: version = self.__makeVersionTuple(package.version) - tuples.append((version, file)) + tuples.append((version, package)) tuples.sort(reverse = True) return [t[1] for t in tuples] @@ -3082,7 +3082,7 @@ class Packager: tuples = [] for package in packages: version = self.__makeVersionTuple(package.packageVersion) - tuples.append((version, file)) + tuples.append((version, package)) tuples.sort(reverse = True) return [t[1] for t in tuples] @@ -3141,9 +3141,9 @@ class Packager: if panda1.version == panda2.version: return True - print 'Rejecting package %s, version "%s": depends on %s, version "%s" instead of version "%s"' % ( + print('Rejecting package %s, version "%s": depends on %s, version "%s" instead of version "%s"' % ( package.packageName, package.version, - panda1.packageName, panda1.version, panda2.version) + panda1.packageName, panda1.version, panda2.version)) return False def __findPackageInRequires(self, packageName, list): diff --git a/direct/src/p3d/coreapi.pdef b/direct/src/p3d/coreapi.pdef index bf066e5d51..03612be605 100644 --- a/direct/src/p3d/coreapi.pdef +++ b/direct/src/p3d/coreapi.pdef @@ -66,7 +66,7 @@ class images(package): token = '%s_img' % (name) configDict[token] = basename else: - print "Could not locate %s" % (filename) + print("Could not locate %s" % (filename)) # Also make a few special cases. We use the same default image # for many of the states. diff --git a/direct/src/p3d/ppackage.py b/direct/src/p3d/ppackage.py index dc00bdc567..4cb02eae80 100755 --- a/direct/src/p3d/ppackage.py +++ b/direct/src/p3d/ppackage.py @@ -139,12 +139,12 @@ from direct.p3d import Packager from panda3d.core import * def usage(code, msg = ''): - print >> sys.stderr, usageText % { + sys.stderr.write(usageText % { 'version' : PandaSystem.getPackageVersionString(), 'host' : PandaSystem.getPackageHostUrl(), 'prog' : os.path.split(sys.argv[0])[1] - } - print >> sys.stderr, msg + }) + sys.stderr.write(msg + '\n') sys.exit(code) installDir = None @@ -161,7 +161,7 @@ platforms = [] try: opts, args = getopt.getopt(sys.argv[1:], 'i:ps:S:DuP:R:Ha:hv') -except getopt.error, msg: +except getopt.error as msg: usage(1, msg) for opt, arg in opts: @@ -199,7 +199,7 @@ for opt, arg in opts: elif opt == '-h': usage(0) else: - print 'illegal option: ' + arg + print('illegal option: ' + arg) sys.exit(1) if not args: @@ -220,7 +220,7 @@ else: if universalBinaries: if platforms: - print '\nYou may not specify both -u and -P.\n' + print('\nYou may not specify both -u and -P.\n') sys.exit(1) if PandaSystem.getPlatform().startswith('osx_'): platforms = ['osx_i386', 'osx_amd64'] @@ -251,7 +251,7 @@ for platform in platforms: except Packager.PackagerError: # Just print the error message and exit gracefully. inst = sys.exc_info()[1] - print inst.args[0] + print(inst.args[0]) sys.exit(1) # An explicit call to exit() is required to exit the program, when diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index e3be05bfc8..88a7131470 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -54,16 +54,26 @@ P3DPythonRun(const char *program_name, const char *archive_file, _interactive_console = interactive_console; if (program_name != NULL) { +#if PY_MAJOR_VERSION >= 3 + // Python 3 case: we have to convert it to a wstring. + TextEncoder enc; + enc.set_text(program_name); + _program_name = enc.get_wtext(); +#else + // Python 2 is happy with a regular string. _program_name = program_name; +#endif } if (archive_file != NULL) { _archive_file = Filename::from_os_specific(archive_file); } _py_argc = 1; - _py_argv = (char **)malloc(2 * sizeof(char *)); - +#if PY_MAJOR_VERSION >= 3 + _py_argv[0] = (wchar_t *)_program_name.c_str(); +#else _py_argv[0] = (char *)_program_name.c_str(); +#endif _py_argv[1] = NULL; #ifdef NDEBUG @@ -78,7 +88,11 @@ P3DPythonRun(const char *program_name, const char *archive_file, // Initialize Python. It appears to be important to do this before // we open the pipe streams and spawn the thread, below. +#if PY_MAJOR_VERSION >= 3 + Py_SetProgramName((wchar_t *)_program_name.c_str()); +#else Py_SetProgramName((char *)_program_name.c_str()); +#endif Py_Initialize(); PyEval_InitThreads(); PySys_SetArgv(_py_argc, _py_argv); @@ -290,7 +304,20 @@ run_python() { "Send an asynchronous request to the plugin host" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; + +#if PY_MAJOR_VERSION >= 3 + static PyModuleDef p3dpython_module = { + PyModuleDef_HEAD_INIT, + "p3dpython", + NULL, + -1, + p3dpython_methods, + NULL, NULL, NULL, NULL + }; + PyObject *p3dpython = PyModule_Create(&p3dpython_module); +#else PyObject *p3dpython = Py_InitModule("p3dpython", p3dpython_methods); +#endif if (p3dpython == NULL) { PyErr_Print(); return false; @@ -644,8 +671,11 @@ handle_pyobj_command(TiXmlElement *xcommand, bool needs_response, result = PyBool_FromLong(PyObject_IsTrue(obj)); } else if (strcmp(method_name, "__int__") == 0) { +#if PY_MAJOR_VERSION >= 3 + result = PyNumber_Long(obj); +#else result = PyNumber_Int(obj); - +#endif } else if (strcmp(method_name, "__float__") == 0) { result = PyNumber_Float(obj); @@ -1510,10 +1540,12 @@ pyobj_to_xml(PyObject *value) { xvalue->SetAttribute("type", "bool"); xvalue->SetAttribute("value", PyObject_IsTrue(value)); +#if PY_MAJOR_VERSION < 3 } else if (PyInt_Check(value)) { // A plain integer value. xvalue->SetAttribute("type", "int"); xvalue->SetAttribute("value", PyInt_AsLong(value)); +#endif } else if (PyLong_Check(value)) { // A long integer value. This gets converted either as an integer @@ -1535,9 +1567,21 @@ pyobj_to_xml(PyObject *value) { xvalue->SetAttribute("type", "float"); xvalue->SetDoubleAttribute("value", PyFloat_AsDouble(value)); + } else if (PyUnicode_Check(value)) { // A unicode value. Convert to utf-8 for the XML encoding. xvalue->SetAttribute("type", "string"); + +#if PY_MAJOR_VERSION >= 3 + // In Python 3, there are only unicode strings, and there is a + // handy function for getting the UTF-8 encoded version. + Py_ssize_t length = 0; + char *buffer = PyUnicode_AsUTF8AndSize(value, &length); + if (buffer != NULL) { + string str(buffer, length); + xvalue->SetAttribute("value", str); + } +#else PyObject *as_str = PyUnicode_AsUTF8String(value); if (as_str != NULL) { char *buffer; @@ -1571,6 +1615,7 @@ pyobj_to_xml(PyObject *value) { } Py_DECREF(ustr); } +#endif // PY_MAJOR_VERSION } else if (PyTuple_Check(value)) { // An immutable sequence. Pass it as a concrete. @@ -1609,7 +1654,11 @@ pyobj_to_xml(PyObject *value) { PyObject *as_str; if (PyUnicode_Check(a)) { // The key is a unicode value. +#if PY_MAJOR_VERSION >= 3 + as_str = a; +#else as_str = PyUnicode_AsUTF8String(a); +#endif } else { // The key is a string value or something else. Make it // a string. @@ -1617,7 +1666,12 @@ pyobj_to_xml(PyObject *value) { } char *buffer; Py_ssize_t length; +#if PY_MAJOR_VERSION >= 3 + buffer = PyUnicode_AsUTF8AndSize(as_str, &length); + if (buffer != NULL) { +#else if (PyString_AsStringAndSize(as_str, &buffer, &length) != -1) { +#endif string str(buffer, length); xitem->SetAttribute("key", str); } @@ -1702,7 +1756,11 @@ xml_to_pyobj(TiXmlElement *xvalue) { } else if (strcmp(type, "int") == 0) { int value; if (xvalue->QueryIntAttribute("value", &value) == TIXML_SUCCESS) { +#if PY_MAJOR_VERSION >= 3 + return PyLong_FromLong(value); +#else return PyInt_FromLong(value); +#endif } } else if (strcmp(type, "float") == 0) { diff --git a/direct/src/plugin/p3dPythonRun.h b/direct/src/plugin/p3dPythonRun.h index 1f52c5eeb1..974b27684e 100644 --- a/direct/src/plugin/p3dPythonRun.h +++ b/direct/src/plugin/p3dPythonRun.h @@ -159,10 +159,15 @@ private: int _session_id; - string _program_name; Filename _archive_file; int _py_argc; - char **_py_argv; +#if PY_MAJOR_VERSION >= 3 + wchar_t *_py_argv[2]; + wstring _program_name; +#else + char *_py_argv[2]; + string _program_name; +#endif bool _interactive_console; PyObject *_runner; diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index 781caf9588..871cf403a2 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -8,7 +8,7 @@ import marshal import imp import platform import types -from distutils.sysconfig import PREFIX, get_python_inc, get_python_version +from distutils.sysconfig import PREFIX, get_python_inc, get_python_version, get_config_var # Temporary (?) try..except to protect against unbuilt p3extend_frozen. try: @@ -63,7 +63,7 @@ class CompilationEnvironment: # Paths to Python stuff. self.Python = None self.PythonIPath = get_python_inc() - self.PythonVersion = get_python_version() + self.PythonVersion = get_config_var("LDVERSION") or get_python_version() # The VC directory of Microsoft Visual Studio (if relevant) self.MSVC = None @@ -970,7 +970,7 @@ class Freezer: stuff = ("", "rb", imp.PY_COMPILED) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) else: - fp = open(pathname, modulefinder.READ_MODE) + fp = open(pathname, 'U') stuff = ("", "r", imp.PY_SOURCE) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) @@ -1062,7 +1062,7 @@ class Freezer: def __addPyc(self, multifile, filename, code, compressionLevel): if code: - data = imp.get_magic() + '\0\0\0\0' + \ + data = imp.get_magic() + b'\0\0\0\0' + \ marshal.dumps(code) stream = StringStream(data) @@ -1341,7 +1341,10 @@ class Freezer: for i in range(0, len(code), 16): result += '\n ' for c in code[i:i+16]: - result += ('%d,' % ord(c)) + if isinstance(c, int): # Python 3 + result += ('%d,' % c) + else: # Python 2 + result += ('%d,' % ord(c)) result += '\n};\n' return result diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 30de3f1552..28acd9b1f8 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -3271,6 +3271,7 @@ IGATEFILES=GetDirectoryContents('panda/src/downloader', ["*.h", "*_composite*.cx TargetAdd('libp3downloader.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3downloader.in', opts=['IMOD:panda3d.core', 'ILIB:libp3downloader', 'SRCDIR:panda/src/downloader']) TargetAdd('libp3downloader_igate.obj', input='libp3downloader.in', opts=["DEPENDENCYONLY"]) +TargetAdd('p3downloader_stringStream_ext.obj', opts=OPTS, input='stringStream_ext.cxx') # # DIRECTORY: panda/metalibs/pandaexpress/ @@ -3905,6 +3906,7 @@ if (not RUNTIME): TargetAdd('core_module.obj', opts=['IMOD:panda3d._core', 'ILIB:_core']) TargetAdd('_core.pyd', input='libp3downloader_igate.obj') + TargetAdd('_core.pyd', input='p3downloader_stringStream_ext.obj') TargetAdd('_core.pyd', input='p3express_ext_composite.obj') TargetAdd('_core.pyd', input='libp3express_igate.obj') diff --git a/panda/src/downloader/stringStream.h b/panda/src/downloader/stringStream.h index d90314c46e..fd3f2ad6bc 100644 --- a/panda/src/downloader/stringStream.h +++ b/panda/src/downloader/stringStream.h @@ -17,29 +17,43 @@ #include "pandabase.h" #include "stringStreamBuf.h" +#include "extension.h" //////////////////////////////////////////////////////////////////// // Class : StringStream // Description : A bi-directional stream object that reads and writes // data to an internal buffer, which can be retrieved -// and/or set as a string. +// and/or set as a string in Python 2 or a bytes object +// in Python 3. //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS StringStream : public iostream { -PUBLISHED: - INLINE StringStream(); +public: INLINE StringStream(const string &source); +PUBLISHED: + EXTENSION(StringStream(PyObject *source)); + INLINE StringStream(); + INLINE void clear_data(); INLINE size_t get_data_size(); - INLINE string get_data(); - INLINE void set_data(const string &data); + EXTENSION(PyObject *get_data()); + EXTENSION(void set_data(PyObject *data)); + + MAKE_PROPERTY(data, get_data, set_data); public: +#ifndef CPPPARSER + INLINE string get_data(); + INLINE void set_data(const string &data); +#endif + INLINE void swap_data(pvector &data); private: StringStreamBuf _buf; + + friend class Extension; }; #include "stringStream.I" diff --git a/panda/src/downloader/stringStream_ext.cxx b/panda/src/downloader/stringStream_ext.cxx new file mode 100644 index 0000000000..84343420a2 --- /dev/null +++ b/panda/src/downloader/stringStream_ext.cxx @@ -0,0 +1,99 @@ +// Filename: stringStream_ext.cxx +// Created by: rdb (09Dec13) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "stringStream_ext.h" + +#ifdef HAVE_PYTHON + +//////////////////////////////////////////////////////////////////// +// Function: StringStream::__init__ +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +void Extension:: +__init__(PyObject *source) { + set_data(source); +} + +//////////////////////////////////////////////////////////////////// +// Function: StringStream::get_data +// Access: Published +// Description: Returns the contents of the data stream as a string. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +get_data() { + _this->flush(); + const pvector &data = _this->_buf.get_data(); + if (!data.empty()) { +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize((char *)&data[0], data.size()); +#else + return PyString_FromStringAndSize((char *)&data[0], data.size()); +#endif + } +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize("", 0); +#else + return PyString_FromStringAndSize("", 0); +#endif +} + +//////////////////////////////////////////////////////////////////// +// Function: StringStream::set_data +// Access: Published +// Description: Replaces the contents of the data stream. This +// implicitly reseeks to 0. +//////////////////////////////////////////////////////////////////// +void Extension:: +set_data(PyObject *data) { + _this->_buf.clear(); + + if (data == NULL) { + return; + } + +#if PY_VERSION_HEX >= 0x02060000 + if (PyObject_CheckBuffer(data)) { + Py_buffer view; + if (PyObject_GetBuffer(data, &view, PyBUF_CONTIG_RO) == -1) { + PyErr_SetString(PyExc_TypeError, + "StringStream requires a contiguous buffer"); + return; + } + pvector pv; + pv.insert(pv.end(), (const unsigned char *)view.buf, (const unsigned char *)view.buf + view.len); + _this->_buf.swap_data(pv); + PyBuffer_Release(&view); + return; + } +#endif + +#if PY_MAJOR_VERSION < 3 + if (PyString_Check(data)) { + char *buffer; + Py_ssize_t length; + if (PyString_AsStringAndSize(data, &buffer, &length) != -1) { + pvector pv; + pv.insert(pv.end(), (const unsigned char *)buffer, (const unsigned char *)buffer + length); + _this->_buf.swap_data(pv); + } + return; + } +#endif + + PyErr_SetString(PyExc_TypeError, + "StringStream requires a bytes or buffer object"); +} + +#endif diff --git a/panda/src/downloader/stringStream_ext.h b/panda/src/downloader/stringStream_ext.h new file mode 100644 index 0000000000..200a9c25c9 --- /dev/null +++ b/panda/src/downloader/stringStream_ext.h @@ -0,0 +1,43 @@ +// Filename: stringStream_ext.h +// Created by: rdb (06Aug15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef STRINGSTREAM_EXT_H +#define STRINGSTREAM_EXT_H + +#include "dtoolbase.h" + +#ifdef HAVE_PYTHON + +#include "extension.h" +#include "stringStream.h" +#include "py_panda.h" + +//////////////////////////////////////////////////////////////////// +// Class : Extension +// Description : This class defines the extension methods for +// StringStream, which are called instead of +// any C++ methods with the same prototype. +//////////////////////////////////////////////////////////////////// +template<> +class Extension : public ExtensionBase { +public: + void __init__(PyObject *source); + + PyObject *get_data(); + void set_data(PyObject *data); +}; + +#endif // HAVE_PYTHON + +#endif // STRINGSTREAM_EXT_H From bff070430efc1f2bf2a9dcfc5128322fcf9fa6b6 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 8 Aug 2015 20:52:47 +0200 Subject: [PATCH 059/200] Fix some aliasing warnings --- direct/src/directbase/ppython.cxx | 2 +- panda/src/gobj/geomPrimitive.cxx | 4 ++-- panda/src/gobj/geomPrimitive.h | 2 +- panda/src/gobj/shader.I | 4 ++-- panda/src/gobj/shader.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/direct/src/directbase/ppython.cxx b/direct/src/directbase/ppython.cxx index 4d673d96b6..65f1272c8a 100644 --- a/direct/src/directbase/ppython.cxx +++ b/direct/src/directbase/ppython.cxx @@ -36,7 +36,7 @@ int main(int argc, char *mb_argv[]) { size_t len = mbstowcs(NULL, mb_argv[i], 0); argv[i] = new wchar_t[len + 1]; mbstowcs(argv[i], mb_argv[i], len); - argv[i][len] = NULL; + argv[i][len] = 0; } // Just for good measure argv[argc] = NULL; diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 80408a18c5..797ea9e1c8 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -1398,9 +1398,9 @@ modify_ends() { // you do, be sure you know what you are doing! //////////////////////////////////////////////////////////////////// void GeomPrimitive:: -set_ends(CPTA_int ends) { +set_ends(PTA_int ends) { CDWriter cdata(_cycler, true); - cdata->_ends = (PTA_int &)ends; + cdata->_ends = ends; cdata->_modified = Geom::get_next_modified(); cdata->_got_minmax = false; diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index da787edad7..d2a2f4cbd1 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -169,7 +169,7 @@ PUBLISHED: INLINE CPTA_int get_ends() const; PTA_int modify_ends(); - void set_ends(CPTA_int ends); + void set_ends(PTA_int ends); INLINE CPT(GeomVertexArrayData) get_mins() const; INLINE CPT(GeomVertexArrayData) get_maxs() const; diff --git a/panda/src/gobj/shader.I b/panda/src/gobj/shader.I index eccb05d79f..0dae6344dd 100644 --- a/panda/src/gobj/shader.I +++ b/panda/src/gobj/shader.I @@ -20,7 +20,7 @@ // type. //////////////////////////////////////////////////////////////////// INLINE Filename Shader:: -get_filename(const ShaderType &type) const { +get_filename(ShaderType type) const { if (_filename._separate && type != ST_none) { switch (type) { case ST_vertex: @@ -59,7 +59,7 @@ get_filename(const ShaderType &type) const { // Description: Return the Shader's text for the given shader type. //////////////////////////////////////////////////////////////////// INLINE const string &Shader:: -get_text(const ShaderType &type) const { +get_text(ShaderType type) const { if (_text._separate) { nassertr(type != ST_none || !_text._shared.empty(), _text._shared); switch (type) { diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 0c2fb79401..c0c31afaae 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -97,8 +97,8 @@ PUBLISHED: const string &tess_evaluation = ""); static PT(Shader) make_compute(ShaderLanguage lang, const string &body); - INLINE Filename get_filename(const ShaderType &type = ST_none) const; - INLINE const string &get_text(const ShaderType &type = ST_none) const; + INLINE Filename get_filename(ShaderType type = ST_none) const; + INLINE const string &get_text(ShaderType type = ST_none) const; INLINE bool get_error_flag() const; INLINE ShaderLanguage get_language() const; From 8a8cc94cbb75616080760cca4fd3d31ba7cfedf7 Mon Sep 17 00:00:00 2001 From: tobspr Date: Sat, 8 Aug 2015 20:24:23 +0200 Subject: [PATCH 060/200] Add setters to BoundingBox and BoundingSphere --- panda/src/mathutil/boundingBox.I | 14 ++++++++++++++ panda/src/mathutil/boundingBox.h | 3 +++ panda/src/mathutil/boundingSphere.I | 25 +++++++++++++++++++++++-- panda/src/mathutil/boundingSphere.h | 4 ++++ 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/panda/src/mathutil/boundingBox.I b/panda/src/mathutil/boundingBox.I index 2b595b5794..9887d75860 100644 --- a/panda/src/mathutil/boundingBox.I +++ b/panda/src/mathutil/boundingBox.I @@ -114,3 +114,17 @@ get_plane(int n) const { get_point(plane_def[n][1]), get_point(plane_def[n][2])); } + +//////////////////////////////////////////////////////////////////// +// Function: BoundingBox::set_min_max +// Access: Published +// Description: Sets the min and max point of the rectangular solid. +//////////////////////////////////////////////////////////////////// +INLINE_MATHUTIL void BoundingBox:: +set_min_max(const LPoint3 &min, const LPoint3 &max) { + nassertv(!min.is_nan() && !max.is_nan()); + nassertv(_min[0] <= _max[0] && _min[1] <= _max[1] && _min[2] <= _max[2]); + _min = min; + _max = max; + _flags = 0; +} diff --git a/panda/src/mathutil/boundingBox.h b/panda/src/mathutil/boundingBox.h index d816e69a58..8d76955e8e 100644 --- a/panda/src/mathutil/boundingBox.h +++ b/panda/src/mathutil/boundingBox.h @@ -46,6 +46,7 @@ public: virtual void output(ostream &out) const; + PUBLISHED: INLINE_MATHUTIL int get_num_points() const; INLINE_MATHUTIL LPoint3 get_point(int n) const; @@ -54,6 +55,8 @@ PUBLISHED: INLINE_MATHUTIL LPlane get_plane(int n) const; MAKE_SEQ(get_planes, get_num_planes, get_plane); + INLINE_MATHUTIL void set_min_max(const LPoint3 &min, const LPoint3 &max); + public: // Inline accessors for speed. INLINE_MATHUTIL const LPoint3 &get_minq() const; diff --git a/panda/src/mathutil/boundingSphere.I b/panda/src/mathutil/boundingSphere.I index c42c7a40e4..708753ec3d 100644 --- a/panda/src/mathutil/boundingSphere.I +++ b/panda/src/mathutil/boundingSphere.I @@ -19,7 +19,7 @@ // Description: Constructs an empty sphere. //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL BoundingSphere:: -BoundingSphere() { +BoundingSphere() : _center(0) { } //////////////////////////////////////////////////////////////////// @@ -44,7 +44,6 @@ BoundingSphere(const LPoint3 ¢er, PN_stdfloat radius) : //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL LPoint3 BoundingSphere:: get_center() const { - nassertr(!is_empty(), LPoint3::zero()); nassertr(!is_infinite(), LPoint3::zero()); return _center; } @@ -61,3 +60,25 @@ get_radius() const { return _radius; } +//////////////////////////////////////////////////////////////////// +// Function: BoundingSphere::set_center +// Access: Published +// Description: Sets the center point of the sphere. +//////////////////////////////////////////////////////////////////// +INLINE_MATHUTIL void BoundingSphere:: +set_center(const LPoint3 ¢er) { + nassertv(!center.is_nan()); + _center = center; +} + +//////////////////////////////////////////////////////////////////// +// Function: BoundingSphere::set_radius +// Access: Published +// Description: Sets the radius of the sphere. +//////////////////////////////////////////////////////////////////// +INLINE_MATHUTIL void BoundingSphere:: +set_radius(PN_stdfloat radius) { + nassertv(!cnan(radius)); + _radius = radius; + _flags = 0; +} diff --git a/panda/src/mathutil/boundingSphere.h b/panda/src/mathutil/boundingSphere.h index d5b8854763..26e78209cb 100644 --- a/panda/src/mathutil/boundingSphere.h +++ b/panda/src/mathutil/boundingSphere.h @@ -47,6 +47,10 @@ PUBLISHED: INLINE_MATHUTIL LPoint3 get_center() const; INLINE_MATHUTIL PN_stdfloat get_radius() const; + INLINE_MATHUTIL void set_center(const LPoint3 ¢er); + INLINE_MATHUTIL void set_radius(PN_stdfloat radius); + + public: virtual const BoundingSphere *as_bounding_sphere() const; From 85e3d2ee3a2112eed8245e2ed58ff32899bade1a Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Aug 2015 13:10:20 +0200 Subject: [PATCH 061/200] Don't override host URL when building CMU runtime distribution --- makepanda/makepanda.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index ca941bfdde..f72103f017 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -460,9 +460,8 @@ SdkAutoDisableMax() SdkAutoDisablePhysX() SdkAutoDisableSpeedTree() -if (RTDIST and DISTRIBUTOR == "cmu"): - HOST_URL = "https://runtime.panda3d.org/" - +if RTDIST and DISTRIBUTOR == "cmu": + # Some validation checks for the CMU builds. if (RTDIST_VERSION == "cmu_1.7" and SDK["PYTHONVERSION"] != "python2.6"): exit("The CMU 1.7 runtime distribution must be built against Python 2.6!") elif (RTDIST_VERSION == "cmu_1.8" and SDK["PYTHONVERSION"] != "python2.7"): @@ -470,7 +469,7 @@ if (RTDIST and DISTRIBUTOR == "cmu"): elif (RTDIST_VERSION == "cmu_1.9" and SDK["PYTHONVERSION"] != "python2.7"): exit("The CMU 1.9 runtime distribution must be built against Python 2.7!") -elif RTDIST and not HOST_URL: +if RTDIST and not HOST_URL: exit("You must specify a host URL when building the rtdist!") if RUNTIME and not HOST_URL: From 5bf0d44735657a283c391a45b278f6f538643a75 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Aug 2015 15:59:00 +0200 Subject: [PATCH 062/200] Fix linker issue on Windows --- panda/src/downloader/stringStream.I | 6 ++---- panda/src/downloader/stringStream.cxx | 14 ++++++++++++++ panda/src/downloader/stringStream.h | 2 +- panda/src/downloader/stringStream_ext.cxx | 8 ++------ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/panda/src/downloader/stringStream.I b/panda/src/downloader/stringStream.I index fe58ee15e5..66481c69ee 100644 --- a/panda/src/downloader/stringStream.I +++ b/panda/src/downloader/stringStream.I @@ -16,7 +16,7 @@ //////////////////////////////////////////////////////////////////// // Function: StringStream::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StringStream:: StringStream() : iostream(&_buf) { @@ -80,9 +80,7 @@ INLINE void StringStream:: set_data(const string &data) { _buf.clear(); if (!data.empty()) { - pvector pv; - pv.insert(pv.end(), (const unsigned char *)&data[0], (const unsigned char *)&data[0] + data.size()); - _buf.swap_data(pv); + set_data((const unsigned char *)data.data(), data.size()); } } diff --git a/panda/src/downloader/stringStream.cxx b/panda/src/downloader/stringStream.cxx index bc9f764bf2..a15172ea08 100644 --- a/panda/src/downloader/stringStream.cxx +++ b/panda/src/downloader/stringStream.cxx @@ -13,3 +13,17 @@ //////////////////////////////////////////////////////////////////// #include "stringStream.h" + +//////////////////////////////////////////////////////////////////// +// Function: StringStream::set_data +// Access: Public +// Description: Replaces the contents of the data stream. This +// implicitly reseeks to 0. +//////////////////////////////////////////////////////////////////// +void StringStream:: +set_data(const unsigned char *data, size_t size) { + _buf.clear(); + pvector pv; + pv.insert(pv.end(), data, data + size); + _buf.swap_data(pv); +} diff --git a/panda/src/downloader/stringStream.h b/panda/src/downloader/stringStream.h index fd3f2ad6bc..cc295e5357 100644 --- a/panda/src/downloader/stringStream.h +++ b/panda/src/downloader/stringStream.h @@ -46,6 +46,7 @@ public: #ifndef CPPPARSER INLINE string get_data(); INLINE void set_data(const string &data); + void set_data(const unsigned char *data, size_t size); #endif INLINE void swap_data(pvector &data); @@ -59,4 +60,3 @@ private: #include "stringStream.I" #endif - diff --git a/panda/src/downloader/stringStream_ext.cxx b/panda/src/downloader/stringStream_ext.cxx index 84343420a2..a1c46d6cef 100644 --- a/panda/src/downloader/stringStream_ext.cxx +++ b/panda/src/downloader/stringStream_ext.cxx @@ -71,9 +71,7 @@ set_data(PyObject *data) { "StringStream requires a contiguous buffer"); return; } - pvector pv; - pv.insert(pv.end(), (const unsigned char *)view.buf, (const unsigned char *)view.buf + view.len); - _this->_buf.swap_data(pv); + _this->set_data((const unsigned char *)view.buf, view.len); PyBuffer_Release(&view); return; } @@ -84,9 +82,7 @@ set_data(PyObject *data) { char *buffer; Py_ssize_t length; if (PyString_AsStringAndSize(data, &buffer, &length) != -1) { - pvector pv; - pv.insert(pv.end(), (const unsigned char *)buffer, (const unsigned char *)buffer + length); - _this->_buf.swap_data(pv); + _this->set_data((const unsigned char *)buffer, (size_t)length); } return; } From 9dc1a0cbad748599950c7fc047dc004e99d0e7a4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Aug 2015 19:07:24 +0200 Subject: [PATCH 063/200] Backward compatibility hack so that older runtime versions will still be able to use 1.9 rtdist --- direct/src/plugin/p3dInstanceManager.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/direct/src/plugin/p3dInstanceManager.cxx b/direct/src/plugin/p3dInstanceManager.cxx index b5536b8836..793e6cf36e 100644 --- a/direct/src/plugin/p3dInstanceManager.cxx +++ b/direct/src/plugin/p3dInstanceManager.cxx @@ -258,14 +258,22 @@ initialize(int api_version, const string &contents_filename, // TODO: Linux multiplatform support. Just add the // appropriate platform strings to _supported_platforms. + } else { + nout << "Platform string was set by plugin to " << _platform << "\n"; } if (_supported_platforms.empty()) { + // Hack for older plug-ins, which should still remain compatible with + // newer versions of the runtime distribution. + if (_platform == "win32") { + _supported_platforms.push_back("win_i386"); + } + // We always support at least the specific platform on which we're // running. _supported_platforms.push_back(_platform); } - + #ifdef P3D_PLUGIN_LOG_DIRECTORY if (_log_directory.empty()) { _log_directory = P3D_PLUGIN_LOG_DIRECTORY; From 1e870b3c1c32893c11d00409e89575067906df0c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Aug 2015 22:16:59 +0200 Subject: [PATCH 064/200] Automatically create win32 alias for coreapi package for backward compatibility with older runtimes --- direct/src/p3d/Packager.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 36883ceb52..d0c009a206 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -16,6 +16,7 @@ import getpass import platform import struct import subprocess +import copy from direct.p3d.FileSpec import FileSpec from direct.p3d.SeqValue import SeqValue from direct.showbase import Loader @@ -839,6 +840,14 @@ class Packager: self.packager.contents[pe.getKey()] = pe self.packager.contentsChanged = True + # Hack for coreapi package, to preserve backward compatibility + # with old versions of the runtime, which still called the + # 32-bit Windows platform "win32". + if self.packageName == "coreapi" and self.platform == "win_i386": + pe2 = copy.copy(pe) + pe2.platform = "win32" + self.packager.contents[pe2.getKey()] = pe2 + self.cleanup() return True From 369305c529572f8936d59f57a028e8305de6c3dd Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Aug 2015 22:26:25 +0200 Subject: [PATCH 065/200] Prevent having to relink most of pandatool when version info changes --- pandatool/src/progbase/programBase.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandatool/src/progbase/programBase.cxx b/pandatool/src/progbase/programBase.cxx index 94bcb0e13b..a9b7c666bf 100644 --- a/pandatool/src/progbase/programBase.cxx +++ b/pandatool/src/progbase/programBase.cxx @@ -27,7 +27,7 @@ #include "configVariableBool.h" #include "panda_getopt_long.h" #include "preprocess_argv.h" -#include "pandaVersion.h" +#include "pandaSystem.h" #include #include @@ -222,7 +222,8 @@ write_man_page(ostream &out) { } } - out << " 1 \"" << date_str << "\" \"" PANDA_VERSION_STR "\" Panda3D\n"; + out << " 1 \"" << date_str << "\" \"" + << PandaSystem::get_version_string() << "\" Panda3D\n"; out << ".SH NAME\n"; if (_brief.empty()) { From 12af94707fe4ab7e55f0e52ed262f6b45aeec5ed Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 01:53:16 +0200 Subject: [PATCH 066/200] Fix cloggage of the pipe communicating with the forked X11 splash window subprocess --- direct/src/plugin/p3dX11SplashWindow.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index f1afc5a15b..513458521e 100644 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -681,10 +681,13 @@ subprocess_run() { } } - if (input_ready) { + do { + // Empty the pipe of whatever is in it. receive_command(); - } + input_ready = _pipe_read.has_gdata(); + } while (input_ready); + // Sleep a good amount in order not to lock up the system. struct timespec req; req.tv_sec = 0; req.tv_nsec = 50000000; // 50 ms From 2abc51d88faa17ccb6d0e805522993ba01da60b1 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 01:57:00 +0200 Subject: [PATCH 067/200] Allow specifying contents of .py modules with file(text=...) in pdef --- direct/src/p3d/Packager.py | 5 ++++- direct/src/showutil/FreezeTool.py | 20 +++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index d0c009a206..40c30d8485 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -1841,7 +1841,10 @@ class Packager: self.notify.warning(message) return - self.freezer.addModule(moduleName, filename = file.filename) + if file.text: + self.freezer.addModule(moduleName, filename = file.filename, text = file.text) + else: + self.freezer.addModule(moduleName, filename = file.filename) def addEggFile(self, file): # Precompile egg files to bam's. diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index 28c622a9be..68a6eff60a 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -8,6 +8,7 @@ import marshal import imp import platform import types +from StringIO import StringIO from distutils.sysconfig import PREFIX, get_python_inc, get_python_version # Temporary (?) try..except to protect against unbuilt p3extend_frozen. @@ -499,7 +500,8 @@ class Freezer: def __init__(self, moduleName, filename = None, implicit = False, guess = False, exclude = False, forbid = False, - allowChildren = False, fromSource = None): + allowChildren = False, fromSource = None, + text = None): # The Python module name. self.moduleName = moduleName @@ -534,6 +536,9 @@ class Freezer: # record came from, supplied by the caller. self.fromSource = fromSource + # If this is set, it contains Python code of the module. + self.text = text + # Some sanity checks. if not self.exclude: self.allowChildren = True @@ -750,7 +755,8 @@ class Freezer: return modules def addModule(self, moduleName, implicit = False, newName = None, - filename = None, guess = False, fromSource = None): + filename = None, guess = False, fromSource = None, + text = None): """ Adds a module to the list of modules to be exported by this tool. If implicit is true, it is OK if the module does not actually exist. @@ -806,7 +812,7 @@ class Freezer: # It's actually a regular module. self.modules[newParentName] = self.ModuleDef( parentName, implicit = implicit, guess = guess, - fromSource = fromSource) + fromSource = fromSource, text = text) else: # Now get all the py files in the parent directory. @@ -821,7 +827,7 @@ class Freezer: # A normal, explicit module name. self.modules[newName] = self.ModuleDef( moduleName, filename = filename, implicit = implicit, - guess = guess, fromSource = fromSource) + guess = guess, fromSource = fromSource, text = text) def done(self, compileToExe = False): """ Call this method after you have added all modules with @@ -972,7 +978,11 @@ class Freezer: stuff = ("", "rb", imp.PY_COMPILED) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) else: - fp = open(pathname, modulefinder.READ_MODE) + fp = open(pathname, 'U') + if mdef.text: + fp = StringIO(mdef.text) + else: + fp = open(pathname, modulefinder.READ_MODE) stuff = ("", "r", imp.PY_SOURCE) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) From 03e377091da4e8d2712ce4cdfb3b28c6e189998a Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 02:01:52 +0200 Subject: [PATCH 068/200] Add in 'rocket' module for rocket package --- direct/src/p3d/panda3d.pdef | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/direct/src/p3d/panda3d.pdef b/direct/src/p3d/panda3d.pdef index 4f3df21c97..87a42eff2b 100644 --- a/direct/src/p3d/panda3d.pdef +++ b/direct/src/p3d/panda3d.pdef @@ -362,8 +362,16 @@ class rocket(package): config(display_name = "Panda3D libRocket support") require('panda3d') - module('panda3d.rocket', required = True) - module('_rocketcore', '_rocketcontrols') + file('rocket.py', extract = True, text = """ +from _rocketcore import * +try: + from _rocketcontrols import * +except ImportError: + pass +""") + + module('panda3d.rocket', '_rocketcore', required = True) + module('_rocketcontrols') file('libp3rocket.dll', required = True) class vrpn(package): From caf986fa2ab7de5e835b3b95f2a74cff8385c1b5 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 02:48:53 +0200 Subject: [PATCH 069/200] Fix uninitialized variable that would sometimes prevent mouse movement from being registered by libRocket --- panda/src/rocket/rocketInputHandler.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/rocket/rocketInputHandler.cxx b/panda/src/rocket/rocketInputHandler.cxx index 71ea099192..c0a4e22464 100644 --- a/panda/src/rocket/rocketInputHandler.cxx +++ b/panda/src/rocket/rocketInputHandler.cxx @@ -34,6 +34,8 @@ TypeHandle RocketInputHandler::_type_handle; RocketInputHandler:: RocketInputHandler(const string &name) : DataNode(name), + _mouse_xy(-1), + _mouse_xy_changed(false), _modifiers(0), _wheel_delta(0) { From d74f02819861183d163bc7580d87a62b12efa3d7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 04:00:41 +0200 Subject: [PATCH 070/200] Linux splash window shouldn't block waiting for pipe activity --- direct/src/plugin/p3dX11SplashWindow.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index 513458521e..76c0175a18 100644 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -681,11 +681,11 @@ subprocess_run() { } } - do { + while (input_ready) { // Empty the pipe of whatever is in it. receive_command(); input_ready = _pipe_read.has_gdata(); - } while (input_ready); + } // Sleep a good amount in order not to lock up the system. struct timespec req; From 3e6e355577740e120f51df6e4fa56d19bfb0d07c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Aug 2015 04:34:45 +0200 Subject: [PATCH 071/200] Fix error building rocket package on 1.9 branch --- direct/src/showutil/FreezeTool.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index 68a6eff60a..54f7c90429 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -978,11 +978,10 @@ class Freezer: stuff = ("", "rb", imp.PY_COMPILED) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) else: - fp = open(pathname, 'U') if mdef.text: fp = StringIO(mdef.text) else: - fp = open(pathname, modulefinder.READ_MODE) + fp = open(pathname, 'U') stuff = ("", "r", imp.PY_SOURCE) self.mf.load_module(mdef.moduleName, fp, pathname, stuff) From 888efc18afcdabe1855cb06522ed2232dfe0c211 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 11 Aug 2015 13:56:47 +0200 Subject: [PATCH 072/200] Avoid unnecessary glVertexAttribDivisor calls --- panda/src/glstuff/glShaderContext_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 2a67e0ba21..5df6c93871 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1425,7 +1425,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { GL_TRUE, stride, client_pointer); } - if (_glgsg->_supports_vertex_attrib_divisor) { + if (_glgsg->_supports_vertex_attrib_divisor && divisor > 0) { _glgsg->_glVertexAttribDivisor(p, divisor); _has_divisor = true; } From a24531ff7b8495e47bff4bd7cb0287e46cb95851 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 11 Aug 2015 15:45:27 +0200 Subject: [PATCH 073/200] Various GL tweaks --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 2 +- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 13 +++++-------- panda/src/glstuff/glGraphicsStateGuardian_src.h | 2 +- panda/src/glstuff/glmisc_src.cxx | 6 ++++++ panda/src/glstuff/glmisc_src.h | 1 + 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 78ecf91bb1..2d851775a5 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -1277,7 +1277,7 @@ open_buffer() { // Actually, let's always get a colour buffer for now until we // figure out why Intel HD Graphics cards complain otherwise. - if (_fb_properties.get_color_bits() == 0) { + if (gl_force_fbo_color && _fb_properties.get_color_bits() == 0) { _fb_properties.set_color_bits(1); } diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 0a40264eb0..1a2317760a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -11116,7 +11116,7 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) { gtc->_height = height; gtc->_depth = depth; - gtc->update_data_size_bytes(get_texture_memory_size(tex)); + gtc->update_data_size_bytes(get_texture_memory_size(gtc)); } nassertr(gtc->_has_storage, false); @@ -11665,7 +11665,8 @@ upload_simple_texture(CLP(TextureContext) *gtc) { // currently-selected texture). //////////////////////////////////////////////////////////////////// size_t CLP(GraphicsStateGuardian):: -get_texture_memory_size(Texture *tex) { +get_texture_memory_size(CLP(TextureContext) *gtc) { + Texture *tex = gtc->get_texture(); #ifdef OPENGLES // Texture querying not supported on OpenGL ES. int width = tex->get_x_size(); int height = tex->get_y_size(); @@ -11692,10 +11693,6 @@ get_texture_memory_size(Texture *tex) { return tex->get_expected_ram_image_size(); } - GLint minfilter; - glGetTexParameteriv(target, GL_TEXTURE_MIN_FILTER, &minfilter); - bool has_mipmaps = is_mipmap_filter(minfilter); - clear_my_gl_errors(); GLint internal_format; @@ -11755,7 +11752,7 @@ get_texture_memory_size(Texture *tex) { #endif // OPENGLES size_t result = num_bytes * width * height * depth * scale; - if (has_mipmaps) { + if (gtc->_uses_mipmaps) { result = (result * 4) / 3; } @@ -11770,7 +11767,7 @@ get_texture_memory_size(Texture *tex) { //////////////////////////////////////////////////////////////////// void CLP(GraphicsStateGuardian):: check_nonresident_texture(BufferContextChain &chain) { -#ifndef OPENGLES // Residency queries not supported by OpenGL ES. +#if defined(SUPPORT_FIXED_FUNCTION) && !defined(OPENGLES) // Residency queries not supported by OpenGL ES. size_t num_textures = chain.get_count(); if (num_textures == 0) { return; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 5272dfb771..ff8044d324 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -548,7 +548,7 @@ protected: Texture::CompressionMode image_compression); bool upload_simple_texture(CLP(TextureContext) *gtc); - size_t get_texture_memory_size(Texture *tex); + size_t get_texture_memory_size(CLP(TextureContext) *gtc); void check_nonresident_texture(BufferContextChain &chain); bool do_extract_texture_data(CLP(TextureContext) *gtc); bool extract_texture_image(PTA_uchar &image, size_t &page_size, diff --git a/panda/src/glstuff/glmisc_src.cxx b/panda/src/glstuff/glmisc_src.cxx index 743b9ca0ea..0d4e31ae96 100644 --- a/panda/src/glstuff/glmisc_src.cxx +++ b/panda/src/glstuff/glmisc_src.cxx @@ -187,6 +187,12 @@ ConfigVariableBool gl_force_depth_stencil ("gl-force-depth-stencil", false, PRC_DESC("Temporary hack variable 7x00 vs 8x00 nVidia bug. See glGraphicsStateGuardian_src.cxx.")); +ConfigVariableBool gl_force_fbo_color + ("gl-force-fbo-color", true, + PRC_DESC("This is set to true to force all FBOs to have at least one " + "color attachment. This is to work around an Intel driver " + "issue. Set to false to allow depth-only FBOs.")); + ConfigVariableBool gl_check_errors ("gl-check-errors", false, PRC_DESC("Regularly call glGetError() to check for OpenGL errors. " diff --git a/panda/src/glstuff/glmisc_src.h b/panda/src/glstuff/glmisc_src.h index 78a19a5a8f..538206ff11 100644 --- a/panda/src/glstuff/glmisc_src.h +++ b/panda/src/glstuff/glmisc_src.h @@ -65,6 +65,7 @@ extern ConfigVariableBool gl_debug_object_labels; extern ConfigVariableBool gl_debug_buffers; extern ConfigVariableBool gl_finish; extern ConfigVariableBool gl_force_depth_stencil; +extern ConfigVariableBool gl_force_fbo_color; extern ConfigVariableBool gl_check_errors; extern ConfigVariableBool gl_force_flush; extern ConfigVariableBool gl_separate_specular_color; From 9773fd79692b6733faf5ef9779ce8459af38c3da Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 11 Aug 2015 17:08:31 +0200 Subject: [PATCH 074/200] Support cube map arrays --- panda/src/display/graphicsStateGuardian.I | 10 ++++ panda/src/display/graphicsStateGuardian.cxx | 1 + panda/src/display/graphicsStateGuardian.h | 2 + .../glstuff/glGraphicsStateGuardian_src.cxx | 42 ++++++++++++--- panda/src/glstuff/glShaderContext_src.cxx | 24 +++++++++ panda/src/gobj/shader.cxx | 52 ++++++++++++++----- panda/src/gobj/shader.h | 6 ++- panda/src/gobj/texture.I | 32 ++++++++++++ panda/src/gobj/texture.cxx | 31 +++++++++-- panda/src/gobj/texture.h | 4 ++ 10 files changed, 179 insertions(+), 25 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 15b2b89b78..1646f4a741 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -495,6 +495,16 @@ get_supports_buffer_texture() const { return _supports_buffer_texture; } +//////////////////////////////////////////////////////////////////// +// Function: GraphicsStateGuardian::get_supports_cube_map_array +// Access: Published +// Description: Returns true if this GSG can render cube map arrays. +//////////////////////////////////////////////////////////////////// +INLINE bool GraphicsStateGuardian:: +get_supports_cube_map_array() const { + return _supports_cube_map_array; +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::get_supports_tex_non_pow2 // Access: Published diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 02ee982feb..fa17aa31da 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -198,6 +198,7 @@ GraphicsStateGuardian(CoordinateSystem internal_coordinate_system, _supports_2d_texture_array = false; _supports_cube_map = false; _supports_buffer_texture = false; + _supports_cube_map_array = false; _supports_tex_non_pow2 = false; _supports_texture_srgb = false; _supports_compressed_texture = false; diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index cc3c78a1bc..b657d867e9 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -132,6 +132,7 @@ PUBLISHED: INLINE bool get_supports_2d_texture_array() const; INLINE bool get_supports_cube_map() const; INLINE bool get_supports_buffer_texture() const; + INLINE bool get_supports_cube_map_array() const; INLINE bool get_supports_tex_non_pow2() const; INLINE bool get_supports_texture_srgb() const; @@ -489,6 +490,7 @@ protected: bool _supports_2d_texture_array; bool _supports_cube_map; bool _supports_buffer_texture; + bool _supports_cube_map_array; bool _supports_tex_non_pow2; bool _supports_texture_srgb; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 1a2317760a..ee713fbce2 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -856,6 +856,11 @@ reset() { } #endif +#ifndef OPENGLES + _supports_cube_map_array = is_at_least_gl_version(4, 0) || + has_extension("GL_ARB_texture_cube_map_array"); +#endif + #ifndef OPENGLES if (is_at_least_gl_version(3, 0)) { _glTexBuffer = (PFNGLTEXBUFFERPROC)get_extension_func("glTexBuffer"); @@ -4541,6 +4546,14 @@ prepare_texture(Texture *tex, int view) { } break; + case Texture::TT_cube_map_array: + if (!_supports_cube_map_array) { + GLCAT.warning() + << "Cube map arrays are not supported by this OpenGL driver.\n"; + return NULL; + } + break; + default: break; } @@ -5747,7 +5760,7 @@ framebuffer_copy_to_ram(Texture *tex, int view, int z, Texture::TextureType texture_type; int z_size; - //TODO: should be extended to support 3D textures and 2D arrays. + //TODO: should be extended to support 3D textures, 2D arrays and cube map arrays. if (z >= 0) { texture_type = Texture::TT_cube_map; z_size = 6; @@ -7512,7 +7525,7 @@ get_texture_target(Texture::TextureType texture_type) const { case Texture::TT_2d_texture_array: #ifndef OPENGLES if (_supports_2d_texture_array) { - return GL_TEXTURE_2D_ARRAY_EXT; + return GL_TEXTURE_2D_ARRAY; } #endif return GL_NONE; @@ -7524,6 +7537,14 @@ get_texture_target(Texture::TextureType texture_type) const { return GL_NONE; } + case Texture::TT_cube_map_array: +#ifndef OPENGLES + if (_supports_cube_map_array) { + return GL_TEXTURE_CUBE_MAP_ARRAY; + } +#endif + return GL_NONE; + case Texture::TT_buffer_texture: #ifndef OPENGLES if (_supports_buffer_texture) { @@ -9695,7 +9716,7 @@ update_standard_texture_bindings() { continue; } #ifndef OPENGLES - if (target == GL_TEXTURE_2D_ARRAY_EXT) { + if (target == GL_TEXTURE_2D_ARRAY || target == GL_TEXTURE_CUBE_MAP_ARRAY) { // Cannot be applied via the FFP. continue; } @@ -10748,6 +10769,12 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) { max_dimension_z = _max_2d_texture_array_layers; break; + case Texture::TT_cube_map_array: + max_dimension_x = _max_texture_dimension; + max_dimension_y = _max_texture_dimension; + max_dimension_z = int(_max_2d_texture_array_layers / 6) * 6; + break; + case Texture::TT_buffer_texture: max_dimension_x = _max_buffer_texture_size; max_dimension_y = 1; @@ -11009,6 +11036,7 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) { break; case Texture::TT_3d_texture: case Texture::TT_2d_texture_array: + case Texture::TT_cube_map_array: _glTexStorage3D(target, num_levels, internal_format, width, height, depth); break; } @@ -11343,7 +11371,8 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, #endif // OPENGLES #ifndef OPENGLES - case GL_TEXTURE_2D_ARRAY_EXT: + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: if (_supports_2d_texture_array) { if (image_compression == Texture::CM_off) { _glTexSubImage3D(page_target, n - mipmap_bias, 0, 0, 0, width, height, depth, @@ -11525,7 +11554,8 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, #endif #ifndef OPENGLES - case GL_TEXTURE_2D_ARRAY_EXT: + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: if (_supports_2d_texture_array) { if (image_compression == Texture::CM_off) { _glTexImage3D(page_target, n - mipmap_bias, internal_format, @@ -11876,7 +11906,7 @@ do_extract_texture_data(CLP(TextureContext) *gtc) { glGetTexLevelParameteriv(page_target, 0, GL_TEXTURE_DEPTH, &depth); } #ifndef OPENGLES - else if (_supports_2d_texture_array && target == GL_TEXTURE_2D_ARRAY_EXT) { + else if (target == GL_TEXTURE_2D_ARRAY || target == GL_TEXTURE_CUBE_MAP_ARRAY) { glGetTexLevelParameteriv(page_target, 0, GL_TEXTURE_DEPTH, &depth); } #endif diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 7a7e89de89..8cfd20119f 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1096,18 +1096,22 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { case GL_INT_SAMPLER_2D_ARRAY: case GL_INT_SAMPLER_CUBE: case GL_INT_SAMPLER_BUFFER: + case GL_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_UNSIGNED_INT_SAMPLER_1D: case GL_UNSIGNED_INT_SAMPLER_2D: case GL_UNSIGNED_INT_SAMPLER_3D: case GL_UNSIGNED_INT_SAMPLER_CUBE: case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY: case GL_UNSIGNED_INT_SAMPLER_BUFFER: + case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY: case GL_SAMPLER_1D_SHADOW: case GL_SAMPLER_1D: case GL_SAMPLER_CUBE_SHADOW: case GL_SAMPLER_2D_ARRAY: case GL_SAMPLER_2D_ARRAY_SHADOW: case GL_SAMPLER_BUFFER: + case GL_SAMPLER_CUBE_MAP_ARRAY: + case GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW: #endif // !OPENGLES case GL_SAMPLER_2D: case GL_SAMPLER_2D_SHADOW: @@ -1460,6 +1464,26 @@ get_sampler_texture_type(int &out, GLenum param_type) { return false; } + case GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW: + if (!_glgsg->_supports_shadow_filter) { + GLCAT.error() + << "GLSL shader uses shadow sampler, which is unsupported by the driver.\n"; + return false; + } + // Fall through + case GL_INT_SAMPLER_CUBE_MAP_ARRAY: + case GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY: + case GL_SAMPLER_CUBE_MAP_ARRAY: + out = Texture::TT_cube_map_array; + if (_glgsg->_supports_cube_map_array) { + return true; + } else { + GLCAT.error() + << "GLSL shader uses cube map array, which is unsupported by the driver.\n"; + return false; + + } + case GL_INT_SAMPLER_BUFFER: case GL_UNSIGNED_INT_SAMPLER_BUFFER: case GL_SAMPLER_BUFFER: diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index 57b5882ea7..7761312d2f 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -82,12 +82,14 @@ cp_report_error(ShaderArgInfo &p, const string &msg) { case SAT_mat4x2: tstr = "mat4x2 "; break; case SAT_mat4x3: tstr = "mat4x3 "; break; case SAT_mat4x4: tstr = "mat4x4 "; break; - case SAT_sampler1d: tstr = "sampler1d "; break; - case SAT_sampler2d: tstr = "sampler2d "; break; - case SAT_sampler3d: tstr = "sampler3d "; break; - case SAT_sampler2dArray: tstr = "sampler2dArray "; break; - case SAT_samplercube: tstr = "samplercube "; break; - default: tstr = "unknown "; break; + case SAT_sampler1d: tstr = "sampler1D "; break; + case SAT_sampler2d: tstr = "sampler2D "; break; + case SAT_sampler3d: tstr = "sampler3D "; break; + case SAT_sampler2d_array: tstr = "sampler2DArray "; break; + case SAT_sampler_cube: tstr = "samplerCUBE "; break; + case SAT_sampler_buffer: tstr = "samplerBUF "; break; + case SAT_sampler_cube_array:tstr = "samplerCUBEARRAY "; break; + default: tstr = "unknown "; break; } string cstr = "invalid"; @@ -244,8 +246,10 @@ cp_errchk_parameter_sampler(ShaderArgInfo &p) if ((p._type!=SAT_sampler1d)&& (p._type!=SAT_sampler2d)&& (p._type!=SAT_sampler3d)&& - (p._type!=SAT_sampler2dArray)&& - (p._type!=SAT_samplercube)) { + (p._type!=SAT_sampler2d_array)&& + (p._type!=SAT_sampler_cube)&& + (p._type!=SAT_sampler_buffer)&& + (p._type!=SAT_sampler_cube_array)) { cp_report_error(p, "parameter should have a 'sampler' type"); return false; } @@ -1215,8 +1219,10 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { case SAT_sampler1d: bind._desired_type = Texture::TT_1d_texture; break; case SAT_sampler2d: bind._desired_type = Texture::TT_2d_texture; break; case SAT_sampler3d: bind._desired_type = Texture::TT_3d_texture; break; - case SAT_sampler2dArray: bind._desired_type = Texture::TT_2d_texture_array; break; - case SAT_samplercube: bind._desired_type = Texture::TT_cube_map; break; + case SAT_sampler2d_array:bind._desired_type = Texture::TT_2d_texture_array; break; + case SAT_sampler_cube: bind._desired_type = Texture::TT_cube_map; break; + case SAT_sampler_buffer: bind._desired_type = Texture::TT_buffer_texture; break; + case SAT_sampler_cube_array:bind._desired_type = Texture::TT_cube_map_array; break; default: cp_report_error(p, "Invalid type for a tex-parameter"); return false; @@ -1358,7 +1364,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { _tex_spec.push_back(bind); return true; } - case SAT_sampler2dArray: { + case SAT_sampler2d_array: { ShaderTexSpec bind; bind._id = p._id; bind._name = kinputname; @@ -1366,7 +1372,7 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { _tex_spec.push_back(bind); return true; } - case SAT_samplercube: { + case SAT_sampler_cube: { ShaderTexSpec bind; bind._id = p._id; bind._name = kinputname; @@ -1374,6 +1380,22 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { _tex_spec.push_back(bind); return true; } + case SAT_sampler_buffer: { + ShaderTexSpec bind; + bind._id = p._id; + bind._name = kinputname; + bind._desired_type = Texture::TT_buffer_texture; + _tex_spec.push_back(bind); + return true; + } + case SAT_sampler_cube_array: { + ShaderTexSpec bind; + bind._id = p._id; + bind._name = kinputname; + bind._desired_type = Texture::TT_cube_map_array; + _tex_spec.push_back(bind); + return true; + } default: cp_report_error(p, "invalid type for non-prefix parameter"); return false; @@ -1460,8 +1482,10 @@ cg_parameter_type(CGparameter p) { case CG_SAMPLER1D: return Shader::SAT_sampler1d; case CG_SAMPLER2D: return Shader::SAT_sampler2d; case CG_SAMPLER3D: return Shader::SAT_sampler3d; - case CG_SAMPLER2DARRAY: return Shader::SAT_sampler2dArray; - case CG_SAMPLERCUBE: return Shader::SAT_samplercube; + case CG_SAMPLER2DARRAY: return Shader::SAT_sampler2d_array; + case CG_SAMPLERCUBE: return Shader::SAT_sampler_cube; + case CG_SAMPLERBUF: return Shader::SAT_sampler_buffer; + case CG_SAMPLERCUBEARRAY:return Shader::SAT_sampler_cube_array; // CG_SAMPLER1DSHADOW and CG_SAMPLER2DSHADOW case 1313: return Shader::SAT_sampler1d; case 1314: return Shader::SAT_sampler2d; diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index c0c31afaae..c5b8a3095b 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -230,8 +230,10 @@ public: SAT_sampler1d, SAT_sampler2d, SAT_sampler3d, - SAT_sampler2dArray, - SAT_samplercube, + SAT_sampler2d_array, + SAT_sampler_cube, + SAT_sampler_buffer, + SAT_sampler_cube_array, SAT_unknown }; diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 6c6b945d2f..24a21e06b4 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -215,6 +215,38 @@ setup_cube_map(int size, ComponentType component_type, Format format) { setup_texture(TT_cube_map, size, size, 6, component_type, format); } +//////////////////////////////////////////////////////////////////// +// Function: Texture::setup_cube_map_array +// Access: Published +// Description: Sets the texture as cube map array with N cube maps. +// Note that this number is not the same as the z_size. +// Follow up with read() or load() to fill +// the texture properties and image data, or use +// set_clear_color to let the texture be cleared to a +// solid color. +//////////////////////////////////////////////////////////////////// +INLINE void Texture:: +setup_cube_map_array(int num_cube_maps) { + setup_cube_map_array(0, num_cube_maps, T_unsigned_byte, F_rgb); +} + +//////////////////////////////////////////////////////////////////// +// Function: Texture::setup_cube_map_array +// Access: Published +// Description: Sets the texture as cube map array with N cube maps +// with the specified dimensions and format. Follow up +// with set_ram_image() or modify_ram_image() to fill +// the image data, or use set_clear_color to let the +// texture be cleared to a solid color. +// +// The num_cube_maps given here is multiplied by six +// to become the z_size of the image. +//////////////////////////////////////////////////////////////////// +INLINE void Texture:: +setup_cube_map_array(int size, int num_cube_maps, ComponentType component_type, Format format) { + setup_texture(TT_cube_map_array, size, size, num_cube_maps * 6, component_type, format); +} + //////////////////////////////////////////////////////////////////// // Function: Texture::setup_buffer_texture // Access: Published diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 66bbe6767e..0ee3a85847 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -1525,6 +1525,10 @@ write(ostream &out, int indent_level) const { out << "cube map, " << cdata->_x_size << " x " << cdata->_y_size; break; + case TT_cube_map_array: + out << "cube map array, " << cdata->_x_size << " x " << cdata->_y_size << " x " << cdata->_z_size; + break; + case TT_buffer_texture: out << "buffer, " << cdata->_x_size; break; @@ -1928,6 +1932,8 @@ format_texture_type(TextureType tt) { return "2d_texture_array"; case TT_cube_map: return "cube_map"; + case TT_cube_map_array: + return "cube_map_array"; case TT_buffer_texture: return "buffer_texture"; } @@ -1952,6 +1958,8 @@ string_texture_type(const string &str) { return TT_2d_texture_array; } else if (cmp_nocase(str, "cube_map") == 0) { return TT_cube_map; + } else if (cmp_nocase(str, "cube_map_array") == 0) { + return TT_cube_map_array; } else if (cmp_nocase(str, "buffer_texture") == 0) { return TT_buffer_texture; } @@ -4875,11 +4883,17 @@ do_reconsider_image_properties(CData *cdata, int x_size, int y_size, int num_com } #ifndef NDEBUG - if (cdata->_texture_type == TT_1d_texture || - cdata->_texture_type == TT_buffer_texture) { + switch (cdata->_texture_type) { + case TT_1d_texture: + case TT_buffer_texture: nassertr(y_size == 1, false); - } else if (cdata->_texture_type == TT_cube_map) { + break; + case TT_cube_map: + case TT_cube_map_array: nassertr(x_size == y_size, false); + break; + default: + break; } #endif if ((cdata->_x_size != x_size)||(cdata->_y_size != y_size)) { @@ -5074,6 +5088,15 @@ do_setup_texture(CData *cdata, Texture::TextureType texture_type, cdata->_default_sampler.set_wrap_w(SamplerState::WM_clamp); break; + case TT_cube_map_array: + // Cube maps array z_size needs to be a multiple of 6. + nassertv(x_size == y_size && z_size % 6 == 0); + + cdata->_default_sampler.set_wrap_u(SamplerState::WM_clamp); + cdata->_default_sampler.set_wrap_v(SamplerState::WM_clamp); + cdata->_default_sampler.set_wrap_w(SamplerState::WM_clamp); + break; + case TT_buffer_texture: nassertv(y_size == 1 && z_size == 1); break; @@ -5246,6 +5269,7 @@ do_set_z_size(CData *cdata, int z_size) { if (cdata->_z_size != z_size) { nassertv((cdata->_texture_type == Texture::TT_3d_texture) || (cdata->_texture_type == Texture::TT_cube_map && z_size == 6) || + (cdata->_texture_type == Texture::TT_cube_map_array && z_size % 6 == 0) || (cdata->_texture_type == Texture::TT_2d_texture_array) || (z_size == 1)); cdata->_z_size = z_size; cdata->inc_image_modified(); @@ -8113,6 +8137,7 @@ make_this_from_bam(const FactoryParams ¶ms) { break; case TT_2d_texture_array: + case TT_cube_map_array: me = TexturePool::load_2d_texture_array(filename, has_read_mipmaps, options); break; diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index d3fc0c4bb8..729f3671ec 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -84,6 +84,7 @@ PUBLISHED: TT_2d_texture_array, TT_cube_map, TT_buffer_texture, + TT_cube_map_array, }; enum ComponentType { @@ -242,6 +243,9 @@ PUBLISHED: INLINE void setup_2d_texture_array(int z_size = 1); INLINE void setup_2d_texture_array(int x_size, int y_size, int z_size, ComponentType component_type, Format format); + INLINE void setup_cube_map_array(int num_cube_maps); + INLINE void setup_cube_map_array(int size, int num_cube_maps, + ComponentType component_type, Format format); INLINE void setup_buffer_texture(int size, ComponentType component_type, Format format, GeomEnums::UsageHint usage); void generate_normalization_cube_map(int size); From 283713a38240458b1317b267e124a7420b7a5966 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 11 Aug 2015 18:27:15 +0200 Subject: [PATCH 075/200] Fix deprecation warning for default shader in GL3.2+ core context --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index ee713fbce2..9927b8c57a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -170,6 +170,7 @@ static const string default_fshader = "#version 130\n" "in vec2 texcoord;\n" "in vec4 color;\n" + "out vec4 p3d_FragColor;" #else "precision mediump float;\n" "varying vec2 texcoord;\n" @@ -178,11 +179,12 @@ static const string default_fshader = "uniform sampler2D p3d_Texture0;\n" "void main(void) {\n" #ifndef OPENGLES - " gl_FragColor = texture(p3d_Texture0, texcoord);\n" + " p3d_FragColor = texture(p3d_Texture0, texcoord);\n" + " p3d_FragColor *= color;\n" #else " gl_FragColor = texture2D(p3d_Texture0, texcoord).bgra;\n" -#endif " gl_FragColor *= color;\n" +#endif "}\n"; #endif From 03d633f2e763ee062dfad0cc4ecc1feed1bddd74 Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Tue, 11 Aug 2015 11:11:05 -0500 Subject: [PATCH 076/200] For stdpy.file wrapper, handle mode more consistently with Python. For Python 2, ignore unknown characters in the mode rather than silently failing to open. For Python 3, fail if unknown characters appear. --- direct/src/stdpy/file.py | 74 ++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index 91cf209b04..25f5b6e1a1 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -11,6 +11,7 @@ __all__ = [ ] from panda3d import core +import sys import types _vfs = core.VirtualFileSystem.getGlobalPtr() @@ -65,12 +66,27 @@ class file: self.filename = filename self.name = filename.toOsSpecific() + if sys.version_info >= (3, 0): + # Python 3 is much stricter than Python 2, which lets + # unknown flags fall through. + for ch in mode: + if not ch in 'rwxabt+U': + raise IOError("invalid mode: " + mode) + binary = False + if 'b' in mode and 't' in mode: + raise IOError("can't have text and binary mode at once") + if 'b' in mode: # Strip 'b'. This means a binary file. i = mode.index('b') mode = mode[:i] + mode[i + 1:] binary = True + elif 't' in mode: + # Strip 't'. This means a text file (redundant, yes). + i = mode.index('t') + mode = mode[:i] + mode[i + 1:] + binary = False if 'U' in mode: # Strip 'U'. We don't use it; universal-newline support @@ -83,61 +99,69 @@ class file: mode = 'r' # Per Python docs, we insist this is true. - assert mode[0] in 'rwa' + modeType = mode[0] + assert modeType in 'rwa' if binary: filename.setBinary() else: filename.setText() - - # Actually open the streams. - if mode == 'w': - self.__stream = _vfs.openWriteFile(filename, autoUnwrap, True) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError, message - writeMode = True - - elif mode == 'a': - self.__stream = _vfs.openAppendFile(filename) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError, message - writeMode = True - - elif mode == 'w+': + + # Actually open the streams, taking care to + # ignore unknown chars in the mode string. + # We already asserted that it starts with a mode + # char above, so locate the '+' + if modeType == 'w' and '+' in mode: self.__stream = _vfs.openReadWriteFile(filename, True) if not self.__stream: message = 'Could not open %s for writing' % (filename) - raise IOError, message + raise IOError(message) readMode = True writeMode = True - elif mode == 'a+': + elif modeType == 'a' and '+' in mode: self.__stream = _vfs.openReadAppendFile(filename) if not self.__stream: message = 'Could not open %s for writing' % (filename) - raise IOError, message + raise IOError(message) readMode = True writeMode = True - elif mode == 'r+': + elif modeType == 'r' and '+' in mode: self.__stream = _vfs.openReadWriteFile(filename, False) if not self.__stream: message = 'Could not open %s for writing' % (filename) - raise IOError, message + raise IOError(message) readMode = True writeMode = True + + elif modeType == 'w': + self.__stream = _vfs.openWriteFile(filename, autoUnwrap, True) + if not self.__stream: + message = 'Could not open %s for writing' % (filename) + raise IOError(message) + writeMode = True - elif mode == 'r': + elif modeType == 'a': + self.__stream = _vfs.openAppendFile(filename) + if not self.__stream: + message = 'Could not open %s for writing' % (filename) + raise IOError(message) + writeMode = True + + elif modeType == 'r': self.__stream = _vfs.openReadFile(filename, autoUnwrap) if not self.__stream: if not _vfs.exists(filename): message = 'No such file: %s' % (filename) else: message = 'Could not open %s for reading' % (filename) - raise IOError, message + raise IOError(message) readMode = True + + else: + # should not get here unless there's a bug above + raise IOError("Unhandled mode flags: " + mode) self.__needsVfsClose = True From 782c4db6348474a65daf2ba1034f6090369b7459 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 11 Aug 2015 19:11:56 +0200 Subject: [PATCH 077/200] Instead of checking every 100 end_frame() calls, check for errors every second. --- .../glstuff/glGraphicsStateGuardian_src.cxx | 25 ++++++++++--------- .../src/glstuff/glGraphicsStateGuardian_src.h | 4 +-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 9927b8c57a..b552d1dec7 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -351,6 +351,12 @@ CLP(GraphicsStateGuardian)(GraphicsEngine *engine, GraphicsPipe *pipe) : _renderbuffer_residency(get_prepared_objects()->get_name(), "renderbuffer") { _error_count = 0; + _last_error_check = -1.0; + + // calling glGetError() forces a sync, this turns it on if you want to. + _check_errors = gl_check_errors; + _force_flush = gl_force_flush; + _gl_shadlang_ver_major = 0; _gl_shadlang_ver_minor = 0; @@ -363,10 +369,6 @@ CLP(GraphicsStateGuardian)(GraphicsEngine *engine, GraphicsPipe *pipe) : // the window tells us otherwise. _is_hardware = true; - // calling glGetError() forces a sync, this turns it on if you want to. - _check_errors = gl_check_errors; - _force_flush = gl_force_flush; - _scissor_enabled = false; _scissor_attrib_active = false; @@ -452,6 +454,8 @@ debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei l //////////////////////////////////////////////////////////////////// void CLP(GraphicsStateGuardian):: reset() { + _last_error_check = -1.0; + free_pointers(); GraphicsStateGuardian::reset(); @@ -3300,12 +3304,12 @@ end_frame(Thread *current_thread) { if (_check_errors || (_supports_debug && gl_debug)) { report_my_gl_errors(); } else { - static int frame_counter = -1; - // If _check_errors is false, we still want to check for errors - // the first few frames and once every N frames, so that we know if - // anything went wrong at all. - if (frame_counter++ <= 0) { + // once every second, so that we know if anything went wrong at all. + double current = ClockObject::get_global_clock()->get_frame_time(); + + if (current - _last_error_check >= 1.0) { + _last_error_check = current; PStatTimer timer(_check_error_pcollector); GLenum error_code = glGetError(); @@ -3334,9 +3338,6 @@ end_frame(Thread *current_thread) { panic_deactivate(); } } - } else if (frame_counter > 100) { - // 100 frames have passed. Check next frame. - frame_counter = 0; } } #endif diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index ff8044d324..a2a519d109 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -648,8 +648,6 @@ protected: bool _supports_depth32; #endif - int _error_count; - string _gl_vendor; string _gl_renderer; string _gl_version; @@ -917,6 +915,8 @@ public: //RenderState::SlotMask _inv_state_mask; + int _error_count; + double _last_error_check; bool _check_errors; bool _force_flush; bool _supports_debug; From f161ce82cc43e8dd8dbe4701b4bb2a5a3f1c0a2d Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 12 Aug 2015 18:29:54 +0200 Subject: [PATCH 078/200] Add argument names to quaternion classes so they show up in the API ref --- panda/src/linmath/lorientation_src.h | 10 +++++----- panda/src/linmath/lquaternion_src.h | 6 +++--- panda/src/linmath/lrotation_src.h | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/panda/src/linmath/lorientation_src.h b/panda/src/linmath/lorientation_src.h index 350922667f..7c4e33d0a7 100644 --- a/panda/src/linmath/lorientation_src.h +++ b/panda/src/linmath/lorientation_src.h @@ -21,11 +21,11 @@ class FLOATNAME(LRotation); class EXPCL_PANDA_LINMATH FLOATNAME(LOrientation) : public FLOATNAME(LQuaternion) { PUBLISHED: INLINE_LINMATH FLOATNAME(LOrientation)(); - INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion)&); - INLINE_LINMATH FLOATNAME(LOrientation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE); - INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &, float); - INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &); - INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &); + INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion) &c); + INLINE_LINMATH FLOATNAME(LOrientation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k); + INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, float twist); + INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &m); + INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &m); INLINE_LINMATH FLOATNAME(LOrientation) operator * (const FLOATNAME(LRotation) &other) const; diff --git a/panda/src/linmath/lquaternion_src.h b/panda/src/linmath/lquaternion_src.h index 730c39e637..22b3f0bffe 100644 --- a/panda/src/linmath/lquaternion_src.h +++ b/panda/src/linmath/lquaternion_src.h @@ -20,10 +20,10 @@ class EXPCL_PANDA_LINMATH FLOATNAME(LQuaternion) : public FLOATNAME(LVecBase4) { PUBLISHED: INLINE_LINMATH FLOATNAME(LQuaternion)(); INLINE_LINMATH FLOATNAME(LQuaternion)(const FLOATNAME(LVecBase4) ©); - INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE, const FLOATNAME(LVecBase3) ©); - INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE); + INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE r, const FLOATNAME(LVecBase3) ©); + INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k); - static FLOATNAME(LQuaternion) pure_imaginary(const FLOATNAME(LVector3) &); + static FLOATNAME(LQuaternion) pure_imaginary(const FLOATNAME(LVector3) &v); INLINE_LINMATH FLOATNAME(LQuaternion) conjugate() const; diff --git a/panda/src/linmath/lrotation_src.h b/panda/src/linmath/lrotation_src.h index f71a53a3e5..374a0e17a1 100644 --- a/panda/src/linmath/lrotation_src.h +++ b/panda/src/linmath/lrotation_src.h @@ -19,13 +19,13 @@ class EXPCL_PANDA_LINMATH FLOATNAME(LRotation) : public FLOATNAME(LQuaternion) { PUBLISHED: INLINE_LINMATH FLOATNAME(LRotation)(); - INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &); + INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &c); INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVecBase4) ©); - INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE); - INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &, FLOATTYPE); - INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &); - INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix4) &); - INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE); + INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k); + INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &axis, FLOATTYPE angle); + INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &m); + INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix4) &m); + INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r); INLINE_LINMATH FLOATNAME(LRotation) operator * (FLOATTYPE scalar) const; INLINE_LINMATH FLOATNAME(LRotation) operator / (FLOATTYPE scalar) const; From 9b93b8a030e61c7a45225cd6339c5ecd63ff98b7 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 13 Aug 2015 01:59:07 +0200 Subject: [PATCH 079/200] python-pmw shouldn't be a dependency, merely a recommendency --- makepanda/makepanda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index f72103f017..64c624100d 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -6553,8 +6553,8 @@ def MakeInstallerLinux(): depends = ReadFile("targetroot/debian/substvars_dep").replace("shlibs:Depends=", "").strip() recommends = ReadFile("targetroot/debian/substvars_rec").replace("shlibs:Depends=", "").strip() if PkgSkip("PYTHON")==0: - depends += ", " + PYTHONV + ", python-pmw" - recommends += ", python-wxversion, python-profiler (>= " + PV + "), python-tk (>= " + PV + ")" + depends += ", " + PYTHONV + recommends += ", python-wxversion, python-profiler (>= " + PV + "), python-pmw, python-tk (>= " + PV + ")" if PkgSkip("NVIDIACG")==0: depends += ", nvidia-cg-toolkit" From 9fdc2d82d143c34ec2aa975d1eb10d84b20728aa Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Thu, 13 Aug 2015 10:58:51 -0500 Subject: [PATCH 080/200] Send libRocket key events before mouse events On Linux (at least), a key event is accompanied with a mouse position event. If a libRocket UI is listening to e.g. "mouseover" events, then any keypress will first appear to be a mouse movement, tripping up code that tries to handle focus with both keyboard and mouse support. This change merely dispatches key events before any mouse events to avoid this problem. --- panda/src/rocket/rocketInputHandler.cxx | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/panda/src/rocket/rocketInputHandler.cxx b/panda/src/rocket/rocketInputHandler.cxx index c0a4e22464..b734e59bef 100644 --- a/panda/src/rocket/rocketInputHandler.cxx +++ b/panda/src/rocket/rocketInputHandler.cxx @@ -302,30 +302,6 @@ void RocketInputHandler:: update_context(Rocket::Core::Context *context, int xoffs, int yoffs) { MutexHolder holder(_lock); - if (_mouse_xy_changed) { - _mouse_xy_changed = false; - - context->ProcessMouseMove(_mouse_xy.get_x() - xoffs, - _mouse_xy.get_y() - yoffs, _modifiers); - } - - if (_mouse_buttons.size() > 0) { - ButtonActivityMap::const_iterator it; - for (it = _mouse_buttons.begin(); it != _mouse_buttons.end(); ++it) { - if (it->second) { - context->ProcessMouseButtonDown(it->first, _modifiers); - } else { - context->ProcessMouseButtonUp(it->first, _modifiers); - } - } - _mouse_buttons.clear(); - } - - if (_wheel_delta != 0) { - context->ProcessMouseWheel(_wheel_delta, _modifiers); - _wheel_delta = 0; - } - if (_keys.size() > 0) { ButtonActivityMap::const_iterator it; for (it = _keys.begin(); it != _keys.end(); ++it) { @@ -356,5 +332,29 @@ update_context(Rocket::Core::Context *context, int xoffs, int yoffs) { _text_input.clear(); } + if (_mouse_xy_changed) { + _mouse_xy_changed = false; + + context->ProcessMouseMove(_mouse_xy.get_x() - xoffs, + _mouse_xy.get_y() - yoffs, _modifiers); + } + + if (_mouse_buttons.size() > 0) { + ButtonActivityMap::const_iterator it; + for (it = _mouse_buttons.begin(); it != _mouse_buttons.end(); ++it) { + if (it->second) { + context->ProcessMouseButtonDown(it->first, _modifiers); + } else { + context->ProcessMouseButtonUp(it->first, _modifiers); + } + } + _mouse_buttons.clear(); + } + + if (_wheel_delta != 0) { + context->ProcessMouseWheel(_wheel_delta, _modifiers); + _wheel_delta = 0; + } + context->Update(); } From 3e34233b1c86638c903c4574c7c7e0b5babf1e1c Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 14 Aug 2015 15:57:56 +0200 Subject: [PATCH 081/200] Implement extracted files for packp3d and pdeploy (only when used together) This also changes start_dir for pdeployed applications to point to the application directory, no longer to ~/.panda3d/start --- direct/src/p3d/DeploymentTools.py | 78 ++++++++-- direct/src/p3d/Packager.py | 4 + direct/src/p3d/packp3d.py | 10 ++ direct/src/plugin/load_plugin.cxx | 23 ++- direct/src/plugin/load_plugin.h | 6 +- direct/src/plugin/p3dAuthSession.cxx | 2 +- direct/src/plugin/p3dInstance.cxx | 2 +- direct/src/plugin/p3dInstanceManager.I | 12 ++ direct/src/plugin/p3dInstanceManager.cxx | 19 ++- direct/src/plugin/p3dInstanceManager.h | 5 +- direct/src/plugin/p3dSession.cxx | 2 +- direct/src/plugin/p3d_plugin.cxx | 9 +- direct/src/plugin/p3d_plugin.h | 5 +- direct/src/plugin_activex/PPInstance.cpp | 6 +- direct/src/plugin_npapi/ppInstance.cxx | 4 +- direct/src/plugin_standalone/p3dEmbed.cxx | 29 +++- direct/src/plugin_standalone/panda3d.cxx | 171 ++++++++++++--------- direct/src/plugin_standalone/panda3d.h | 1 + direct/src/plugin_standalone/panda3dBase.h | 1 + 19 files changed, 271 insertions(+), 118 deletions(-) diff --git a/direct/src/p3d/DeploymentTools.py b/direct/src/p3d/DeploymentTools.py index 5bb3f3a159..78b2378eda 100644 --- a/direct/src/p3d/DeploymentTools.py +++ b/direct/src/p3d/DeploymentTools.py @@ -444,6 +444,7 @@ class Installer: notify = directNotify.newCategory("Installer") def __init__(self, p3dfile, shortname, fullname, version, tokens = {}): + self.p3dFilename = p3dfile if not shortname: shortname = p3dfile.getBasenameWoExtension() self.shortname = shortname @@ -477,22 +478,16 @@ class Installer: if not self.authoremail and ' ' not in uname: self.authoremail = "%s@%s" % (uname, socket.gethostname()) - self.standalone = Standalone(p3dfile, tokens) - self.tempDir = Filename.temporary("", self.shortname, "") + "/" - self.tempDir.makeDir() - self.__tempRoots = {} - # Load the p3d file to read out the required packages mf = Multifile() - if not mf.openRead(p3dfile): + if not mf.openRead(self.p3dFilename): Installer.notify.error("Not a Panda3D application: %s" % (p3dfile)) return # Now load the p3dInfo file. - self.hostUrl = PandaSystem.getPackageHostUrl() - if not self.hostUrl: - self.hostUrl = self.standalone.host.hostUrl + self.hostUrl = None self.requires = [] + self.extracts = [] i = mf.findSubfile('p3d_info.xml') if i >= 0: stream = mf.openReadSubfile(i) @@ -511,14 +506,54 @@ class Installer: p3dRequires.Attribute('host'))) p3dRequires = p3dRequires.NextSiblingElement('requires') + p3dExtract = p3dPackage.FirstChildElement('extract') + while p3dExtract: + filename = p3dExtract.Attribute('filename') + self.extracts.append(filename) + p3dExtract = p3dExtract.NextSiblingElement('extract') + if not self.fullname: p3dConfig = p3dPackage.FirstChildElement('config') if p3dConfig: self.fullname = p3dConfig.Attribute('display_name') + else: + Installer.notify.warning("No p3d_info.xml was found in .p3d archive.") + + mf.close() + + if not self.hostUrl: + self.hostUrl = PandaSystem.getPackageHostUrl() + if not self.hostUrl: + self.hostUrl = self.standalone.host.hostUrl + Installer.notify.warning("No host URL was specified by .p3d archive. Falling back to %s" % (self.hostUrl)) if not self.fullname: self.fullname = self.shortname + self.tempDir = Filename.temporary("", self.shortname, "") + "/" + self.tempDir.makeDir() + self.__tempRoots = {} + + if self.extracts: + # Copy .p3d to a temporary file so we can remove the extracts. + p3dfile = Filename(self.tempDir, self.p3dFilename.getBasename()) + shutil.copyfile(self.p3dFilename.toOsSpecific(), p3dfile.toOsSpecific()) + mf = Multifile() + if not mf.openReadWrite(p3dfile): + Installer.notify.error("Failure to open %s for writing." % (p3dfile)) + + # We don't really need this silly thing when embedding, anyway. + mf.setHeaderPrefix("") + + for fn in self.extracts: + if not mf.removeSubfile(fn): + Installer.notify.error("Failure to remove %s from multifile." % (p3dfile)) + + mf.repack() + mf.close() + + self.standalone = Standalone(p3dfile, tokens) + def __del__(self): try: appRunner.rmtree(self.tempDir) @@ -533,6 +568,22 @@ class Installer: if not self.includeRequires: return + # Write out the extracts from the original .p3d. + if self.extracts: + mf = Multifile() + if not mf.openRead(self.p3dFilename): + Installer.notify.error("Failed to open .p3d archive: %s" % (filename)) + + for filename in self.extracts: + i = mf.findSubfile(filename) + if i < 0: + Installer.notify.error("Cannot find extract in .p3d archive: %s" % (filename)) + continue + + if not mf.extractSubfile(i, Filename(hostDir, filename)): + Installer.notify.error("Failed to extract file from .p3d archive: %s" % (filename)) + mf.close() + pkgTree = PackageTree(platform, hostDir, self.hostUrl) pkgTree.installPackage("images", None, self.standalone.host.hostUrl) @@ -660,7 +711,8 @@ class Installer: Filename(tempdir, "usr/bin/").makeDir() if self.includeRequires: - extraTokens = {"host_dir" : "/usr/lib/" + self.shortname.lower()} + extraTokens = {"host_dir" : "/usr/lib/" + self.shortname.lower(), + "start_dir" : "/usr/lib/" + self.shortname.lower()} else: extraTokens = {} self.standalone.build(Filename(tempdir, "usr/bin/" + self.shortname.lower()), platform, extraTokens) @@ -712,7 +764,7 @@ class Installer: print >>desktop, "Type=Application" desktop.close() - if self.includeRequires: + if self.includeRequires or self.extracts: hostDir = Filename(tempdir, "usr/lib/%s/" % self.shortname.lower()) hostDir.makeDir() self.installPackagesInto(hostDir, platform) @@ -853,7 +905,7 @@ class Installer: exefile = Filename(output, "Contents/MacOS/" + self.shortname) exefile.makeDir() if self.includeRequires: - extraTokens = {"host_dir" : "../Resources"} + extraTokens = {"host_dir": "../Resources", "start_dir": "../Resources"} else: extraTokens = {} self.standalone.build(exefile, platform, extraTokens) @@ -1064,7 +1116,7 @@ class Installer: exefile = Filename(Filename.getTempDirectory(), self.shortname + ".exe") exefile.unlink() if self.includeRequires: - extraTokens = {"host_dir" : "."} + extraTokens = {"host_dir": ".", "start_dir": "."} else: extraTokens = {} self.standalone.build(exefile, platform, extraTokens) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 40c30d8485..b0a44d7fa2 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -1496,6 +1496,10 @@ class Packager: xhost = he.makeXml(packager = self.packager) xpackage.InsertEndChild(xhost) + self.extracts.sort() + for name, xextract in self.extracts: + xpackage.InsertEndChild(xextract) + doc.InsertEndChild(xpackage) # Write the xml file to a temporary file on disk, so we diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index 3544022fd6..b26c6d5b22 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -57,6 +57,14 @@ Options: instead of -e for files that are uncompressible by their nature (e.g. mpg files). This option may be repeated as necessary. + -x ext + Marks files with the given extensions of needing to be physically + extracted to disk before they can be loaded. This is used for + file types that cannot be loaded via the virtual file system, + such as .ico files on Windows. + This option is currently only implemented when deploying the + application with pdeploy. + -p python_lib_dir Adds a directory to search for additional Python modules. You can use this to add your system's Python path, to allow packp3d @@ -134,6 +142,8 @@ def makePackedApp(args): packager.binaryExtensions.append(value) elif option == '-n': packager.uncompressibleExtensions.append(value) + elif option == '-x': + packager.extractExtensions.append(value) elif option == '-p': sys.path.append(value) elif option == '-c': diff --git a/direct/src/plugin/load_plugin.cxx b/direct/src/plugin/load_plugin.cxx index a9276b9e99..8a8e5ef179 100644 --- a/direct/src/plugin/load_plugin.cxx +++ b/direct/src/plugin/load_plugin.cxx @@ -140,7 +140,7 @@ load_plugin(const string &p3d_plugin_filename, const string &log_directory, const string &log_basename, bool trusted_environment, bool console_environment, const string &root_dir, const string &host_dir, - ostream &logfile) { + const string &start_dir, ostream &logfile) { if (plugin_loaded) { return true; } @@ -259,7 +259,7 @@ load_plugin(const string &p3d_plugin_filename, verify_contents, platform, log_directory, log_basename, trusted_environment, console_environment, - root_dir, host_dir, logfile)) { + root_dir, host_dir, start_dir, logfile)) { unload_dso(); return false; } @@ -283,7 +283,7 @@ init_plugin(const string &contents_filename, const string &host_url, const string &log_directory, const string &log_basename, bool trusted_environment, bool console_environment, const string &root_dir, const string &host_dir, - ostream &logfile) { + const string &start_dir, ostream &logfile) { // Ensure that all of the function pointers have been found. if (P3D_initialize_ptr == NULL || @@ -371,15 +371,26 @@ init_plugin(const string &contents_filename, const string &host_url, return false; } - if (!P3D_initialize_ptr(P3D_API_VERSION, contents_filename.c_str(), + // A bit of extra hand-hacked compatibility for using newer plug-ins + // with an older version of the core API. + int api_version = P3D_API_VERSION; + if (api_version == 17 && start_dir.empty()) { + api_version = 16; + if (host_dir.empty()) { + api_version = 15; + } + } + + if (!P3D_initialize_ptr(api_version, contents_filename.c_str(), host_url.c_str(), verify_contents, platform.c_str(), log_directory.c_str(), log_basename.c_str(), trusted_environment, console_environment, - root_dir.c_str(), host_dir.c_str())) { + root_dir.c_str(), host_dir.c_str(), + start_dir.c_str())) { // Oops, failure to initialize. logfile << "Failed to initialize plugin (passed API version " - << P3D_API_VERSION << ")\n"; + << api_version << ")\n"; return false; } diff --git a/direct/src/plugin/load_plugin.h b/direct/src/plugin/load_plugin.h index 985eef7261..f9f89565e5 100644 --- a/direct/src/plugin/load_plugin.h +++ b/direct/src/plugin/load_plugin.h @@ -67,13 +67,15 @@ load_plugin(const string &p3d_plugin_filename, P3D_verify_contents verify_contents, const string &platform, const string &log_directory, const string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir, const string &host_dir, ostream &logfile); + const string &root_dir, const string &host_dir, + const string &start_dir, ostream &logfile); bool init_plugin(const string &contents_filename, const string &host_url, P3D_verify_contents verify_contents, const string &platform, const string &log_directory, const string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir, const string &host_dir, ostream &logfile); + const string &root_dir, const string &host_dir, + const string &start_dir, ostream &logfile); void unload_plugin(ostream &logfile); bool is_plugin_loaded(); diff --git a/direct/src/plugin/p3dAuthSession.cxx b/direct/src/plugin/p3dAuthSession.cxx index 6130119223..103c372f0a 100644 --- a/direct/src/plugin/p3dAuthSession.cxx +++ b/direct/src/plugin/p3dAuthSession.cxx @@ -163,7 +163,7 @@ start_p3dcert() { P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr(); - _start_dir = inst_mgr->get_root_dir() + "/start"; + _start_dir = inst_mgr->get_start_dir(); string root_dir = _inst->_p3dcert_package->get_package_dir(); mkdir_complete(_start_dir, nout); diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index d81a271d1e..3f84bb441e 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -1564,7 +1564,7 @@ uninstall_packages() { if (inst_mgr->get_verify_contents() != P3D_VC_never) { string start_dir_suffix = get_start_dir_suffix(); if (!start_dir_suffix.empty()) { - string start_dir = inst_mgr->get_root_dir() + "/start" + start_dir_suffix; + string start_dir = inst_mgr->get_start_dir() + start_dir_suffix; nout << "Cleaning up start directory " << start_dir << "\n"; inst_mgr->delete_directory_recursively(start_dir); } diff --git a/direct/src/plugin/p3dInstanceManager.I b/direct/src/plugin/p3dInstanceManager.I index caadc083b3..af5b6de16c 100644 --- a/direct/src/plugin/p3dInstanceManager.I +++ b/direct/src/plugin/p3dInstanceManager.I @@ -111,6 +111,18 @@ get_root_dir() const { return _root_dir; } +//////////////////////////////////////////////////////////////////// +// Function: P3DInstanceManager::get_start_dir +// Access: Public +// Description: Returns the directory that the .p3d file should be +// mounted to and run from. This is usually the +// "start" subdirectory of the root_dir. +//////////////////////////////////////////////////////////////////// +inline const string &P3DInstanceManager:: +get_start_dir() const { + return _start_dir; +} + //////////////////////////////////////////////////////////////////// // Function: P3DInstanceManager::get_platform // Access: Public diff --git a/direct/src/plugin/p3dInstanceManager.cxx b/direct/src/plugin/p3dInstanceManager.cxx index 793e6cf36e..fa8c70def2 100644 --- a/direct/src/plugin/p3dInstanceManager.cxx +++ b/direct/src/plugin/p3dInstanceManager.cxx @@ -201,7 +201,8 @@ initialize(int api_version, const string &contents_filename, const string &platform, const string &log_directory, const string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir, const string &host_dir) { + const string &root_dir, const string &host_dir, + const string &start_dir) { _api_version = api_version; _host_url = host_url; _verify_contents = verify_contents; @@ -298,12 +299,18 @@ initialize(int api_version, const string &contents_filename, } else { _root_dir = root_dir; } - + _host_dir = host_dir; + if (start_dir.empty()) { + _start_dir = _root_dir + "/start"; + } else { + _start_dir = start_dir; + } + // Allow the caller (e.g. panda3d.exe) to specify a log directory. // Or, allow the developer to compile one in. - + // // Failing that, we write logfiles to Panda3D/log. if (_log_directory.empty()) { _log_directory = _root_dir + "/log"; @@ -1515,8 +1522,10 @@ create_runtime_environment() { // Make the certificate directory. _certs_dir = _root_dir + "/certs"; - if (!mkdir_complete(_certs_dir, nout)) { - nout << "Couldn't mkdir " << _certs_dir << "\n"; + if (!get_trusted_environment()) { + if (!mkdir_complete(_certs_dir, nout)) { + nout << "Couldn't mkdir " << _certs_dir << "\n"; + } } _created_runtime_environment = true; diff --git a/direct/src/plugin/p3dInstanceManager.h b/direct/src/plugin/p3dInstanceManager.h index 78cfcfbdce..b051c01310 100644 --- a/direct/src/plugin/p3dInstanceManager.h +++ b/direct/src/plugin/p3dInstanceManager.h @@ -59,7 +59,8 @@ public: bool trusted_environment, bool console_environment, const string &root_dir = "", - const string &host_dir = ""); + const string &host_dir = "", + const string &start_dir = ""); inline bool is_initialized() const; inline void reconsider_runtime_environment(); @@ -69,6 +70,7 @@ public: inline int get_api_version() const; inline const string &get_host_url() const; inline const string &get_root_dir() const; + inline const string &get_start_dir() const; inline const string &get_platform() const; inline const string &get_temp_directory() const; inline const string &get_log_directory() const; @@ -173,6 +175,7 @@ private: string _host_url; string _root_dir; string _host_dir; + string _start_dir; string _certs_dir; P3D_verify_contents _verify_contents; string _platform; diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index e0b9c73f08..3e6189ce4d 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -717,7 +717,7 @@ start_p3dpython(P3DInstance *inst) { _keep_user_env = true; } if (!_keep_user_env) { - _start_dir = inst_mgr->get_root_dir() + "/start" + inst->get_start_dir_suffix(); + _start_dir = inst_mgr->get_start_dir() + inst->get_start_dir_suffix(); mkdir_complete(_start_dir, nout); } replace_slashes(_start_dir); diff --git a/direct/src/plugin/p3d_plugin.cxx b/direct/src/plugin/p3d_plugin.cxx index 8641a72121..241a59d253 100644 --- a/direct/src/plugin/p3d_plugin.cxx +++ b/direct/src/plugin/p3d_plugin.cxx @@ -39,7 +39,8 @@ P3D_initialize(int api_version, const char *contents_filename, const char *platform, const char *log_directory, const char *log_basename, bool trusted_environment, bool console_environment, - const char *root_dir, const char *host_dir) { + const char *root_dir, const char *host_dir, + const char *start_dir) { if (api_version < 10 || api_version > P3D_API_VERSION) { // Can't accept an incompatible version. return false; @@ -89,12 +90,16 @@ P3D_initialize(int api_version, const char *contents_filename, host_dir = ""; } + if (api_version < 17 || start_dir == NULL) { + start_dir = ""; + } + P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr(); bool result = inst_mgr->initialize(api_version, contents_filename, host_url, verify_contents, platform, log_directory, log_basename, trusted_environment, console_environment, - root_dir, host_dir); + root_dir, host_dir, start_dir); RELEASE_LOCK(_api_lock); return result; } diff --git a/direct/src/plugin/p3d_plugin.h b/direct/src/plugin/p3d_plugin.h index e053e6e21b..916763c036 100644 --- a/direct/src/plugin/p3d_plugin.h +++ b/direct/src/plugin/p3d_plugin.h @@ -79,7 +79,7 @@ extern "C" { (below). This number will be incremented whenever there are changes to any of the interface specifications defined in this header file. */ -#define P3D_API_VERSION 16 +#define P3D_API_VERSION 17 /************************ GLOBAL FUNCTIONS **************************/ @@ -161,7 +161,8 @@ P3D_initialize_func(int api_version, const char *contents_filename, const char *platform, const char *log_directory, const char *log_basename, bool trusted_environment, bool console_environment, - const char *root_dir, const char *host_dir); + const char *root_dir, const char *host_dir, + const char *start_dir); /* This function should be called to unload the core API. It will release all internally-allocated memory and return the core API to diff --git a/direct/src/plugin_activex/PPInstance.cpp b/direct/src/plugin_activex/PPInstance.cpp index a0984a27f6..2151fc63f1 100644 --- a/direct/src/plugin_activex/PPInstance.cpp +++ b/direct/src/plugin_activex/PPInstance.cpp @@ -581,12 +581,12 @@ int PPInstance::LoadPlugin( const std::string& dllFilename ) pathname = override_filename; } #endif // P3D_PLUGIN_P3D_PLUGIN - + nout << "Attempting to load core API from " << pathname << "\n"; string contents_filename = m_rootDir + "/contents.xml"; if (!load_plugin(pathname, contents_filename, PANDA_PACKAGE_HOST_URL, - P3D_VC_normal, "", "", "", false, false, - m_rootDir, "", nout)) { + P3D_VC_normal, "", "", "", false, false, + m_rootDir, "", "", nout)) { nout << "Unable to launch core API in " << pathname << "\n"; error = 1; } else { diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 55b9757a04..209204652d 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -1738,8 +1738,8 @@ do_load_plugin() { nout << "Attempting to load core API from " << pathname << "\n"; string contents_filename = _root_dir + "/contents.xml"; if (!load_plugin(pathname, contents_filename, PANDA_PACKAGE_HOST_URL, - P3D_VC_normal, "", "", "", false, false, - _root_dir, "", nout)) { + P3D_VC_normal, "", "", "", false, false, + _root_dir, "", "", nout)) { nout << "Unable to launch core API in " << pathname << "\n"; set_failed(); return; diff --git a/direct/src/plugin_standalone/p3dEmbed.cxx b/direct/src/plugin_standalone/p3dEmbed.cxx index 4ee1ff31ca..a09c13423b 100644 --- a/direct/src/plugin_standalone/p3dEmbed.cxx +++ b/direct/src/plugin_standalone/p3dEmbed.cxx @@ -53,7 +53,8 @@ run_embedded(streampos read_offset, int argc, char *argv[]) { // the + 1 from the test. _read_offset_check = read_offset + (streampos)1; if (_read_offset_check == (streampos)0xFF3D3D01) { - cerr << "This program is not intended to be run directly.\nIt is used by pdeploy to construct an embedded Panda3D application.\n"; + cerr << "This program is not intended to be run directly.\nIt is used " + "by pdeploy to construct an embedded Panda3D application.\n"; return 1; } @@ -86,22 +87,30 @@ run_embedded(streampos read_offset, int argc, char *argv[]) { string value; string root_dir; string host_dir; + string start_dir; + while (true) { if (curchr == EOF) { cerr << "Truncated stream\n"; - return(1); + return 1; } else if (curchr == 0) { // Two null bytes in a row means we've reached the end of the data. if (havenull) { break; } - + // This means we haven't seen an '=' character yet. if (keyword == "") { if (curstr != "") { cerr << "Ignoring token '" << curstr << "' without value\n"; } + + } else if (keyword == "start_dir") { + // Don't pass this on as a token, since it has slightly different + // semantics when used as an HTML token. + start_dir = curstr; + } else { value.assign(curstr); P3D_token token; @@ -118,6 +127,8 @@ run_embedded(streampos read_offset, int argc, char *argv[]) { _got_win_size = true; } else if (keyword == "log_basename") { _log_basename = value; + } else if (keyword == "log_directory") { + _log_dirname = value; } else if (keyword == "root_dir") { root_dir = value; } else if (keyword == "host_dir") { @@ -168,6 +179,13 @@ run_embedded(streampos read_offset, int argc, char *argv[]) { _host_dir = host_dir_f.to_os_specific(); } + // Make the start directory absolute + if (!start_dir.empty()) { + Filename start_dir_f(start_dir); + start_dir_f.make_absolute(f.get_dirname()); + _start_dir = start_dir_f.to_os_specific(); + } + // Initialize the core API by directly assigning all of the function // pointers. P3D_initialize_ptr = &P3D_initialize; @@ -229,18 +247,17 @@ run_embedded(streampos read_offset, int argc, char *argv[]) { // function pointers. This will also call P3D_initialize(). if (!init_plugin("", _host_url, _verify_contents, _this_platform, _log_dirname, _log_basename, true, _console_environment, - _root_dir, _host_dir, cerr)) { + _root_dir, _host_dir, _start_dir, cerr)) { cerr << "Unable to launch core API\n"; return 1; } - + // Create a plugin instance and run the program P3D_instance *inst = create_instance(f, true, argv, argc, read_offset); _instances.insert(inst); run_main_loop(); - unload_plugin(cerr); return 0; } diff --git a/direct/src/plugin_standalone/panda3d.cxx b/direct/src/plugin_standalone/panda3d.cxx index ab0219f7cf..fd0d2f44b7 100644 --- a/direct/src/plugin_standalone/panda3d.cxx +++ b/direct/src/plugin_standalone/panda3d.cxx @@ -690,7 +690,6 @@ choose_random_mirrors(vector_string &result, int num_mirrors) { } } - //////////////////////////////////////////////////////////////////// // Function: Panda3D::get_core_api // Access: Protected @@ -700,78 +699,12 @@ choose_random_mirrors(vector_string &result, int num_mirrors) { //////////////////////////////////////////////////////////////////// bool Panda3D:: get_core_api() { + bool is_fresh = false; if (!_coreapi_dll.quick_verify(_root_dir)) { - // The DLL file needs to be downloaded. Build up our list of - // URL's to attempt to download it from, in reverse order. - string url; - vector_string core_urls; - - // Our last act of desperation: hit the original host, with a - // query uniquifier, to break through any caches. - ostringstream strm; - strm << _download_url_prefix << _coreapi_dll.get_filename() - << "?" << time(NULL); - url = strm.str(); - core_urls.push_back(url); - - // Before we try that, we'll hit the original host, without a - // uniquifier. - url = _download_url_prefix; - url += _coreapi_dll.get_filename(); - core_urls.push_back(url); - - // And before we try that, we'll try two mirrors, at random. - vector_string mirrors; - choose_random_mirrors(mirrors, 2); - for (vector_string::iterator si = mirrors.begin(); - si != mirrors.end(); - ++si) { - url = (*si) + _coreapi_dll.get_filename(); - core_urls.push_back(url); - } - - // The very first thing we'll try is the super_mirror, if we have - // one. - if (!_super_mirror_url_prefix.empty()) { - url = _super_mirror_url_prefix + _coreapi_dll.get_filename(); - core_urls.push_back(url); - } - - // Now pick URL's off the list, and try them, until we have - // success. - Filename pathname = Filename::from_os_specific(_coreapi_dll.get_pathname(_root_dir)); - pathname.make_dir(); - HTTPClient *http = HTTPClient::get_global_ptr(); - - bool success = false; - while (!core_urls.empty()) { - url = core_urls.back(); - core_urls.pop_back(); - - PT(HTTPChannel) channel = http->get_document(url); - if (!channel->download_to_file(pathname)) { - cerr << "Unable to download " << url << "\n"; - - } else if (!_coreapi_dll.full_verify(_root_dir)) { - cerr << "Mismatched download for " << url << "\n"; - - } else { - // successfully downloaded! - success = true; - break; - } - } - - if (!success) { - cerr << "Couldn't download core API.\n"; + if (!download_core_api()) { return false; } - - // Since we had to download some of it, might as well ask the core - // API to check all of it. - if (_verify_contents == P3D_VC_none) { - _verify_contents = P3D_VC_normal; - } + is_fresh = true; } // Now we've got the DLL. Load it. @@ -795,9 +728,19 @@ get_core_api() { if (!load_plugin(pathname, contents_filename.to_os_specific(), _host_url, _verify_contents, _this_platform, _log_dirname, _log_basename, trusted_environment, _console_environment, - _root_dir, "", cerr)) { - cerr << "Unable to launch core API in " << pathname << "\n"; - return false; + _root_dir, _host_dir, _start_dir, cerr)) { + + // If we're not sure this is the latest version, make sure it is + // up-to-date, and then try again. + if (is_fresh || !download_core_api() || + !load_plugin(pathname, contents_filename.to_os_specific(), + _host_url, _verify_contents, _this_platform, _log_dirname, + _log_basename, trusted_environment, _console_environment, + _root_dir, _host_dir, _start_dir, cerr)) { + + cerr << "Unable to launch core API in " << pathname << "\n"; + return false; + } } // Successfully loaded. @@ -822,6 +765,88 @@ get_core_api() { return true; } +//////////////////////////////////////////////////////////////////// +// Function: Panda3D::download_core_api +// Access: Protected +// Description: Downloads the latest version of the core API from +// the plug-in server. +//////////////////////////////////////////////////////////////////// +bool Panda3D:: +download_core_api() { + // The DLL file needs to be downloaded. Build up our list of + // URL's to attempt to download it from, in reverse order. + string url; + vector_string core_urls; + + // Our last act of desperation: hit the original host, with a + // query uniquifier, to break through any caches. + ostringstream strm; + strm << _download_url_prefix << _coreapi_dll.get_filename() + << "?" << time(NULL); + url = strm.str(); + core_urls.push_back(url); + + // Before we try that, we'll hit the original host, without a + // uniquifier. + url = _download_url_prefix; + url += _coreapi_dll.get_filename(); + core_urls.push_back(url); + + // And before we try that, we'll try two mirrors, at random. + vector_string mirrors; + choose_random_mirrors(mirrors, 2); + for (vector_string::iterator si = mirrors.begin(); + si != mirrors.end(); + ++si) { + url = (*si) + _coreapi_dll.get_filename(); + core_urls.push_back(url); + } + + // The very first thing we'll try is the super_mirror, if we have + // one. + if (!_super_mirror_url_prefix.empty()) { + url = _super_mirror_url_prefix + _coreapi_dll.get_filename(); + core_urls.push_back(url); + } + + // Now pick URL's off the list, and try them, until we have + // success. + Filename pathname = Filename::from_os_specific(_coreapi_dll.get_pathname(_root_dir)); + pathname.make_dir(); + HTTPClient *http = HTTPClient::get_global_ptr(); + + bool success = false; + while (!core_urls.empty()) { + url = core_urls.back(); + core_urls.pop_back(); + + PT(HTTPChannel) channel = http->get_document(url); + if (!channel->download_to_file(pathname)) { + cerr << "Unable to download " << url << "\n"; + + } else if (!_coreapi_dll.full_verify(_root_dir)) { + cerr << "Mismatched download for " << url << "\n"; + + } else { + // successfully downloaded! + success = true; + break; + } + } + + if (!success) { + cerr << "Couldn't download core API.\n"; + return false; + } + + // Since we had to download some of it, might as well ask the core + // API to check all of it. + if (_verify_contents == P3D_VC_none) { + _verify_contents = P3D_VC_normal; + } + return true; +} + //////////////////////////////////////////////////////////////////// // Function: Panda3D::usage // Access: Protected diff --git a/direct/src/plugin_standalone/panda3d.h b/direct/src/plugin_standalone/panda3d.h index 36603b93e6..94efc0c41f 100644 --- a/direct/src/plugin_standalone/panda3d.h +++ b/direct/src/plugin_standalone/panda3d.h @@ -48,6 +48,7 @@ protected: void add_mirror(string mirror_url); void choose_random_mirrors(vector_string &result, int num_mirrors); bool get_core_api(); + bool download_core_api(); void usage(); diff --git a/direct/src/plugin_standalone/panda3dBase.h b/direct/src/plugin_standalone/panda3dBase.h index 0f577f39fe..f53e59b14c 100644 --- a/direct/src/plugin_standalone/panda3dBase.h +++ b/direct/src/plugin_standalone/panda3dBase.h @@ -74,6 +74,7 @@ protected: string _host_url; string _root_dir; string _host_dir; + string _start_dir; string _log_dirname; string _log_basename; string _this_platform; From 6b7cbc5f2fe746a2600c3f1c9f819b4d52a6b12c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 16 Aug 2015 13:51:25 +0200 Subject: [PATCH 082/200] Fix issue running makepanda on German computers --- makepanda/makepandacore.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 3d45411016..7b1770fe77 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2290,6 +2290,9 @@ def SetupBuildEnvironment(compiler): print("Target OS: %s" % GetTarget()) print("Target arch: %s" % GetTargetArch()) + # Set to English so we can safely parse the result of gcc commands. + os.environ["LC_ALL"] = "C" + if compiler == "MSVC": # Add the visual studio tools to PATH et al. SetupVisualStudioEnviron() From e178ca4c9bed35a026d8a64b735d7abe25f4bce3 Mon Sep 17 00:00:00 2001 From: tobspr Date: Sun, 16 Aug 2015 10:45:59 +0200 Subject: [PATCH 083/200] Fix missing imports in showbase when using sticky keys (was broken with commit 0aa0f34c7498131ab67077be83be3c93a0e9ca83) --- direct/src/showbase/ShowBase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 9ab3184d6a..e6c0f623e4 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -9,6 +9,8 @@ __all__ = ['ShowBase', 'WindowControls'] from panda3d.core import * from panda3d.direct import get_config_showbase, throw_new_frame, init_app_for_gui +from panda3d.direct import storeAccessibilityShortcutKeys, allowAccessibilityShortcutKeys + # This needs to be available early for DirectGUI imports import __builtin__ as builtins From 1c1efa7f17981ee559f150effbc444878e1077f4 Mon Sep 17 00:00:00 2001 From: tobspr Date: Sat, 15 Aug 2015 21:35:18 +0200 Subject: [PATCH 084/200] Fix Texture:estimate_texture_memory() --- panda/src/gobj/texture.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index e2cd069a75..4131da068c 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -502,11 +502,14 @@ estimate_texture_memory() const { case Texture::F_green: case Texture::F_blue: case Texture::F_luminance: + case Texture::F_sluminance: + bpp = 1; + break; + case Texture::F_luminance_alpha: case Texture::F_luminance_alphamask: - case Texture::F_sluminance: case Texture::F_sluminance_alpha: - bpp = 4; + bpp = 2; break; case Texture::F_rgba: @@ -529,13 +532,16 @@ estimate_texture_memory() const { break; case Texture::F_depth_stencil: + bpp = 4; + break; + case Texture::F_depth_component: - bpp = 32; + bpp = 2; break; case Texture::F_rgba12: case Texture::F_rgb12: - bpp = 6; + bpp = 8; break; case Texture::F_rgba16: @@ -554,7 +560,7 @@ estimate_texture_memory() const { bpp = 4; break; case Texture::F_rgb16: - bpp = 6; + bpp = 8; break; case Texture::F_r32i: From 2ea3e3f65a6454f003cae25f441df451a185be63 Mon Sep 17 00:00:00 2001 From: tobspr Date: Sun, 16 Aug 2015 08:29:14 +0200 Subject: [PATCH 085/200] Fix occasional crash when connecting to pstats --- panda/src/display/graphicsStateGuardian.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index ee69ed5fba..9fbe8b9606 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1960,7 +1960,7 @@ flush_timer_queries() { if (_pending_timer_queries[i]->is_answer_ready()) { first = count; - while (i < count) { + while (i < count - 1) { if (!_pending_timer_queries[++i]->is_answer_ready()) { first = i; break; From 9868d8719696b49646a5ff8d667ae25baf465f2e Mon Sep 17 00:00:00 2001 From: tobspr Date: Sat, 15 Aug 2015 21:09:53 +0200 Subject: [PATCH 086/200] Add Texture::F_r11_g11_b10 --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 15 +++++++++++++++ panda/src/gobj/texture.cxx | 12 ++++++++++++ panda/src/gobj/texture.h | 3 +++ 3 files changed, 30 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index b552d1dec7..f1fafe212a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -7763,6 +7763,7 @@ get_external_image_format(Texture *tex) const { case Texture::F_depth_component24: case Texture::F_depth_component32: case Texture::F_depth_stencil: + case Texture::F_r11_g11_b10: // This shouldn't be possible. nassertr(false, GL_RGB); break; @@ -7946,6 +7947,7 @@ get_external_image_format(Texture *tex) const { case Texture::F_rgb16: case Texture::F_rgb32: case Texture::F_srgb: + case Texture::F_r11_g11_b10: #ifdef OPENGLES return GL_RGB; #else @@ -8044,6 +8046,7 @@ get_internal_image_format(Texture *tex, bool force_sized) const { case Texture::F_rgb8i: case Texture::F_rgba8i: case Texture::F_r32i: + case Texture::F_r11_g11_b10: // Unsupported; fall through to below. break; @@ -8536,6 +8539,11 @@ get_internal_image_format(Texture *tex, bool force_sized) const { return GL_R32I; #endif +#ifndef OPENGLES + case Texture::F_r11_g11_b10: + return GL_R11F_G11F_B10F; +#endif + default: GLCAT.error() << "Invalid image format in get_internal_image_format(): " @@ -12105,6 +12113,13 @@ do_extract_texture_data(CLP(TextureContext) *gtc) { break; #endif +#ifndef OPENGLES + case GL_R11F_G11F_B10F: + type = Texture::T_float; + format = Texture::F_r11_g11_b10; + break; +#endif + #ifdef OPENGLES_2 case GL_RED_EXT: case GL_R8_EXT: diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 37bdce45c9..5ae858a926 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -577,6 +577,10 @@ estimate_texture_memory() const { bpp = 12; break; + case Texture::F_r11_g11_b10: + bpp = 4; + break; + default: break; } @@ -1701,6 +1705,9 @@ write(ostream &out, int indent_level) const { case F_rgba8i: out << "rgba8i"; break; + case F_r11_g11_b10: + out << "r11_g11_b10"; + break; } if (cdata->_compression != CM_default) { @@ -2115,6 +2122,8 @@ format_format(Format format) { return "rgb8i"; case F_rgba8i: return "rgba8i"; + case F_r11_g11_b10: + return "r11g11b10"; } return "**invalid**"; } @@ -2201,6 +2210,8 @@ string_format(const string &str) { return F_rg32; } else if (cmp_nocase(str, "rgb32") == 0 || cmp_nocase(str, "r32g32b32") == 0) { return F_rgb32; + } else if (cmp_nocase(str, "r11g11b10") == 0) { + return F_r11_g11_b10; } gobj_cat->error() @@ -5181,6 +5192,7 @@ do_set_format(CData *cdata, Texture::Format format) { case F_srgb: case F_rgb32: case F_rgb8i: + case F_r11_g11_b10: cdata->_num_components = 3; break; diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index 729f3671ec..adfc8258bd 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -156,6 +156,9 @@ PUBLISHED: F_rg8i, // 8 integer bits per R,G channel F_rgb8i, // 8 integer bits per R,G,B channel F_rgba8i, // 8 integer bits per R,G,B,A channel + + F_r11_g11_b10, // unsigned floating-point, 11 Red, 11 Green, 10 Blue Bits + }; // Deprecated. See SamplerState.FilterType. From 7ed146a4bf1d8c291e5d23866fdbcc76b33805b0 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 17 Aug 2015 21:34:10 +0200 Subject: [PATCH 087/200] Check environment var names case-insensitively on Windows to avoid PATH vs Path variable conflict --- direct/src/plugin/p3dSession.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 3e6189ce4d..2d6f8b8e94 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -928,7 +928,11 @@ start_p3dpython(P3DInstance *inst) { const char *varc = var.c_str(); bool found = false; for (int i = 0; dont_keep[i] != NULL && !found; ++i) { +#ifdef _WIN32 + found = (_stricmp(dont_keep[i], varc) == 0); +#else found = (strcmp(dont_keep[i], varc) == 0); +#endif } if (!found) { // This variable is OK, keep it. From f14f7d19136db15c4a27ebcfab53daa48c46c75a Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 18 Aug 2015 17:46:38 +0200 Subject: [PATCH 088/200] Add missing 'os' module import --- direct/src/stdpy/file.py | 1 + 1 file changed, 1 insertion(+) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index 25f5b6e1a1..a3e114738c 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -13,6 +13,7 @@ __all__ = [ from panda3d import core import sys import types +import os _vfs = core.VirtualFileSystem.getGlobalPtr() From 7fa0d3c60aa853adc67a5c8574030ee3595a8236 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 20 Aug 2015 18:58:13 +0200 Subject: [PATCH 089/200] Fix bug #1457688: libRocket elements show solid white in tinydisplay --- panda/src/pgraph/renderState.cxx | 25 ++++++++++++++++++++++ panda/src/pgraph/renderState.h | 5 +++++ panda/src/rocket/rocketRenderInterface.cxx | 4 +++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index a7cf3ecddc..f41ad4c4ef 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -352,6 +352,31 @@ make(const RenderAttrib *attrib1, return return_new(state); } +//////////////////////////////////////////////////////////////////// +// Function: RenderState::make +// Access: Published, Static +// Description: Returns a RenderState with five attributes set. +//////////////////////////////////////////////////////////////////// +CPT(RenderState) RenderState:: +make(const RenderAttrib *attrib1, + const RenderAttrib *attrib2, + const RenderAttrib *attrib3, + const RenderAttrib *attrib4, + const RenderAttrib *attrib5, int override) { + RenderState *state = new RenderState; + state->_attributes[attrib1->get_slot()].set(attrib1, override); + state->_attributes[attrib2->get_slot()].set(attrib2, override); + state->_attributes[attrib3->get_slot()].set(attrib3, override); + state->_attributes[attrib4->get_slot()].set(attrib4, override); + state->_attributes[attrib5->get_slot()].set(attrib5, override); + state->_filled_slots.set_bit(attrib1->get_slot()); + state->_filled_slots.set_bit(attrib2->get_slot()); + state->_filled_slots.set_bit(attrib3->get_slot()); + state->_filled_slots.set_bit(attrib4->get_slot()); + state->_filled_slots.set_bit(attrib5->get_slot()); + return return_new(state); +} + //////////////////////////////////////////////////////////////////// // Function: RenderState::make // Access: Published, Static diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index e1bc57d632..d3738849a7 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -87,6 +87,11 @@ PUBLISHED: const RenderAttrib *attrib2, const RenderAttrib *attrib3, const RenderAttrib *attrib4, int override = 0); + static CPT(RenderState) make(const RenderAttrib *attrib1, + const RenderAttrib *attrib2, + const RenderAttrib *attrib3, + const RenderAttrib *attrib4, + const RenderAttrib *attrib5, int override = 0); static CPT(RenderState) make(const RenderAttrib * const *attrib, int num_attribs, int override = 0); diff --git a/panda/src/rocket/rocketRenderInterface.cxx b/panda/src/rocket/rocketRenderInterface.cxx index c3d7af2ffa..90304cda3b 100644 --- a/panda/src/rocket/rocketRenderInterface.cxx +++ b/panda/src/rocket/rocketRenderInterface.cxx @@ -20,6 +20,7 @@ #include "internalName.h" #include "geomVertexWriter.h" #include "geomTriangles.h" +#include "colorAttrib.h" #include "colorBlendAttrib.h" #include "cullBinAttrib.h" #include "depthTestAttrib.h" @@ -49,7 +50,8 @@ render(Rocket::Core::Context* context, CullTraverser *trav) { ColorBlendAttrib::make(ColorBlendAttrib::M_add, ColorBlendAttrib::O_incoming_alpha, ColorBlendAttrib::O_one_minus_incoming_alpha - ) + ), + ColorAttrib::make_vertex() ); _dimensions = context->GetDimensions(); From a359ef8a0b8875dcf3c26ead010aad381ae91774 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 20 Aug 2015 21:04:32 +0200 Subject: [PATCH 090/200] Clamp colors to 0-1 range in tinydisplay --- panda/src/tinydisplay/clip.cxx | 18 ++++++++--------- .../tinydisplay/tinyGraphicsStateGuardian.cxx | 20 +++++++++++-------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/panda/src/tinydisplay/clip.cxx b/panda/src/tinydisplay/clip.cxx index ca1f7930d7..da20a86adc 100644 --- a/panda/src/tinydisplay/clip.cxx +++ b/panda/src/tinydisplay/clip.cxx @@ -42,15 +42,15 @@ void gl_transform_to_viewport(GLContext *c,GLVertex *v) } /* color */ - v->zp.r=(int)(v->color.v[0] * (ZB_POINT_RED_MAX - ZB_POINT_RED_MIN) - + ZB_POINT_RED_MIN); - v->zp.g=(int)(v->color.v[1] * (ZB_POINT_GREEN_MAX - ZB_POINT_GREEN_MIN) - + ZB_POINT_GREEN_MIN); - v->zp.b=(int)(v->color.v[2] * (ZB_POINT_BLUE_MAX - ZB_POINT_BLUE_MIN) - + ZB_POINT_BLUE_MIN); - v->zp.a=(int)(v->color.v[3] * (ZB_POINT_ALPHA_MAX - ZB_POINT_ALPHA_MIN) - + ZB_POINT_ALPHA_MIN); - + v->zp.r=min((int)(v->color.v[0] * (ZB_POINT_RED_MAX - ZB_POINT_RED_MIN)) + + ZB_POINT_RED_MIN, ZB_POINT_RED_MAX); + v->zp.g=min((int)(v->color.v[1] * (ZB_POINT_GREEN_MAX - ZB_POINT_GREEN_MIN)) + + ZB_POINT_GREEN_MIN, ZB_POINT_GREEN_MAX); + v->zp.b=min((int)(v->color.v[2] * (ZB_POINT_BLUE_MAX - ZB_POINT_BLUE_MIN)) + + ZB_POINT_BLUE_MIN, ZB_POINT_BLUE_MAX); + v->zp.a=min((int)(v->color.v[3] * (ZB_POINT_ALPHA_MAX - ZB_POINT_ALPHA_MIN)) + + ZB_POINT_ALPHA_MIN, ZB_POINT_ALPHA_MAX); + /* texture */ if (c->num_textures_enabled >= 1) { static const int si = 0; diff --git a/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx b/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx index e477deae9c..b9efe215c5 100644 --- a/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx +++ b/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx @@ -234,6 +234,7 @@ clear(DrawableRegion *clearable) { PIXEL color = 0; if (clearable->get_clear_color_active()) { LColor v = clearable->get_clear_color(); + v = v.fmin(LColor(1, 1, 1, 1)).fmax(LColor::zero()); if (_current_properties->get_srgb_color()) { color = SRGBA_TO_PIXEL( @@ -697,10 +698,10 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, if (!needs_color) { const LColor &d = _scene_graph_color; const LColor &s = _current_color_scale; - _c->current_color.v[0] = d[0] * s[0]; - _c->current_color.v[1] = d[1] * s[1]; - _c->current_color.v[2] = d[2] * s[2]; - _c->current_color.v[3] = d[3] * s[3]; + _c->current_color.v[0] = max(d[0] * s[0], (PN_stdfloat)0); + _c->current_color.v[1] = max(d[1] * s[1], (PN_stdfloat)0); + _c->current_color.v[2] = max(d[2] * s[2], (PN_stdfloat)0); + _c->current_color.v[3] = max(d[3] * s[3], (PN_stdfloat)0); } bool needs_normal = false; @@ -756,10 +757,10 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, if (needs_color) { const LColor &d = rcolor.get_data4(); const LColor &s = _current_color_scale; - _c->current_color.v[0] = d[0] * s[0]; - _c->current_color.v[1] = d[1] * s[1]; - _c->current_color.v[2] = d[2] * s[2]; - _c->current_color.v[3] = d[3] * s[3]; + _c->current_color.v[0] = max(d[0] * s[0], (PN_stdfloat)0); + _c->current_color.v[1] = max(d[1] * s[1], (PN_stdfloat)0); + _c->current_color.v[2] = max(d[2] * s[2], (PN_stdfloat)0); + _c->current_color.v[3] = max(d[3] * s[3], (PN_stdfloat)0); if (_color_material_flags) { if (_color_material_flags & CMF_ambient) { @@ -1414,6 +1415,7 @@ framebuffer_copy_to_texture(Texture *tex, int view, int z, return false; } LColor border_color = tex->get_border_color(); + border_color = border_color.fmin(LColor(1, 1, 1, 1)).fmax(LColor::zero()); gltex->border_color.v[0] = border_color[0]; gltex->border_color.v[1] = border_color[1]; gltex->border_color.v[2] = border_color[2]; @@ -2565,6 +2567,7 @@ upload_texture(TinyTextureContext *gtc, bool force, bool uses_mipmaps) { return false; } LColor border_color = tex->get_border_color(); + border_color = border_color.fmin(LColor(1, 1, 1, 1)).fmax(LColor::zero()); gltex->border_color.v[0] = border_color[0]; gltex->border_color.v[1] = border_color[1]; gltex->border_color.v[2] = border_color[2]; @@ -2681,6 +2684,7 @@ upload_simple_texture(TinyTextureContext *gtc) { return false; } LColor border_color = tex->get_border_color(); + border_color = border_color.fmin(LColor(1, 1, 1, 1)).fmax(LColor::zero()); gltex->border_color.v[0] = border_color[0]; gltex->border_color.v[1] = border_color[1]; gltex->border_color.v[2] = border_color[2]; From 82f78139274d71e93acab2b8172896df7eef8bd7 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 20 Aug 2015 21:12:28 +0200 Subject: [PATCH 091/200] Fix assertion when resizing tinydisplay window to fullscreen on X11 --- panda/src/x11display/x11GraphicsWindow.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 709911479e..019ab05f05 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -514,8 +514,8 @@ set_properties_now(WindowProperties &properties) { XRRScreenSize *xrrs; xrrs = XRRSizes(_display, 0, &num_sizes); for (int i = 0; i < num_sizes; ++i) { - if (xrrs[i].width == properties.get_x_size() && - xrrs[i].height == properties.get_y_size()) { + if (xrrs[i].width == reqsizex && + xrrs[i].height == reqsizey) { new_size_id = i; } } From 4342ff741bacf11a595d1aa8e59d33a2efd8620e Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 20 Aug 2015 21:26:39 +0200 Subject: [PATCH 092/200] Pass exit status of panda process on to panda3d process (non-Windows only so far) --- direct/src/p3d/AppRunner.py | 4 +- direct/src/plugin/p3dPythonMain.cxx | 8 ++-- direct/src/plugin/p3dPythonRun.cxx | 64 ++++++++++++++++++----------- direct/src/plugin/p3dPythonRun.h | 2 +- direct/src/plugin/p3dSession.cxx | 44 ++++++++++++++------ direct/src/plugin/run_p3dpython.cxx | 13 +++--- direct/src/plugin/run_p3dpython.h | 8 ++-- 7 files changed, 89 insertions(+), 54 deletions(-) diff --git a/direct/src/p3d/AppRunner.py b/direct/src/p3d/AppRunner.py index ff63e5aa8d..7c080ad8e2 100644 --- a/direct/src/p3d/AppRunner.py +++ b/direct/src/p3d/AppRunner.py @@ -634,13 +634,13 @@ class AppRunner(DirectObject): try: taskMgr.run() - except SystemExit: + except SystemExit as err: # Presumably the window has already been shut down here, but shut # it down again for good measure. if hasattr(__builtin__, "base"): base.destroy() - self.notify.info("Normal exit.") + self.notify.info("Normal exit with status %d." % err.code) raise except: diff --git a/direct/src/plugin/p3dPythonMain.cxx b/direct/src/plugin/p3dPythonMain.cxx index bf218a8cb9..ef5b83e282 100644 --- a/direct/src/plugin/p3dPythonMain.cxx +++ b/direct/src/plugin/p3dPythonMain.cxx @@ -150,10 +150,10 @@ main(int argc, char *argv[]) { } } - if (!run_p3dpython(program_name, archive_file, input_handle, output_handle, - NULL, interactive_console)) { + int status = run_p3dpython(program_name, archive_file, input_handle, + output_handle, NULL, interactive_console); + if (status != 0) { cerr << "Failure on startup.\n"; - return 1; } - return 0; + return status; } diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index 667f34e7dc..6ef80cd224 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -137,8 +137,10 @@ P3DPythonRun:: // Access: Public // Description: Runs the embedded Python process. This method does // not return until the plugin is ready to exit. +// +// Returns the exit status, which will be 0 on success. //////////////////////////////////////////////////////////////////// -bool P3DPythonRun:: +int P3DPythonRun:: run_python() { #if defined(_WIN32) && defined(USE_DEBUG_PYTHON) // On Windows, in a debug build, we have to preload sys.dll_suffix = @@ -156,7 +158,7 @@ run_python() { if (panda3d_module == NULL) { nout << "Failed to create panda3d module:\n"; PyErr_Print(); - return false; + return 1; } // Set the __path__ such that it can find panda3d/core.pyd, etc. @@ -174,7 +176,7 @@ run_python() { if (vfsimporter == NULL) { nout << "Failed to import _vfsimporter:\n"; PyErr_Print(); - return false; + return 1; } Py_DECREF(vfsimporter); @@ -183,7 +185,7 @@ run_python() { if (vfsimporter_module == NULL) { nout << "Failed to import VFSImporter:\n"; PyErr_Print(); - return false; + return 1; } // And register the VFSImporter. @@ -191,7 +193,7 @@ run_python() { if (result == NULL) { nout << "Failed to call VFSImporter.register():\n"; PyErr_Print(); - return false; + return 1; } Py_DECREF(result); Py_DECREF(vfsimporter_module); @@ -203,12 +205,12 @@ run_python() { PT(Multifile) mf = new Multifile; if (!mf->open_read(_archive_file)) { nout << "Could not read " << _archive_file << "\n"; - return false; + return 1; } VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); if (!vfs->mount(mf, dir, VirtualFileSystem::MF_read_only)) { nout << "Could not mount " << _archive_file << "\n"; - return false; + return 1; } // And finally, we can import the startup module. @@ -216,7 +218,7 @@ run_python() { if (app_runner_module == NULL) { nout << "Failed to import direct.p3d.AppRunner\n"; PyErr_Print(); - return false; + return 1; } // Get the pointers to the objects needed within the module. @@ -224,7 +226,7 @@ run_python() { if (app_runner_class == NULL) { nout << "Failed to get AppRunner class\n"; PyErr_Print(); - return false; + return 1; } // Construct an instance of AppRunner. @@ -232,7 +234,7 @@ run_python() { if (_runner == NULL) { nout << "Failed to construct AppRunner instance\n"; PyErr_Print(); - return false; + return 1; } Py_DECREF(app_runner_class); @@ -240,35 +242,35 @@ run_python() { _undefined_object_class = PyObject_GetAttrString(app_runner_module, "UndefinedObject"); if (_undefined_object_class == NULL) { PyErr_Print(); - return false; + return 1; } // And the "Undefined" instance. _undefined = PyObject_GetAttrString(app_runner_module, "Undefined"); if (_undefined == NULL) { PyErr_Print(); - return false; + return 1; } // Get the ConcreteStruct class. _concrete_struct_class = PyObject_GetAttrString(app_runner_module, "ConcreteStruct"); if (_concrete_struct_class == NULL) { PyErr_Print(); - return false; + return 1; } // Get the BrowserObject class. _browser_object_class = PyObject_GetAttrString(app_runner_module, "BrowserObject"); if (_browser_object_class == NULL) { PyErr_Print(); - return false; + return 1; } // Get the global TaskManager. _taskMgr = PyObject_GetAttrString(app_runner_module, "taskMgr"); if (_taskMgr == NULL) { PyErr_Print(); - return false; + return 1; } Py_DECREF(app_runner_module); @@ -285,12 +287,12 @@ run_python() { PyObject *p3dpython = Py_InitModule("p3dpython", p3dpython_methods); if (p3dpython == NULL) { PyErr_Print(); - return false; + return 1; } PyObject *request_func = PyObject_GetAttrString(p3dpython, "request_func"); if (request_func == NULL) { PyErr_Print(); - return false; + return 1; } // Now pass that func pointer back to our AppRunner instance, so it @@ -298,7 +300,7 @@ run_python() { result = PyObject_CallMethod(_runner, (char *)"setRequestFunc", (char *)"N", request_func); if (result == NULL) { PyErr_Print(); - return false; + return 1; } Py_DECREF(result); @@ -318,7 +320,7 @@ run_python() { PyObject *check_comm = PyObject_GetAttrString(p3dpython, "check_comm"); if (check_comm == NULL) { PyErr_Print(); - return false; + return 1; } // Add it to the task manager. We do this instead of constructing a @@ -326,7 +328,7 @@ run_python() { result = PyObject_CallMethod(_taskMgr, (char *)"add", (char *)"Ns", check_comm, "check_comm"); if (result == NULL) { PyErr_Print(); - return false; + return 1; } Py_DECREF(result); @@ -334,18 +336,30 @@ run_python() { // taskMgr.run()). PyObject *done = PyObject_CallMethod(_runner, (char *)"run", (char *)""); if (done == NULL) { + int status = 1; + // An uncaught application exception, and not handled by - // appRunner.exceptionHandler. - PyErr_Print(); + // appRunner.exceptionHandler. If it is a SystemExit, extract + // the exit status that we should return. + if (PyErr_Occurred() == PyExc_SystemExit) { + PyObject *ptype, *ptraceback; + PySystemExitObject *value = NULL; + PyErr_Fetch(&ptype, (PyObject **)&value, &ptraceback); + if (value != NULL) { + status = (int)PyInt_AsLong(value->code); + } + } else { + PyErr_Print(); + } if (_interactive_console) { // Give an interactive user a chance to explore the exception. run_interactive_console(); - return true; + return 0; } // We're done. - return false; + return status; } // A normal exit from the taskManager. We're presumably done. @@ -355,7 +369,7 @@ run_python() { run_interactive_console(); } - return true; + return 0; } //////////////////////////////////////////////////////////////////// diff --git a/direct/src/plugin/p3dPythonRun.h b/direct/src/plugin/p3dPythonRun.h index 1f52c5eeb1..824def1cfe 100644 --- a/direct/src/plugin/p3dPythonRun.h +++ b/direct/src/plugin/p3dPythonRun.h @@ -71,7 +71,7 @@ public: const char *log_pathname, bool interactive_console); ~P3DPythonRun(); - bool run_python(); + int run_python(); void set_window_open(P3DCInstance *inst, bool is_open); void request_keyboard_focus(P3DCInstance *inst); diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 2d6f8b8e94..da9b30874f 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -179,18 +179,27 @@ shutdown() { result = waitpid(_p3dpython_pid, &status, WNOHANG); } _p3dpython_pid = -1; - + nout << "Python process has successfully stopped.\n"; if (WIFEXITED(status)) { - nout << " exited normally, status = " - << WEXITSTATUS(status) << "\n"; + int code = WEXITSTATUS(status); + + nout << " exited normally, status = " << code << "\n"; + if (code != 0) { + _exit(code); + } + } else if (WIFSIGNALED(status)) { - nout << " signalled by " << WTERMSIG(status) << ", core = " + nout << " signalled by " << WTERMSIG(status) << ", core = " << WCOREDUMP(status) << "\n"; + + // This seems to be a popular shell convention. + _exit(128 + WTERMSIG(status)); + } else if (WIFSTOPPED(status)) { nout << " stopped by " << WSTOPSIG(status) << "\n"; } - + #endif // _WIN32 } @@ -1708,15 +1717,24 @@ posix_create_process() { // its process. Report an error condition. nout << "Python process stopped immediately.\n"; if (WIFEXITED(status)) { - nout << " exited normally, status = " - << WEXITSTATUS(status) << "\n"; + int code = WEXITSTATUS(status); + + nout << " exited normally, status = " << code << "\n"; + if (code != 0) { + _exit(code); + } + } else if (WIFSIGNALED(status)) { - nout << " signalled by " << WTERMSIG(status) << ", core = " + nout << " signalled by " << WTERMSIG(status) << ", core = " << WCOREDUMP(status) << "\n"; + + // This seems to be a popular shell convention. + _exit(128 + WTERMSIG(status)); + } else if (WIFSTOPPED(status)) { nout << " stopped by " << WSTOPSIG(status) << "\n"; } - + return -1; } #endif // _WIN32 @@ -1798,10 +1816,12 @@ p3dpython_thread_run() { return; } - if (!run_p3dpython(libp3dpython.c_str(), _mf_filename.c_str(), - _input_handle, _output_handle, _log_pathname.c_str(), - _interactive_console)) { + int status = run_p3dpython(libp3dpython.c_str(), _mf_filename.c_str(), + _input_handle, _output_handle, _log_pathname.c_str(), + _interactive_console); + if (status != 0) { nout << "Failure on startup.\n"; + _exit(status); } } diff --git a/direct/src/plugin/run_p3dpython.cxx b/direct/src/plugin/run_p3dpython.cxx index e5db32d10e..5a7dc4c742 100644 --- a/direct/src/plugin/run_p3dpython.cxx +++ b/direct/src/plugin/run_p3dpython.cxx @@ -19,16 +19,17 @@ // Function: run_p3dpython // Description: This externally-visible function is the main entry // point to this DLL, and it starts the whole thing -// running. Returns true on success, false on failure. +// running. Returns the exit status, which will be +// 0 on success, 1 or otherwise on failure. //////////////////////////////////////////////////////////////////// -bool +int run_p3dpython(const char *program_name, const char *archive_file, - FHandle input_handle, FHandle output_handle, + FHandle input_handle, FHandle output_handle, const char *log_pathname, bool interactive_console) { - P3DPythonRun::_global_ptr = - new P3DPythonRun(program_name, archive_file, input_handle, output_handle, + P3DPythonRun::_global_ptr = + new P3DPythonRun(program_name, archive_file, input_handle, output_handle, log_pathname, interactive_console); - bool result = P3DPythonRun::_global_ptr->run_python(); + int result = P3DPythonRun::_global_ptr->run_python(); delete P3DPythonRun::_global_ptr; P3DPythonRun::_global_ptr = NULL; return result; diff --git a/direct/src/plugin/run_p3dpython.h b/direct/src/plugin/run_p3dpython.h index 21d5430f54..6b358b742b 100644 --- a/direct/src/plugin/run_p3dpython.h +++ b/direct/src/plugin/run_p3dpython.h @@ -26,14 +26,14 @@ #define EXPCL_P3DPYTHON #endif -typedef bool +typedef int run_p3dpython_func(const char *program_name, const char *archive_file, - FHandle input_handle, FHandle output_handle, + FHandle input_handle, FHandle output_handle, const char *log_pathname, bool interactive_console); -extern "C" EXPCL_P3DPYTHON bool +extern "C" EXPCL_P3DPYTHON int run_p3dpython(const char *program_name, const char *archive_file, - FHandle input_handle, FHandle output_handle, + FHandle input_handle, FHandle output_handle, const char *log_pathname, bool interactive_console); #endif From eecded05bdd04cafe93793efdc97742b58903e83 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 20 Aug 2015 21:59:12 +0200 Subject: [PATCH 093/200] Fix broken imports in ParticleTest --- direct/src/particles/ParticleTest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/particles/ParticleTest.py b/direct/src/particles/ParticleTest.py index 786e6f90dc..7937bfec2b 100644 --- a/direct/src/particles/ParticleTest.py +++ b/direct/src/particles/ParticleTest.py @@ -2,8 +2,8 @@ if __name__ == "__main__": from direct.directbase.TestStart import * - from pandac.LinearVectorForce import LinearVectorForce - from pandac.Vec3 import Vec3 + from panda3d.physics import LinearVectorForce + from panda3d.core import Vec3 import ParticleEffect from direct.tkpanels import ParticlePanel import Particles From 902bce01e972b20abd7172503078ef93be066ed9 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 22 Aug 2015 19:16:21 +0200 Subject: [PATCH 094/200] Fix various window sizing issues on X11 --- panda/src/x11display/x11GraphicsWindow.cxx | 136 ++++++++++++--------- panda/src/x11display/x11GraphicsWindow.h | 2 + 2 files changed, 80 insertions(+), 58 deletions(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 019ab05f05..82a1180cf3 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -429,6 +429,7 @@ process_events() { // inner corner, anyway, but that means we need to fix // XConfigureWindow too.) properties.set_origin(configure_event.x, configure_event.y); + properties.set_size(configure_event.width, configure_event.height); if (_properties.get_fixed_size()) { // If the window properties indicate a fixed size only, undo @@ -436,21 +437,15 @@ process_events() { // doesn't appear to be a way to universally disallow this // directly (although we do set the min_size and max_size to // the same value, which seems to work for most window - // managers.) Incidentally, this also works to force my - // tiling window manager into 'floating' mode. - WindowProperties current_props = get_properties(); - if (configure_event.width != current_props.get_x_size() || - configure_event.height != current_props.get_y_size()) { + // managers.) + if (configure_event.width != _fixed_size.get_x() || + configure_event.height != _fixed_size.get_y()) { XWindowChanges changes; - changes.width = current_props.get_x_size(); - changes.height = current_props.get_y_size(); + changes.width = _fixed_size.get_x(); + changes.height = _fixed_size.get_y(); int value_mask = (CWWidth | CWHeight); XConfigureWindow(_display, _xwindow, value_mask, &changes); } - - } else { - // A normal window may be resized by the user at will. - properties.set_size(configure_event.width, configure_event.height); } changed_properties = true; } @@ -494,16 +489,19 @@ set_properties_now(WindowProperties &properties) { x11GraphicsPipe *x11_pipe; DCAST_INTO_V(x11_pipe, _pipe); - // Handle fullscreen mode. - if (properties.has_fullscreen()) { - if (properties.get_fullscreen()) { + // We're either going into or out of fullscreen, or are in fullscreen + // and are changing the resolution. + bool is_fullscreen = _properties.has_fullscreen() && _properties.get_fullscreen(); + bool want_fullscreen = properties.has_fullscreen() ? properties.get_fullscreen() : is_fullscreen; + + if (is_fullscreen != want_fullscreen || (is_fullscreen && properties.has_size())) { + if (want_fullscreen) { if (_have_xrandr) { #ifdef HAVE_XRANDR XRRScreenConfiguration* conf = XRRGetScreenInfo(_display, x11_pipe->get_root()); - if (_orig_size_id == (SizeID) -1) { - _orig_size_id = XRRConfigCurrentConfiguration(conf, &_orig_rotation); - } - int num_sizes, reqsizex, reqsizey, new_size_id = -1; + SizeID old_size_id = XRRConfigCurrentConfiguration(conf, &_orig_rotation); + SizeID new_size_id = (SizeID) -1; + int num_sizes = 0, reqsizex, reqsizey; if (properties.has_size()) { reqsizex = properties.get_x_size(); reqsizey = properties.get_y_size(); @@ -519,16 +517,18 @@ set_properties_now(WindowProperties &properties) { new_size_id = i; } } - if (new_size_id == -1) { + if (new_size_id == (SizeID) -1) { x11display_cat.error() << "Videocard has no supported display resolutions at specified res (" - << reqsizex << " x " << reqsizey <<")\n"; - _orig_size_id = -1; + << reqsizex << " x " << reqsizey << ")\n"; } else { - if (new_size_id != _orig_size_id) { + if (new_size_id != old_size_id) { + XRRSetScreenConfig(_display, conf, x11_pipe->get_root(), new_size_id, _orig_rotation, CurrentTime); - } else { - _orig_size_id = -1; + if (_orig_size_id == (SizeID) -1) { + // Remember the original resolution so we can switch back to it. + _orig_size_id = old_size_id; + } } } #endif @@ -545,7 +545,7 @@ set_properties_now(WindowProperties &properties) { if (_have_xrandr && _orig_size_id != (SizeID) -1) { XRRScreenConfiguration* conf = XRRGetScreenInfo(_display, x11_pipe->get_root()); XRRSetScreenConfig(_display, conf, x11_pipe->get_root(), _orig_size_id, _orig_rotation, CurrentTime); - _orig_size_id = -1; + _orig_size_id = (SizeID) -1; } #endif // Set the origin back to what it was @@ -589,8 +589,7 @@ set_properties_now(WindowProperties &properties) { // on the fly. // We'll pass some property requests on as a window manager hint. - WindowProperties wm_properties = _properties; - wm_properties.add_properties(properties); + set_wm_properties(properties, true); // The window title may be changed by issuing another hint request. // Assume this will be honored. @@ -617,6 +616,7 @@ set_properties_now(WindowProperties &properties) { changes.y = 0; value_mask |= CWX | CWY; properties.clear_origin(); + } else if (properties.has_origin()) { changes.x = properties.get_x_origin(); changes.y = properties.get_y_origin(); @@ -625,10 +625,21 @@ set_properties_now(WindowProperties &properties) { properties.clear_origin(); } + // This, too. But we can't currently change out of fixed_size mode. + if (properties.has_fixed_size() && properties.get_fixed_size()) { + _properties.set_fixed_size(properties.get_fixed_size()); + properties.clear_fixed_size(); + _fixed_size = _properties.get_size(); + } + if (properties.has_size()) { changes.width = properties.get_x_size(); changes.height = properties.get_y_size(); value_mask |= (CWWidth | CWHeight); + + if (_properties.get_fixed_size()) { + _fixed_size = properties.get_size(); + } properties.clear_size(); } @@ -656,13 +667,6 @@ set_properties_now(WindowProperties &properties) { properties.clear_z_order(); } - if (value_mask != 0) { - XReconfigureWMWindow(_display, _xwindow, _screen, value_mask, &changes); - - // Don't draw anything until this is done reconfiguring. - _awaiting_configure = true; - } - // We hide the cursor by setting it to an invisible pixmap. // We can also load a custom cursor from a file. if (properties.has_cursor_hidden() || properties.has_cursor_filename()) { @@ -783,7 +787,14 @@ set_properties_now(WindowProperties &properties) { } } - set_wm_properties(wm_properties, true); + if (value_mask != 0) { + // We must call this after changing the WM properties, otherwise + // we may get misleading ConfigureNotify events in the wrong order. + XReconfigureWMWindow(_display, _xwindow, _screen, value_mask, &changes); + + // Don't draw anything until this is done reconfiguring. + _awaiting_configure = true; + } } //////////////////////////////////////////////////////////////////// @@ -962,6 +973,11 @@ open_window() { << "failed to create X window.\n"; return false; } + + if (_properties.get_fixed_size()) { + _fixed_size = _properties.get_size(); + } + set_wm_properties(_properties, false); // We don't specify any fancy properties of the XIC. It would be @@ -1034,8 +1050,8 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) { XTextProperty window_name; XTextProperty *window_name_p = (XTextProperty *)NULL; if (properties.has_title()) { - char *name = (char *)properties.get_title().c_str(); - if (XStringListToTextProperty(&name, 1, &window_name) != 0) { + const char *name = properties.get_title().c_str(); + if (XStringListToTextProperty((char **)&name, 1, &window_name) != 0) { window_name_p = &window_name; } } @@ -1056,18 +1072,19 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) { } size_hints_p->flags |= USPosition; } + LVecBase2i size = _properties.get_size(); if (properties.has_size()) { - size_hints_p->width = properties.get_x_size(); - size_hints_p->height = properties.get_y_size(); + size = properties.get_size(); + size_hints_p->width = size.get_x(); + size_hints_p->height = size.get_y(); size_hints_p->flags |= USSize; - - if (properties.get_fixed_size()) { - size_hints_p->min_width = properties.get_x_size(); - size_hints_p->min_height = properties.get_y_size(); - size_hints_p->max_width = properties.get_x_size(); - size_hints_p->max_height = properties.get_y_size(); - size_hints_p->flags |= (PMinSize | PMaxSize); - } + } + if (properties.get_fixed_size()) { + size_hints_p->min_width = size.get_x(); + size_hints_p->min_height = size.get_y(); + size_hints_p->max_width = size.get_x(); + size_hints_p->max_height = size.get_y(); + size_hints_p->flags |= (PMinSize | PMaxSize); } } } @@ -1107,18 +1124,21 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) { SetAction set_data[max_set_data]; int next_set_data = 0; - if (properties.get_fullscreen()) { - // For a "fullscreen" request, we pass this through, hoping the - // window manager will support EWMH. - type_data[next_type_data++] = x11_pipe->_net_wm_window_type_fullscreen; + if (properties.has_fullscreen()) { + if (properties.get_fullscreen()) { + // For a "fullscreen" request, we pass this through, hoping the + // window manager will support EWMH. + type_data[next_type_data++] = x11_pipe->_net_wm_window_type_fullscreen; - // We also request it as a state. - state_data[next_state_data++] = x11_pipe->_net_wm_state_fullscreen; - // Don't ask me why this has to be 1/0 and not _net_wm_state_add. - // It doesn't seem to work otherwise. - set_data[next_set_data++] = SetAction(x11_pipe->_net_wm_state_fullscreen, 1); - } else { - set_data[next_set_data++] = SetAction(x11_pipe->_net_wm_state_fullscreen, 0); + // We also request it as a state. + state_data[next_state_data++] = x11_pipe->_net_wm_state_fullscreen; + // Don't ask me why this has to be 1/0 and not _net_wm_state_add. + // It doesn't seem to work otherwise. + set_data[next_set_data++] = SetAction(x11_pipe->_net_wm_state_fullscreen, 1); + + } else { + set_data[next_set_data++] = SetAction(x11_pipe->_net_wm_state_fullscreen, 0); + } } // If we asked for a window without a border, there's no excellent diff --git a/panda/src/x11display/x11GraphicsWindow.h b/panda/src/x11display/x11GraphicsWindow.h index 9fc7210f60..b8c79c8a86 100644 --- a/panda/src/x11display/x11GraphicsWindow.h +++ b/panda/src/x11display/x11GraphicsWindow.h @@ -96,6 +96,8 @@ protected: SizeID _orig_size_id; #endif + LVecBase2i _fixed_size; + long _event_mask; bool _awaiting_configure; bool _dga_mouse_enabled; From 9f85086c10c7721f4bb9146badb56e0459f33316 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 22 Aug 2015 20:27:51 +0200 Subject: [PATCH 095/200] Apparently Python supports non-int status codes. Handle this correctly in the plug-in. --- direct/src/p3d/AppRunner.py | 2 +- direct/src/plugin/p3dPythonRun.cxx | 28 +++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/direct/src/p3d/AppRunner.py b/direct/src/p3d/AppRunner.py index 7c080ad8e2..76c979c465 100644 --- a/direct/src/p3d/AppRunner.py +++ b/direct/src/p3d/AppRunner.py @@ -640,7 +640,7 @@ class AppRunner(DirectObject): if hasattr(__builtin__, "base"): base.destroy() - self.notify.info("Normal exit with status %d." % err.code) + self.notify.info("Normal exit with status %s." % repr(err.code)) raise except: diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index 6ef80cd224..c42cf9263e 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -341,12 +341,30 @@ run_python() { // An uncaught application exception, and not handled by // appRunner.exceptionHandler. If it is a SystemExit, extract // the exit status that we should return. - if (PyErr_Occurred() == PyExc_SystemExit) { + if (PyErr_ExceptionMatches(PyExc_SystemExit)) { PyObject *ptype, *ptraceback; - PySystemExitObject *value = NULL; - PyErr_Fetch(&ptype, (PyObject **)&value, &ptraceback); - if (value != NULL) { - status = (int)PyInt_AsLong(value->code); + PyObject *value = NULL; + PyErr_Fetch(&ptype, &value, &ptraceback); + + if (value != NULL && PyExceptionInstance_Check(value)) { + PyObject *code = PyObject_GetAttrString(value, "code"); + if (code) { + Py_DECREF(value); + value = code; + } + } + + if (value == NULL || value == Py_None) { + status = 0; +#if PY_MAJOR_VERSION >= 3 + } else if (PyLong_Check(value)) { + status = (int)PyLong_AsLong(value); +#else + } else if (PyInt_Check(value)) { + status = (int)PyInt_AsLong(value); +#endif + } else { + status = 1; } } else { PyErr_Print(); From d8f655479a943f6cb8a9a15cf28756bffa9722c5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 23 Aug 2015 14:10:02 +0200 Subject: [PATCH 096/200] Remove references to SourceForge CVS repository --- direct/src/directscripts/cleancvstree | 44 ------- direct/src/directscripts/make-panda3d-tgz.py | 124 ------------------- makepanda/expandimports.bat | 2 +- makepanda/makechm.bat | 2 +- makepanda/makedocs.bat | 2 +- makepanda/makepanda.bat | 2 +- panda/src/doc/howto.install_vc7 | 95 -------------- 7 files changed, 4 insertions(+), 267 deletions(-) delete mode 100644 direct/src/directscripts/cleancvstree delete mode 100755 direct/src/directscripts/make-panda3d-tgz.py delete mode 100644 panda/src/doc/howto.install_vc7 diff --git a/direct/src/directscripts/cleancvstree b/direct/src/directscripts/cleancvstree deleted file mode 100644 index 92749714b7..0000000000 --- a/direct/src/directscripts/cleancvstree +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# -# cleancvstree -# -# Cleancvstree searches a CVS tree for files that are not in CVS, and -# deletes them. Be careful using it --- it's very aggressive. -# -############################################################################## - -import sys,os - -def cleanCvsTree(dir): - try: - sub = os.listdir(dir) - except: - print "Could not read directory: "+dir - return - valid = {} - try: - readentries = 0 - cvsent = open(dir + "/CVS/Entries") - for line in cvsent: - words = line.split("/") - if (len(words) > 1): - valid[words[1]] = 1 - cvsent.close() - readentries = 1 - except: - print "Could not read "+dir+"/CVS/Entries" - if (readentries): - for file in sub: - if (os.path.isfile(dir+"/"+file)): - if (valid.has_key(file)==0): - os.unlink(dir+"/"+file) - for file in sub: - if (file != "CVS"): - if (os.path.isdir(dir+"/"+file)): - cleanCvsTree(dir+"/"+file) - -if (os.path.isdir(sys.argv[1])==0): - print "Not a directory: "+sys.argv[1] - os.exit(1) - -cleanCvsTree(sys.argv[1]) diff --git a/direct/src/directscripts/make-panda3d-tgz.py b/direct/src/directscripts/make-panda3d-tgz.py deleted file mode 100755 index 33615bb0e3..0000000000 --- a/direct/src/directscripts/make-panda3d-tgz.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python - -"""This script generates the panda3d-date.tar.gz tarball for a file -release of panda3d onto the SourceForge download site. - -Options: - - -d cvsroot - Specifies the CVSROOT string to use to tag and export the - tree. The default is $SFROOT if it is defined, or $CVSROOT - otherwise. - - -r tag - Specifies the tag to export from. If this parameter is - specified, the tree is not tagged again; otherwise, the - current head of the CVS tree is tagged with the file version - name. - - -m module - Specifies the module to check out and build. The default is - panda3d. -""" - -import sys -import os -import os.path -import getopt -import time -import glob -import shutil - -CVSROOT = os.getenv('SFROOT') or os.getenv('CVSROOT') -ORIGTAG = '' -MODULE = 'panda3d' - -def usage(code, msg = ''): - print >> sys.stderr, __doc__ - print >> sys.stderr, msg - sys.exit(code) - -try: - opts, args = getopt.getopt(sys.argv[1:], 'd:r:m:h') -except getopt.error, msg: - usage(1, msg) - -for opt, arg in opts: - if opt == '-d': - CVSROOT = arg - elif opt == '-r': - ORIGTAG = arg - elif opt == '-m': - MODULE = arg - elif opt == '-h': - usage(0) - -if not CVSROOT: - usage(1, 'CVSROOT must have a value.') - -if not MODULE: - usage(1, 'MODULE must have a value.') - -basename = MODULE + '-' + time.strftime("%Y-%m-%d") -tarfile = basename + '.tar.gz' -zipfile = basename + '.zip' - -if os.path.exists(basename): - print basename, 'already exists in the local directory!' - sys.exit(1) - -if not ORIGTAG: - # If we weren't given a starting tag, make one. - tag = basename - - print 'Tagging sources.' - cmd = 'cvs -f -d "%s" rtag -F -r HEAD "%s" "%s"' % (CVSROOT, tag, MODULE) - if os.system(cmd) != 0: - sys.exit(1) -else: - # Otherwise, we were given a starting tag, so use it. - tag = ORIGTAG - -print 'Checking out "%s" as "%s".' % (MODULE, basename) -cmd = 'cvs -z3 -f -d "%s" export -r "%s" -d "%s" "%s"' % (CVSROOT, tag, - basename, MODULE) -if os.system(cmd) != 0: - sys.exit(1) - -# Move the contents of the doc module into the root directory where people -# will expect to see it. -docdir = basename + os.sep + 'doc' -if os.path.exists(docdir): - files = glob.glob(docdir + os.sep + '*') - for file in files: - shutil.copy(file, basename) - os.remove(file) - os.rmdir(docdir) - -# Generate the autoconf scripts for ppremake. -if MODULE == 'ppremake': - ppremakedir = basename -else: - ppremakedir = basename + os.sep + 'ppremake' -if os.path.exists(ppremakedir): - cmd = 'cd "./%s" && aclocal && autoheader && automake --foreign -a && autoconf' % (ppremakedir) - if os.system(cmd) != 0: - sys.exit(1) - -# Generate the tarball. -print 'Generating %s' % (tarfile) -if os.path.exists(tarfile): - os.remove(tarfile) -cmd = 'tar cf - "%s" | gzip -9 > "%s"' % (basename, tarfile) -if os.system(cmd) != 0: - sys.exit(1) - -# Also generate a zip file. -print 'Generating %s' % (zipfile) -if os.path.exists(zipfile): - os.remove(zipfile) -cmd = 'zip -9rq "%s" "%s"' % (zipfile, basename) -if os.system(cmd) != 0: - sys.exit(1) - -shutil.rmtree(basename) diff --git a/makepanda/expandimports.bat b/makepanda/expandimports.bat index ee2dcc6c3e..9f70fab96a 100644 --- a/makepanda/expandimports.bat +++ b/makepanda/expandimports.bat @@ -21,7 +21,7 @@ goto done :missing2 echo You seem to be missing the 'thirdparty' directory. You probably checked - echo the source code out from sourceforge. The sourceforge repository is + echo the source code out from GitHub. The GitHub repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done diff --git a/makepanda/makechm.bat b/makepanda/makechm.bat index 5a4b1b38e1..c644330344 100755 --- a/makepanda/makechm.bat +++ b/makepanda/makechm.bat @@ -21,7 +21,7 @@ goto done :missing2 echo You seem to be missing the 'thirdparty' directory. You probably checked - echo the source code out from sourceforge. The sourceforge repository is + echo the source code out from GitHub. The GitHub repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done diff --git a/makepanda/makedocs.bat b/makepanda/makedocs.bat index c628e2ec81..f1be388a10 100644 --- a/makepanda/makedocs.bat +++ b/makepanda/makedocs.bat @@ -21,7 +21,7 @@ goto done :missing2 echo You seem to be missing the 'thirdparty' directory. You probably checked - echo the source code out from sourceforge. The sourceforge repository is + echo the source code out from GitHub. The GitHub repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done diff --git a/makepanda/makepanda.bat b/makepanda/makepanda.bat index d8d3a25e8e..3908b4f69a 100755 --- a/makepanda/makepanda.bat +++ b/makepanda/makepanda.bat @@ -31,7 +31,7 @@ goto done :missing2 echo %thirdparty% echo You seem to be missing the 'thirdparty' directory. You probably checked - echo the source code out from sourceforge. The sourceforge repository is + echo the source code out from GitHub. The GitHub repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done diff --git a/panda/src/doc/howto.install_vc7 b/panda/src/doc/howto.install_vc7 deleted file mode 100644 index ec0caf2f2b..0000000000 --- a/panda/src/doc/howto.install_vc7 +++ /dev/null @@ -1,95 +0,0 @@ -VC7 upgrade instructions in 2 easy steps ------------------------- -Step 1. cvs update wintools & dtool - -Step 2. Run v:\msvc7\vc_setup\setup.exe, or install from the MSDN -'Visual Studio.NET' CD. Click on 'Windows Component Update' (if it is -highlighted, else click '2'). Click 'Continue' (Selecting 'Do not use -this machine to host web projects') You will install IE6, which will -requires a reboot. Give your pw if you want it to happen -automatically. - -After rebooting, setup should start again. If it does not, go back and -rerun it, it should remember where it left off. - -After installing components, you are ready to install VC7 in Step 2. -Enter this step and enter the product-key, which is stored in -V:\msvc7\vc7-prodkey.txt - -On the 'select items to install page', you need uncheck things to -avoid wasting gigs of extra space and install time. Uncheck -everything except for Language Tools->Visual C++, Server -Components->Remote Debugger->Native Remote Debugger, and if you want, -Documentation (this is a gig, and is only a slight update if you -already have MSDN installed locally though. You will want to -uninstall the separately-installed MSDN docs if you get this.) - -Unlike VC 6.0, there is no option to add the required compiler bin -directories to the environment path automatically. To do this, if you -are running from the NT command line, run -"C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat" - -If you are using tcsh.exe under cygwin, enable VC7 using -'source $WINTOOLS/etc/setup_msvc7.csh' - -You will want to copy the top portion of setup_msvc7.csh to your -.cshrc, so you can do 'set_msvc7' to set up the PATH properly in the -future, or you can add the required dirs to the front of your path -explicitly as well as 'setenv USE_COMPILER MSVC7' to always use VC7. -The easiest thing to do is just put the 'set_msvc7' at the end of your -.cshrc. - -IMPORTANT: - -After finishing this process, make sure you are using VC7 in your -shell by typing 'cl' at the prompt. If you see: - -> Microsoft (R)32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86 -> Copyright (C) Microsoft Corporation 1984-2001. - -then you have VC7. If you have still VC6, you will see -> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 -> Copyright (C) Microsoft Corp 1984-1998. - -If you try to build with this broken setup, the build process -will get confused and compile with VC6 but try to link with -the VC7 libraries and you will get link errors. - -To correct this problem, check your tcsh path to make sure it has the -.NET dirs in it, and make sure the cygwin softlink mount point /msvc7 -exists, and is not empty but points to the proper VC7 directory. Doing -'ls /msvc7' should give you something like - -Common7/ Visual Studio .NET Enterprise Architect - English/ -Crystal Reports/ Visual Studio SDKs/ -EnterpriseFrameworks/ contents.htm -FrameworkSDK/ readme.htm -Msdn/ redist.txt -Setup/ sqlserver/ -Vb7/ toc.htm -Vc7/ vdt70vcs.dll* - -If it does not, try running 'source ~/player/wintools/etc/setup_env.csh' -again to get it to do the -'mount -s C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET /msvc7' -cmd to create the softlink, or run the cmd yourself. - ---- -Notes: -The debug C runtime seems significantly slower than the vc6 one, which has -slowed Opt2 install builds considerably. ---------- -To distribute toontown, -We need to rebuild the python and nspr DLLs to link to the new -VC7 C and C++ runtime DLLs, which are -msvcp70.dll -msvcr70.dll - -and these must replace -msvcp60.dll -msvcrt.dll -in the Toontown download. - - - - From 563f6843a2a34bac6ec0421936b2d6146a63f68f Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 23 Aug 2015 14:56:03 +0200 Subject: [PATCH 097/200] Add -x option to packp3d, include 'cur' as an extractable extension by default --- direct/src/p3d/Packager.py | 4 ++-- direct/src/p3d/packp3d.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index b0a44d7fa2..2ab09422f0 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -2371,7 +2371,7 @@ class Packager: # Binary files that are copied (and compressed) without # processing. - self.binaryExtensions = [ 'ttf', 'TTF', 'mid', 'ico' ] + self.binaryExtensions = [ 'ttf', 'TTF', 'mid', 'ico', 'cur' ] # Files that can have an existence in multiple different # packages simultaneously without conflict. @@ -2411,7 +2411,7 @@ class Packager: } # Files that should be extracted to disk. - self.extractExtensions = self.executableExtensions[:] + self.manifestExtensions[:] + [ 'ico' ] + self.extractExtensions = self.executableExtensions[:] + self.manifestExtensions[:] + [ 'ico', 'cur' ] # Files that indicate a platform dependency. self.platformSpecificExtensions = self.executableExtensions[:] diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index b26c6d5b22..53a703b5eb 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -111,7 +111,7 @@ class ArgumentError(StandardError): pass def makePackedApp(args): - opts, args = getopt.getopt(args, 'o:d:m:S:e:n:p:c:r:s:Dh') + opts, args = getopt.getopt(args, 'o:d:m:S:e:n:x:p:c:r:s:Dh') packager = Packager.Packager() From 09f2bea96f96351f627a2b56259fc9f5ad86efd9 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 23 Aug 2015 14:56:53 +0200 Subject: [PATCH 098/200] Fix typo in error message --- direct/src/showbase/Loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py index 52f253d717..adee7fbe2b 100644 --- a/direct/src/showbase/Loader.py +++ b/direct/src/showbase/Loader.py @@ -855,7 +855,7 @@ class Loader(DirectObject): def loadShader (self, shaderPath, okMissing = False): shader = ShaderPool.loadShader (shaderPath) if not shader and not okMissing: - message = 'Could not shader file: %s' % (shaderPath) + message = 'Could not load shader file: %s' % (shaderPath) raise IOError, message return shader From 3ece15bba014d88ee89a517740edafa1e2688ef0 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 23 Aug 2015 17:13:12 +0200 Subject: [PATCH 099/200] Implement texture clears for buffer textures --- .../glstuff/glGraphicsStateGuardian_src.cxx | 41 +++++++++++++++---- .../src/glstuff/glGraphicsStateGuardian_src.h | 5 +++ 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index f1fafe212a..1eda94595b 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -818,13 +818,28 @@ reset() { if (_glClearTexImage == NULL) { GLCAT.warning() - << "GL_ARB_clear_texture advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n"; + << "GL_ARB_clear_texture advertised as supported by OpenGL runtime, but could not get pointers to extension function.\n"; } else { _supports_clear_texture = true; } } #endif + _supports_clear_buffer = false; +#ifndef OPENGLES + if (is_at_least_gl_version(4, 3) || has_extension("GL_ARB_clear_buffer_object")) { + _glClearBufferData = (PFNGLCLEARBUFFERDATAPROC) + get_extension_func("glClearBufferData"); + + if (_glClearBufferData == NULL) { + GLCAT.warning() + << "GL_ARB_clear_buffer_object advertised as supported by OpenGL runtime, but could not get pointers to extension function.\n"; + } else { + _supports_clear_buffer = true; + } + } +#endif + _supports_2d_texture_array = false; #ifndef OPENGLES if (is_at_least_gl_version(3, 0)) { @@ -11303,13 +11318,25 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, // The texture has a clear color, so we should fill this mipmap // level to a solid color. #ifndef OPENGLES - if (_supports_clear_texture) { - // We can do that with the convenient glClearTexImage function. - string clear_data = tex->get_clear_data(); + if (texture_target != GL_TEXTURE_BUFFER) { + if (_supports_clear_texture) { + // We can do that with the convenient glClearTexImage function. + string clear_data = tex->get_clear_data(); - _glClearTexImage(gtc->_index, n - mipmap_bias, external_format, - component_type, (void *)clear_data.data()); - continue; + _glClearTexImage(gtc->_index, n - mipmap_bias, external_format, + component_type, (void *)clear_data.data()); + continue; + } + } else { + if (_supports_clear_buffer) { + // For buffer textures we need to clear the underlying storage. + string clear_data = tex->get_clear_data(); + cerr << "clearing buffer data\n"; + + _glClearBufferData(GL_TEXTURE_BUFFER, internal_format, external_format, + component_type, (const void *)clear_data.data()); + continue; + } } #endif // OPENGLES // Ask the Texture class to create the mipmap level in RAM. diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index a2a519d109..43ba33bdfd 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -695,6 +695,11 @@ public: PFNGLCLEARTEXIMAGEPROC _glClearTexImage; #endif + bool _supports_clear_buffer; +#ifndef OPENGLES + PFNGLCLEARBUFFERDATAPROC _glClearBufferData; +#endif + PFNGLCOMPRESSEDTEXIMAGE1DPROC _glCompressedTexImage1D; PFNGLCOMPRESSEDTEXIMAGE2DPROC _glCompressedTexImage2D; PFNGLCOMPRESSEDTEXIMAGE3DPROC _glCompressedTexImage3D; From d68bbae5b46b246f27d3796ac59dd48f302de7a9 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 26 Aug 2015 14:57:30 +0200 Subject: [PATCH 100/200] Don't add "(not used)" to config decls when writing them, it makes it harder to write out a config.prc file --- dtool/src/prc/configDeclaration.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtool/src/prc/configDeclaration.cxx b/dtool/src/prc/configDeclaration.cxx index 65cc4360d2..141c8d8adf 100644 --- a/dtool/src/prc/configDeclaration.cxx +++ b/dtool/src/prc/configDeclaration.cxx @@ -163,9 +163,9 @@ output(ostream &out) const { void ConfigDeclaration:: write(ostream &out) const { out << get_variable()->get_name() << " " << get_string_value(); - if (!get_variable()->is_used()) { - out << " (not used)"; - } + //if (!get_variable()->is_used()) { + // out << " (not used)"; + //} out << "\n"; } From 56b94eb8153984f2fbbe50e95ad5490ab458e26c Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 16:28:03 +0200 Subject: [PATCH 101/200] Don't raise exception in tp_traverse, instead silently passing case where object is already destructed --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index cf6434508b..1078582d53 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2237,8 +2237,7 @@ write_module_class(ostream &out, Object *obj) { out << " " << cClassName << " *local_this = NULL;\n"; out << " DTOOL_Call_ExtractThisPointerForType(self, &Dtool_" << ClassName << ", (void **) &local_this);\n"; out << " if (local_this == NULL) {\n"; - out << " PyErr_SetString(PyExc_AttributeError, \"C++ object is not yet constructed, or already destructed.\");\n"; - out << " return -1;\n"; + out << " return 0;\n"; out << " }\n\n"; // Find the remap. There should be only one. From 838589ef0ffb5b835ee731b304902c5aeef0faeb Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 20:14:05 +0200 Subject: [PATCH 102/200] Fix bug: excluded modules in one package would be implicitly excluded from packages that depend on it This fixes the lack of 'xml' package in the 'morepy' package. --- direct/src/p3d/Packager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 2ab09422f0..ef0ee784b9 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -2196,8 +2196,10 @@ class Packager: ext = Filename(lowerName).getExtension() if ext not in self.packager.nonuniqueExtensions: self.skipFilenames[lowerName] = True + for moduleName, mdef in package.moduleNames.items(): - self.skipModules[moduleName] = mdef + if not mdef.exclude: + self.skipModules[moduleName] = mdef # Packager constructor def __init__(self, platform = None): From 9053999889d1deb6d3ab9dc3751fa5539c496b82 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 21:40:08 +0200 Subject: [PATCH 103/200] Don't put important code in an assert - fixes media player sample in runtime environment --- samples/media-player/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/media-player/main.py b/samples/media-player/main.py index 838cb54961..4fc487544e 100755 --- a/samples/media-player/main.py +++ b/samples/media-player/main.py @@ -38,7 +38,8 @@ class MediaPlayer(ShowBase): # but we want to make sure we get a MovieTexture, since it # implements synchronizeTo. self.tex = MovieTexture("name") - assert self.tex.read(media_file), "Failed to load video!" + success = self.tex.read(media_file) + assert success, "Failed to load video!" # Set up a fullscreen card to set the video texture on. cm = CardMaker("My Fullscreen Card") From dbb83409e041675f0c72864cc38e4a1cc09c6b3c Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2015 01:09:47 +0200 Subject: [PATCH 104/200] More panda3d.exe robustness: make sure contents.xml is fresh if core API fails hash check --- direct/src/plugin_standalone/panda3d.cxx | 151 +++++++++++++---------- direct/src/plugin_standalone/panda3d.h | 1 + 2 files changed, 89 insertions(+), 63 deletions(-) diff --git a/direct/src/plugin_standalone/panda3d.cxx b/direct/src/plugin_standalone/panda3d.cxx index fd0d2f44b7..065a2afe31 100644 --- a/direct/src/plugin_standalone/panda3d.cxx +++ b/direct/src/plugin_standalone/panda3d.cxx @@ -356,6 +356,7 @@ bool Panda3D:: get_plugin() { // First, look for the existing contents.xml file. bool success = false; + bool is_fresh = false; Filename contents_filename = Filename(Filename::from_os_specific(_root_dir), "contents.xml"); if (_verify_contents != P3D_VC_force) { @@ -370,75 +371,100 @@ get_plugin() { if (!success) { // Couldn't read it (or it wasn't current enough), so go get a new // one. - HTTPClient *http = HTTPClient::get_global_ptr(); - - // Try the super_mirror first. - if (!_super_mirror_url_prefix.empty()) { - // We don't bother putting a uniquifying query string when we're - // downloading this file from the super_mirror. The super_mirror - // is by definition a cache, so it doesn't make sense to bust - // caches here. - string url = _super_mirror_url_prefix + "contents.xml"; - PT(HTTPChannel) channel = http->make_channel(false); - channel->get_document(url); - - Filename tempfile = Filename::temporary("", "p3d_"); - if (!channel->download_to_file(tempfile)) { - cerr << "Unable to download " << url << "\n"; - tempfile.unlink(); - } else { - // Successfully downloaded from the super_mirror; try to read it. - success = read_contents_file(tempfile, true); - tempfile.unlink(); - } + if (!download_contents_file(contents_filename)) { + // We don't have a usable contents.xml file. + return false; } + is_fresh = true; + } - if (!success) { - // Go download contents.xml from the actual host. - ostringstream strm; - strm << _host_url_prefix << "contents.xml"; - // Append a uniquifying query string to the URL to force the - // download to go all the way through any caches. We use the time - // in seconds; that's unique enough. - strm << "?" << time(NULL); - string url = strm.str(); - - // We might as well explicitly request the cache to be disabled too, - // since we have an interface for that via HTTPChannel. - DocumentSpec request(url); - request.set_cache_control(DocumentSpec::CC_no_cache); - - PT(HTTPChannel) channel = http->make_channel(false); - channel->get_document(request); - - // Since we have to download some of it, might as well ask the core - // API to check all of it. - if (_verify_contents == P3D_VC_none) { - _verify_contents = P3D_VC_normal; - } - - // First, download it to a temporary file. - Filename tempfile = Filename::temporary("", "p3d_"); - if (!channel->download_to_file(tempfile)) { - cerr << "Unable to download " << url << "\n"; - - // Couldn't download, but try to read the existing contents.xml - // file anyway. Maybe it's good enough. - success = read_contents_file(contents_filename, false); - - } else { - // Successfully downloaded; read it and move it into place. - success = read_contents_file(tempfile, true); - } + // Now that we've downloaded the contents file successfully, start + // the Core API. + if (!get_core_api()) { + // We failed. Make sure contents.xml is up-to-date and try again. + if (!is_fresh && download_contents_file(contents_filename) && get_core_api()) { + return true; + } else { + return false; + } + } + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: Panda3D::download_contents_file +// Access: Protected +// Description: Redownloads the contents.xml file from the named +// URL without first checking if it is up to date. +// Returns true if we have a contents.xml file that +// might be usable, false otherwise. +//////////////////////////////////////////////////////////////////// +bool Panda3D:: +download_contents_file(const Filename &contents_filename) { + bool success = false; + HTTPClient *http = HTTPClient::get_global_ptr(); + + // Try the super_mirror first. + if (!_super_mirror_url_prefix.empty()) { + // We don't bother putting a uniquifying query string when we're + // downloading this file from the super_mirror. The super_mirror + // is by definition a cache, so it doesn't make sense to bust + // caches here. + string url = _super_mirror_url_prefix + "contents.xml"; + PT(HTTPChannel) channel = http->make_channel(false); + channel->get_document(url); + + Filename tempfile = Filename::temporary("", "p3d_"); + if (!channel->download_to_file(tempfile)) { + cerr << "Unable to download " << url << "\n"; + tempfile.unlink(); + } else { + // Successfully downloaded from the super_mirror; try to read it. + success = read_contents_file(tempfile, true); tempfile.unlink(); } } - if (success) { - // Now that we've downloaded the contents file successfully, start - // the Core API. - success = get_core_api(); + if (!success) { + // Go download contents.xml from the actual host. + ostringstream strm; + strm << _host_url_prefix << "contents.xml"; + // Append a uniquifying query string to the URL to force the + // download to go all the way through any caches. We use the time + // in seconds; that's unique enough. + strm << "?" << time(NULL); + string url = strm.str(); + + // We might as well explicitly request the cache to be disabled too, + // since we have an interface for that via HTTPChannel. + DocumentSpec request(url); + request.set_cache_control(DocumentSpec::CC_no_cache); + + PT(HTTPChannel) channel = http->make_channel(false); + channel->get_document(request); + + // Since we have to download some of it, might as well ask the core + // API to check all of it. + if (_verify_contents == P3D_VC_none) { + _verify_contents = P3D_VC_normal; + } + + // First, download it to a temporary file. + Filename tempfile = Filename::temporary("", "p3d_"); + if (!channel->download_to_file(tempfile)) { + cerr << "Unable to download " << url << "\n"; + + // Couldn't download, but try to read the existing contents.xml + // file anyway. Maybe it's good enough. + success = read_contents_file(contents_filename, false); + + } else { + // Successfully downloaded; read it and move it into place. + success = read_contents_file(tempfile, true); + } + + tempfile.unlink(); } return success; @@ -835,7 +861,6 @@ download_core_api() { } if (!success) { - cerr << "Couldn't download core API.\n"; return false; } diff --git a/direct/src/plugin_standalone/panda3d.h b/direct/src/plugin_standalone/panda3d.h index 94efc0c41f..2f902bac6e 100644 --- a/direct/src/plugin_standalone/panda3d.h +++ b/direct/src/plugin_standalone/panda3d.h @@ -42,6 +42,7 @@ public: protected: bool post_arg_processing(); bool get_plugin(); + bool download_contents_file(const Filename &contents_filename); bool read_contents_file(const Filename &contents_filename, bool fresh_download); void find_host(TiXmlElement *xcontents); void read_xhost(TiXmlElement *xhost); From 0bba09fc96f8f4f1d8b681798fce6eacea715d2a Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2015 01:12:28 +0200 Subject: [PATCH 105/200] Add more customization options for splash screen, use proper Helvetica font for splash window on X11, change dimensioning rules to be more consistent with HTML/CSS rules --- direct/src/plugin/p3dInstance.cxx | 52 ++++++++- direct/src/plugin/p3dSplashWindow.cxx | 131 +++++++++++++++++++++-- direct/src/plugin/p3dSplashWindow.h | 19 +++- direct/src/plugin/p3dX11SplashWindow.cxx | 95 +++++++++++++--- direct/src/plugin/p3dX11SplashWindow.h | 9 +- 5 files changed, 277 insertions(+), 29 deletions(-) diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index 3f84bb441e..87db3f1edc 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -2769,6 +2769,7 @@ make_splash_window() { int r, g, b; if (parse_color(r, g, b, _fparams.lookup_token("bgcolor"))) { _splash_window->set_bgcolor(r, g, b); + _splash_window->set_bar_bgcolor(r, g, b); } else { nout << "parse failure on bgcolor " << _fparams.lookup_token("bgcolor") << "\n"; } @@ -2781,11 +2782,58 @@ make_splash_window() { nout << "parse failure on barcolor " << _fparams.lookup_token("barcolor") << "\n"; } } + if (_fparams.has_token("bar_bgcolor")) { + int r, g, b; + if (parse_color(r, g, b, _fparams.lookup_token("bar_bgcolor"))) { + _splash_window->set_bar_bgcolor(r, g, b); + } else { + nout << "parse failure on bar_bgcolor " << _fparams.lookup_token("bar_bgcolor") << "\n"; + } + } + if (_fparams.has_token("bar_border")) { + int border = _fparams.lookup_token_int("bar_border"); + _splash_window->set_bar_border(border); + } + if (_fparams.has_token("bar_bottom")) { + int bottom = _fparams.lookup_token_int("bar_bottom"); + _splash_window->set_bar_bottom(bottom); + } + if (_fparams.has_token("bar_width")) { + string bar_width = _fparams.lookup_token("bar_width"); + char *endptr; + long width = strtol(bar_width.c_str(), &endptr, 10); + bool percent = false; + + if (*endptr == '%') { + percent = true; + ++endptr; + } + if (*endptr == '\0' && width >= 0 && width < 65536) { + _splash_window->set_bar_width((int)width, percent); + } else { + nout << "parse failure on bar_width " << bar_width << "\n"; + } + } + if (_fparams.has_token("bar_height")) { + string bar_height = _fparams.lookup_token("bar_height"); + char *endptr; + long height = strtol(bar_height.c_str(), &endptr, 10); + bool percent = false; + + if (*endptr == '%') { + percent = true; + ++endptr; + } + if (*endptr == '\0' && height >= 0 && height < 65536) { + _splash_window->set_bar_height((int)height, percent); + } else { + nout << "parse failure on bar_height " << bar_height << "\n"; + } + } _splash_window->set_wparams(_wparams); _splash_window->set_install_label(_install_label); - - + P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr(); // Go get the required images. diff --git a/direct/src/plugin/p3dSplashWindow.cxx b/direct/src/plugin/p3dSplashWindow.cxx index cbe58a50e2..d9dcd802dd 100644 --- a/direct/src/plugin/p3dSplashWindow.cxx +++ b/direct/src/plugin/p3dSplashWindow.cxx @@ -48,6 +48,15 @@ P3DSplashWindow(P3DInstance *inst, bool make_visible) : _barcolor_r = 0x6c; _barcolor_g = 0xa5; _barcolor_b = 0xe0; + _bar_bgcolor_r = _bgcolor_r; + _bar_bgcolor_g = _bgcolor_g; + _bar_bgcolor_b = _bgcolor_b; + _bar_border = 1; + _bar_bottom = 24; + _bar_width = 398; + _bar_height = 22; + _bar_width_ratio = 0.6; + _bar_height_ratio = 0.1; _button_width = 0; _button_height = 0; _button_x = 0; @@ -113,7 +122,7 @@ set_image_filename(const string &image_filename, ImagePlacement image_placement) //////////////////////////////////////////////////////////////////// // Function: P3DSplashWindow::set_fgcolor -// Access: Public, Virtual +// Access: Public // Description: Specifies the color that is used to display the text // above the loading bar. // @@ -129,7 +138,7 @@ set_fgcolor(int r, int g, int b) { //////////////////////////////////////////////////////////////////// // Function: P3DSplashWindow::set_bgcolor -// Access: Public, Virtual +// Access: Public // Description: Specifies the solid color that is displayed behind // the splash image, if any, or before the splash image // is loaded. @@ -146,7 +155,7 @@ set_bgcolor(int r, int g, int b) { //////////////////////////////////////////////////////////////////// // Function: P3DSplashWindow::set_barcolor -// Access: Public, Virtual +// Access: Public // Description: Specifies the color that is used to fill the // loading bar. // @@ -160,6 +169,105 @@ set_barcolor(int r, int g, int b) { _barcolor_b = b; } +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_bar_bgcolor +// Access: Public +// Description: Specifies the solid color that is displayed behind +// the loading bar. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_bar_bgcolor(int r, int g, int b) { + nout << "bar_bgcolor " << r << ", " << g << ", " << b << "\n"; + _bar_bgcolor_r = r; + _bar_bgcolor_g = g; + _bar_bgcolor_b = b; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_bar_border +// Access: Public +// Description: Sets the width in pixels of the border around the +// loading bar, or 0 not to draw a bar at all. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_bar_border(int border) { + nout << "bar_border " << border << "\n"; + _bar_border = border; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_bar_bottom +// Access: Public +// Description: Sets the amount of background pixels between the +// bottom edge of the window and the bottom edge of +// the loading bar border. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_bar_bottom(int bottom) { + nout << "bar_bottom " << bottom << "\n"; + _bar_bottom = bottom; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_bar_width +// Access: Public +// Description: Sets the width of the loading bar. If percent is +// true, it is interpreted as a percentage of the +// window width. If false, it is interpreted as an +// absolute width in pixels. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_bar_width(int width, bool percent) { + nout << "bar_width " << width; + if (percent) { + nout << '%'; + } + nout << '\n'; + + if (percent) { + _bar_width = -1; + _bar_width_ratio = abs(width) / 100.0; + } else { + _bar_width = abs(width); + _bar_width_ratio = 1.0; + } +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_bar_height +// Access: Public +// Description: Sets the height of the loading bar. If percent is +// true, it is interpreted as a percentage of the +// window height. If false, it is interpreted as an +// absolute height in pixels. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_bar_height(int height, bool percent) { + nout << "bar_height " << height; + if (percent) { + nout << '%'; + } + nout << '\n'; + + if (percent) { + _bar_height = -1; + _bar_height_ratio = abs(height) / 100.0; + } else { + _bar_height = abs(height); + _bar_height_ratio = 1.0; + } +} + //////////////////////////////////////////////////////////////////// // Function: P3DSplashWindow::set_install_label // Access: Public, Virtual @@ -271,10 +379,21 @@ read_image_data(ImageData &image, string &data, void P3DSplashWindow:: get_bar_placement(int &bar_x, int &bar_y, int &bar_width, int &bar_height) { - bar_width = min((int)(_win_width * 0.6), 400); - bar_height = min((int)(_win_height * 0.1), 24); + + bar_width = (int)(_win_width * _bar_width_ratio); + bar_height = (int)(_win_height * _bar_height_ratio); + + if (_bar_width >= 0) { + bar_width = min(bar_width, _bar_width); + } + if (_bar_height >= 0) { + bar_height = min(bar_height, _bar_height); + } + + // Horizontally center the bar, and set it at a fixed distance + // from the bottom edge of the splash window. bar_x = (_win_width - bar_width) / 2; - bar_y = (_win_height - bar_height * 2); + bar_y = _win_height - _bar_bottom - _bar_border - bar_height; } //////////////////////////////////////////////////////////////////// diff --git a/direct/src/plugin/p3dSplashWindow.h b/direct/src/plugin/p3dSplashWindow.h index 33feccead5..edbc02c448 100644 --- a/direct/src/plugin/p3dSplashWindow.h +++ b/direct/src/plugin/p3dSplashWindow.h @@ -54,9 +54,14 @@ public: virtual void set_image_filename(const string &image_filename, ImagePlacement image_placement); - virtual void set_fgcolor(int r, int g, int b); - virtual void set_bgcolor(int r, int g, int b); - virtual void set_barcolor(int r, int g, int b); + void set_fgcolor(int r, int g, int b); + void set_bgcolor(int r, int g, int b); + void set_barcolor(int r, int g, int b); + void set_bar_bgcolor(int r, int g, int b); + void set_bar_border(int border); + void set_bar_bottom(int bottom); + void set_bar_width(int width, bool percent=false); + void set_bar_height(int height, bool percent=false); virtual void set_install_label(const string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); @@ -105,7 +110,15 @@ protected: int _fgcolor_r, _fgcolor_g, _fgcolor_b; int _bgcolor_r, _bgcolor_g, _bgcolor_b; int _barcolor_r, _barcolor_g, _barcolor_b; + int _bar_bgcolor_r, _bar_bgcolor_g, _bar_bgcolor_b; + int _bar_border; +private: + int _bar_bottom; + int _bar_width, _bar_height; + double _bar_width_ratio, _bar_height_ratio; + +protected: // The region of the window for accepting button clicks. int _button_width, _button_height; int _button_x, _button_y; diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index 76c0175a18..6d3d2919a7 100644 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -25,6 +25,8 @@ #include #include +static const char *xfont_name = "-*-helvetica-medium-r-normal--12-120-*-*-p-*-iso8859-1"; + //////////////////////////////////////////////////////////////////// // Function: P3DX11SplashWindow::Constructor // Access: Public @@ -47,11 +49,14 @@ P3DX11SplashWindow(P3DInstance *inst, bool make_visible) : _display = None; _window = None; _screen = 0; + _font = NULL; _graphics_context = None; _bar_context = None; + _bar_bg_context = None; _fg_pixel = -1; _bg_pixel = -1; _bar_pixel = -1; + _bar_bg_pixel = -1; _own_display = false; _install_progress = 0.0; _progress_known = true; @@ -609,10 +614,15 @@ subprocess_run() { get_bar_placement(bar_x, bar_y, bar_width, bar_height); if (needs_draw_label) { - int text_width = _install_label.size() * 6; - int text_height = 10; + int direction, ascent, descent; + XCharStruct extents; + XTextExtents(_font, _install_label.c_str(), _install_label.size(), + &direction, &ascent, &descent, &extents); + + int text_width = extents.width; + int text_height = extents.ascent + extents.descent; int text_x = (_win_width - text_width) / 2; - int text_y = bar_y - 4; + int text_y = bar_y - descent - _bar_border - 4; XClearArea(_display, _window, text_x - 2, text_y - text_height - 2, @@ -624,25 +634,44 @@ subprocess_run() { } if (needs_redraw_progress) { - XClearArea(_display, _window, - bar_x, bar_y, bar_width, bar_height, false); - XDrawRectangle(_display, _window, _graphics_context, - bar_x, bar_y, bar_width, bar_height); + // Draw the bar background. + if (_bar_bg_context != None) { + XFillRectangle(_display, _window, _bar_bg_context, + bar_x, bar_y, bar_width, bar_height); + } else { + XClearArea(_display, _window, + bar_x, bar_y, bar_width, bar_height, false); + } + + // Draw the border around the bar. + int border_x = bar_x - 1; + int border_y = bar_y - 1; + int border_width = bar_width + 1; + int border_height = bar_height + 1; + + for (int i = 0; i < _bar_border; ++i) { + XDrawRectangle(_display, _window, _graphics_context, + border_x, border_y, border_width, border_height); + border_x -= 1; + border_y -= 1; + border_width += 2; + border_height += 2; + } needs_update_progress = true; needs_redraw_progress = false; } if (needs_update_progress) { if (_progress_known) { - int progress_width = (int)((bar_width - 2) * _install_progress + 0.5); + int progress_width = (int)((bar_width - 1) * _install_progress + 0.5); XFillRectangle(_display, _window, _bar_context, - bar_x + 1, bar_y + 1, - progress_width + 1, bar_height - 1); + bar_x, bar_y, + progress_width + 1, bar_height); } else { // Progress is unknown. Draw a moving block, not a progress bar // filling up. int block_width = (int)(bar_width * 0.1 + 0.5); - int block_travel = (bar_width - 2) - block_width; + int block_travel = (bar_width - 1) - block_width; int progress = (int)(_received_data * _unknown_progress_rate); progress = progress % (block_travel * 2); if (progress > block_travel) { @@ -650,8 +679,8 @@ subprocess_run() { } XFillRectangle(_display, _window, _bar_context, - bar_x + 1 + progress, bar_y + 1, - block_width + 1, bar_height - 1); + bar_x + progress, bar_y, + block_width + 1, bar_height); } needs_update_progress = false; } @@ -958,10 +987,17 @@ setup_gc() { return; } - XFontStruct* fs = XLoadQueryFont(_display, "6x13"); + _font = XLoadQueryFont(_display, xfont_name); + + if (_font != NULL) { + nout << "Loaded font " << xfont_name << "\n"; + } else { + nout << "Font " << xfont_name << " unavailable.\n"; + _font = XLoadQueryFont(_display, "6x13"); + } XGCValues gcval; - gcval.font = fs->fid; + gcval.font = _font->fid; gcval.function = GXcopy; gcval.plane_mask = AllPlanes; gcval.foreground = BlackPixel(_display, _screen); @@ -991,6 +1027,24 @@ setup_gc() { _bar_context = XCreateGC(_display, _window, GCFont | GCFunction | GCPlaneMask | GCForeground | GCBackground, &gcval); + + // And another for the background color of the bar. + if (_bar_bgcolor_r != _bgcolor_r || _bar_bgcolor_g != _bgcolor_g || + _bar_bgcolor_b != _bgcolor_b) { + XColor bar_bg; + bar_bg.red = _bar_bgcolor_r * 0x101; + bar_bg.green = _bar_bgcolor_g * 0x101; + bar_bg.blue = _bar_bgcolor_b * 0x101; + bar_bg.flags = DoRed | DoGreen | DoBlue; + + if (XAllocColor(_display, colormap, &bar_bg)) { + _bar_bg_pixel = bar_bg.pixel; + gcval.foreground = bar_bg.pixel; + } + + _bar_bg_context = XCreateGC(_display, _window, + GCFont | GCFunction | GCPlaneMask | GCForeground | GCBackground, &gcval); + } } //////////////////////////////////////////////////////////////////// @@ -1016,6 +1070,17 @@ close_window() { XFreeColors(_display, colormap, &_bar_pixel, 1, 0); } + if (_bar_bg_context != None) { + if (_bar_bg_context != _graphics_context) { + XFreeGC(_display, _bar_bg_context); + } + _bar_bg_context = None; + + // Also free the color we allocated. + Colormap colormap = DefaultColormap(_display, _screen); + XFreeColors(_display, colormap, &_bar_bg_pixel, 1, 0); + } + if (_fg_pixel != -1) { Colormap colormap = DefaultColormap(_display, _screen); XFreeColors(_display, colormap, &_fg_pixel, 1, 0); diff --git a/direct/src/plugin/p3dX11SplashWindow.h b/direct/src/plugin/p3dX11SplashWindow.h index b26e4dbc81..2622a31fa3 100644 --- a/direct/src/plugin/p3dX11SplashWindow.h +++ b/direct/src/plugin/p3dX11SplashWindow.h @@ -86,7 +86,7 @@ private: void setup_gc(); void close_window(); - void update_image(X11ImageData &image); + void update_image(X11ImageData &image); void compose_image(); bool scale_image(vector &image0, int &image0_width, int &image0_height, X11ImageData &image); @@ -123,17 +123,20 @@ private: double _install_progress; bool _progress_known; size_t _received_data; - + string _label_text; X11_Display *_display; int _screen; + XFontStruct *_font; GC _graphics_context; GC _bar_context; + GC _bar_bg_context; unsigned long _fg_pixel; unsigned long _bg_pixel; unsigned long _bar_pixel; - + unsigned long _bar_bg_pixel; + X11_Window _window; }; From 965ed034b20bed6b2f7382ac682586f13a7c78a3 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2015 04:02:52 +0200 Subject: [PATCH 106/200] Implement border width and bar bgcolor in Windows splash window --- direct/src/plugin/p3dWinSplashWindow.cxx | 26 +++++++++++++++++++----- direct/src/plugin/p3dWinSplashWindow.h | 5 +++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/direct/src/plugin/p3dWinSplashWindow.cxx b/direct/src/plugin/p3dWinSplashWindow.cxx index dd3f79662a..eb071711db 100644 --- a/direct/src/plugin/p3dWinSplashWindow.cxx +++ b/direct/src/plugin/p3dWinSplashWindow.cxx @@ -37,6 +37,7 @@ P3DWinSplashWindow(P3DInstance *inst, bool make_visible) : _fg_brush = NULL; _bg_brush = NULL; _bar_brush = NULL; + _bar_bg_brush = NULL; _thread_running = false; _install_progress = 0.0; _progress_known = true; @@ -500,6 +501,7 @@ make_window() { _fg_brush = CreateSolidBrush(RGB(_fgcolor_r, _fgcolor_g, _fgcolor_b)); _bg_brush = CreateSolidBrush(RGB(_bgcolor_r, _bgcolor_g, _bgcolor_b)); _bar_brush = CreateSolidBrush(RGB(_barcolor_r, _barcolor_g, _barcolor_b)); + _bar_bg_brush = CreateSolidBrush(RGB(_bar_bgcolor_r, _bar_bgcolor_g, _bar_bgcolor_b)); } //////////////////////////////////////////////////////////////////// @@ -635,6 +637,10 @@ close_window() { DeleteObject(_bar_brush); _bar_brush = NULL; } + if (_bar_bg_brush != NULL) { + DeleteObject(_bar_bg_brush); + _bar_bg_brush = NULL; + } _background_image.dump_image(); _button_ready_image.dump_image(); @@ -794,7 +800,7 @@ paint_progress_bar(HDC dc) { RECT bar_rect = { bar_x, bar_y, bar_x + bar_width, bar_y + bar_height }; // Clear the entire progress bar to white (or the background color). - FillRect(dc, &bar_rect, _bg_brush); + FillRect(dc, &bar_rect, _bar_bg_brush); // Draw the interior of the progress bar in blue (or the bar color). if (_drawn_progress_known) { @@ -820,7 +826,17 @@ paint_progress_bar(HDC dc) { } // Now draw a black (or foreground) border around the progress bar. - FrameRect(dc, &bar_rect, _fg_brush); + if (_bar_border >= 0) { + RECT border_rect = bar_rect; + + for (int i = 0; i < _bar_border; ++i) { + --border_rect.left; + --border_rect.top; + ++border_rect.right; + ++border_rect.bottom; + FrameRect(dc, &border_rect, _fg_brush); + } + } if (!_drawn_label.empty()) { // Now draw the install_label right above it. @@ -836,7 +852,7 @@ paint_progress_bar(HDC dc) { int text_width = text_size.cx; int text_height = text_size.cy; int text_x = (_win_width - text_width) / 2; - int text_y = bar_y - (int)(text_height * 1.5); + int text_y = bar_y - (int)(text_height * 1.5) - _bar_border; // Clear the rectangle behind the text to white. RECT text_rect = { text_x - 2, text_y - 2, text_x + text_width + 4, text_y + text_height + 4 }; @@ -856,7 +872,7 @@ paint_progress_bar(HDC dc) { // Access: Private // Description: The windows event-processing handler. //////////////////////////////////////////////////////////////////// -LONG P3DWinSplashWindow:: +LRESULT P3DWinSplashWindow:: window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) { case WM_DESTROY: @@ -937,7 +953,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { // Access: Private, Static // Description: The windows event-processing handler, static version. //////////////////////////////////////////////////////////////////// -LONG P3DWinSplashWindow:: +LRESULT P3DWinSplashWindow:: st_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { LONG_PTR self = GetWindowLongPtr(hwnd, GWLP_USERDATA); if (self == NULL) { diff --git a/direct/src/plugin/p3dWinSplashWindow.h b/direct/src/plugin/p3dWinSplashWindow.h index ca7e04b1cf..9c27f4578e 100644 --- a/direct/src/plugin/p3dWinSplashWindow.h +++ b/direct/src/plugin/p3dWinSplashWindow.h @@ -68,8 +68,8 @@ private: void paint_window(HDC dc); bool paint_image(HDC dc, const WinImageData &image, bool use_alpha); void paint_progress_bar(HDC dc); - LONG window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); - static LONG WINAPI st_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); + LRESULT window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); + static LRESULT WINAPI st_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); private: class WinImageData : public ImageData { @@ -112,6 +112,7 @@ private: HBRUSH _fg_brush; HBRUSH _bg_brush; HBRUSH _bar_brush; + HBRUSH _bar_bg_brush; static bool _registered_window_class; }; From 8fd166e63f74bc51a64073f67d0ed34498642ef9 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2015 04:06:29 +0200 Subject: [PATCH 107/200] panda3d.exe on Windows now respects child process exit codes --- direct/src/plugin/p3dSession.cxx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index da9b30874f..27361a8d85 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -100,6 +100,8 @@ void P3DSession:: shutdown() { set_failed(); + int exit_code = 0; + if (_p3dpython_started) { // Tell the process we're going away. TiXmlDocument doc; @@ -139,7 +141,14 @@ shutdown() { nout << "Force-killing python process.\n"; TerminateProcess(_p3dpython_handle, 2); } - + + DWORD dw_exit_code = 0; + if (!GetExitCodeProcess(_p3dpython_handle, &dw_exit_code)) { + nout << "GetExitCodeProcess failed, error: " << GetLastError() << "\n"; + } else { + exit_code = (int)dw_exit_code; + } + CloseHandle(_p3dpython_handle); _p3dpython_handle = INVALID_HANDLE_VALUE; @@ -182,19 +191,15 @@ shutdown() { nout << "Python process has successfully stopped.\n"; if (WIFEXITED(status)) { - int code = WEXITSTATUS(status); - - nout << " exited normally, status = " << code << "\n"; - if (code != 0) { - _exit(code); - } + exit_code = WEXITSTATUS(status); + nout << " exited normally, status = " << exit_code << "\n"; } else if (WIFSIGNALED(status)) { nout << " signalled by " << WTERMSIG(status) << ", core = " << WCOREDUMP(status) << "\n"; // This seems to be a popular shell convention. - _exit(128 + WTERMSIG(status)); + exit_code = 128 + WTERMSIG(status); } else if (WIFSTOPPED(status)) { nout << " stopped by " << WSTOPSIG(status) << "\n"; @@ -220,6 +225,11 @@ shutdown() { // Close the pipe now. _pipe_read.close(); + + // If we had an exit status, pass it on to the runtime process. + if (exit_code != 0) { + _exit(exit_code); + } } //////////////////////////////////////////////////////////////////// From 7cae04027847dad5d5b243274c940b9ee454d033 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Sep 2015 03:31:28 +0200 Subject: [PATCH 108/200] Support custom font settings in splash window + X11 impl --- direct/src/plugin/p3dInstance.cxx | 40 +++++++++++++ direct/src/plugin/p3dOsxSplashWindow.cxx | 2 +- direct/src/plugin/p3dSplashWindow.cxx | 61 ++++++++++++++++++++ direct/src/plugin/p3dSplashWindow.h | 20 +++++++ direct/src/plugin/p3dX11SplashWindow.cxx | 73 ++++++++++++++++++++++-- 5 files changed, 190 insertions(+), 6 deletions(-) diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index 87db3f1edc..87fbf64dee 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -2830,6 +2830,46 @@ make_splash_window() { nout << "parse failure on bar_height " << bar_height << "\n"; } } + if (_fparams.has_token("font_family")) { + string family = _fparams.lookup_token("font_family"); + _splash_window->set_font_family(family); + } + if (_fparams.has_token("font_size")) { + int size = _fparams.lookup_token_int("font_size"); + _splash_window->set_font_size(size); + } + if (_fparams.has_token("font_style")) { + string style = _fparams.lookup_token("font_style"); + + if (style == "normal") { + _splash_window->set_font_style(P3DSplashWindow::FS_normal); + } else if (style == "oblique") { + _splash_window->set_font_style(P3DSplashWindow::FS_oblique); + } else if (style == "italic") { + _splash_window->set_font_style(P3DSplashWindow::FS_italic); + } else { + nout << "parse_failure on font_style " << style << "\n"; + } + } + if (_fparams.has_token("font_weight")) { + string weight = _fparams.lookup_token("font_weight"); + + if (weight == "normal") { + _splash_window->set_font_weight(400); + } else if (weight == "bold") { + _splash_window->set_font_weight(700); + } else if (weight == "bolder") { + _splash_window->set_font_weight(700); + } else if (weight == "lighter") { + _splash_window->set_font_weight(100); + } else if (weight.size() == 3 && + weight[0] >= '1' && weight[0] <= '9' && + weight[1] == '0' && weight[2] == '0') { + _splash_window->set_font_weight(((int)weight[0] - 48) * 100); + } else { + nout << "parse_failure on font_weight " << weight << "\n"; + } + } _splash_window->set_wparams(_wparams); _splash_window->set_install_label(_install_label); diff --git a/direct/src/plugin/p3dOsxSplashWindow.cxx b/direct/src/plugin/p3dOsxSplashWindow.cxx index 979b35160d..6b979b2a7b 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.cxx +++ b/direct/src/plugin/p3dOsxSplashWindow.cxx @@ -683,7 +683,7 @@ paint_progress_bar(CGContextRef context) { // Choose a suitable font. float text_height = 15.0; - CGContextSelectFont(context, "Helvetica", text_height, kCGEncodingMacRoman); + CGContextSelectFont(context, _font_family.c_str(), text_height, kCGEncodingMacRoman); // Measure the text, for centering. CGContextSetTextPosition(context, 0, 0); diff --git a/direct/src/plugin/p3dSplashWindow.cxx b/direct/src/plugin/p3dSplashWindow.cxx index d9dcd802dd..37960d4499 100644 --- a/direct/src/plugin/p3dSplashWindow.cxx +++ b/direct/src/plugin/p3dSplashWindow.cxx @@ -57,6 +57,10 @@ P3DSplashWindow(P3DInstance *inst, bool make_visible) : _bar_height = 22; _bar_width_ratio = 0.6; _bar_height_ratio = 0.1; + _font_family = "Helvetica"; + _font_size = 12; + _font_style = FS_normal; + _font_weight = FW_normal; _button_width = 0; _button_height = 0; _button_x = 0; @@ -268,6 +272,63 @@ set_bar_height(int height, bool percent) { } } +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_font_family +// Access: Public +// Description: Sets the font family of the text above the loading +// bar. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_font_family(const string &family) { + nout << "font_family " << family << "\n"; + _font_family = family; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_font_size +// Access: Public +// Description: Sets the font size in pixels of the text above the +// loading bar. The default value is 12. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_font_size(int size) { + nout << "font_size " << size << "\n"; + _font_size = size; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_font_style +// Access: Public +// Description: Sets the font style of the text above the loading +// bar. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_font_style(FontStyle style) { + nout << "font_style " << style << "\n"; + _font_style = style; +} + +//////////////////////////////////////////////////////////////////// +// Function: P3DSplashWindow::set_font_weight +// Access: Public +// Description: Sets the font weight of the text above the loading +// bar. The default is FW_normal. It should be +// a multiple of 100 in the range 100-900. +// +// This may only be set before wparams is set. +//////////////////////////////////////////////////////////////////// +void P3DSplashWindow:: +set_font_weight(int weight) { + nout << "font_weight " << weight << "\n"; + _font_weight = weight; +} + //////////////////////////////////////////////////////////////////// // Function: P3DSplashWindow::set_install_label // Access: Public, Virtual diff --git a/direct/src/plugin/p3dSplashWindow.h b/direct/src/plugin/p3dSplashWindow.h index edbc02c448..3b98b2cfa1 100644 --- a/direct/src/plugin/p3dSplashWindow.h +++ b/direct/src/plugin/p3dSplashWindow.h @@ -51,6 +51,17 @@ public: IP_button_click, IP_none }; + enum FontStyle { + FS_normal, + FS_italic, + FS_oblique + }; + enum FontWeight { + FW_normal = 400, + FW_medium = 500, + FW_bold = 700, + FW_black = 900 + }; virtual void set_image_filename(const string &image_filename, ImagePlacement image_placement); @@ -62,6 +73,10 @@ public: void set_bar_bottom(int bottom); void set_bar_width(int width, bool percent=false); void set_bar_height(int height, bool percent=false); + void set_font_family(const string &family); + void set_font_size(int size); + void set_font_style(FontStyle style); + void set_font_weight(int weight); virtual void set_install_label(const string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); @@ -119,6 +134,11 @@ private: double _bar_width_ratio, _bar_height_ratio; protected: + string _font_family; + int _font_size; + FontStyle _font_style; + int _font_weight; + // The region of the window for accepting button clicks. int _button_width, _button_height; int _button_x, _button_y; diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index 6d3d2919a7..4c41b3ca4c 100644 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -25,8 +25,6 @@ #include #include -static const char *xfont_name = "-*-helvetica-medium-r-normal--12-120-*-*-p-*-iso8859-1"; - //////////////////////////////////////////////////////////////////// // Function: P3DX11SplashWindow::Constructor // Access: Public @@ -987,12 +985,77 @@ setup_gc() { return; } - _font = XLoadQueryFont(_display, xfont_name); + char style = 'r'; + if (_font_style == FS_oblique) { + style = 'o'; + } else if (_font_style == FS_italic) { + style = 'i'; + } + + // Determine the order at which to try the various weights. From: + // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight + const char *const *try_weights; + const int num_weights = 7; + + if (_font_weight > 700) { + static const char *const weights[] = {"black", "bold", "demibold", "semibold", "medium", "regular", "extralight"}; + try_weights = weights; + + } else if (_font_weight > 600) { + static const char *const weights[] = {"bold", "black", "demibold", "semibold", "medium", "regular", "extralight"}; + try_weights = weights; + + } else if (_font_weight > 500) { + static const char *const weights[] = {"demibold", "semibold", "bold", "black", "medium", "regular", "extralight"}; + try_weights = weights; + + } else if (_font_weight == 500) { + static const char *const weights[] = {"medium", "regular", "extralight", "demibold", "semibold", "bold", "black"}; + try_weights = weights; + + } else if (_font_weight >= 400) { + static const char *const weights[] = {"regular", "medium", "extralight", "demibold", "semibold", "bold", "black"}; + try_weights = weights; + + } else { + static const char *const weights[] = {"extralight", "regular", "medium", "demibold", "semibold", "bold", "black"}; + try_weights = weights; + } + + char font_name[1024]; + + // Go through the weights array to find the best matching font. + for (int i = 0; i < num_weights; ++i) { + const char *weight_name = try_weights[i]; + + // Compose the proper pattern for finding the desired font face. + snprintf(font_name, 1024, "-*-%s-%s-%c-normal--%d-*-*-*-*-*-iso8859-1", + _font_family.c_str(), weight_name, style, _font_size); + + _font = XLoadQueryFont(_display, font_name); + if (_font != NULL) { + break; + } + nout << "Font " << font_name << " unavailable.\n"; + + if (style == 'i' || style == 'o') { + // If oblique is not found, try italic, and vice versa. + char style2 = 216 - style; + snprintf(font_name, 1024, "-*-%s-%s-%c-normal--%d-*-*-*-*-*-iso8859-1", + _font_family.c_str(), weight_name, style2, _font_size); + + _font = XLoadQueryFont(_display, font_name); + if (_font != NULL) { + break; + } + nout << "Font " << font_name << " unavailable.\n"; + } + } if (_font != NULL) { - nout << "Loaded font " << xfont_name << "\n"; + nout << "Loaded font " << font_name << "\n"; } else { - nout << "Font " << xfont_name << " unavailable.\n"; + nout << "Using fallback font 6x13.\n"; _font = XLoadQueryFont(_display, "6x13"); } From be58900723e99145fbef6ff9bf1f634566fa259e Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Sep 2015 03:52:30 +0200 Subject: [PATCH 109/200] Implement custom font settings for splash window on Windows --- direct/src/plugin/p3dWinSplashWindow.cxx | 16 +++++++++++++--- direct/src/plugin/p3dWinSplashWindow.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/direct/src/plugin/p3dWinSplashWindow.cxx b/direct/src/plugin/p3dWinSplashWindow.cxx index eb071711db..999abdb86f 100644 --- a/direct/src/plugin/p3dWinSplashWindow.cxx +++ b/direct/src/plugin/p3dWinSplashWindow.cxx @@ -34,6 +34,7 @@ P3DWinSplashWindow(P3DInstance *inst, bool make_visible) : _thread = NULL; _thread_id = 0; _hwnd = NULL; + _font = NULL; _fg_brush = NULL; _bg_brush = NULL; _bar_brush = NULL; @@ -498,6 +499,17 @@ make_window() { ShowWindow(_hwnd, SW_HIDE); } + // Load the requested font. + _font = CreateFontA(-_font_size, 0, 0, 0, _font_weight, + (_font_style != FS_normal), FALSE, FALSE, + ANSI_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, + CLEARTYPE_QUALITY, VARIABLE_PITCH, _font_family.c_str()); + + if (_font == NULL) { + nout << "CreateFont failed: " << GetLastError() << "\n"; + _font = (HFONT)GetStockObject(ANSI_VAR_FONT); + } + _fg_brush = CreateSolidBrush(RGB(_fgcolor_r, _fgcolor_g, _fgcolor_b)); _bg_brush = CreateSolidBrush(RGB(_bgcolor_r, _bgcolor_g, _bgcolor_b)); _bar_brush = CreateSolidBrush(RGB(_barcolor_r, _barcolor_g, _barcolor_b)); @@ -840,12 +852,10 @@ paint_progress_bar(HDC dc) { if (!_drawn_label.empty()) { // Now draw the install_label right above it. - const char *text = _drawn_label.c_str(); - HFONT font = (HFONT)GetStockObject(ANSI_VAR_FONT); // Measure the text, for centering. - SelectObject(dc, font); + SelectObject(dc, _font); SIZE text_size; GetTextExtentPoint32(dc, text, strlen(text), &text_size); diff --git a/direct/src/plugin/p3dWinSplashWindow.h b/direct/src/plugin/p3dWinSplashWindow.h index 9c27f4578e..33c9f9d584 100644 --- a/direct/src/plugin/p3dWinSplashWindow.h +++ b/direct/src/plugin/p3dWinSplashWindow.h @@ -109,6 +109,7 @@ private: HANDLE _thread; DWORD _thread_id; HWND _hwnd; + HFONT _font; HBRUSH _fg_brush; HBRUSH _bg_brush; HBRUSH _bar_brush; From f9f62f17f1feb808fde79af5b3a6a535f6121855 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Sep 2015 22:27:03 +0200 Subject: [PATCH 110/200] Implement font customization options in MacOSX splash window Also, switch to non-deprecated CoreText API --- direct/src/plugin/p3dOsxSplashWindow.cxx | 168 +++++++++++++---------- direct/src/plugin/p3dOsxSplashWindow.h | 2 + 2 files changed, 100 insertions(+), 70 deletions(-) diff --git a/direct/src/plugin/p3dOsxSplashWindow.cxx b/direct/src/plugin/p3dOsxSplashWindow.cxx index 6b979b2a7b..53f9976d4c 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.cxx +++ b/direct/src/plugin/p3dOsxSplashWindow.cxx @@ -36,6 +36,7 @@ P3DOsxSplashWindow:: P3DOsxSplashWindow(P3DInstance *inst, bool make_visible) : P3DSplashWindow(inst, make_visible) { + _font_attribs = NULL; _install_progress = 0; _progress_known = true; _received_data = 0; @@ -59,6 +60,9 @@ P3DOsxSplashWindow:: DisposeWindow(_toplevel_window); _toplevel_window = NULL; } + if (_font_attribs != NULL) { + CFRelease(_font_attribs); + } } //////////////////////////////////////////////////////////////////// @@ -123,6 +127,41 @@ set_wparams(const P3DWindowParams &wparams) { } } } + + // Determine the attributes of the font we're going to use. + int symbolic = 0; + if (_font_style != FS_normal) { + symbolic |= kCTFontItalicTrait; + } + if (_font_weight > 500) { + symbolic |= kCTFontBoldTrait; + } + CFNumberRef symbolic_ref = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &symbolic); + + CFStringRef traits_keys[1] = { kCTFontSymbolicTrait }; + CFTypeRef traits_values[1] = { symbolic_ref }; + CFDictionaryRef traits = CFDictionaryCreate(kCFAllocatorDefault, (const void **)&traits_keys, (const void **)&traits_values, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + CFStringRef family = CFStringCreateWithCString(NULL, _font_family.c_str(), kCFStringEncodingUTF8); + + CFStringRef attribs_keys[2] = { kCTFontFamilyNameAttribute, kCTFontTraitsAttribute }; + CFTypeRef attribs_values[2] = { family, traits }; + CFDictionaryRef attribs = CFDictionaryCreate(kCFAllocatorDefault, (const void **)&attribs_keys, (const void **)&attribs_values, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + // Create the font object. + CTFontDescriptorRef font_desc = CTFontDescriptorCreateWithAttributes(attribs); + CTFontRef font = CTFontCreateWithFontDescriptor(font_desc, _font_size, NULL); + + CFStringRef keys[1] = { kCTFontAttributeName }; + CFTypeRef values[1] = { font }; + _font_attribs = CFDictionaryCreate(kCFAllocatorDefault, (const void **)&keys, (const void **)&values, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + CFRelease(font); + CFRelease(font_desc); + CFRelease(attribs); + CFRelease(traits); + CFRelease(family); + CFRelease(symbolic_ref); } //////////////////////////////////////////////////////////////////// @@ -171,6 +210,9 @@ set_image_filename(const string &image_filename, ImagePlacement image_placement) case IP_button_click: load_image(_button_click_image, image_filename); break; + + default: + return; } refresh(); @@ -333,10 +375,8 @@ paint_window_osx_cgcontext(CGContextRef context) { CGColorRef bg = CGColorCreate(rgb_space, bg_components); CGRect region = { { 0, 0 }, { _win_width, _win_height } }; - CGContextBeginPath(context); CGContextSetFillColorWithColor(context, bg); - CGContextAddRect(context, region); - CGContextFillPath(context); + CGContextFillRect(context, region); CGColorRelease(bg); CGColorSpaceRelease(rgb_space); @@ -445,8 +485,6 @@ handle_event_osx_event_record(const P3D_event_data &event) { //////////////////////////////////////////////////////////////////// bool P3DOsxSplashWindow:: handle_event_osx_cocoa(const P3D_event_data &event) { - bool retval = false; - assert(event._event_type == P3D_ET_osx_cocoa); const P3DCocoaEvent &ce = event._event._osx_cocoa._event; @@ -455,33 +493,31 @@ handle_event_osx_cocoa(const P3D_event_data &event) { if (_visible) { CGContextRef context = ce.data.draw.context; paint_window_osx_cgcontext(context); - retval = true; + return true; + } else { + return false; } - break; case P3DCocoaEventMouseDown: set_mouse_data((int)ce.data.mouse.pluginX, (int)ce.data.mouse.pluginY, true); - retval = true; - break; + return true; case P3DCocoaEventMouseUp: set_mouse_data((int)ce.data.mouse.pluginX, (int)ce.data.mouse.pluginY, false); - retval = true; - break; + return true; case P3DCocoaEventMouseMoved: case P3DCocoaEventMouseDragged: set_mouse_data((int)ce.data.mouse.pluginX, (int)ce.data.mouse.pluginY, _mouse_down); - retval = true; - break; + return true; case P3DCocoaEventFocusChanged: _mouse_active = (ce.data.focus.hasFocus != 0); - retval = true; - break; - } + return true; - return retval; + default: + return false; + } } //////////////////////////////////////////////////////////////////// @@ -612,42 +648,33 @@ paint_image(CGContextRef context, const OsxImageData &image) { //////////////////////////////////////////////////////////////////// void P3DOsxSplashWindow:: paint_progress_bar(CGContextRef context) { - // Get some colors we'll need. We can't just use - // CGColorGetConstantColor(), since that requires 10.5. CGFloat fg_components[] = { _fgcolor_r / 255.0f, _fgcolor_g / 255.0f, _fgcolor_b / 255.0f, 1 }; CGFloat bg_components[] = { _bgcolor_r / 255.0f, _bgcolor_g / 255.0f, _bgcolor_b / 255.0f, 1 }; CGFloat bar_components[] = { _barcolor_r / 255.0f, _barcolor_g / 255.0f, _barcolor_b / 255.0f, 1 }; + CGFloat bar_bg_components[] = { _bar_bgcolor_r / 255.0f, _bar_bgcolor_g / 255.0f, _bar_bgcolor_b / 255.0f, 1 }; CGColorSpaceRef rgb_space = CGColorSpaceCreateDeviceRGB(); CGColorRef fg = CGColorCreate(rgb_space, fg_components); CGColorRef bg = CGColorCreate(rgb_space, bg_components); CGColorRef bar = CGColorCreate(rgb_space, bar_components); + CGColorRef bar_bg = CGColorCreate(rgb_space, bar_bg_components); + // Get the proper placement for the progress bar. int bar_x, bar_y, bar_width, bar_height; get_bar_placement(bar_x, bar_y, bar_width, bar_height); - // We offset the bar by half a pixel, so we'll be drawing the - // one-pixel line through the middle of a pixel, and it won't try to - // antialias itself into a half-black two-pixel line. - float bar_xf = bar_x + 0.5; - float bar_yf = bar_y - 0.5; - - CGRect bar_rect = { { bar_xf, bar_yf }, { bar_width, bar_height } }; + CGRect bar_rect = { { bar_x, bar_y }, { bar_width, bar_height } }; // Clear the entire progress bar to white (or the background color). - CGContextBeginPath(context); - CGContextSetFillColorWithColor(context, bg); - CGContextAddRect(context, bar_rect); - CGContextFillPath(context); + CGContextSetFillColorWithColor(context, bar_bg); + CGContextFillRect(context, bar_rect); // Draw the interior of the progress bar in blue (or the bar color). if (_progress_known) { int progress_width = (int)(bar_width * _install_progress + 0.5); if (progress_width != 0) { - CGRect prog = { { bar_xf, bar_yf }, { progress_width, bar_height } }; - CGContextBeginPath(context); + CGRect prog = { { bar_x, bar_y }, { progress_width, bar_height } }; CGContextSetFillColorWithColor(context, bar); - CGContextAddRect(context, prog); - CGContextFillPath(context); + CGContextFillRect(context, prog); } } else { // Progress is unknown. Draw a moving block, not a progress bar @@ -660,57 +687,58 @@ paint_progress_bar(CGContextRef context) { progress = block_travel * 2 - progress; } - CGRect prog = { { bar_xf + progress, bar_yf }, { block_width, bar_height } }; - CGContextBeginPath(context); + CGRect prog = { { bar_x + progress, bar_y }, { block_width, bar_height } }; CGContextSetFillColorWithColor(context, bar); - CGContextAddRect(context, prog); - CGContextFillPath(context); + CGContextFillRect(context, prog); } - + // Draw the black stroke around the progress bar. - CGContextBeginPath(context); - CGContextSetLineWidth(context, 1); - CGContextSetStrokeColorWithColor(context, fg); - CGContextAddRect(context, bar_rect); - CGContextStrokePath(context); + if (_bar_border > 0) { + // We offset the border by half a pixel, so we'll be drawing the + // one-pixel line through the middle of a pixel, and it won't try to + // antialias itself into a half-black two-pixel line. + CGRect border_rect = { { bar_x - 0.5, bar_y - 0.5 }, + { bar_width + 1, bar_height + 1 } }; + + CGContextBeginPath(context); + CGContextSetLineWidth(context, 1); + CGContextSetStrokeColorWithColor(context, fg); + + for (int i = 0; i < _bar_border; ++i) { + CGContextAddRect(context, border_rect); + border_rect.origin.x -= 1; + border_rect.origin.y -= 1; + border_rect.size.width += 2; + border_rect.size.height += 2; + } + CGContextStrokePath(context); + } if (!_install_label.empty()) { - // Now draw the install_label right above it. - // Need to invert the text so it won't be upside-down. CGAffineTransform text_xform = CGAffineTransformMakeScale(1, -1); CGContextSetTextMatrix(context, text_xform); - // Choose a suitable font. - float text_height = 15.0; - CGContextSelectFont(context, _font_family.c_str(), text_height, kCGEncodingMacRoman); + // Now draw the install_label right above it. + CFStringRef string = CFStringCreateWithCString(NULL, _install_label.c_str(), kCFStringEncodingUTF8); + CFAttributedStringRef attr_string = CFAttributedStringCreate(NULL, string, _font_attribs); + CTLineRef line = CTLineCreateWithAttributedString(attr_string); - // Measure the text, for centering. - CGContextSetTextPosition(context, 0, 0); - CGContextSetTextDrawingMode(context, kCGTextInvisible); - CGContextShowText(context, _install_label.data(), _install_label.length()); - CGPoint end_point = CGContextGetTextPosition(context); - float text_width = end_point.x; - - int text_x = (int)(_win_width - text_width) / 2; - int text_y = (int)(bar_y - text_height * 1.5); - - // Clear the rectangle behind the text to bg. - CGRect text_rect = { { text_x - 2, text_y - 2 }, { text_width + 4, text_height + 4 } }; - - CGContextBeginPath(context); - CGContextAddRect(context, text_rect); - CGContextSetFillColorWithColor(context, bg); - CGContextFillPath(context); + // Determine the placement based on the size of the text. + CGRect bounds = CTLineGetImageBounds(line, context); + float text_x = (_win_width - bounds.size.width) / 2.0f - bounds.origin.x; + float text_y = bar_y + bounds.origin.y - 4 - _bar_border; // And finally, draw the text. - CGContextSetTextDrawingMode(context, kCGTextFill); - CGContextSetFillColorWithColor(context, fg); + CGContextSetTextPosition(context, text_x, text_y); + CTLineDraw(line, context); - CGContextShowTextAtPoint(context, text_x, text_y + text_height, - _install_label.data(), _install_label.length()); + CFRelease(line); + CFRelease(attr_string); + CFRelease(string); } + CGColorRelease(bar_bg); CGColorRelease(bar); CGColorRelease(bg); CGColorRelease(fg); diff --git a/direct/src/plugin/p3dOsxSplashWindow.h b/direct/src/plugin/p3dOsxSplashWindow.h index 03149bfc98..8c4cab382b 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.h +++ b/direct/src/plugin/p3dOsxSplashWindow.h @@ -83,6 +83,8 @@ private: OsxImageData _button_rollover_image; OsxImageData _button_click_image; + CFDictionaryRef _font_attribs; + string _install_label; double _install_progress; bool _progress_known; From e1d7c737cf16cbc46f1b22f89205c146c88999bc Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 3 Sep 2015 03:29:42 +0200 Subject: [PATCH 111/200] Fix "... is not a Multifile" error in pdeployed executables --- direct/src/plugin_standalone/panda3dBase.cxx | 10 +++++----- direct/src/plugin_standalone/panda3dBase.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/direct/src/plugin_standalone/panda3dBase.cxx b/direct/src/plugin_standalone/panda3dBase.cxx index 6b38e221f2..707eddedd2 100644 --- a/direct/src/plugin_standalone/panda3dBase.cxx +++ b/direct/src/plugin_standalone/panda3dBase.cxx @@ -342,7 +342,7 @@ make_parent_window() { //////////////////////////////////////////////////////////////////// P3D_instance *Panda3DBase:: create_instance(const string &p3d, bool start_instance, - char **args, int num_args, const int &p3d_offset) { + char **args, int num_args, int p3d_offset) { // Check to see if the p3d filename we were given is a URL, or a // local file. Filename p3d_filename = Filename::from_os_specific(p3d); @@ -356,9 +356,9 @@ create_instance(const string &p3d, bool start_instance, p3d_filename.make_absolute(); os_p3d_filename = p3d_filename.to_os_specific(); - } + } if (is_local) { - read_p3d_info(p3d_filename); + read_p3d_info(p3d_filename, p3d_offset); } // Build up the token list. @@ -454,9 +454,9 @@ delete_instance(P3D_instance *inst) { // parameters (like width and height). //////////////////////////////////////////////////////////////////// bool Panda3DBase:: -read_p3d_info(const Filename &p3d_filename) { +read_p3d_info(const Filename &p3d_filename, int p3d_offset) { PT(Multifile) mf = new Multifile; - if (!mf->open_read(p3d_filename)) { + if (!mf->open_read(p3d_filename, p3d_offset)) { return false; } int si = mf->find_subfile("p3d_info.xml"); diff --git a/direct/src/plugin_standalone/panda3dBase.h b/direct/src/plugin_standalone/panda3dBase.h index f53e59b14c..b3ace6256f 100644 --- a/direct/src/plugin_standalone/panda3dBase.h +++ b/direct/src/plugin_standalone/panda3dBase.h @@ -49,10 +49,10 @@ protected: P3D_instance * create_instance(const string &p3d, bool start_instance, - char **args, int num_args, const int &p3d_offset = 0); + char **args, int num_args, int p3d_offset = 0); void delete_instance(P3D_instance *instance); - bool read_p3d_info(const Filename &p3d_filename); + bool read_p3d_info(const Filename &p3d_filename, int p3d_offset = 0); bool parse_token(const char *arg); bool parse_int_pair(const char *arg, int &x, int &y); string lookup_token(const string &keyword) const; From c33f3b3dca1b80c467c002edf6a577430b18e983 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 3 Sep 2015 03:49:01 +0200 Subject: [PATCH 112/200] Force httplib2 and pyglet to be platform-independent packages --- direct/src/p3d/thirdparty.pdef | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/p3d/thirdparty.pdef b/direct/src/p3d/thirdparty.pdef index b657aac95b..bc72b39eb7 100644 --- a/direct/src/p3d/thirdparty.pdef +++ b/direct/src/p3d/thirdparty.pdef @@ -137,7 +137,7 @@ class pyopengl(package): module('OpenGL.GLU', 'OpenGL.GLUT', 'OpenGL.GLE', 'OpenGL.GLX') class httplib2(package): - config(display_name = "httplib2") + config(display_name = "httplib2", platform_specific = False) require('panda3d') module('httplib2', required = True) @@ -149,7 +149,7 @@ class box2d(package): module('Box2D', required = True) class pyglet(package): - config(display_name = "pyglet") - require('panda3d') + config(display_name = "pyglet", platform_specific = False) + require('panda3d', 'morepy') module('pyglet', required = True) From 1a0fb8f012ca96359f1f575182c2899c17a285bf Mon Sep 17 00:00:00 2001 From: enn0x Date: Sat, 5 Sep 2015 00:54:20 +0200 Subject: [PATCH 113/200] Panda Nodes returned by raycast or sweep querries are no longer 'const' --- panda/src/bullet/bulletAllHitsRayResult.cxx | 2 +- panda/src/bullet/bulletAllHitsRayResult.h | 2 +- panda/src/bullet/bulletBodyNode.cxx | 2 +- panda/src/bullet/bulletClosestHitRayResult.cxx | 4 ++-- panda/src/bullet/bulletClosestHitRayResult.h | 2 +- panda/src/bullet/bulletClosestHitSweepResult.cxx | 4 ++-- panda/src/bullet/bulletClosestHitSweepResult.h | 2 +- panda/src/bullet/bulletContactResult.cxx | 2 +- panda/src/bullet/bulletPersistentManifold.cxx | 8 ++++---- panda/src/bullet/bulletPersistentManifold.h | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/panda/src/bullet/bulletAllHitsRayResult.cxx b/panda/src/bullet/bulletAllHitsRayResult.cxx index 7d57feb767..953390820e 100644 --- a/panda/src/bullet/bulletAllHitsRayResult.cxx +++ b/panda/src/bullet/bulletAllHitsRayResult.cxx @@ -156,7 +156,7 @@ get_hit_fraction() const { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -const PandaNode *BulletRayHit:: +PandaNode *BulletRayHit:: get_node() const { return (_object) ? (PandaNode *)_object->getUserPointer() : NULL; diff --git a/panda/src/bullet/bulletAllHitsRayResult.h b/panda/src/bullet/bulletAllHitsRayResult.h index 26e04034af..6825e0ff68 100644 --- a/panda/src/bullet/bulletAllHitsRayResult.h +++ b/panda/src/bullet/bulletAllHitsRayResult.h @@ -33,7 +33,7 @@ struct EXPCL_PANDABULLET BulletRayHit { PUBLISHED: INLINE static BulletRayHit empty(); - const PandaNode *get_node() const; + PandaNode *get_node() const; LPoint3 get_hit_pos() const; LVector3 get_hit_normal() const; PN_stdfloat get_hit_fraction() const; diff --git a/panda/src/bullet/bulletBodyNode.cxx b/panda/src/bullet/bulletBodyNode.cxx index c494afe00c..03c24ffaa1 100644 --- a/panda/src/bullet/bulletBodyNode.cxx +++ b/panda/src/bullet/bulletBodyNode.cxx @@ -761,7 +761,7 @@ write_datagram(BamWriter *manager, Datagram &dg) { dg.add_stdfloat(get_ccd_swept_sphere_radius()); dg.add_stdfloat(get_ccd_motion_threshold()); - for (int i = 0; i < _shapes.size(); ++i) { + for (unsigned int i = 0; i < _shapes.size(); ++i) { manager->write_pointer(dg, get_shape(i)); manager->write_pointer(dg, get_shape_transform(i)); } diff --git a/panda/src/bullet/bulletClosestHitRayResult.cxx b/panda/src/bullet/bulletClosestHitRayResult.cxx index a1b2910b65..acde58087b 100644 --- a/panda/src/bullet/bulletClosestHitRayResult.cxx +++ b/panda/src/bullet/bulletClosestHitRayResult.cxx @@ -87,11 +87,11 @@ get_hit_fraction() const { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -const PandaNode *BulletClosestHitRayResult:: +PandaNode *BulletClosestHitRayResult:: get_node() const { const btCollisionObject *objectPtr = m_collisionObject; - return (objectPtr) ? (const PandaNode *)objectPtr->getUserPointer() : NULL; + return (objectPtr) ? (PandaNode *)objectPtr->getUserPointer() : NULL; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/bullet/bulletClosestHitRayResult.h b/panda/src/bullet/bulletClosestHitRayResult.h index 1a3846ab89..dcb9e325b9 100644 --- a/panda/src/bullet/bulletClosestHitRayResult.h +++ b/panda/src/bullet/bulletClosestHitRayResult.h @@ -38,7 +38,7 @@ PUBLISHED: bool has_hit() const; - const PandaNode *get_node() const; + PandaNode *get_node() const; LPoint3 get_hit_pos() const; LVector3 get_hit_normal() const; PN_stdfloat get_hit_fraction() const; diff --git a/panda/src/bullet/bulletClosestHitSweepResult.cxx b/panda/src/bullet/bulletClosestHitSweepResult.cxx index 7c4a12c336..6245495490 100644 --- a/panda/src/bullet/bulletClosestHitSweepResult.cxx +++ b/panda/src/bullet/bulletClosestHitSweepResult.cxx @@ -67,11 +67,11 @@ get_hit_fraction() const { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -const PandaNode *BulletClosestHitSweepResult:: +PandaNode *BulletClosestHitSweepResult:: get_node() const { const btCollisionObject *objectPtr = m_hitCollisionObject; - return (objectPtr) ? (const PandaNode *)objectPtr->getUserPointer() : NULL; + return (objectPtr) ? (PandaNode *)objectPtr->getUserPointer() : NULL; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/bullet/bulletClosestHitSweepResult.h b/panda/src/bullet/bulletClosestHitSweepResult.h index 6d142452b0..7ff7e524b4 100644 --- a/panda/src/bullet/bulletClosestHitSweepResult.h +++ b/panda/src/bullet/bulletClosestHitSweepResult.h @@ -38,7 +38,7 @@ PUBLISHED: bool has_hit() const; - const PandaNode *get_node() const; + PandaNode *get_node() const; LPoint3 get_hit_pos() const; LVector3 get_hit_normal() const; PN_stdfloat get_hit_fraction() const; diff --git a/panda/src/bullet/bulletContactResult.cxx b/panda/src/bullet/bulletContactResult.cxx index b9adc65c75..f65d66928f 100644 --- a/panda/src/bullet/bulletContactResult.cxx +++ b/panda/src/bullet/bulletContactResult.cxx @@ -63,7 +63,7 @@ BulletContactResult() : btCollisionWorld::ContactResultCallback() { #if BT_BULLET_VERSION >= 281 //////////////////////////////////////////////////////////////////// // Function: BulletContactResult::use_filter -// Access: Published +// Access: Protected // Description: //////////////////////////////////////////////////////////////////// void BulletContactResult:: diff --git a/panda/src/bullet/bulletPersistentManifold.cxx b/panda/src/bullet/bulletPersistentManifold.cxx index 4d345294e6..f356f6efe0 100644 --- a/panda/src/bullet/bulletPersistentManifold.cxx +++ b/panda/src/bullet/bulletPersistentManifold.cxx @@ -63,7 +63,7 @@ clear_manifold() { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -const PandaNode *BulletPersistentManifold:: +PandaNode *BulletPersistentManifold:: get_node0() { #if BT_BULLET_VERSION >= 281 @@ -72,7 +72,7 @@ get_node0() { const btCollisionObject *obj = (btCollisionObject *)_manifold->getBody0(); #endif - return (obj) ? (const PandaNode *)obj->getUserPointer(): NULL; + return (obj) ? (PandaNode *)obj->getUserPointer(): NULL; } //////////////////////////////////////////////////////////////////// @@ -80,7 +80,7 @@ get_node0() { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -const PandaNode *BulletPersistentManifold:: +PandaNode *BulletPersistentManifold:: get_node1() { #if BT_BULLET_VERSION >= 281 @@ -89,7 +89,7 @@ get_node1() { const btCollisionObject *obj = (btCollisionObject *)_manifold->getBody1(); #endif - return (obj) ? (const PandaNode *)obj->getUserPointer(): NULL; + return (obj) ? (PandaNode *)obj->getUserPointer(): NULL; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/bullet/bulletPersistentManifold.h b/panda/src/bullet/bulletPersistentManifold.h index 0e63c48c08..ee976739c9 100644 --- a/panda/src/bullet/bulletPersistentManifold.h +++ b/panda/src/bullet/bulletPersistentManifold.h @@ -32,8 +32,8 @@ class EXPCL_PANDABULLET BulletPersistentManifold { PUBLISHED: INLINE ~BulletPersistentManifold(); - const PandaNode *get_node0(); - const PandaNode *get_node1(); + PandaNode *get_node0(); + PandaNode *get_node1(); int get_num_manifold_points() const; BulletManifoldPoint *get_manifold_point(int idx) const; From 03a13993785af90be3d342b83be19c657c13d871 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 Sep 2015 13:12:48 +0200 Subject: [PATCH 114/200] Remove accidentally checked in debug message --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 1eda94595b..0a1dc16a0b 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -11331,7 +11331,6 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, if (_supports_clear_buffer) { // For buffer textures we need to clear the underlying storage. string clear_data = tex->get_clear_data(); - cerr << "clearing buffer data\n"; _glClearBufferData(GL_TEXTURE_BUFFER, internal_format, external_format, component_type, (const void *)clear_data.data()); From e1c0ae7f1be9e8478778306a0d42acc89a97bfb8 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 Sep 2015 15:28:12 +0200 Subject: [PATCH 115/200] Add F_hardware_skinning/p3d_TransformTable to GLSL on 1.9 branch, as requested Uses a hack to prevent breaking ABI compat --- panda/src/display/standardMunger.cxx | 40 ++++++--- panda/src/glstuff/glGeomMunger_src.cxx | 2 +- .../glstuff/glGraphicsStateGuardian_src.cxx | 6 +- panda/src/glstuff/glShaderContext_src.cxx | 84 +++++++++++++++++++ panda/src/glstuff/glShaderContext_src.h | 7 ++ panda/src/pgraph/shaderAttrib.h | 1 + 6 files changed, 125 insertions(+), 15 deletions(-) diff --git a/panda/src/display/standardMunger.cxx b/panda/src/display/standardMunger.cxx index 922150a114..c33c95f7e2 100644 --- a/panda/src/display/standardMunger.cxx +++ b/panda/src/display/standardMunger.cxx @@ -37,14 +37,13 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, StateMunger(gsg), _num_components(num_components), _numeric_type(numeric_type), - _contents(contents) + _contents(contents), + _munge_color(false), + _munge_color_scale(false), + _auto_shader(false) { _render_mode = DCAST(RenderModeAttrib, state->get_attrib(RenderModeAttrib::get_class_slot())); - _munge_color = false; - _munge_color_scale = false; - _auto_shader = false; - if (!get_gsg()->get_runtime_color_scale()) { // We might need to munge the colors. const ColorAttrib *color_attrib = (const ColorAttrib *) @@ -98,6 +97,11 @@ StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state, if (shader_attrib->auto_shader()) { _auto_shader = true; } + if (shader_attrib->get_flag(ShaderAttrib::F_hardware_skinning)) { + // Hijack this field, such as not to break ABI compatibility. + // This hack is not present in 1.10. + _num_components |= 0x10000; + } } //////////////////////////////////////////////////////////////////// @@ -120,17 +124,20 @@ munge_data_impl(const GeomVertexData *data) { CPT(GeomVertexData) new_data = data; if (_munge_color) { - new_data = new_data->set_color(_color, _num_components, _numeric_type, - _contents); + new_data = new_data->set_color(_color, _num_components & 0xffff, + _numeric_type, _contents); } else if (_munge_color_scale) { - new_data = new_data->scale_color(_color_scale, _num_components, + new_data = new_data->scale_color(_color_scale, _num_components & 0xffff, _numeric_type, _contents); } GeomVertexAnimationSpec animation = new_data->get_format()->get_animation(); - if (hardware_animated_vertices && - animation.get_animation_type() == AT_panda && - new_data->get_slider_table() == (SliderTable *)NULL) { + if (_num_components & 0x10000) { + animation.set_hardware(4, true); + + } else if (hardware_animated_vertices && + animation.get_animation_type() == AT_panda && + new_data->get_slider_table() == (SliderTable *)NULL) { // Maybe we can animate the vertices with hardware. const TransformBlendTable *table = new_data->get_transform_blend_table(); if (table != (TransformBlendTable *)NULL && @@ -306,7 +313,11 @@ compare_to_impl(const GeomMunger *other) const { return compare; } } - + bool shader_skinning = ((_num_components & 0x10000) != 0); + bool om_shader_skinning = ((om->_num_components & 0x10000) != 0); + if (shader_skinning != om_shader_skinning) { + return (int)shader_skinning - (int)om_shader_skinning; + } if (_auto_shader != om->_auto_shader) { return (int)_auto_shader - (int)om->_auto_shader; } @@ -345,6 +356,11 @@ geom_compare_to_impl(const GeomMunger *other) const { return compare; } } + bool shader_skinning = ((_num_components & 0x10000) != 0); + bool om_shader_skinning = ((om->_num_components & 0x10000) != 0); + if (shader_skinning != om_shader_skinning) { + return (int)shader_skinning - (int)om_shader_skinning; + } return StateMunger::geom_compare_to_impl(other); } diff --git a/panda/src/glstuff/glGeomMunger_src.cxx b/panda/src/glstuff/glGeomMunger_src.cxx index b2deb6e29f..a3b53ac464 100644 --- a/panda/src/glstuff/glGeomMunger_src.cxx +++ b/panda/src/glstuff/glGeomMunger_src.cxx @@ -118,7 +118,7 @@ munge_format_impl(const GeomVertexFormat *orig, if (animation.get_num_transforms() > 1) { PT(GeomVertexArrayFormat) new_array_format = new GeomVertexArrayFormat; new_array_format->add_column - (InternalName::get_transform_weight(), animation.get_num_transforms() - 1, + (InternalName::get_transform_weight(), animation.get_num_transforms(), NT_stdfloat, C_other); if (animation.get_indexed_transforms()) { diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index a1a2e7e7a9..2d0c82e0b9 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -3249,11 +3249,11 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, } } +#ifndef OPENGLES const GeomVertexAnimationSpec &animation = _data_reader->get_format()->get_animation(); bool hardware_animation = (animation.get_animation_type() == Geom::AT_hardware); -#ifndef OPENGLES - if (hardware_animation) { + if (hardware_animation && _current_shader_context == NULL) { // Set up the transform matrices for vertex blending. nassertr(_supports_vertex_blend, false); glEnable(GL_VERTEX_BLEND_ARB); @@ -3335,6 +3335,8 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, GLPf(LoadMatrix)(_internal_transform->get_mat().get_data()); } } +#else + const bool hardware_animation = false; #endif #ifndef OPENGLES_2 diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 5df6c93871..298eda1f9e 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -197,6 +197,8 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext _glsl_program = 0; _uses_standard_vertex_arrays = false; _has_divisor = false; + _transform_table_index = -1; + _slider_table_index = -1; nassertv(s->get_language() == Shader::SL_GLSL); @@ -527,6 +529,26 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext s->_mat_spec.push_back(bind); continue; } + if (noprefix == "TransformTable") { + if (param_type != GL_FLOAT_MAT4) { + GLCAT.error() + << "p3d_TransformTable should be uniform mat4\n"; + continue; + } + _transform_table_index = p; + _transform_table_size = param_size; + continue; + } + if (noprefix == "SliderTable") { + if (param_type != GL_FLOAT) { + GLCAT.error() + << "p3d_SliderTable should be uniform float\n"; + continue; + } + _slider_table_index = p; + _slider_table_size = param_size; + continue; + } GLCAT.error() << "Unrecognized uniform name '" << param_name_cstr << "'!\n"; continue; @@ -1324,6 +1346,58 @@ issue_parameters(int altered) { _glgsg->report_my_gl_errors(); } +//////////////////////////////////////////////////////////////////// +// Function: GLShaderContext::update_transform_table +// Access: Public +// Description: Changes the active transform table, used for hardware +// skinning. +//////////////////////////////////////////////////////////////////// +void CLP(ShaderContext):: +update_transform_table(const TransformTable *table) { + LMatrix4f *matrices = (LMatrix4f *)alloca(_transform_table_size * 64); + + int i = 0; + if (table != NULL) { + int num_transforms = min(_transform_table_size, table->get_num_transforms()); + for (; i < num_transforms; ++i) { +#ifdef STDFLOAT_DOUBLE + LMatrix4 matrix; + table->get_transform(i)->get_matrix(matrix); + matrices[i] = LCAST(float, matrix); +#else + table->get_transform(i)->get_matrix(matrices[i]); +#endif + } + } + for (; i < _transform_table_size; ++i) { + matrices[i] = LMatrix4f::ident_mat(); + } + + _glgsg->_glUniformMatrix4fv(_transform_table_index, _transform_table_size, + GL_FALSE, (float *)matrices); +} + +//////////////////////////////////////////////////////////////////// +// Function: GLShaderContext::update_slider_table +// Access: Public +// Description: Changes the active slider table, used for hardware +// skinning. +//////////////////////////////////////////////////////////////////// +void CLP(ShaderContext):: +update_slider_table(const SliderTable *table) { + float *sliders = (float *)alloca(_slider_table_size * 4); + memset(sliders, 0, _slider_table_size * 4); + + if (table != NULL) { + int num_sliders = min(_slider_table_size, table->get_num_sliders()); + for (int i = 0; i < num_sliders; ++i) { + sliders[i] = table->get_slider(i)->get_slider(); + } + } + + _glgsg->_glUniform1fv(_slider_table_index, _slider_table_size, sliders); +} + //////////////////////////////////////////////////////////////////// // Function: GLShaderContext::disable_shader_vertex_arrays // Access: Public @@ -1441,6 +1515,16 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { } } + if (_transform_table_index >= 0) { + const TransformTable *table = _glgsg->_data_reader->get_transform_table(); + update_transform_table(table); + } + + if (_slider_table_index >= 0) { + const SliderTable *table = _glgsg->_data_reader->get_slider_table(); + update_slider_table(table); + } + _glgsg->report_my_gl_errors(); return true; diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index e2a9aadc9d..62d54ed675 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -41,6 +41,8 @@ public: void bind(bool reissue_parameters = true); void unbind(); void issue_parameters(int altered); + void update_transform_table(const TransformTable *table); + void update_slider_table(const SliderTable *table); void disable_shader_vertex_arrays(); bool update_shader_vertex_arrays(ShaderContext *prev, bool force); void disable_shader_texture_bindings(); @@ -65,6 +67,11 @@ private: //typedef pvector ParamContexts; //ParamContexts _params; + GLint _transform_table_index; + GLint _slider_table_index; + GLsizei _transform_table_size; + GLsizei _slider_table_size; + pvector _glsl_parameter_map; pmap _glsl_uniform_handles; diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index c6bb2eb583..9d677a411e 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -48,6 +48,7 @@ PUBLISHED: enum { F_disable_alpha_write = 0, // Suppress writes to color buffer alpha channel. F_subsume_alpha_test = 1, // Shader promises to subsume the alpha test using TEXKILL + F_hardware_skinning = 2, // Shader needs pre-animated vertices }; INLINE bool has_shader() const; From d3487eba6b06e6f6af408d08f8a54596eb9e87a0 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Sep 2015 23:28:37 +0200 Subject: [PATCH 116/200] Set visibility attributes on all exported bindings --- dtool/src/interrogate/interfaceMakerC.cxx | 19 ++++++++++++++----- .../interfaceMakerPythonNative.cxx | 4 ++++ .../interrogate/interfaceMakerPythonObj.cxx | 2 ++ .../interfaceMakerPythonSimple.cxx | 2 ++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerC.cxx b/dtool/src/interrogate/interfaceMakerC.cxx index c693bf7689..25eeb87023 100644 --- a/dtool/src/interrogate/interfaceMakerC.cxx +++ b/dtool/src/interrogate/interfaceMakerC.cxx @@ -53,6 +53,14 @@ InterfaceMakerC:: //////////////////////////////////////////////////////////////////// void InterfaceMakerC:: write_prototypes(ostream &out,ostream *out_h) { + // The 'used' attribute prevents emscripten from optimizing it out. + out << + "#if __GNUC__ >= 4\n" + "#define EXPORT_FUNC extern \"C\" __attribute__((used, visibility(\"default\")))\n" + "#else\n" + "#define EXPORT_FUNC extern \"C\"\n" + "#endif\n\n"; + FunctionsByIndex::iterator fi; for (fi = _functions.begin(); fi != _functions.end(); ++fi) { Function *func = (*fi).second; @@ -140,8 +148,13 @@ write_prototype_for(ostream &out, InterfaceMaker::Function *func) { for (ri = func->_remaps.begin(); ri != func->_remaps.end(); ++ri) { FunctionRemap *remap = (*ri); + + if (remap->_extension || (remap->_flags & FunctionRemap::F_explicit_self)) { + continue; + } + if (output_function_names) { - out << "extern \"C\" "; + out << "EXPORT_FUNC "; } write_function_header(out, func, remap, false); out << ";\n"; @@ -216,10 +229,6 @@ write_function_instance(ostream &out, InterfaceMaker::Function *func, void InterfaceMakerC:: write_function_header(ostream &out, InterfaceMaker::Function *func, FunctionRemap *remap, bool newline) { - if (remap->_extension || (remap->_flags & FunctionRemap::F_explicit_self)) { - return; - } - if (remap->_void_return) { out << "void"; } else { diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index cd780c01a2..49e7a184ec 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1499,6 +1499,8 @@ write_module(ostream &out, ostream *out_h, InterrogateModuleDef *def) { << "\n" << "#ifdef _WIN32\n" << "extern \"C\" __declspec(dllexport) PyObject *PyInit_" << def->module_name << "();\n" + << "#elif __GNUC__ >= 4\n" + << "extern \"C\" __attribute__((visibility(\"default\"))) PyInit_" << def->module_name << "();\n" << "#else\n" << "extern \"C\" PyObject *PyInit_" << def->module_name << "();\n" << "#endif\n" @@ -1512,6 +1514,8 @@ write_module(ostream &out, ostream *out_h, InterrogateModuleDef *def) { << "\n" << "#ifdef _WIN32\n" << "extern \"C\" __declspec(dllexport) void init" << def->module_name << "();\n" + << "#elif __GNUC__ >= 4\n" + << "extern \"C\" __attribute__((visibility(\"default\"))) init" << def->module_name << "();\n" << "#else\n" << "extern \"C\" void init" << def->module_name << "();\n" << "#endif\n" diff --git a/dtool/src/interrogate/interfaceMakerPythonObj.cxx b/dtool/src/interrogate/interfaceMakerPythonObj.cxx index 9081c435bd..d88c62e7c7 100644 --- a/dtool/src/interrogate/interfaceMakerPythonObj.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonObj.cxx @@ -136,6 +136,8 @@ write_module(ostream &out,ostream *out_h, InterrogateModuleDef *def) { << "#ifdef _WIN32\n" << "extern \"C\" __declspec(dllexport) INIT_FUNC();\n" + << "#elif __GNUC__ >= 4\n" + << "extern \"C\" __attribute__((visibility(\"default\"))) INIT_FUNC();\n" << "#else\n" << "extern \"C\" INIT_FUNC();\n" << "#endif\n\n" diff --git a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx index d6e0684db7..9b04103af2 100644 --- a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx @@ -123,6 +123,8 @@ write_module(ostream &out,ostream *out_h, InterrogateModuleDef *def) { << "#ifdef _WIN32\n" << "extern \"C\" __declspec(dllexport) INIT_FUNC();\n" + << "#elif __GNUC__ >= 4\n" + << "extern \"C\" __attribute__((visibility(\"default\"))) INIT_FUNC();\n" << "#else\n" << "extern \"C\" INIT_FUNC();\n" << "#endif\n\n" From 20f90f35b9ce7f6ff1792d4eb1e270eaa6181c33 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Sep 2015 23:30:02 +0200 Subject: [PATCH 117/200] Regenerate interrogatedb bindings to include interrogate_request --- dtool/metalibs/dtoolconfig/pydtool.cxx | 842 +++++++++++++------------ 1 file changed, 438 insertions(+), 404 deletions(-) diff --git a/dtool/metalibs/dtoolconfig/pydtool.cxx b/dtool/metalibs/dtoolconfig/pydtool.cxx index bde03f4197..77a162c7ec 100644 --- a/dtool/metalibs/dtoolconfig/pydtool.cxx +++ b/dtool/metalibs/dtoolconfig/pydtool.cxx @@ -1,12 +1,13 @@ /* - * This file generated by: - * interrogate -D EXPCL_DTOOLCONFIG= -nodb -python -promiscuous -I~/panda3d-git/built/include -module panda3d.dtoolconfig -library dtoolconfig -string -true-names -do-module -oc pydtool.cxx ../../src/interrogatedb/interrogate_interface.h + * This file was generated by: + * interrogate -D EXPCL_DTOOLCONFIG= -nodb -python -promiscuous -I/home/rdb/panda3d-git/built/include -module panda3d.interrogatedb -library interrogatedb -string -true-names -do-module -oc pydtool.cxx ../../src/interrogatedb/interrogate_interface.h ../../src/interrogatedb/interrogate_request.h * */ #include #include "../../src/interrogatedb/interrogate_interface.h" +#include "../../src/interrogatedb/interrogate_request.h" #include "dtoolbase.h" #undef _POSIX_C_SOURCE @@ -18,137 +19,139 @@ #include "Python.h" #endif -static PyObject *_inPU7VHtbRf(PyObject *self, PyObject *args); -static PyObject *_inPU7VHda_g(PyObject *self, PyObject *args); -static PyObject *_inPU7VH4RgX(PyObject *self, PyObject *args); -static PyObject *_inPU7VH3Gip(PyObject *self, PyObject *args); -static PyObject *_inPU7VHRKDz(PyObject *self, PyObject *args); -static PyObject *_inPU7VHgZ9N(PyObject *self, PyObject *args); -static PyObject *_inPU7VHFnRZ(PyObject *self, PyObject *args); -static PyObject *_inPU7VHg0Qv(PyObject *self, PyObject *args); -static PyObject *_inPU7VHtrqw(PyObject *self, PyObject *args); -static PyObject *_inPU7VHdmpW(PyObject *self, PyObject *args); -static PyObject *_inPU7VHUYgQ(PyObject *self, PyObject *args); -static PyObject *_inPU7VH0k7F(PyObject *self, PyObject *args); -static PyObject *_inPU7VHfIsr(PyObject *self, PyObject *args); -static PyObject *_inPU7VHvysR(PyObject *self, PyObject *args); -static PyObject *_inPU7VHYQ_2(PyObject *self, PyObject *args); -static PyObject *_inPU7VH3kdv(PyObject *self, PyObject *args); -static PyObject *_inPU7VHew01(PyObject *self, PyObject *args); -static PyObject *_inPU7VHQna7(PyObject *self, PyObject *args); -static PyObject *_inPU7VHkg95(PyObject *self, PyObject *args); -static PyObject *_inPU7VHluRc(PyObject *self, PyObject *args); -static PyObject *_inPU7VHtHdM(PyObject *self, PyObject *args); -static PyObject *_inPU7VHDId0(PyObject *self, PyObject *args); -static PyObject *_inPU7VHHuAm(PyObject *self, PyObject *args); -static PyObject *_inPU7VH_xr0(PyObject *self, PyObject *args); -static PyObject *_inPU7VHH5qp(PyObject *self, PyObject *args); -static PyObject *_inPU7VHU2_B(PyObject *self, PyObject *args); -static PyObject *_inPU7VHHFO2(PyObject *self, PyObject *args); -static PyObject *_inPU7VHcfjm(PyObject *self, PyObject *args); -static PyObject *_inPU7VH3Sjw(PyObject *self, PyObject *args); -static PyObject *_inPU7VHgJcX(PyObject *self, PyObject *args); -static PyObject *_inPU7VHYlw6(PyObject *self, PyObject *args); -static PyObject *_inPU7VHsmnz(PyObject *self, PyObject *args); -static PyObject *_inPU7VHxQ10(PyObject *self, PyObject *args); -static PyObject *_inPU7VH6gPB(PyObject *self, PyObject *args); -static PyObject *_inPU7VHISgV(PyObject *self, PyObject *args); -static PyObject *_inPU7VHH3bx(PyObject *self, PyObject *args); -static PyObject *_inPU7VHzeUk(PyObject *self, PyObject *args); -static PyObject *_inPU7VHUeI5(PyObject *self, PyObject *args); -static PyObject *_inPU7VHuSvx(PyObject *self, PyObject *args); -static PyObject *_inPU7VHwpYd(PyObject *self, PyObject *args); -static PyObject *_inPU7VHOfNh(PyObject *self, PyObject *args); -static PyObject *_inPU7VHf5_U(PyObject *self, PyObject *args); -static PyObject *_inPU7VHL3ZB(PyObject *self, PyObject *args); -static PyObject *_inPU7VHXw0I(PyObject *self, PyObject *args); -static PyObject *_inPU7VH3zru(PyObject *self, PyObject *args); -static PyObject *_inPU7VHRrg2(PyObject *self, PyObject *args); -static PyObject *_inPU7VHEJCx(PyObject *self, PyObject *args); -static PyObject *_inPU7VHWAZr(PyObject *self, PyObject *args); -static PyObject *_inPU7VHrD_M(PyObject *self, PyObject *args); -static PyObject *_inPU7VHjolz(PyObject *self, PyObject *args); -static PyObject *_inPU7VHt_JD(PyObject *self, PyObject *args); -static PyObject *_inPU7VHwEts(PyObject *self, PyObject *args); -static PyObject *_inPU7VHrJWs(PyObject *self, PyObject *args); -static PyObject *_inPU7VHpmFD(PyObject *self, PyObject *args); -static PyObject *_inPU7VHyYUX(PyObject *self, PyObject *args); -static PyObject *_inPU7VH54dn(PyObject *self, PyObject *args); -static PyObject *_inPU7VHGMpW(PyObject *self, PyObject *args); -static PyObject *_inPU7VHNuBV(PyObject *self, PyObject *args); -static PyObject *_inPU7VH9UwA(PyObject *self, PyObject *args); -static PyObject *_inPU7VH3FDt(PyObject *self, PyObject *args); -static PyObject *_inPU7VHf513(PyObject *self, PyObject *args); -static PyObject *_inPU7VHsqGH(PyObject *self, PyObject *args); -static PyObject *_inPU7VH7shV(PyObject *self, PyObject *args); -static PyObject *_inPU7VHA1eF(PyObject *self, PyObject *args); -static PyObject *_inPU7VH9tTm(PyObject *self, PyObject *args); -static PyObject *_inPU7VH776V(PyObject *self, PyObject *args); -static PyObject *_inPU7VHfaH0(PyObject *self, PyObject *args); -static PyObject *_inPU7VHGB9D(PyObject *self, PyObject *args); -static PyObject *_inPU7VHsxxs(PyObject *self, PyObject *args); -static PyObject *_inPU7VHMT0z(PyObject *self, PyObject *args); -static PyObject *_inPU7VHiW3v(PyObject *self, PyObject *args); -static PyObject *_inPU7VH4Px8(PyObject *self, PyObject *args); -static PyObject *_inPU7VHNHcs(PyObject *self, PyObject *args); -static PyObject *_inPU7VHqHrb(PyObject *self, PyObject *args); -static PyObject *_inPU7VHaOqq(PyObject *self, PyObject *args); -static PyObject *_inPU7VHqWOw(PyObject *self, PyObject *args); -static PyObject *_inPU7VHHu7x(PyObject *self, PyObject *args); -static PyObject *_inPU7VHwGnA(PyObject *self, PyObject *args); -static PyObject *_inPU7VHXGxx(PyObject *self, PyObject *args); -static PyObject *_inPU7VHj04Z(PyObject *self, PyObject *args); -static PyObject *_inPU7VHEOv4(PyObject *self, PyObject *args); -static PyObject *_inPU7VHpCqJ(PyObject *self, PyObject *args); -static PyObject *_inPU7VH_Pz3(PyObject *self, PyObject *args); -static PyObject *_inPU7VHt_06(PyObject *self, PyObject *args); -static PyObject *_inPU7VHmuPs(PyObject *self, PyObject *args); -static PyObject *_inPU7VHvM8B(PyObject *self, PyObject *args); -static PyObject *_inPU7VHap97(PyObject *self, PyObject *args); -static PyObject *_inPU7VH0o8D(PyObject *self, PyObject *args); -static PyObject *_inPU7VHOoQ2(PyObject *self, PyObject *args); -static PyObject *_inPU7VHKuFh(PyObject *self, PyObject *args); -static PyObject *_inPU7VHo5L6(PyObject *self, PyObject *args); -static PyObject *_inPU7VHzgKK(PyObject *self, PyObject *args); -static PyObject *_inPU7VH0FIF(PyObject *self, PyObject *args); -static PyObject *_inPU7VHZqvD(PyObject *self, PyObject *args); -static PyObject *_inPU7VHDyRd(PyObject *self, PyObject *args); -static PyObject *_inPU7VHMnKa(PyObject *self, PyObject *args); -static PyObject *_inPU7VHRtji(PyObject *self, PyObject *args); -static PyObject *_inPU7VHCnbQ(PyObject *self, PyObject *args); -static PyObject *_inPU7VHdUVN(PyObject *self, PyObject *args); -static PyObject *_inPU7VHihbt(PyObject *self, PyObject *args); -static PyObject *_inPU7VHbyPY(PyObject *self, PyObject *args); -static PyObject *_inPU7VHAaT6(PyObject *self, PyObject *args); -static PyObject *_inPU7VHgL9q(PyObject *self, PyObject *args); -static PyObject *_inPU7VHWB97(PyObject *self, PyObject *args); -static PyObject *_inPU7VHDUAl(PyObject *self, PyObject *args); -static PyObject *_inPU7VH1_Kf(PyObject *self, PyObject *args); -static PyObject *_inPU7VH98lD(PyObject *self, PyObject *args); -static PyObject *_inPU7VH9SHr(PyObject *self, PyObject *args); -static PyObject *_inPU7VHdiZP(PyObject *self, PyObject *args); -static PyObject *_inPU7VHTdER(PyObject *self, PyObject *args); -static PyObject *_inPU7VHYO56(PyObject *self, PyObject *args); -static PyObject *_inPU7VHxtCG(PyObject *self, PyObject *args); -static PyObject *_inPU7VH_EB2(PyObject *self, PyObject *args); -static PyObject *_inPU7VHEG1l(PyObject *self, PyObject *args); -static PyObject *_inPU7VH7tUq(PyObject *self, PyObject *args); -static PyObject *_inPU7VHyStU(PyObject *self, PyObject *args); -static PyObject *_inPU7VHdM85(PyObject *self, PyObject *args); -static PyObject *_inPU7VHk_GN(PyObject *self, PyObject *args); -static PyObject *_inPU7VH8QjG(PyObject *self, PyObject *args); -static PyObject *_inPU7VHyMtj(PyObject *self, PyObject *args); -static PyObject *_inPU7VHHDtN(PyObject *self, PyObject *args); -static PyObject *_inPU7VHHFjA(PyObject *self, PyObject *args); -static PyObject *_inPU7VH_NPR(PyObject *self, PyObject *args); -static PyObject *_inPU7VHcTOH(PyObject *self, PyObject *args); -static PyObject *_inPU7VHhdU7(PyObject *self, PyObject *args); -static PyObject *_inPU7VHQPxU(PyObject *self, PyObject *args); -static PyObject *_inPU7VHO7Pz(PyObject *self, PyObject *args); -static PyObject *_inPU7VHvu_E(PyObject *self, PyObject *args); -static PyObject *_inPU7VHxGUt(PyObject *self, PyObject *args); -static PyObject *_inPU7VHzM1P(PyObject *self, PyObject *args); -static PyObject *_inPU7VHoY5L(PyObject *self, PyObject *args); +static PyObject *_inP07yttbRf(PyObject *self, PyObject *args); +static PyObject *_inP07ytda_g(PyObject *self, PyObject *args); +static PyObject *_inP07yt4RgX(PyObject *self, PyObject *args); +static PyObject *_inP07yt3Gip(PyObject *self, PyObject *args); +static PyObject *_inP07ytRKDz(PyObject *self, PyObject *args); +static PyObject *_inP07ytgZ9N(PyObject *self, PyObject *args); +static PyObject *_inP07ytFnRZ(PyObject *self, PyObject *args); +static PyObject *_inP07ytg0Qv(PyObject *self, PyObject *args); +static PyObject *_inP07yttrqw(PyObject *self, PyObject *args); +static PyObject *_inP07ytdmpW(PyObject *self, PyObject *args); +static PyObject *_inP07ytUYgQ(PyObject *self, PyObject *args); +static PyObject *_inP07yt0k7F(PyObject *self, PyObject *args); +static PyObject *_inP07ytfIsr(PyObject *self, PyObject *args); +static PyObject *_inP07ytvysR(PyObject *self, PyObject *args); +static PyObject *_inP07ytYQ_2(PyObject *self, PyObject *args); +static PyObject *_inP07yt3kdv(PyObject *self, PyObject *args); +static PyObject *_inP07ytew01(PyObject *self, PyObject *args); +static PyObject *_inP07ytQna7(PyObject *self, PyObject *args); +static PyObject *_inP07ytkg95(PyObject *self, PyObject *args); +static PyObject *_inP07ytluRc(PyObject *self, PyObject *args); +static PyObject *_inP07yttHdM(PyObject *self, PyObject *args); +static PyObject *_inP07ytDId0(PyObject *self, PyObject *args); +static PyObject *_inP07ytHuAm(PyObject *self, PyObject *args); +static PyObject *_inP07yt_xr0(PyObject *self, PyObject *args); +static PyObject *_inP07ytH5qp(PyObject *self, PyObject *args); +static PyObject *_inP07ytU2_B(PyObject *self, PyObject *args); +static PyObject *_inP07ytHFO2(PyObject *self, PyObject *args); +static PyObject *_inP07ytcfjm(PyObject *self, PyObject *args); +static PyObject *_inP07yt3Sjw(PyObject *self, PyObject *args); +static PyObject *_inP07ytgJcX(PyObject *self, PyObject *args); +static PyObject *_inP07ytYlw6(PyObject *self, PyObject *args); +static PyObject *_inP07ytsmnz(PyObject *self, PyObject *args); +static PyObject *_inP07ytxQ10(PyObject *self, PyObject *args); +static PyObject *_inP07yt6gPB(PyObject *self, PyObject *args); +static PyObject *_inP07ytISgV(PyObject *self, PyObject *args); +static PyObject *_inP07ytH3bx(PyObject *self, PyObject *args); +static PyObject *_inP07ytzeUk(PyObject *self, PyObject *args); +static PyObject *_inP07ytUeI5(PyObject *self, PyObject *args); +static PyObject *_inP07ytuSvx(PyObject *self, PyObject *args); +static PyObject *_inP07ytwpYd(PyObject *self, PyObject *args); +static PyObject *_inP07ytOfNh(PyObject *self, PyObject *args); +static PyObject *_inP07ytf5_U(PyObject *self, PyObject *args); +static PyObject *_inP07ytL3ZB(PyObject *self, PyObject *args); +static PyObject *_inP07ytXw0I(PyObject *self, PyObject *args); +static PyObject *_inP07yt3zru(PyObject *self, PyObject *args); +static PyObject *_inP07ytRrg2(PyObject *self, PyObject *args); +static PyObject *_inP07ytEJCx(PyObject *self, PyObject *args); +static PyObject *_inP07ytWAZr(PyObject *self, PyObject *args); +static PyObject *_inP07ytrD_M(PyObject *self, PyObject *args); +static PyObject *_inP07ytjolz(PyObject *self, PyObject *args); +static PyObject *_inP07ytt_JD(PyObject *self, PyObject *args); +static PyObject *_inP07ytwEts(PyObject *self, PyObject *args); +static PyObject *_inP07ytrJWs(PyObject *self, PyObject *args); +static PyObject *_inP07ytpmFD(PyObject *self, PyObject *args); +static PyObject *_inP07ytyYUX(PyObject *self, PyObject *args); +static PyObject *_inP07yt54dn(PyObject *self, PyObject *args); +static PyObject *_inP07ytGMpW(PyObject *self, PyObject *args); +static PyObject *_inP07ytNuBV(PyObject *self, PyObject *args); +static PyObject *_inP07yt9UwA(PyObject *self, PyObject *args); +static PyObject *_inP07yt3FDt(PyObject *self, PyObject *args); +static PyObject *_inP07ytf513(PyObject *self, PyObject *args); +static PyObject *_inP07ytsqGH(PyObject *self, PyObject *args); +static PyObject *_inP07yt7shV(PyObject *self, PyObject *args); +static PyObject *_inP07ytA1eF(PyObject *self, PyObject *args); +static PyObject *_inP07yt9tTm(PyObject *self, PyObject *args); +static PyObject *_inP07yt776V(PyObject *self, PyObject *args); +static PyObject *_inP07ytfaH0(PyObject *self, PyObject *args); +static PyObject *_inP07ytGB9D(PyObject *self, PyObject *args); +static PyObject *_inP07ytsxxs(PyObject *self, PyObject *args); +static PyObject *_inP07ytMT0z(PyObject *self, PyObject *args); +static PyObject *_inP07ytiW3v(PyObject *self, PyObject *args); +static PyObject *_inP07yt4Px8(PyObject *self, PyObject *args); +static PyObject *_inP07ytNHcs(PyObject *self, PyObject *args); +static PyObject *_inP07ytqHrb(PyObject *self, PyObject *args); +static PyObject *_inP07ytaOqq(PyObject *self, PyObject *args); +static PyObject *_inP07ytqWOw(PyObject *self, PyObject *args); +static PyObject *_inP07ytHu7x(PyObject *self, PyObject *args); +static PyObject *_inP07ytwGnA(PyObject *self, PyObject *args); +static PyObject *_inP07ytXGxx(PyObject *self, PyObject *args); +static PyObject *_inP07ytj04Z(PyObject *self, PyObject *args); +static PyObject *_inP07ytEOv4(PyObject *self, PyObject *args); +static PyObject *_inP07ytpCqJ(PyObject *self, PyObject *args); +static PyObject *_inP07yt_Pz3(PyObject *self, PyObject *args); +static PyObject *_inP07ytt_06(PyObject *self, PyObject *args); +static PyObject *_inP07ytmuPs(PyObject *self, PyObject *args); +static PyObject *_inP07ytvM8B(PyObject *self, PyObject *args); +static PyObject *_inP07ytap97(PyObject *self, PyObject *args); +static PyObject *_inP07yt0o8D(PyObject *self, PyObject *args); +static PyObject *_inP07ytOoQ2(PyObject *self, PyObject *args); +static PyObject *_inP07ytKuFh(PyObject *self, PyObject *args); +static PyObject *_inP07yto5L6(PyObject *self, PyObject *args); +static PyObject *_inP07ytzgKK(PyObject *self, PyObject *args); +static PyObject *_inP07yt0FIF(PyObject *self, PyObject *args); +static PyObject *_inP07ytZqvD(PyObject *self, PyObject *args); +static PyObject *_inP07ytDyRd(PyObject *self, PyObject *args); +static PyObject *_inP07ytMnKa(PyObject *self, PyObject *args); +static PyObject *_inP07ytRtji(PyObject *self, PyObject *args); +static PyObject *_inP07ytCnbQ(PyObject *self, PyObject *args); +static PyObject *_inP07ytdUVN(PyObject *self, PyObject *args); +static PyObject *_inP07ytihbt(PyObject *self, PyObject *args); +static PyObject *_inP07ytbyPY(PyObject *self, PyObject *args); +static PyObject *_inP07ytAaT6(PyObject *self, PyObject *args); +static PyObject *_inP07ytgL9q(PyObject *self, PyObject *args); +static PyObject *_inP07ytWB97(PyObject *self, PyObject *args); +static PyObject *_inP07ytDUAl(PyObject *self, PyObject *args); +static PyObject *_inP07yt1_Kf(PyObject *self, PyObject *args); +static PyObject *_inP07yt98lD(PyObject *self, PyObject *args); +static PyObject *_inP07yt9SHr(PyObject *self, PyObject *args); +static PyObject *_inP07ytdiZP(PyObject *self, PyObject *args); +static PyObject *_inP07ytTdER(PyObject *self, PyObject *args); +static PyObject *_inP07ytYO56(PyObject *self, PyObject *args); +static PyObject *_inP07ytxtCG(PyObject *self, PyObject *args); +static PyObject *_inP07yt_EB2(PyObject *self, PyObject *args); +static PyObject *_inP07ytEG1l(PyObject *self, PyObject *args); +static PyObject *_inP07yt7tUq(PyObject *self, PyObject *args); +static PyObject *_inP07ytyStU(PyObject *self, PyObject *args); +static PyObject *_inP07ytdM85(PyObject *self, PyObject *args); +static PyObject *_inP07ytk_GN(PyObject *self, PyObject *args); +static PyObject *_inP07yt8QjG(PyObject *self, PyObject *args); +static PyObject *_inP07ytyMtj(PyObject *self, PyObject *args); +static PyObject *_inP07ytHDtN(PyObject *self, PyObject *args); +static PyObject *_inP07ytHFjA(PyObject *self, PyObject *args); +static PyObject *_inP07yt_NPR(PyObject *self, PyObject *args); +static PyObject *_inP07ytcTOH(PyObject *self, PyObject *args); +static PyObject *_inP07ythdU7(PyObject *self, PyObject *args); +static PyObject *_inP07ytQPxU(PyObject *self, PyObject *args); +static PyObject *_inP07ytO7Pz(PyObject *self, PyObject *args); +static PyObject *_inP07ytvu_E(PyObject *self, PyObject *args); +static PyObject *_inP07ytxGUt(PyObject *self, PyObject *args); +static PyObject *_inP07ytzM1P(PyObject *self, PyObject *args); +static PyObject *_inP07ytoY5L(PyObject *self, PyObject *args); +static PyObject *_inP07yte_7S(PyObject *self, PyObject *args); +static PyObject *_inP07ytw_15(PyObject *self, PyObject *args); /* @@ -156,10 +159,10 @@ static PyObject *_inPU7VHoY5L(PyObject *self, PyObject *args); * void interrogate_add_search_directory(char const *dirname) */ static PyObject * -_inPU7VHtbRf(PyObject *, PyObject *args) { +_inP07yttbRf(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - interrogate_add_search_directory((char *)param0); + interrogate_add_search_directory((char const *)param0); return Py_BuildValue(""); } return (PyObject *)NULL; @@ -170,10 +173,10 @@ _inPU7VHtbRf(PyObject *, PyObject *args) { * void interrogate_add_search_path(char const *pathstring) */ static PyObject * -_inPU7VHda_g(PyObject *, PyObject *args) { +_inP07ytda_g(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - interrogate_add_search_path((char *)param0); + interrogate_add_search_path((char const *)param0); return Py_BuildValue(""); } return (PyObject *)NULL; @@ -184,7 +187,7 @@ _inPU7VHda_g(PyObject *, PyObject *args) { * bool interrogate_error_flag(void) */ static PyObject * -_inPU7VH4RgX(PyObject *, PyObject *args) { +_inP07yt4RgX(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { bool return_value = interrogate_error_flag(); return PyBool_FromLong(return_value); @@ -197,7 +200,7 @@ _inPU7VH4RgX(PyObject *, PyObject *args) { * int interrogate_number_of_manifests(void) */ static PyObject * -_inPU7VH3Gip(PyObject *, PyObject *args) { +_inP07yt3Gip(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_manifests(); #if PY_MAJOR_VERSION >= 3 @@ -214,7 +217,7 @@ _inPU7VH3Gip(PyObject *, PyObject *args) { * ManifestIndex interrogate_get_manifest(int n) */ static PyObject * -_inPU7VHRKDz(PyObject *, PyObject *args) { +_inP07ytRKDz(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { ManifestIndex return_value = interrogate_get_manifest((int)param0); @@ -232,10 +235,10 @@ _inPU7VHRKDz(PyObject *, PyObject *args) { * ManifestIndex interrogate_get_manifest_by_name(char const *manifest_name) */ static PyObject * -_inPU7VHgZ9N(PyObject *, PyObject *args) { +_inP07ytgZ9N(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - ManifestIndex return_value = interrogate_get_manifest_by_name((char *)param0); + ManifestIndex return_value = interrogate_get_manifest_by_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -250,7 +253,7 @@ _inPU7VHgZ9N(PyObject *, PyObject *args) { * char const *interrogate_manifest_name(ManifestIndex manifest) */ static PyObject * -_inPU7VHFnRZ(PyObject *, PyObject *args) { +_inP07ytFnRZ(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_manifest_name((ManifestIndex)param0); @@ -268,7 +271,7 @@ _inPU7VHFnRZ(PyObject *, PyObject *args) { * char const *interrogate_manifest_definition(ManifestIndex manifest) */ static PyObject * -_inPU7VHg0Qv(PyObject *, PyObject *args) { +_inP07ytg0Qv(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_manifest_definition((ManifestIndex)param0); @@ -286,7 +289,7 @@ _inPU7VHg0Qv(PyObject *, PyObject *args) { * bool interrogate_manifest_has_type(ManifestIndex manifest) */ static PyObject * -_inPU7VHtrqw(PyObject *, PyObject *args) { +_inP07yttrqw(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_manifest_has_type((ManifestIndex)param0); @@ -300,7 +303,7 @@ _inPU7VHtrqw(PyObject *, PyObject *args) { * TypeIndex interrogate_manifest_get_type(ManifestIndex manifest) */ static PyObject * -_inPU7VHdmpW(PyObject *, PyObject *args) { +_inP07ytdmpW(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_manifest_get_type((ManifestIndex)param0); @@ -318,7 +321,7 @@ _inPU7VHdmpW(PyObject *, PyObject *args) { * bool interrogate_manifest_has_getter(ManifestIndex manifest) */ static PyObject * -_inPU7VHUYgQ(PyObject *, PyObject *args) { +_inP07ytUYgQ(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_manifest_has_getter((ManifestIndex)param0); @@ -332,7 +335,7 @@ _inPU7VHUYgQ(PyObject *, PyObject *args) { * FunctionIndex interrogate_manifest_getter(ManifestIndex manifest) */ static PyObject * -_inPU7VH0k7F(PyObject *, PyObject *args) { +_inP07yt0k7F(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_manifest_getter((ManifestIndex)param0); @@ -350,7 +353,7 @@ _inPU7VH0k7F(PyObject *, PyObject *args) { * bool interrogate_manifest_has_int_value(ManifestIndex manifest) */ static PyObject * -_inPU7VHfIsr(PyObject *, PyObject *args) { +_inP07ytfIsr(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_manifest_has_int_value((ManifestIndex)param0); @@ -364,7 +367,7 @@ _inPU7VHfIsr(PyObject *, PyObject *args) { * int interrogate_manifest_get_int_value(ManifestIndex manifest) */ static PyObject * -_inPU7VHvysR(PyObject *, PyObject *args) { +_inP07ytvysR(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_manifest_get_int_value((ManifestIndex)param0); @@ -382,7 +385,7 @@ _inPU7VHvysR(PyObject *, PyObject *args) { * char const *interrogate_element_name(ElementIndex element) */ static PyObject * -_inPU7VHYQ_2(PyObject *, PyObject *args) { +_inP07ytYQ_2(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_element_name((ElementIndex)param0); @@ -400,7 +403,7 @@ _inPU7VHYQ_2(PyObject *, PyObject *args) { * char const *interrogate_element_scoped_name(ElementIndex element) */ static PyObject * -_inPU7VH3kdv(PyObject *, PyObject *args) { +_inP07yt3kdv(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_element_scoped_name((ElementIndex)param0); @@ -418,7 +421,7 @@ _inPU7VH3kdv(PyObject *, PyObject *args) { * bool interrogate_element_has_comment(ElementIndex element) */ static PyObject * -_inPU7VHew01(PyObject *, PyObject *args) { +_inP07ytew01(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_element_has_comment((ElementIndex)param0); @@ -432,7 +435,7 @@ _inPU7VHew01(PyObject *, PyObject *args) { * char const *interrogate_element_comment(ElementIndex element) */ static PyObject * -_inPU7VHQna7(PyObject *, PyObject *args) { +_inP07ytQna7(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_element_comment((ElementIndex)param0); @@ -450,10 +453,10 @@ _inPU7VHQna7(PyObject *, PyObject *args) { * ElementIndex interrogate_get_element_by_name(char const *element_name) */ static PyObject * -_inPU7VHkg95(PyObject *, PyObject *args) { +_inP07ytkg95(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - ElementIndex return_value = interrogate_get_element_by_name((char *)param0); + ElementIndex return_value = interrogate_get_element_by_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -468,10 +471,10 @@ _inPU7VHkg95(PyObject *, PyObject *args) { * ElementIndex interrogate_get_element_by_scoped_name(char const *element_name) */ static PyObject * -_inPU7VHluRc(PyObject *, PyObject *args) { +_inP07ytluRc(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - ElementIndex return_value = interrogate_get_element_by_scoped_name((char *)param0); + ElementIndex return_value = interrogate_get_element_by_scoped_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -486,7 +489,7 @@ _inPU7VHluRc(PyObject *, PyObject *args) { * TypeIndex interrogate_element_type(ElementIndex element) */ static PyObject * -_inPU7VHtHdM(PyObject *, PyObject *args) { +_inP07yttHdM(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_element_type((ElementIndex)param0); @@ -504,7 +507,7 @@ _inPU7VHtHdM(PyObject *, PyObject *args) { * bool interrogate_element_has_getter(ElementIndex element) */ static PyObject * -_inPU7VHDId0(PyObject *, PyObject *args) { +_inP07ytDId0(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_element_has_getter((ElementIndex)param0); @@ -518,7 +521,7 @@ _inPU7VHDId0(PyObject *, PyObject *args) { * FunctionIndex interrogate_element_getter(ElementIndex element) */ static PyObject * -_inPU7VHHuAm(PyObject *, PyObject *args) { +_inP07ytHuAm(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_element_getter((ElementIndex)param0); @@ -536,7 +539,7 @@ _inPU7VHHuAm(PyObject *, PyObject *args) { * bool interrogate_element_has_setter(ElementIndex element) */ static PyObject * -_inPU7VH_xr0(PyObject *, PyObject *args) { +_inP07yt_xr0(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_element_has_setter((ElementIndex)param0); @@ -550,7 +553,7 @@ _inPU7VH_xr0(PyObject *, PyObject *args) { * FunctionIndex interrogate_element_setter(ElementIndex element) */ static PyObject * -_inPU7VHH5qp(PyObject *, PyObject *args) { +_inP07ytH5qp(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_element_setter((ElementIndex)param0); @@ -568,7 +571,7 @@ _inPU7VHH5qp(PyObject *, PyObject *args) { * int interrogate_number_of_globals(void) */ static PyObject * -_inPU7VHU2_B(PyObject *, PyObject *args) { +_inP07ytU2_B(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_globals(); #if PY_MAJOR_VERSION >= 3 @@ -585,7 +588,7 @@ _inPU7VHU2_B(PyObject *, PyObject *args) { * ElementIndex interrogate_get_global(int n) */ static PyObject * -_inPU7VHHFO2(PyObject *, PyObject *args) { +_inP07ytHFO2(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { ElementIndex return_value = interrogate_get_global((int)param0); @@ -603,7 +606,7 @@ _inPU7VHHFO2(PyObject *, PyObject *args) { * int interrogate_number_of_global_functions(void) */ static PyObject * -_inPU7VHcfjm(PyObject *, PyObject *args) { +_inP07ytcfjm(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_global_functions(); #if PY_MAJOR_VERSION >= 3 @@ -620,7 +623,7 @@ _inPU7VHcfjm(PyObject *, PyObject *args) { * FunctionIndex interrogate_get_global_function(int n) */ static PyObject * -_inPU7VH3Sjw(PyObject *, PyObject *args) { +_inP07yt3Sjw(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_get_global_function((int)param0); @@ -638,7 +641,7 @@ _inPU7VH3Sjw(PyObject *, PyObject *args) { * int interrogate_number_of_functions(void) */ static PyObject * -_inPU7VHgJcX(PyObject *, PyObject *args) { +_inP07ytgJcX(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_functions(); #if PY_MAJOR_VERSION >= 3 @@ -655,7 +658,7 @@ _inPU7VHgJcX(PyObject *, PyObject *args) { * FunctionIndex interrogate_get_function(int n) */ static PyObject * -_inPU7VHYlw6(PyObject *, PyObject *args) { +_inP07ytYlw6(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_get_function((int)param0); @@ -673,7 +676,7 @@ _inPU7VHYlw6(PyObject *, PyObject *args) { * char const *interrogate_function_name(FunctionIndex function) */ static PyObject * -_inPU7VHsmnz(PyObject *, PyObject *args) { +_inP07ytsmnz(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_name((FunctionIndex)param0); @@ -691,7 +694,7 @@ _inPU7VHsmnz(PyObject *, PyObject *args) { * char const *interrogate_function_scoped_name(FunctionIndex function) */ static PyObject * -_inPU7VHxQ10(PyObject *, PyObject *args) { +_inP07ytxQ10(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_scoped_name((FunctionIndex)param0); @@ -709,7 +712,7 @@ _inPU7VHxQ10(PyObject *, PyObject *args) { * bool interrogate_function_has_comment(FunctionIndex function) */ static PyObject * -_inPU7VH6gPB(PyObject *, PyObject *args) { +_inP07yt6gPB(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_function_has_comment((FunctionIndex)param0); @@ -723,7 +726,7 @@ _inPU7VH6gPB(PyObject *, PyObject *args) { * char const *interrogate_function_comment(FunctionIndex function) */ static PyObject * -_inPU7VHISgV(PyObject *, PyObject *args) { +_inP07ytISgV(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_comment((FunctionIndex)param0); @@ -741,7 +744,7 @@ _inPU7VHISgV(PyObject *, PyObject *args) { * char const *interrogate_function_prototype(FunctionIndex function) */ static PyObject * -_inPU7VHH3bx(PyObject *, PyObject *args) { +_inP07ytH3bx(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_prototype((FunctionIndex)param0); @@ -759,7 +762,7 @@ _inPU7VHH3bx(PyObject *, PyObject *args) { * bool interrogate_function_is_method(FunctionIndex function) */ static PyObject * -_inPU7VHzeUk(PyObject *, PyObject *args) { +_inP07ytzeUk(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_function_is_method((FunctionIndex)param0); @@ -773,7 +776,7 @@ _inPU7VHzeUk(PyObject *, PyObject *args) { * TypeIndex interrogate_function_class(FunctionIndex function) */ static PyObject * -_inPU7VHUeI5(PyObject *, PyObject *args) { +_inP07ytUeI5(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_function_class((FunctionIndex)param0); @@ -791,7 +794,7 @@ _inPU7VHUeI5(PyObject *, PyObject *args) { * bool interrogate_function_has_module_name(FunctionIndex function) */ static PyObject * -_inPU7VHuSvx(PyObject *, PyObject *args) { +_inP07ytuSvx(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_function_has_module_name((FunctionIndex)param0); @@ -805,7 +808,7 @@ _inPU7VHuSvx(PyObject *, PyObject *args) { * char const *interrogate_function_module_name(FunctionIndex function) */ static PyObject * -_inPU7VHwpYd(PyObject *, PyObject *args) { +_inP07ytwpYd(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_module_name((FunctionIndex)param0); @@ -823,7 +826,7 @@ _inPU7VHwpYd(PyObject *, PyObject *args) { * bool interrogate_function_has_library_name(FunctionIndex function) */ static PyObject * -_inPU7VHOfNh(PyObject *, PyObject *args) { +_inP07ytOfNh(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_function_has_library_name((FunctionIndex)param0); @@ -837,7 +840,7 @@ _inPU7VHOfNh(PyObject *, PyObject *args) { * char const *interrogate_function_library_name(FunctionIndex function) */ static PyObject * -_inPU7VHf5_U(PyObject *, PyObject *args) { +_inP07ytf5_U(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_function_library_name((FunctionIndex)param0); @@ -855,7 +858,7 @@ _inPU7VHf5_U(PyObject *, PyObject *args) { * bool interrogate_function_is_virtual(FunctionIndex function) */ static PyObject * -_inPU7VHL3ZB(PyObject *, PyObject *args) { +_inP07ytL3ZB(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_function_is_virtual((FunctionIndex)param0); @@ -869,7 +872,7 @@ _inPU7VHL3ZB(PyObject *, PyObject *args) { * int interrogate_function_number_of_c_wrappers(FunctionIndex function) */ static PyObject * -_inPU7VHXw0I(PyObject *, PyObject *args) { +_inP07ytXw0I(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_function_number_of_c_wrappers((FunctionIndex)param0); @@ -887,7 +890,7 @@ _inPU7VHXw0I(PyObject *, PyObject *args) { * FunctionWrapperIndex interrogate_function_c_wrapper(FunctionIndex function, int n) */ static PyObject * -_inPU7VH3zru(PyObject *, PyObject *args) { +_inP07yt3zru(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -906,7 +909,7 @@ _inPU7VH3zru(PyObject *, PyObject *args) { * int interrogate_function_number_of_python_wrappers(FunctionIndex function) */ static PyObject * -_inPU7VHRrg2(PyObject *, PyObject *args) { +_inP07ytRrg2(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_function_number_of_python_wrappers((FunctionIndex)param0); @@ -924,7 +927,7 @@ _inPU7VHRrg2(PyObject *, PyObject *args) { * FunctionWrapperIndex interrogate_function_python_wrapper(FunctionIndex function, int n) */ static PyObject * -_inPU7VHEJCx(PyObject *, PyObject *args) { +_inP07ytEJCx(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -943,7 +946,7 @@ _inPU7VHEJCx(PyObject *, PyObject *args) { * char const *interrogate_wrapper_name(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHWAZr(PyObject *, PyObject *args) { +_inP07ytWAZr(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_wrapper_name((FunctionWrapperIndex)param0); @@ -961,7 +964,7 @@ _inPU7VHWAZr(PyObject *, PyObject *args) { * bool interrogate_wrapper_is_callable_by_name(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHrD_M(PyObject *, PyObject *args) { +_inP07ytrD_M(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_wrapper_is_callable_by_name((FunctionWrapperIndex)param0); @@ -975,7 +978,7 @@ _inPU7VHrD_M(PyObject *, PyObject *args) { * bool interrogate_wrapper_has_comment(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHjolz(PyObject *, PyObject *args) { +_inP07ytjolz(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_wrapper_has_comment((FunctionWrapperIndex)param0); @@ -989,7 +992,7 @@ _inPU7VHjolz(PyObject *, PyObject *args) { * char const *interrogate_wrapper_comment(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHt_JD(PyObject *, PyObject *args) { +_inP07ytt_JD(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_wrapper_comment((FunctionWrapperIndex)param0); @@ -1007,7 +1010,7 @@ _inPU7VHt_JD(PyObject *, PyObject *args) { * bool interrogate_wrapper_has_return_value(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHwEts(PyObject *, PyObject *args) { +_inP07ytwEts(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_wrapper_has_return_value((FunctionWrapperIndex)param0); @@ -1021,7 +1024,7 @@ _inPU7VHwEts(PyObject *, PyObject *args) { * TypeIndex interrogate_wrapper_return_type(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHrJWs(PyObject *, PyObject *args) { +_inP07ytrJWs(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_wrapper_return_type((FunctionWrapperIndex)param0); @@ -1039,7 +1042,7 @@ _inPU7VHrJWs(PyObject *, PyObject *args) { * bool interrogate_wrapper_caller_manages_return_value(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHpmFD(PyObject *, PyObject *args) { +_inP07ytpmFD(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_wrapper_caller_manages_return_value((FunctionWrapperIndex)param0); @@ -1053,7 +1056,7 @@ _inPU7VHpmFD(PyObject *, PyObject *args) { * FunctionIndex interrogate_wrapper_return_value_destructor(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHyYUX(PyObject *, PyObject *args) { +_inP07ytyYUX(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_wrapper_return_value_destructor((FunctionWrapperIndex)param0); @@ -1071,7 +1074,7 @@ _inPU7VHyYUX(PyObject *, PyObject *args) { * int interrogate_wrapper_number_of_parameters(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VH54dn(PyObject *, PyObject *args) { +_inP07yt54dn(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_wrapper_number_of_parameters((FunctionWrapperIndex)param0); @@ -1089,7 +1092,7 @@ _inPU7VH54dn(PyObject *, PyObject *args) { * TypeIndex interrogate_wrapper_parameter_type(FunctionWrapperIndex wrapper, int n) */ static PyObject * -_inPU7VHGMpW(PyObject *, PyObject *args) { +_inP07ytGMpW(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1108,7 +1111,7 @@ _inPU7VHGMpW(PyObject *, PyObject *args) { * bool interrogate_wrapper_parameter_has_name(FunctionWrapperIndex wrapper, int n) */ static PyObject * -_inPU7VHNuBV(PyObject *, PyObject *args) { +_inP07ytNuBV(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1123,7 +1126,7 @@ _inPU7VHNuBV(PyObject *, PyObject *args) { * char const *interrogate_wrapper_parameter_name(FunctionWrapperIndex wrapper, int n) */ static PyObject * -_inPU7VH9UwA(PyObject *, PyObject *args) { +_inP07yt9UwA(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1142,7 +1145,7 @@ _inPU7VH9UwA(PyObject *, PyObject *args) { * bool interrogate_wrapper_parameter_is_this(FunctionWrapperIndex wrapper, int n) */ static PyObject * -_inPU7VH3FDt(PyObject *, PyObject *args) { +_inP07yt3FDt(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1157,7 +1160,7 @@ _inPU7VH3FDt(PyObject *, PyObject *args) { * bool interrogate_wrapper_has_pointer(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHf513(PyObject *, PyObject *args) { +_inP07ytf513(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_wrapper_has_pointer((FunctionWrapperIndex)param0); @@ -1171,7 +1174,7 @@ _inPU7VHf513(PyObject *, PyObject *args) { * void *interrogate_wrapper_pointer(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VHsqGH(PyObject *, PyObject *args) { +_inP07ytsqGH(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { interrogate_wrapper_pointer((FunctionWrapperIndex)param0); @@ -1185,7 +1188,7 @@ _inPU7VHsqGH(PyObject *, PyObject *args) { * char const *interrogate_wrapper_unique_name(FunctionWrapperIndex wrapper) */ static PyObject * -_inPU7VH7shV(PyObject *, PyObject *args) { +_inP07yt7shV(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_wrapper_unique_name((FunctionWrapperIndex)param0); @@ -1203,10 +1206,10 @@ _inPU7VH7shV(PyObject *, PyObject *args) { * FunctionWrapperIndex interrogate_get_wrapper_by_unique_name(char const *unique_name) */ static PyObject * -_inPU7VHA1eF(PyObject *, PyObject *args) { +_inP07ytA1eF(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - FunctionWrapperIndex return_value = interrogate_get_wrapper_by_unique_name((char *)param0); + FunctionWrapperIndex return_value = interrogate_get_wrapper_by_unique_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -1221,7 +1224,7 @@ _inPU7VHA1eF(PyObject *, PyObject *args) { * TypeIndex interrogate_make_seq_class(MakeSeqIndex make_seq) */ static PyObject * -_inPU7VH9tTm(PyObject *, PyObject *args) { +_inP07yt9tTm(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_make_seq_class((MakeSeqIndex)param0); @@ -1239,7 +1242,7 @@ _inPU7VH9tTm(PyObject *, PyObject *args) { * char const *interrogate_make_seq_seq_name(MakeSeqIndex make_seq) */ static PyObject * -_inPU7VH776V(PyObject *, PyObject *args) { +_inP07yt776V(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_make_seq_seq_name((MakeSeqIndex)param0); @@ -1257,7 +1260,7 @@ _inPU7VH776V(PyObject *, PyObject *args) { * char const *interrogate_make_seq_num_name(MakeSeqIndex make_seq) */ static PyObject * -_inPU7VHfaH0(PyObject *, PyObject *args) { +_inP07ytfaH0(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_make_seq_num_name((MakeSeqIndex)param0); @@ -1275,7 +1278,7 @@ _inPU7VHfaH0(PyObject *, PyObject *args) { * char const *interrogate_make_seq_element_name(MakeSeqIndex make_seq) */ static PyObject * -_inPU7VHGB9D(PyObject *, PyObject *args) { +_inP07ytGB9D(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_make_seq_element_name((MakeSeqIndex)param0); @@ -1293,7 +1296,7 @@ _inPU7VHGB9D(PyObject *, PyObject *args) { * int interrogate_number_of_global_types(void) */ static PyObject * -_inPU7VHsxxs(PyObject *, PyObject *args) { +_inP07ytsxxs(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_global_types(); #if PY_MAJOR_VERSION >= 3 @@ -1310,7 +1313,7 @@ _inPU7VHsxxs(PyObject *, PyObject *args) { * TypeIndex interrogate_get_global_type(int n) */ static PyObject * -_inPU7VHMT0z(PyObject *, PyObject *args) { +_inP07ytMT0z(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_get_global_type((int)param0); @@ -1328,7 +1331,7 @@ _inPU7VHMT0z(PyObject *, PyObject *args) { * int interrogate_number_of_types(void) */ static PyObject * -_inPU7VHiW3v(PyObject *, PyObject *args) { +_inP07ytiW3v(PyObject *, PyObject *args) { if (PyArg_ParseTuple(args, "")) { int return_value = interrogate_number_of_types(); #if PY_MAJOR_VERSION >= 3 @@ -1345,7 +1348,7 @@ _inPU7VHiW3v(PyObject *, PyObject *args) { * TypeIndex interrogate_get_type(int n) */ static PyObject * -_inPU7VH4Px8(PyObject *, PyObject *args) { +_inP07yt4Px8(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_get_type((int)param0); @@ -1363,10 +1366,10 @@ _inPU7VH4Px8(PyObject *, PyObject *args) { * TypeIndex interrogate_get_type_by_name(char const *type_name) */ static PyObject * -_inPU7VHNHcs(PyObject *, PyObject *args) { +_inP07ytNHcs(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - TypeIndex return_value = interrogate_get_type_by_name((char *)param0); + TypeIndex return_value = interrogate_get_type_by_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -1381,10 +1384,10 @@ _inPU7VHNHcs(PyObject *, PyObject *args) { * TypeIndex interrogate_get_type_by_scoped_name(char const *type_name) */ static PyObject * -_inPU7VHqHrb(PyObject *, PyObject *args) { +_inP07ytqHrb(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - TypeIndex return_value = interrogate_get_type_by_scoped_name((char *)param0); + TypeIndex return_value = interrogate_get_type_by_scoped_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -1399,10 +1402,10 @@ _inPU7VHqHrb(PyObject *, PyObject *args) { * TypeIndex interrogate_get_type_by_true_name(char const *type_name) */ static PyObject * -_inPU7VHaOqq(PyObject *, PyObject *args) { +_inP07ytaOqq(PyObject *, PyObject *args) { char *param0; if (PyArg_ParseTuple(args, "s", ¶m0)) { - TypeIndex return_value = interrogate_get_type_by_true_name((char *)param0); + TypeIndex return_value = interrogate_get_type_by_true_name((char const *)param0); #if PY_MAJOR_VERSION >= 3 return PyLong_FromLong(return_value); #else @@ -1417,7 +1420,7 @@ _inPU7VHaOqq(PyObject *, PyObject *args) { * char const *interrogate_type_name(TypeIndex type) */ static PyObject * -_inPU7VHqWOw(PyObject *, PyObject *args) { +_inP07ytqWOw(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_name((TypeIndex)param0); @@ -1435,7 +1438,7 @@ _inPU7VHqWOw(PyObject *, PyObject *args) { * char const *interrogate_type_scoped_name(TypeIndex type) */ static PyObject * -_inPU7VHHu7x(PyObject *, PyObject *args) { +_inP07ytHu7x(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_scoped_name((TypeIndex)param0); @@ -1453,7 +1456,7 @@ _inPU7VHHu7x(PyObject *, PyObject *args) { * char const *interrogate_type_true_name(TypeIndex type) */ static PyObject * -_inPU7VHwGnA(PyObject *, PyObject *args) { +_inP07ytwGnA(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_true_name((TypeIndex)param0); @@ -1471,7 +1474,7 @@ _inPU7VHwGnA(PyObject *, PyObject *args) { * bool interrogate_type_is_nested(TypeIndex type) */ static PyObject * -_inPU7VHXGxx(PyObject *, PyObject *args) { +_inP07ytXGxx(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_nested((TypeIndex)param0); @@ -1485,7 +1488,7 @@ _inPU7VHXGxx(PyObject *, PyObject *args) { * TypeIndex interrogate_type_outer_class(TypeIndex type) */ static PyObject * -_inPU7VHj04Z(PyObject *, PyObject *args) { +_inP07ytj04Z(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_type_outer_class((TypeIndex)param0); @@ -1503,7 +1506,7 @@ _inPU7VHj04Z(PyObject *, PyObject *args) { * bool interrogate_type_has_comment(TypeIndex type) */ static PyObject * -_inPU7VHEOv4(PyObject *, PyObject *args) { +_inP07ytEOv4(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_has_comment((TypeIndex)param0); @@ -1517,7 +1520,7 @@ _inPU7VHEOv4(PyObject *, PyObject *args) { * char const *interrogate_type_comment(TypeIndex type) */ static PyObject * -_inPU7VHpCqJ(PyObject *, PyObject *args) { +_inP07ytpCqJ(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_comment((TypeIndex)param0); @@ -1535,7 +1538,7 @@ _inPU7VHpCqJ(PyObject *, PyObject *args) { * bool interrogate_type_has_module_name(TypeIndex type) */ static PyObject * -_inPU7VH_Pz3(PyObject *, PyObject *args) { +_inP07yt_Pz3(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_has_module_name((TypeIndex)param0); @@ -1549,7 +1552,7 @@ _inPU7VH_Pz3(PyObject *, PyObject *args) { * char const *interrogate_type_module_name(TypeIndex type) */ static PyObject * -_inPU7VHt_06(PyObject *, PyObject *args) { +_inP07ytt_06(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_module_name((TypeIndex)param0); @@ -1567,7 +1570,7 @@ _inPU7VHt_06(PyObject *, PyObject *args) { * bool interrogate_type_has_library_name(TypeIndex type) */ static PyObject * -_inPU7VHmuPs(PyObject *, PyObject *args) { +_inP07ytmuPs(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_has_library_name((TypeIndex)param0); @@ -1581,7 +1584,7 @@ _inPU7VHmuPs(PyObject *, PyObject *args) { * char const *interrogate_type_library_name(TypeIndex type) */ static PyObject * -_inPU7VHvM8B(PyObject *, PyObject *args) { +_inP07ytvM8B(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { char const *return_value = interrogate_type_library_name((TypeIndex)param0); @@ -1599,7 +1602,7 @@ _inPU7VHvM8B(PyObject *, PyObject *args) { * bool interrogate_type_is_atomic(TypeIndex type) */ static PyObject * -_inPU7VHap97(PyObject *, PyObject *args) { +_inP07ytap97(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_atomic((TypeIndex)param0); @@ -1613,7 +1616,7 @@ _inPU7VHap97(PyObject *, PyObject *args) { * AtomicToken interrogate_type_atomic_token(TypeIndex type) */ static PyObject * -_inPU7VH0o8D(PyObject *, PyObject *args) { +_inP07yt0o8D(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { AtomicToken return_value = interrogate_type_atomic_token((TypeIndex)param0); @@ -1631,7 +1634,7 @@ _inPU7VH0o8D(PyObject *, PyObject *args) { * bool interrogate_type_is_unsigned(TypeIndex type) */ static PyObject * -_inPU7VHOoQ2(PyObject *, PyObject *args) { +_inP07ytOoQ2(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_unsigned((TypeIndex)param0); @@ -1645,7 +1648,7 @@ _inPU7VHOoQ2(PyObject *, PyObject *args) { * bool interrogate_type_is_signed(TypeIndex type) */ static PyObject * -_inPU7VHKuFh(PyObject *, PyObject *args) { +_inP07ytKuFh(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_signed((TypeIndex)param0); @@ -1659,7 +1662,7 @@ _inPU7VHKuFh(PyObject *, PyObject *args) { * bool interrogate_type_is_long(TypeIndex type) */ static PyObject * -_inPU7VHo5L6(PyObject *, PyObject *args) { +_inP07yto5L6(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_long((TypeIndex)param0); @@ -1673,7 +1676,7 @@ _inPU7VHo5L6(PyObject *, PyObject *args) { * bool interrogate_type_is_longlong(TypeIndex type) */ static PyObject * -_inPU7VHzgKK(PyObject *, PyObject *args) { +_inP07ytzgKK(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_longlong((TypeIndex)param0); @@ -1687,7 +1690,7 @@ _inPU7VHzgKK(PyObject *, PyObject *args) { * bool interrogate_type_is_short(TypeIndex type) */ static PyObject * -_inPU7VH0FIF(PyObject *, PyObject *args) { +_inP07yt0FIF(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_short((TypeIndex)param0); @@ -1701,7 +1704,7 @@ _inPU7VH0FIF(PyObject *, PyObject *args) { * bool interrogate_type_is_wrapped(TypeIndex type) */ static PyObject * -_inPU7VHZqvD(PyObject *, PyObject *args) { +_inP07ytZqvD(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_wrapped((TypeIndex)param0); @@ -1715,7 +1718,7 @@ _inPU7VHZqvD(PyObject *, PyObject *args) { * bool interrogate_type_is_pointer(TypeIndex type) */ static PyObject * -_inPU7VHDyRd(PyObject *, PyObject *args) { +_inP07ytDyRd(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_pointer((TypeIndex)param0); @@ -1729,7 +1732,7 @@ _inPU7VHDyRd(PyObject *, PyObject *args) { * bool interrogate_type_is_const(TypeIndex type) */ static PyObject * -_inPU7VHMnKa(PyObject *, PyObject *args) { +_inP07ytMnKa(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_const((TypeIndex)param0); @@ -1743,7 +1746,7 @@ _inPU7VHMnKa(PyObject *, PyObject *args) { * bool interrogate_type_is_typedef(TypeIndex type) */ static PyObject * -_inPU7VHRtji(PyObject *, PyObject *args) { +_inP07ytRtji(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_typedef((TypeIndex)param0); @@ -1757,7 +1760,7 @@ _inPU7VHRtji(PyObject *, PyObject *args) { * TypeIndex interrogate_type_wrapped_type(TypeIndex type) */ static PyObject * -_inPU7VHCnbQ(PyObject *, PyObject *args) { +_inP07ytCnbQ(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { TypeIndex return_value = interrogate_type_wrapped_type((TypeIndex)param0); @@ -1775,7 +1778,7 @@ _inPU7VHCnbQ(PyObject *, PyObject *args) { * bool interrogate_type_is_enum(TypeIndex type) */ static PyObject * -_inPU7VHdUVN(PyObject *, PyObject *args) { +_inP07ytdUVN(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_enum((TypeIndex)param0); @@ -1789,7 +1792,7 @@ _inPU7VHdUVN(PyObject *, PyObject *args) { * int interrogate_type_number_of_enum_values(TypeIndex type) */ static PyObject * -_inPU7VHihbt(PyObject *, PyObject *args) { +_inP07ytihbt(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_enum_values((TypeIndex)param0); @@ -1807,7 +1810,7 @@ _inPU7VHihbt(PyObject *, PyObject *args) { * char const *interrogate_type_enum_value_name(TypeIndex type, int n) */ static PyObject * -_inPU7VHbyPY(PyObject *, PyObject *args) { +_inP07ytbyPY(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1826,7 +1829,7 @@ _inPU7VHbyPY(PyObject *, PyObject *args) { * char const *interrogate_type_enum_value_scoped_name(TypeIndex type, int n) */ static PyObject * -_inPU7VHAaT6(PyObject *, PyObject *args) { +_inP07ytAaT6(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1845,7 +1848,7 @@ _inPU7VHAaT6(PyObject *, PyObject *args) { * char const *interrogate_type_enum_value_comment(TypeIndex type, int n) */ static PyObject * -_inPU7VHgL9q(PyObject *, PyObject *args) { +_inP07ytgL9q(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1864,7 +1867,7 @@ _inPU7VHgL9q(PyObject *, PyObject *args) { * int interrogate_type_enum_value(TypeIndex type, int n) */ static PyObject * -_inPU7VHWB97(PyObject *, PyObject *args) { +_inP07ytWB97(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1883,7 +1886,7 @@ _inPU7VHWB97(PyObject *, PyObject *args) { * bool interrogate_type_is_struct(TypeIndex type) */ static PyObject * -_inPU7VHDUAl(PyObject *, PyObject *args) { +_inP07ytDUAl(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_struct((TypeIndex)param0); @@ -1897,7 +1900,7 @@ _inPU7VHDUAl(PyObject *, PyObject *args) { * bool interrogate_type_is_class(TypeIndex type) */ static PyObject * -_inPU7VH1_Kf(PyObject *, PyObject *args) { +_inP07yt1_Kf(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_class((TypeIndex)param0); @@ -1911,7 +1914,7 @@ _inPU7VH1_Kf(PyObject *, PyObject *args) { * bool interrogate_type_is_union(TypeIndex type) */ static PyObject * -_inPU7VH98lD(PyObject *, PyObject *args) { +_inP07yt98lD(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_union((TypeIndex)param0); @@ -1925,7 +1928,7 @@ _inPU7VH98lD(PyObject *, PyObject *args) { * bool interrogate_type_is_fully_defined(TypeIndex type) */ static PyObject * -_inPU7VH9SHr(PyObject *, PyObject *args) { +_inP07yt9SHr(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_fully_defined((TypeIndex)param0); @@ -1939,7 +1942,7 @@ _inPU7VH9SHr(PyObject *, PyObject *args) { * bool interrogate_type_is_unpublished(TypeIndex type) */ static PyObject * -_inPU7VHdiZP(PyObject *, PyObject *args) { +_inP07ytdiZP(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_is_unpublished((TypeIndex)param0); @@ -1953,7 +1956,7 @@ _inPU7VHdiZP(PyObject *, PyObject *args) { * int interrogate_type_number_of_constructors(TypeIndex type) */ static PyObject * -_inPU7VHTdER(PyObject *, PyObject *args) { +_inP07ytTdER(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_constructors((TypeIndex)param0); @@ -1971,7 +1974,7 @@ _inPU7VHTdER(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_constructor(TypeIndex type, int n) */ static PyObject * -_inPU7VHYO56(PyObject *, PyObject *args) { +_inP07ytYO56(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -1990,7 +1993,7 @@ _inPU7VHYO56(PyObject *, PyObject *args) { * bool interrogate_type_has_destructor(TypeIndex type) */ static PyObject * -_inPU7VHxtCG(PyObject *, PyObject *args) { +_inP07ytxtCG(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_has_destructor((TypeIndex)param0); @@ -2004,7 +2007,7 @@ _inPU7VHxtCG(PyObject *, PyObject *args) { * bool interrogate_type_destructor_is_inherited(TypeIndex type) */ static PyObject * -_inPU7VH_EB2(PyObject *, PyObject *args) { +_inP07yt_EB2(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { bool return_value = interrogate_type_destructor_is_inherited((TypeIndex)param0); @@ -2018,7 +2021,7 @@ _inPU7VH_EB2(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_destructor(TypeIndex type) */ static PyObject * -_inPU7VHEG1l(PyObject *, PyObject *args) { +_inP07ytEG1l(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { FunctionIndex return_value = interrogate_type_get_destructor((TypeIndex)param0); @@ -2036,7 +2039,7 @@ _inPU7VHEG1l(PyObject *, PyObject *args) { * int interrogate_type_number_of_elements(TypeIndex type) */ static PyObject * -_inPU7VH7tUq(PyObject *, PyObject *args) { +_inP07yt7tUq(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_elements((TypeIndex)param0); @@ -2054,7 +2057,7 @@ _inPU7VH7tUq(PyObject *, PyObject *args) { * ElementIndex interrogate_type_get_element(TypeIndex type, int n) */ static PyObject * -_inPU7VHyStU(PyObject *, PyObject *args) { +_inP07ytyStU(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2073,7 +2076,7 @@ _inPU7VHyStU(PyObject *, PyObject *args) { * int interrogate_type_number_of_methods(TypeIndex type) */ static PyObject * -_inPU7VHdM85(PyObject *, PyObject *args) { +_inP07ytdM85(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_methods((TypeIndex)param0); @@ -2091,7 +2094,7 @@ _inPU7VHdM85(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_method(TypeIndex type, int n) */ static PyObject * -_inPU7VHk_GN(PyObject *, PyObject *args) { +_inP07ytk_GN(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2110,7 +2113,7 @@ _inPU7VHk_GN(PyObject *, PyObject *args) { * int interrogate_type_number_of_make_seqs(TypeIndex type) */ static PyObject * -_inPU7VH8QjG(PyObject *, PyObject *args) { +_inP07yt8QjG(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_make_seqs((TypeIndex)param0); @@ -2128,7 +2131,7 @@ _inPU7VH8QjG(PyObject *, PyObject *args) { * MakeSeqIndex interrogate_type_get_make_seq(TypeIndex type, int n) */ static PyObject * -_inPU7VHyMtj(PyObject *, PyObject *args) { +_inP07ytyMtj(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2147,7 +2150,7 @@ _inPU7VHyMtj(PyObject *, PyObject *args) { * int interrogate_type_number_of_casts(TypeIndex type) */ static PyObject * -_inPU7VHHDtN(PyObject *, PyObject *args) { +_inP07ytHDtN(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_casts((TypeIndex)param0); @@ -2165,7 +2168,7 @@ _inPU7VHHDtN(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_cast(TypeIndex type, int n) */ static PyObject * -_inPU7VHHFjA(PyObject *, PyObject *args) { +_inP07ytHFjA(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2184,7 +2187,7 @@ _inPU7VHHFjA(PyObject *, PyObject *args) { * int interrogate_type_number_of_derivations(TypeIndex type) */ static PyObject * -_inPU7VH_NPR(PyObject *, PyObject *args) { +_inP07yt_NPR(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_derivations((TypeIndex)param0); @@ -2202,7 +2205,7 @@ _inPU7VH_NPR(PyObject *, PyObject *args) { * TypeIndex interrogate_type_get_derivation(TypeIndex type, int n) */ static PyObject * -_inPU7VHcTOH(PyObject *, PyObject *args) { +_inP07ytcTOH(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2221,7 +2224,7 @@ _inPU7VHcTOH(PyObject *, PyObject *args) { * bool interrogate_type_derivation_has_upcast(TypeIndex type, int n) */ static PyObject * -_inPU7VHhdU7(PyObject *, PyObject *args) { +_inP07ythdU7(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2236,7 +2239,7 @@ _inPU7VHhdU7(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_upcast(TypeIndex type, int n) */ static PyObject * -_inPU7VHQPxU(PyObject *, PyObject *args) { +_inP07ytQPxU(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2255,7 +2258,7 @@ _inPU7VHQPxU(PyObject *, PyObject *args) { * bool interrogate_type_derivation_downcast_is_impossible(TypeIndex type, int n) */ static PyObject * -_inPU7VHO7Pz(PyObject *, PyObject *args) { +_inP07ytO7Pz(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2270,7 +2273,7 @@ _inPU7VHO7Pz(PyObject *, PyObject *args) { * bool interrogate_type_derivation_has_downcast(TypeIndex type, int n) */ static PyObject * -_inPU7VHvu_E(PyObject *, PyObject *args) { +_inP07ytvu_E(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2285,7 +2288,7 @@ _inPU7VHvu_E(PyObject *, PyObject *args) { * FunctionIndex interrogate_type_get_downcast(TypeIndex type, int n) */ static PyObject * -_inPU7VHxGUt(PyObject *, PyObject *args) { +_inP07ytxGUt(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2304,7 +2307,7 @@ _inPU7VHxGUt(PyObject *, PyObject *args) { * int interrogate_type_number_of_nested_types(TypeIndex type) */ static PyObject * -_inPU7VHzM1P(PyObject *, PyObject *args) { +_inP07ytzM1P(PyObject *, PyObject *args) { int param0; if (PyArg_ParseTuple(args, "i", ¶m0)) { int return_value = interrogate_type_number_of_nested_types((TypeIndex)param0); @@ -2322,7 +2325,7 @@ _inPU7VHzM1P(PyObject *, PyObject *args) { * TypeIndex interrogate_type_get_nested_type(TypeIndex type, int n) */ static PyObject * -_inPU7VHoY5L(PyObject *, PyObject *args) { +_inP07ytoY5L(PyObject *, PyObject *args) { int param0; int param1; if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) { @@ -2336,139 +2339,169 @@ _inPU7VHoY5L(PyObject *, PyObject *args) { return (PyObject *)NULL; } +/* + * Python simple wrapper for + * void interrogate_request_database(char const *database_filename) + */ +static PyObject * +_inP07yte_7S(PyObject *, PyObject *args) { + char *param0; + if (PyArg_ParseTuple(args, "s", ¶m0)) { + interrogate_request_database((char const *)param0); + return Py_BuildValue(""); + } + return (PyObject *)NULL; +} + +/* + * Python simple wrapper for + * void interrogate_request_module(InterrogateModuleDef *def) + */ +static PyObject * +_inP07ytw_15(PyObject *, PyObject *args) { + int param0; + if (PyArg_ParseTuple(args, "i", ¶m0)) { + interrogate_request_module((InterrogateModuleDef *)param0); + return Py_BuildValue(""); + } + return (PyObject *)NULL; +} + static PyMethodDef python_simple_funcs[] = { - { "interrogate_add_search_directory", &_inPU7VHtbRf, METH_VARARGS }, - { "interrogate_add_search_path", &_inPU7VHda_g, METH_VARARGS }, - { "interrogate_error_flag", &_inPU7VH4RgX, METH_VARARGS }, - { "interrogate_number_of_manifests", &_inPU7VH3Gip, METH_VARARGS }, - { "interrogate_get_manifest", &_inPU7VHRKDz, METH_VARARGS }, - { "interrogate_get_manifest_by_name", &_inPU7VHgZ9N, METH_VARARGS }, - { "interrogate_manifest_name", &_inPU7VHFnRZ, METH_VARARGS }, - { "interrogate_manifest_definition", &_inPU7VHg0Qv, METH_VARARGS }, - { "interrogate_manifest_has_type", &_inPU7VHtrqw, METH_VARARGS }, - { "interrogate_manifest_get_type", &_inPU7VHdmpW, METH_VARARGS }, - { "interrogate_manifest_has_getter", &_inPU7VHUYgQ, METH_VARARGS }, - { "interrogate_manifest_getter", &_inPU7VH0k7F, METH_VARARGS }, - { "interrogate_manifest_has_int_value", &_inPU7VHfIsr, METH_VARARGS }, - { "interrogate_manifest_get_int_value", &_inPU7VHvysR, METH_VARARGS }, - { "interrogate_element_name", &_inPU7VHYQ_2, METH_VARARGS }, - { "interrogate_element_scoped_name", &_inPU7VH3kdv, METH_VARARGS }, - { "interrogate_element_has_comment", &_inPU7VHew01, METH_VARARGS }, - { "interrogate_element_comment", &_inPU7VHQna7, METH_VARARGS }, - { "interrogate_get_element_by_name", &_inPU7VHkg95, METH_VARARGS }, - { "interrogate_get_element_by_scoped_name", &_inPU7VHluRc, METH_VARARGS }, - { "interrogate_element_type", &_inPU7VHtHdM, METH_VARARGS }, - { "interrogate_element_has_getter", &_inPU7VHDId0, METH_VARARGS }, - { "interrogate_element_getter", &_inPU7VHHuAm, METH_VARARGS }, - { "interrogate_element_has_setter", &_inPU7VH_xr0, METH_VARARGS }, - { "interrogate_element_setter", &_inPU7VHH5qp, METH_VARARGS }, - { "interrogate_number_of_globals", &_inPU7VHU2_B, METH_VARARGS }, - { "interrogate_get_global", &_inPU7VHHFO2, METH_VARARGS }, - { "interrogate_number_of_global_functions", &_inPU7VHcfjm, METH_VARARGS }, - { "interrogate_get_global_function", &_inPU7VH3Sjw, METH_VARARGS }, - { "interrogate_number_of_functions", &_inPU7VHgJcX, METH_VARARGS }, - { "interrogate_get_function", &_inPU7VHYlw6, METH_VARARGS }, - { "interrogate_function_name", &_inPU7VHsmnz, METH_VARARGS }, - { "interrogate_function_scoped_name", &_inPU7VHxQ10, METH_VARARGS }, - { "interrogate_function_has_comment", &_inPU7VH6gPB, METH_VARARGS }, - { "interrogate_function_comment", &_inPU7VHISgV, METH_VARARGS }, - { "interrogate_function_prototype", &_inPU7VHH3bx, METH_VARARGS }, - { "interrogate_function_is_method", &_inPU7VHzeUk, METH_VARARGS }, - { "interrogate_function_class", &_inPU7VHUeI5, METH_VARARGS }, - { "interrogate_function_has_module_name", &_inPU7VHuSvx, METH_VARARGS }, - { "interrogate_function_module_name", &_inPU7VHwpYd, METH_VARARGS }, - { "interrogate_function_has_library_name", &_inPU7VHOfNh, METH_VARARGS }, - { "interrogate_function_library_name", &_inPU7VHf5_U, METH_VARARGS }, - { "interrogate_function_is_virtual", &_inPU7VHL3ZB, METH_VARARGS }, - { "interrogate_function_number_of_c_wrappers", &_inPU7VHXw0I, METH_VARARGS }, - { "interrogate_function_c_wrapper", &_inPU7VH3zru, METH_VARARGS }, - { "interrogate_function_number_of_python_wrappers", &_inPU7VHRrg2, METH_VARARGS }, - { "interrogate_function_python_wrapper", &_inPU7VHEJCx, METH_VARARGS }, - { "interrogate_wrapper_name", &_inPU7VHWAZr, METH_VARARGS }, - { "interrogate_wrapper_is_callable_by_name", &_inPU7VHrD_M, METH_VARARGS }, - { "interrogate_wrapper_has_comment", &_inPU7VHjolz, METH_VARARGS }, - { "interrogate_wrapper_comment", &_inPU7VHt_JD, METH_VARARGS }, - { "interrogate_wrapper_has_return_value", &_inPU7VHwEts, METH_VARARGS }, - { "interrogate_wrapper_return_type", &_inPU7VHrJWs, METH_VARARGS }, - { "interrogate_wrapper_caller_manages_return_value", &_inPU7VHpmFD, METH_VARARGS }, - { "interrogate_wrapper_return_value_destructor", &_inPU7VHyYUX, METH_VARARGS }, - { "interrogate_wrapper_number_of_parameters", &_inPU7VH54dn, METH_VARARGS }, - { "interrogate_wrapper_parameter_type", &_inPU7VHGMpW, METH_VARARGS }, - { "interrogate_wrapper_parameter_has_name", &_inPU7VHNuBV, METH_VARARGS }, - { "interrogate_wrapper_parameter_name", &_inPU7VH9UwA, METH_VARARGS }, - { "interrogate_wrapper_parameter_is_this", &_inPU7VH3FDt, METH_VARARGS }, - { "interrogate_wrapper_has_pointer", &_inPU7VHf513, METH_VARARGS }, - { "interrogate_wrapper_pointer", &_inPU7VHsqGH, METH_VARARGS }, - { "interrogate_wrapper_unique_name", &_inPU7VH7shV, METH_VARARGS }, - { "interrogate_get_wrapper_by_unique_name", &_inPU7VHA1eF, METH_VARARGS }, - { "interrogate_make_seq_class", &_inPU7VH9tTm, METH_VARARGS }, - { "interrogate_make_seq_seq_name", &_inPU7VH776V, METH_VARARGS }, - { "interrogate_make_seq_num_name", &_inPU7VHfaH0, METH_VARARGS }, - { "interrogate_make_seq_element_name", &_inPU7VHGB9D, METH_VARARGS }, - { "interrogate_number_of_global_types", &_inPU7VHsxxs, METH_VARARGS }, - { "interrogate_get_global_type", &_inPU7VHMT0z, METH_VARARGS }, - { "interrogate_number_of_types", &_inPU7VHiW3v, METH_VARARGS }, - { "interrogate_get_type", &_inPU7VH4Px8, METH_VARARGS }, - { "interrogate_get_type_by_name", &_inPU7VHNHcs, METH_VARARGS }, - { "interrogate_get_type_by_scoped_name", &_inPU7VHqHrb, METH_VARARGS }, - { "interrogate_get_type_by_true_name", &_inPU7VHaOqq, METH_VARARGS }, - { "interrogate_type_name", &_inPU7VHqWOw, METH_VARARGS }, - { "interrogate_type_scoped_name", &_inPU7VHHu7x, METH_VARARGS }, - { "interrogate_type_true_name", &_inPU7VHwGnA, METH_VARARGS }, - { "interrogate_type_is_nested", &_inPU7VHXGxx, METH_VARARGS }, - { "interrogate_type_outer_class", &_inPU7VHj04Z, METH_VARARGS }, - { "interrogate_type_has_comment", &_inPU7VHEOv4, METH_VARARGS }, - { "interrogate_type_comment", &_inPU7VHpCqJ, METH_VARARGS }, - { "interrogate_type_has_module_name", &_inPU7VH_Pz3, METH_VARARGS }, - { "interrogate_type_module_name", &_inPU7VHt_06, METH_VARARGS }, - { "interrogate_type_has_library_name", &_inPU7VHmuPs, METH_VARARGS }, - { "interrogate_type_library_name", &_inPU7VHvM8B, METH_VARARGS }, - { "interrogate_type_is_atomic", &_inPU7VHap97, METH_VARARGS }, - { "interrogate_type_atomic_token", &_inPU7VH0o8D, METH_VARARGS }, - { "interrogate_type_is_unsigned", &_inPU7VHOoQ2, METH_VARARGS }, - { "interrogate_type_is_signed", &_inPU7VHKuFh, METH_VARARGS }, - { "interrogate_type_is_long", &_inPU7VHo5L6, METH_VARARGS }, - { "interrogate_type_is_longlong", &_inPU7VHzgKK, METH_VARARGS }, - { "interrogate_type_is_short", &_inPU7VH0FIF, METH_VARARGS }, - { "interrogate_type_is_wrapped", &_inPU7VHZqvD, METH_VARARGS }, - { "interrogate_type_is_pointer", &_inPU7VHDyRd, METH_VARARGS }, - { "interrogate_type_is_const", &_inPU7VHMnKa, METH_VARARGS }, - { "interrogate_type_is_typedef", &_inPU7VHRtji, METH_VARARGS }, - { "interrogate_type_wrapped_type", &_inPU7VHCnbQ, METH_VARARGS }, - { "interrogate_type_is_enum", &_inPU7VHdUVN, METH_VARARGS }, - { "interrogate_type_number_of_enum_values", &_inPU7VHihbt, METH_VARARGS }, - { "interrogate_type_enum_value_name", &_inPU7VHbyPY, METH_VARARGS }, - { "interrogate_type_enum_value_scoped_name", &_inPU7VHAaT6, METH_VARARGS }, - { "interrogate_type_enum_value_comment", &_inPU7VHgL9q, METH_VARARGS }, - { "interrogate_type_enum_value", &_inPU7VHWB97, METH_VARARGS }, - { "interrogate_type_is_struct", &_inPU7VHDUAl, METH_VARARGS }, - { "interrogate_type_is_class", &_inPU7VH1_Kf, METH_VARARGS }, - { "interrogate_type_is_union", &_inPU7VH98lD, METH_VARARGS }, - { "interrogate_type_is_fully_defined", &_inPU7VH9SHr, METH_VARARGS }, - { "interrogate_type_is_unpublished", &_inPU7VHdiZP, METH_VARARGS }, - { "interrogate_type_number_of_constructors", &_inPU7VHTdER, METH_VARARGS }, - { "interrogate_type_get_constructor", &_inPU7VHYO56, METH_VARARGS }, - { "interrogate_type_has_destructor", &_inPU7VHxtCG, METH_VARARGS }, - { "interrogate_type_destructor_is_inherited", &_inPU7VH_EB2, METH_VARARGS }, - { "interrogate_type_get_destructor", &_inPU7VHEG1l, METH_VARARGS }, - { "interrogate_type_number_of_elements", &_inPU7VH7tUq, METH_VARARGS }, - { "interrogate_type_get_element", &_inPU7VHyStU, METH_VARARGS }, - { "interrogate_type_number_of_methods", &_inPU7VHdM85, METH_VARARGS }, - { "interrogate_type_get_method", &_inPU7VHk_GN, METH_VARARGS }, - { "interrogate_type_number_of_make_seqs", &_inPU7VH8QjG, METH_VARARGS }, - { "interrogate_type_get_make_seq", &_inPU7VHyMtj, METH_VARARGS }, - { "interrogate_type_number_of_casts", &_inPU7VHHDtN, METH_VARARGS }, - { "interrogate_type_get_cast", &_inPU7VHHFjA, METH_VARARGS }, - { "interrogate_type_number_of_derivations", &_inPU7VH_NPR, METH_VARARGS }, - { "interrogate_type_get_derivation", &_inPU7VHcTOH, METH_VARARGS }, - { "interrogate_type_derivation_has_upcast", &_inPU7VHhdU7, METH_VARARGS }, - { "interrogate_type_get_upcast", &_inPU7VHQPxU, METH_VARARGS }, - { "interrogate_type_derivation_downcast_is_impossible", &_inPU7VHO7Pz, METH_VARARGS }, - { "interrogate_type_derivation_has_downcast", &_inPU7VHvu_E, METH_VARARGS }, - { "interrogate_type_get_downcast", &_inPU7VHxGUt, METH_VARARGS }, - { "interrogate_type_number_of_nested_types", &_inPU7VHzM1P, METH_VARARGS }, - { "interrogate_type_get_nested_type", &_inPU7VHoY5L, METH_VARARGS }, + { "interrogate_add_search_directory", &_inP07yttbRf, METH_VARARGS }, + { "interrogate_add_search_path", &_inP07ytda_g, METH_VARARGS }, + { "interrogate_error_flag", &_inP07yt4RgX, METH_VARARGS }, + { "interrogate_number_of_manifests", &_inP07yt3Gip, METH_VARARGS }, + { "interrogate_get_manifest", &_inP07ytRKDz, METH_VARARGS }, + { "interrogate_get_manifest_by_name", &_inP07ytgZ9N, METH_VARARGS }, + { "interrogate_manifest_name", &_inP07ytFnRZ, METH_VARARGS }, + { "interrogate_manifest_definition", &_inP07ytg0Qv, METH_VARARGS }, + { "interrogate_manifest_has_type", &_inP07yttrqw, METH_VARARGS }, + { "interrogate_manifest_get_type", &_inP07ytdmpW, METH_VARARGS }, + { "interrogate_manifest_has_getter", &_inP07ytUYgQ, METH_VARARGS }, + { "interrogate_manifest_getter", &_inP07yt0k7F, METH_VARARGS }, + { "interrogate_manifest_has_int_value", &_inP07ytfIsr, METH_VARARGS }, + { "interrogate_manifest_get_int_value", &_inP07ytvysR, METH_VARARGS }, + { "interrogate_element_name", &_inP07ytYQ_2, METH_VARARGS }, + { "interrogate_element_scoped_name", &_inP07yt3kdv, METH_VARARGS }, + { "interrogate_element_has_comment", &_inP07ytew01, METH_VARARGS }, + { "interrogate_element_comment", &_inP07ytQna7, METH_VARARGS }, + { "interrogate_get_element_by_name", &_inP07ytkg95, METH_VARARGS }, + { "interrogate_get_element_by_scoped_name", &_inP07ytluRc, METH_VARARGS }, + { "interrogate_element_type", &_inP07yttHdM, METH_VARARGS }, + { "interrogate_element_has_getter", &_inP07ytDId0, METH_VARARGS }, + { "interrogate_element_getter", &_inP07ytHuAm, METH_VARARGS }, + { "interrogate_element_has_setter", &_inP07yt_xr0, METH_VARARGS }, + { "interrogate_element_setter", &_inP07ytH5qp, METH_VARARGS }, + { "interrogate_number_of_globals", &_inP07ytU2_B, METH_VARARGS }, + { "interrogate_get_global", &_inP07ytHFO2, METH_VARARGS }, + { "interrogate_number_of_global_functions", &_inP07ytcfjm, METH_VARARGS }, + { "interrogate_get_global_function", &_inP07yt3Sjw, METH_VARARGS }, + { "interrogate_number_of_functions", &_inP07ytgJcX, METH_VARARGS }, + { "interrogate_get_function", &_inP07ytYlw6, METH_VARARGS }, + { "interrogate_function_name", &_inP07ytsmnz, METH_VARARGS }, + { "interrogate_function_scoped_name", &_inP07ytxQ10, METH_VARARGS }, + { "interrogate_function_has_comment", &_inP07yt6gPB, METH_VARARGS }, + { "interrogate_function_comment", &_inP07ytISgV, METH_VARARGS }, + { "interrogate_function_prototype", &_inP07ytH3bx, METH_VARARGS }, + { "interrogate_function_is_method", &_inP07ytzeUk, METH_VARARGS }, + { "interrogate_function_class", &_inP07ytUeI5, METH_VARARGS }, + { "interrogate_function_has_module_name", &_inP07ytuSvx, METH_VARARGS }, + { "interrogate_function_module_name", &_inP07ytwpYd, METH_VARARGS }, + { "interrogate_function_has_library_name", &_inP07ytOfNh, METH_VARARGS }, + { "interrogate_function_library_name", &_inP07ytf5_U, METH_VARARGS }, + { "interrogate_function_is_virtual", &_inP07ytL3ZB, METH_VARARGS }, + { "interrogate_function_number_of_c_wrappers", &_inP07ytXw0I, METH_VARARGS }, + { "interrogate_function_c_wrapper", &_inP07yt3zru, METH_VARARGS }, + { "interrogate_function_number_of_python_wrappers", &_inP07ytRrg2, METH_VARARGS }, + { "interrogate_function_python_wrapper", &_inP07ytEJCx, METH_VARARGS }, + { "interrogate_wrapper_name", &_inP07ytWAZr, METH_VARARGS }, + { "interrogate_wrapper_is_callable_by_name", &_inP07ytrD_M, METH_VARARGS }, + { "interrogate_wrapper_has_comment", &_inP07ytjolz, METH_VARARGS }, + { "interrogate_wrapper_comment", &_inP07ytt_JD, METH_VARARGS }, + { "interrogate_wrapper_has_return_value", &_inP07ytwEts, METH_VARARGS }, + { "interrogate_wrapper_return_type", &_inP07ytrJWs, METH_VARARGS }, + { "interrogate_wrapper_caller_manages_return_value", &_inP07ytpmFD, METH_VARARGS }, + { "interrogate_wrapper_return_value_destructor", &_inP07ytyYUX, METH_VARARGS }, + { "interrogate_wrapper_number_of_parameters", &_inP07yt54dn, METH_VARARGS }, + { "interrogate_wrapper_parameter_type", &_inP07ytGMpW, METH_VARARGS }, + { "interrogate_wrapper_parameter_has_name", &_inP07ytNuBV, METH_VARARGS }, + { "interrogate_wrapper_parameter_name", &_inP07yt9UwA, METH_VARARGS }, + { "interrogate_wrapper_parameter_is_this", &_inP07yt3FDt, METH_VARARGS }, + { "interrogate_wrapper_has_pointer", &_inP07ytf513, METH_VARARGS }, + { "interrogate_wrapper_pointer", &_inP07ytsqGH, METH_VARARGS }, + { "interrogate_wrapper_unique_name", &_inP07yt7shV, METH_VARARGS }, + { "interrogate_get_wrapper_by_unique_name", &_inP07ytA1eF, METH_VARARGS }, + { "interrogate_make_seq_class", &_inP07yt9tTm, METH_VARARGS }, + { "interrogate_make_seq_seq_name", &_inP07yt776V, METH_VARARGS }, + { "interrogate_make_seq_num_name", &_inP07ytfaH0, METH_VARARGS }, + { "interrogate_make_seq_element_name", &_inP07ytGB9D, METH_VARARGS }, + { "interrogate_number_of_global_types", &_inP07ytsxxs, METH_VARARGS }, + { "interrogate_get_global_type", &_inP07ytMT0z, METH_VARARGS }, + { "interrogate_number_of_types", &_inP07ytiW3v, METH_VARARGS }, + { "interrogate_get_type", &_inP07yt4Px8, METH_VARARGS }, + { "interrogate_get_type_by_name", &_inP07ytNHcs, METH_VARARGS }, + { "interrogate_get_type_by_scoped_name", &_inP07ytqHrb, METH_VARARGS }, + { "interrogate_get_type_by_true_name", &_inP07ytaOqq, METH_VARARGS }, + { "interrogate_type_name", &_inP07ytqWOw, METH_VARARGS }, + { "interrogate_type_scoped_name", &_inP07ytHu7x, METH_VARARGS }, + { "interrogate_type_true_name", &_inP07ytwGnA, METH_VARARGS }, + { "interrogate_type_is_nested", &_inP07ytXGxx, METH_VARARGS }, + { "interrogate_type_outer_class", &_inP07ytj04Z, METH_VARARGS }, + { "interrogate_type_has_comment", &_inP07ytEOv4, METH_VARARGS }, + { "interrogate_type_comment", &_inP07ytpCqJ, METH_VARARGS }, + { "interrogate_type_has_module_name", &_inP07yt_Pz3, METH_VARARGS }, + { "interrogate_type_module_name", &_inP07ytt_06, METH_VARARGS }, + { "interrogate_type_has_library_name", &_inP07ytmuPs, METH_VARARGS }, + { "interrogate_type_library_name", &_inP07ytvM8B, METH_VARARGS }, + { "interrogate_type_is_atomic", &_inP07ytap97, METH_VARARGS }, + { "interrogate_type_atomic_token", &_inP07yt0o8D, METH_VARARGS }, + { "interrogate_type_is_unsigned", &_inP07ytOoQ2, METH_VARARGS }, + { "interrogate_type_is_signed", &_inP07ytKuFh, METH_VARARGS }, + { "interrogate_type_is_long", &_inP07yto5L6, METH_VARARGS }, + { "interrogate_type_is_longlong", &_inP07ytzgKK, METH_VARARGS }, + { "interrogate_type_is_short", &_inP07yt0FIF, METH_VARARGS }, + { "interrogate_type_is_wrapped", &_inP07ytZqvD, METH_VARARGS }, + { "interrogate_type_is_pointer", &_inP07ytDyRd, METH_VARARGS }, + { "interrogate_type_is_const", &_inP07ytMnKa, METH_VARARGS }, + { "interrogate_type_is_typedef", &_inP07ytRtji, METH_VARARGS }, + { "interrogate_type_wrapped_type", &_inP07ytCnbQ, METH_VARARGS }, + { "interrogate_type_is_enum", &_inP07ytdUVN, METH_VARARGS }, + { "interrogate_type_number_of_enum_values", &_inP07ytihbt, METH_VARARGS }, + { "interrogate_type_enum_value_name", &_inP07ytbyPY, METH_VARARGS }, + { "interrogate_type_enum_value_scoped_name", &_inP07ytAaT6, METH_VARARGS }, + { "interrogate_type_enum_value_comment", &_inP07ytgL9q, METH_VARARGS }, + { "interrogate_type_enum_value", &_inP07ytWB97, METH_VARARGS }, + { "interrogate_type_is_struct", &_inP07ytDUAl, METH_VARARGS }, + { "interrogate_type_is_class", &_inP07yt1_Kf, METH_VARARGS }, + { "interrogate_type_is_union", &_inP07yt98lD, METH_VARARGS }, + { "interrogate_type_is_fully_defined", &_inP07yt9SHr, METH_VARARGS }, + { "interrogate_type_is_unpublished", &_inP07ytdiZP, METH_VARARGS }, + { "interrogate_type_number_of_constructors", &_inP07ytTdER, METH_VARARGS }, + { "interrogate_type_get_constructor", &_inP07ytYO56, METH_VARARGS }, + { "interrogate_type_has_destructor", &_inP07ytxtCG, METH_VARARGS }, + { "interrogate_type_destructor_is_inherited", &_inP07yt_EB2, METH_VARARGS }, + { "interrogate_type_get_destructor", &_inP07ytEG1l, METH_VARARGS }, + { "interrogate_type_number_of_elements", &_inP07yt7tUq, METH_VARARGS }, + { "interrogate_type_get_element", &_inP07ytyStU, METH_VARARGS }, + { "interrogate_type_number_of_methods", &_inP07ytdM85, METH_VARARGS }, + { "interrogate_type_get_method", &_inP07ytk_GN, METH_VARARGS }, + { "interrogate_type_number_of_make_seqs", &_inP07yt8QjG, METH_VARARGS }, + { "interrogate_type_get_make_seq", &_inP07ytyMtj, METH_VARARGS }, + { "interrogate_type_number_of_casts", &_inP07ytHDtN, METH_VARARGS }, + { "interrogate_type_get_cast", &_inP07ytHFjA, METH_VARARGS }, + { "interrogate_type_number_of_derivations", &_inP07yt_NPR, METH_VARARGS }, + { "interrogate_type_get_derivation", &_inP07ytcTOH, METH_VARARGS }, + { "interrogate_type_derivation_has_upcast", &_inP07ythdU7, METH_VARARGS }, + { "interrogate_type_get_upcast", &_inP07ytQPxU, METH_VARARGS }, + { "interrogate_type_derivation_downcast_is_impossible", &_inP07ytO7Pz, METH_VARARGS }, + { "interrogate_type_derivation_has_downcast", &_inP07ytvu_E, METH_VARARGS }, + { "interrogate_type_get_downcast", &_inP07ytxGUt, METH_VARARGS }, + { "interrogate_type_number_of_nested_types", &_inP07ytzM1P, METH_VARARGS }, + { "interrogate_type_get_nested_type", &_inP07ytoY5L, METH_VARARGS }, + { "interrogate_request_database", &_inP07yte_7S, METH_VARARGS }, + { "interrogate_request_module", &_inP07ytw_15, METH_VARARGS }, { NULL, NULL } }; @@ -2502,3 +2535,4 @@ INIT_FUNC() { Py_InitModule("interrogatedb", python_simple_funcs); #endif } + From 57e5c8fb2544b3f7fa5efda4eea3bbbfdd939d69 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 10 Sep 2015 15:29:31 +0200 Subject: [PATCH 118/200] Wrap TypeHandle and ButtonHandle as ints in C wrappers --- dtool/src/dtoolbase/typeHandle.I | 15 ++++ dtool/src/dtoolbase/typeHandle.h | 5 +- dtool/src/interrogate/functionRemap.cxx | 48 ++++++++---- dtool/src/interrogate/interfaceMakerC.cxx | 27 +++++++ dtool/src/interrogate/interfaceMakerC.h | 2 + .../interrogate/interrogate_composite2.cxx | 1 + .../interrogate/parameterRemapHandleToInt.cxx | 65 ++++++++++++++++ .../interrogate/parameterRemapHandleToInt.h | 40 ++++++++++ dtool/src/interrogate/parameterRemapThis.cxx | 4 +- dtool/src/interrogate/typeManager.cxx | 27 ++++++- dtool/src/interrogate/typeManager.h | 1 + panda/src/express/config_express.N | 2 +- panda/src/linmath/luse.N | 74 +++++++++---------- panda/src/putil/buttonHandle.h | 2 +- panda/src/putil/config_util.N | 2 +- 15 files changed, 257 insertions(+), 58 deletions(-) create mode 100644 dtool/src/interrogate/parameterRemapHandleToInt.cxx create mode 100644 dtool/src/interrogate/parameterRemapHandleToInt.h diff --git a/dtool/src/dtoolbase/typeHandle.I b/dtool/src/dtoolbase/typeHandle.I index 867bdb4cea..ceb46a8e41 100644 --- a/dtool/src/dtoolbase/typeHandle.I +++ b/dtool/src/dtoolbase/typeHandle.I @@ -263,3 +263,18 @@ INLINE TypeHandle:: operator bool () const { return (_index != 0); } + +//////////////////////////////////////////////////////////////////// +// Function: TypeHandle::from_index +// Access: Public, Static +// Description: Creates a TypeHandle from a type index without +// error checking, for use by internal functions. +// +// See TypeRegistry::find_type_by_id(). +//////////////////////////////////////////////////////////////////// +INLINE TypeHandle TypeHandle:: +from_index(int index) { + TypeHandle handle; + handle._index = index; + return handle; +} diff --git a/dtool/src/dtoolbase/typeHandle.h b/dtool/src/dtoolbase/typeHandle.h index f94e983447..c05e25dd46 100644 --- a/dtool/src/dtoolbase/typeHandle.h +++ b/dtool/src/dtoolbase/typeHandle.h @@ -82,7 +82,7 @@ class TypedObject; // ancestry of a particular type may be queried, and the // type name may be retrieved for run-time display. //////////////////////////////////////////////////////////////////// -class EXPCL_DTOOL TypeHandle { +class EXPCL_DTOOL TypeHandle FINAL { PUBLISHED: enum MemoryClass { MC_singleton, @@ -140,6 +140,9 @@ PUBLISHED: INLINE static TypeHandle none(); INLINE operator bool () const; +public: + INLINE static TypeHandle from_index(int index); + private: int _index; static TypeHandle _none; diff --git a/dtool/src/interrogate/functionRemap.cxx b/dtool/src/interrogate/functionRemap.cxx index 5e602a7553..2bf2fb06da 100644 --- a/dtool/src/interrogate/functionRemap.cxx +++ b/dtool/src/interrogate/functionRemap.cxx @@ -17,6 +17,7 @@ #include "interrogate.h" #include "parameterRemap.h" #include "parameterRemapThis.h" +#include "parameterRemapHandleToInt.h" #include "parameterRemapUnchanged.h" #include "interfaceMaker.h" #include "interrogateBuilder.h" @@ -146,8 +147,13 @@ call_function(ostream &out, int indent_level, bool convert_result, } else if (_type == T_typecast_method) { // A typecast method can be invoked implicitly. string cast_expr = - "(" + _return_type->get_orig_type()->get_local_name(&parser) + - ")(*" + container + ")"; + "(" + _return_type->get_orig_type()->get_local_name(&parser) + ")"; + + if (TypeManager::is_handle(_cpptype)) { + cast_expr += "(" + container + ")"; + } else { + cast_expr += "(*" + container + ")"; + } if (!convert_result) { return_expr = cast_expr; @@ -177,10 +183,7 @@ call_function(ostream &out, int indent_level, bool convert_result, } else if (_type == T_constructor) { // A special case for constructors. - string defconstruct = builder.in_defconstruct(_cpptype->get_local_name(&parser)); - if (pexprs.empty() && !defconstruct.empty()) { - return_expr = defconstruct; - } else if (_extension) { + if (_extension) { // Extension constructors are a special case. We assume there is a // default constructor for the class, and the actual construction is // done by an __init__ method. @@ -192,8 +195,22 @@ call_function(ostream &out, int indent_level, bool convert_result, << get_call_str("result", pexprs) << ";\n"; return_expr = "result"; + } else { - return_expr = "new " + get_call_str(container, pexprs); + string defconstruct = builder.in_defconstruct(_cpptype->get_local_name(&parser)); + string call_expr; + + if (pexprs.empty() && !defconstruct.empty()) { + call_expr = defconstruct; + } else { + call_expr = get_call_str(container, pexprs); + } + + if (!_return_type->return_value_needs_management()) { + return_expr = _return_type->get_return_expr(call_expr); + } else { + return_expr = "new " + call_expr; + } } if (_void_return) { nout << "Error, constructor for " << *_cpptype << " returning void.\n"; @@ -448,12 +465,9 @@ get_call_str(const string &container, const vector_string &pexprs) const { } else if (_has_this && !container.empty()) { // If we have a "this" parameter, the calling convention is also // a bit different. - if (container == "local_this") { - // This isn't important, it just looks a bit prettier. - call << container << "->" << _cppfunc->get_local_name(); - } else { - call << "(" << container << ")->" << _cppfunc->get_local_name(); - } + call << "("; + _parameters[0]._remap->pass_parameter(call, container); + call << ")." << _cppfunc->get_local_name(); } else { call << _cppfunc->get_local_name(&parser); @@ -569,7 +583,13 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak Parameter param; param._name = "this"; param._has_name = true; - param._remap = new ParameterRemapThis(_cpptype, _const_method); + if (_const_method) { + CPPType *const_type = CPPType::new_type(new CPPConstType(_cpptype)); + param._remap = interface_maker->remap_parameter(_cpptype, const_type); + } else { + param._remap = interface_maker->remap_parameter(_cpptype, _cpptype); + } + // param._remap = new ParameterRemapThis(_cpptype, _const_method); _parameters.push_back(param); _first_true_parameter = 1; } diff --git a/dtool/src/interrogate/interfaceMakerC.cxx b/dtool/src/interrogate/interfaceMakerC.cxx index 25eeb87023..9bd21a9922 100644 --- a/dtool/src/interrogate/interfaceMakerC.cxx +++ b/dtool/src/interrogate/interfaceMakerC.cxx @@ -16,6 +16,7 @@ #include "interrogateBuilder.h" #include "interrogate.h" #include "functionRemap.h" +#include "parameterRemapHandleToInt.h" #include "parameterRemapUnchanged.h" #include "typeManager.h" @@ -89,6 +90,32 @@ write_functions(ostream &out) { InterfaceMaker::write_functions(out); } +//////////////////////////////////////////////////////////////////// +// Function: InterfaceMakerC::remap_parameter +// Access: Public, Virtual +// Description: Allocates a new ParameterRemap object suitable to the +// indicated parameter type. If struct_type is +// non-NULL, it is the type of the enclosing class for +// the function (method) in question. +// +// The return value is a newly-allocated ParameterRemap +// object, if the parameter type is acceptable, or NULL +// if the parameter type cannot be handled. +//////////////////////////////////////////////////////////////////// +ParameterRemap *InterfaceMakerC:: +remap_parameter(CPPType *struct_type, CPPType *param_type) { + // Wrap TypeHandle and ButtonHandle, which are practically just + // ints, as an integer instead of a pointer. It makes things easier + // on the scripting language, especially if there has to be a + // dynamic downcasting system on the scripting language side. + if (TypeManager::is_handle(param_type)) { + return new ParameterRemapHandleToInt(param_type); + + } else { + return InterfaceMaker::remap_parameter(struct_type, param_type); + } +} + //////////////////////////////////////////////////////////////////// // Function: InterfaceMakerC::synthesize_this_parameter // Access: Public, Virtual diff --git a/dtool/src/interrogate/interfaceMakerC.h b/dtool/src/interrogate/interfaceMakerC.h index 3faea7bae8..ee715424ac 100644 --- a/dtool/src/interrogate/interfaceMakerC.h +++ b/dtool/src/interrogate/interfaceMakerC.h @@ -36,6 +36,8 @@ public: virtual void write_prototypes(ostream &out,ostream *out_h); virtual void write_functions(ostream &out); + virtual ParameterRemap *remap_parameter(CPPType *struct_type, CPPType *param_type); + virtual bool synthesize_this_parameter(); protected: diff --git a/dtool/src/interrogate/interrogate_composite2.cxx b/dtool/src/interrogate/interrogate_composite2.cxx index 39000d2778..a427cf2674 100644 --- a/dtool/src/interrogate/interrogate_composite2.cxx +++ b/dtool/src/interrogate/interrogate_composite2.cxx @@ -14,5 +14,6 @@ #include "parameterRemapReferenceToPointer.cxx" #include "parameterRemapThis.cxx" #include "parameterRemapToString.cxx" +#include "parameterRemapHandleToInt.cxx" #include "parameterRemapUnchanged.cxx" diff --git a/dtool/src/interrogate/parameterRemapHandleToInt.cxx b/dtool/src/interrogate/parameterRemapHandleToInt.cxx new file mode 100644 index 0000000000..82220c1b75 --- /dev/null +++ b/dtool/src/interrogate/parameterRemapHandleToInt.cxx @@ -0,0 +1,65 @@ +// Filename: parameterRemapHandleToInt.cxx +// Created by: rdb (08Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "parameterRemapHandleToInt.h" +#include "interrogate.h" +#include "interrogateBuilder.h" +#include "typeManager.h" + +#include "cppType.h" +#include "cppDeclaration.h" +#include "cppConstType.h" +#include "cppPointerType.h" + +//////////////////////////////////////////////////////////////////// +// Function: ParameterRemapHandleToInt::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ParameterRemapHandleToInt:: +ParameterRemapHandleToInt(CPPType *orig_type) : + ParameterRemap(orig_type) +{ + _new_type = TypeManager::get_int_type(); +} + +//////////////////////////////////////////////////////////////////// +// Function: ParameterRemapHandleToInt::pass_parameter +// Access: Public, Virtual +// Description: Outputs an expression that converts the indicated +// variable from the new type to the original type, for +// passing into the actual C++ function. +//////////////////////////////////////////////////////////////////// +void ParameterRemapHandleToInt:: +pass_parameter(ostream &out, const string &variable_name) { + CPPType *unwrapped = TypeManager::unwrap_const(_orig_type); + + if (unwrapped->get_local_name(&parser) == "TypeHandle") { + out << "TypeHandle::from_index(" << variable_name << ")"; + } else { + out << unwrapped->get_local_name(&parser) << "(" << variable_name << ")"; + } +} + +//////////////////////////////////////////////////////////////////// +// Function: ParameterRemapHandleToInt::get_return_expr +// Access: Public, Virtual +// Description: Returns an expression that evalutes to the +// appropriate value type for returning from the +// function, given an expression of the original type. +//////////////////////////////////////////////////////////////////// +string ParameterRemapHandleToInt:: +get_return_expr(const string &expression) { + return "(" + expression + ").get_index()"; +} diff --git a/dtool/src/interrogate/parameterRemapHandleToInt.h b/dtool/src/interrogate/parameterRemapHandleToInt.h new file mode 100644 index 0000000000..4a2915d279 --- /dev/null +++ b/dtool/src/interrogate/parameterRemapHandleToInt.h @@ -0,0 +1,40 @@ +// Filename: parameterRemapHandleToInt.h +// Created by: rdb (08Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef PARAMETERREMAPHANDLETOINT_H +#define PARAMETERREMAPHANDLETOINT_H + +#include "dtoolbase.h" + +#include "parameterRemap.h" + +//////////////////////////////////////////////////////////////////// +// Class : ParameterRemapHandleToInt +// Description : A ParameterRemap class that handles remapping a +// Handle parameter to an integer. This makes it +// easier to set up a dynamic typing system on the +// scripting language side. +// +// It also applies to ButtonHandle or any other class +// with the same semantics, because why not. +//////////////////////////////////////////////////////////////////// +class ParameterRemapHandleToInt : public ParameterRemap { +public: + ParameterRemapHandleToInt(CPPType *orig_type); + + virtual void pass_parameter(ostream &out, const string &variable_name); + virtual string get_return_expr(const string &expression); +}; + +#endif diff --git a/dtool/src/interrogate/parameterRemapThis.cxx b/dtool/src/interrogate/parameterRemapThis.cxx index db6e1d6d30..220f01ab44 100644 --- a/dtool/src/interrogate/parameterRemapThis.cxx +++ b/dtool/src/interrogate/parameterRemapThis.cxx @@ -45,8 +45,8 @@ ParameterRemapThis(CPPType *type, bool is_const) : // passing into the actual C++ function. //////////////////////////////////////////////////////////////////// void ParameterRemapThis:: -pass_parameter(ostream &out, const string &) { - out << "**invalid**"; +pass_parameter(ostream &out, const string &variable_name) { + out << "(*" << variable_name << ")"; } //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index c8e6dce9c7..1fd968d09f 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -1820,6 +1820,31 @@ is_Py_buffer(CPPType *type) { } } +//////////////////////////////////////////////////////////////////// +// Function: TypeManager::is_handle +// Access: Public, Static +// Description: Returns true if the indicated type is TypeHandle +// or a class with identical semantics like ButtonHandle. +//////////////////////////////////////////////////////////////////// +bool TypeManager:: +is_handle(CPPType *type) { + switch (type->get_subtype()) { + case CPPDeclaration::ST_const: + return is_handle(type->as_const_type()->_wrapped_around); + + case CPPDeclaration::ST_extension: + case CPPDeclaration::ST_struct: + return (type->get_local_name(&parser) == "TypeHandle" || + type->get_local_name(&parser) == "ButtonHandle"); + + case CPPDeclaration::ST_typedef: + return is_handle(type->as_typedef_type()->_type); + + default: + return false; + } +} + //////////////////////////////////////////////////////////////////// // Function: TypeManager::is_ostream // Access: Public, Static @@ -2631,7 +2656,7 @@ is_trivial(CPPType *source_type) { return is_trivial(source_type->as_typedef_type()->_type); default: - if (source_type->is_trivial()) { + if (source_type->is_trivial() || is_handle(source_type)) { return true; } else { // This is a bit of a hack. is_trivial() returns false for types that diff --git a/dtool/src/interrogate/typeManager.h b/dtool/src/interrogate/typeManager.h index 29b29eb2c7..5df95c63b9 100644 --- a/dtool/src/interrogate/typeManager.h +++ b/dtool/src/interrogate/typeManager.h @@ -112,6 +112,7 @@ public: static bool is_PyUnicodeObject(CPPType *type); static bool is_pointer_to_Py_buffer(CPPType *type); static bool is_Py_buffer(CPPType *type); + static bool is_handle(CPPType *type); static bool involves_unpublished(CPPType *type); static bool involves_protected(CPPType *type); diff --git a/panda/src/express/config_express.N b/panda/src/express/config_express.N index ad6e244b4e..454c630ed2 100644 --- a/panda/src/express/config_express.N +++ b/panda/src/express/config_express.N @@ -1,4 +1,4 @@ -defconstruct TypeHandle new TypeHandle(TypeHandle::none()) +defconstruct TypeHandle TypeHandle(TypeHandle::none()) forcetype PandaSystem forcetype DSearchPath diff --git a/panda/src/linmath/luse.N b/panda/src/linmath/luse.N index 20da19f1c8..ce89055b3d 100644 --- a/panda/src/linmath/luse.N +++ b/panda/src/linmath/luse.N @@ -1,46 +1,46 @@ -defconstruct LPoint2f new LPoint2f(0.0f) -defconstruct LPoint3f new LPoint3f(0.0f) -defconstruct LPoint4f new LPoint4f(0.0f) -defconstruct LPoint2d new LPoint2d(0.0) -defconstruct LPoint3d new LPoint3d(0.0) -defconstruct LPoint4d new LPoint4d(0.0) -defconstruct LPoint2i new LPoint2i(0) -defconstruct LPoint3i new LPoint3i(0) -defconstruct LPoint4i new LPoint4i(0) +defconstruct LPoint2f LPoint2f(0.0f) +defconstruct LPoint3f LPoint3f(0.0f) +defconstruct LPoint4f LPoint4f(0.0f) +defconstruct LPoint2d LPoint2d(0.0) +defconstruct LPoint3d LPoint3d(0.0) +defconstruct LPoint4d LPoint4d(0.0) +defconstruct LPoint2i LPoint2i(0) +defconstruct LPoint3i LPoint3i(0) +defconstruct LPoint4i LPoint4i(0) -defconstruct LVecBase2f new LVecBase2f(0.0f) -defconstruct LVecBase3f new LVecBase3f(0.0f) -defconstruct LVecBase4f new LVecBase4f(0.0f) -defconstruct LVecBase2d new LVecBase2d(0.0) -defconstruct LVecBase3d new LVecBase3d(0.0) -defconstruct LVecBase4d new LVecBase4d(0.0) -defconstruct LVecBase2i new LVecBase2i(0) -defconstruct LVecBase3i new LVecBase3i(0) -defconstruct LVecBase4i new LVecBase4i(0) +defconstruct LVecBase2f LVecBase2f(0.0f) +defconstruct LVecBase3f LVecBase3f(0.0f) +defconstruct LVecBase4f LVecBase4f(0.0f) +defconstruct LVecBase2d LVecBase2d(0.0) +defconstruct LVecBase3d LVecBase3d(0.0) +defconstruct LVecBase4d LVecBase4d(0.0) +defconstruct LVecBase2i LVecBase2i(0) +defconstruct LVecBase3i LVecBase3i(0) +defconstruct LVecBase4i LVecBase4i(0) -defconstruct LVector2f new LVector2f(0.0f) -defconstruct LVector3f new LVector3f(0.0f) -defconstruct LVector4f new LVector4f(0.0f) -defconstruct LVector2d new LVector2d(0.0) -defconstruct LVector3d new LVector3d(0.0) -defconstruct LVector4d new LVector4d(0.0) -defconstruct LVector2i new LVector2i(0) -defconstruct LVector3i new LVector3i(0) -defconstruct LVector4i new LVector4i(0) +defconstruct LVector2f LVector2f(0.0f) +defconstruct LVector3f LVector3f(0.0f) +defconstruct LVector4f LVector4f(0.0f) +defconstruct LVector2d LVector2d(0.0) +defconstruct LVector3d LVector3d(0.0) +defconstruct LVector4d LVector4d(0.0) +defconstruct LVector2i LVector2i(0) +defconstruct LVector3i LVector3i(0) +defconstruct LVector4i LVector4i(0) -defconstruct LMatrix3f new LMatrix3f(LMatrix3f::ident_mat()) -defconstruct LMatrix4f new LMatrix4f(LMatrix4f::ident_mat()) -defconstruct LMatrix3d new LMatrix3d(LMatrix3d::ident_mat()) -defconstruct LMatrix4d new LMatrix4d(LMatrix4d::ident_mat()) +defconstruct LMatrix3f LMatrix3f(LMatrix3f::ident_mat()) +defconstruct LMatrix4f LMatrix4f(LMatrix4f::ident_mat()) +defconstruct LMatrix3d LMatrix3d(LMatrix3d::ident_mat()) +defconstruct LMatrix4d LMatrix4d(LMatrix4d::ident_mat()) -defconstruct LQuaternionf new LQuaternionf(LQuaternionf::ident_quat()) -defconstruct LRotationf new LRotationf(LQuaternionf::ident_quat()) -defconstruct LOrientationf new LOrientationf(LQuaternionf::ident_quat()) +defconstruct LQuaternionf LQuaternionf(LQuaternionf::ident_quat()) +defconstruct LRotationf LRotationf(LQuaternionf::ident_quat()) +defconstruct LOrientationf LOrientationf(LQuaternionf::ident_quat()) -defconstruct LQuaterniond new LQuaterniond(LQuaterniond::ident_quat()) -defconstruct LRotationd new LRotationd(LQuaterniond::ident_quat()) -defconstruct LOrientationd new LOrientationd(LQuaterniond::ident_quat()) +defconstruct LQuaterniond LQuaterniond(LQuaterniond::ident_quat()) +defconstruct LRotationd LRotationd(LQuaterniond::ident_quat()) +defconstruct LOrientationd LOrientationd(LQuaterniond::ident_quat()) # We don't want to accidentally include any of the _src files in the # generated output, since these files aren't intended to be included by diff --git a/panda/src/putil/buttonHandle.h b/panda/src/putil/buttonHandle.h index c53f9a6ac9..dcb0e82db3 100644 --- a/panda/src/putil/buttonHandle.h +++ b/panda/src/putil/buttonHandle.h @@ -25,7 +25,7 @@ // device, including keyboard buttons and mouse buttons // (but see KeyboardButton and MouseButton). //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_PUTIL ButtonHandle { +class EXPCL_PANDA_PUTIL ButtonHandle FINAL { PUBLISHED: INLINE ButtonHandle(); INLINE ButtonHandle(int index); diff --git a/panda/src/putil/config_util.N b/panda/src/putil/config_util.N index 4bcc299b1e..3e7f11238a 100644 --- a/panda/src/putil/config_util.N +++ b/panda/src/putil/config_util.N @@ -1,4 +1,4 @@ -defconstruct ButtonHandle new ButtonHandle(0) +defconstruct ButtonHandle ButtonHandle(0) ignoremember _factory ignoremember get_factory From c9434c5b8506c64014eee6544c847ce51402e0c2 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 10 Sep 2015 15:30:24 +0200 Subject: [PATCH 119/200] Fix shadowed light copy constructor, fix point light lens orientations --- panda/src/pgraphnodes/lightLensNode.cxx | 13 +++++------ panda/src/pgraphnodes/pointLight.cxx | 29 +++++-------------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/panda/src/pgraphnodes/lightLensNode.cxx b/panda/src/pgraphnodes/lightLensNode.cxx index bead7ecf01..c26f0cd9c4 100644 --- a/panda/src/pgraphnodes/lightLensNode.cxx +++ b/panda/src/pgraphnodes/lightLensNode.cxx @@ -62,15 +62,12 @@ LightLensNode:: LightLensNode:: LightLensNode(const LightLensNode ©) : Light(copy), - Camera(copy) + Camera(copy), + _shadow_caster(copy._shadow_caster), + _sb_xsize(copy._sb_xsize), + _sb_ysize(copy._sb_ysize), + _sb_sort(-10) { - _shadow_caster = false; - _sb_xsize = 512; - _sb_ysize = 512; - _sb_sort = -10; - // Backface culling helps eliminating artifacts. - set_initial_state(RenderState::make(CullFaceAttrib::make_reverse(), - ColorWriteAttrib::make(ColorWriteAttrib::C_off))); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraphnodes/pointLight.cxx b/panda/src/pgraphnodes/pointLight.cxx index 5ac0c8885c..20fb1dbd1e 100644 --- a/panda/src/pgraphnodes/pointLight.cxx +++ b/panda/src/pgraphnodes/pointLight.cxx @@ -69,22 +69,22 @@ PointLight(const string &name) : { PT(Lens) lens; lens = new PerspectiveLens(90, 90); - lens->set_view_vector(1, 0, 0, 0, 0, 1); + lens->set_view_vector(1, 0, 0, 0, -1, 0); set_lens(0, lens); lens = new PerspectiveLens(90, 90); - lens->set_view_vector(-1, 0, 0, 0, 0, 1); + lens->set_view_vector(-1, 0, 0, 0, -1, 0); set_lens(1, lens); lens = new PerspectiveLens(90, 90); lens->set_view_vector(0, 1, 0, 0, 0, 1); set_lens(2, lens); lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, -1, 0, 0, 0, 1); + lens->set_view_vector(0, -1, 0, 0, 0, -1); set_lens(3, lens); lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, 0, 1, 0, 0, 1); + lens->set_view_vector(0, 0, 1, 0, -1, 0); set_lens(4, lens); lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, 0, -1, 0, 0, 1); + lens->set_view_vector(0, 0, -1, 0, -1, 0); set_lens(5, lens); } @@ -100,25 +100,6 @@ PointLight(const PointLight ©) : LightLensNode(copy), _cycler(copy._cycler) { - PT(Lens) lens; - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(1, 0, 0, 0, 0, 1); - set_lens(0, lens); - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(-1, 0, 0, 0, 0, 1); - set_lens(1, lens); - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, 1, 0, 0, 0, 1); - set_lens(2, lens); - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, -1, 0, 0, 0, 1); - set_lens(3, lens); - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, 0, 1, 0, 0, 1); - set_lens(4, lens); - lens = new PerspectiveLens(90, 90); - lens->set_view_vector(0, 0, -1, 0, 0, 1); - set_lens(5, lens); } //////////////////////////////////////////////////////////////////// From d63110a49e9d7a3243204974f99761065e39652d Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 30 Apr 2015 19:56:24 +0200 Subject: [PATCH 120/200] Add localized text strings to p3dcert --- direct/src/plugin/p3dAuthSession.cxx | 5 +- direct/src/plugin/p3dCert.cxx | 133 +++--- direct/src/plugin/p3dCert.h | 6 +- direct/src/plugin/p3dCert_strings.cxx | 570 ++++++++++++++++++++++++++ direct/src/plugin/p3dCert_strings.h | 45 ++ direct/src/plugin/p3dSession.cxx | 4 +- makepanda/makepanda.py | 2 + 7 files changed, 695 insertions(+), 70 deletions(-) create mode 100644 direct/src/plugin/p3dCert_strings.cxx create mode 100644 direct/src/plugin/p3dCert_strings.h diff --git a/direct/src/plugin/p3dAuthSession.cxx b/direct/src/plugin/p3dAuthSession.cxx index 103c372f0a..177ffc7c0a 100644 --- a/direct/src/plugin/p3dAuthSession.cxx +++ b/direct/src/plugin/p3dAuthSession.cxx @@ -183,7 +183,7 @@ start_p3dcert() { // These are the enviroment variables we forward from the current // environment, if they are set. const wchar_t *keep[] = { - L"TMP", L"TEMP", L"HOME", L"USER", + L"TMP", L"TEMP", L"HOME", L"USER", L"SYSTEMROOT", L"USERPROFILE", L"COMSPEC", NULL }; @@ -209,7 +209,8 @@ start_p3dcert() { // These are the enviroment variables we forward from the current // environment, if they are set. const char *keep[] = { - "TMP", "TEMP", "HOME", "USER", + "TMP", "TEMP", "HOME", "USER", + "LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG", #ifdef HAVE_X11 "DISPLAY", "XAUTHORITY", #endif diff --git a/direct/src/plugin/p3dCert.cxx b/direct/src/plugin/p3dCert.cxx index b920550092..8d78ff7485 100644 --- a/direct/src/plugin/p3dCert.cxx +++ b/direct/src/plugin/p3dCert.cxx @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include "p3dCert.h" +#include "p3dCert_strings.h" #include "wstring_encode.h" #include "mkdir_complete.h" @@ -26,8 +27,9 @@ #include #include #include +#include -#define BUTTON_WIDTH 120 +#define BUTTON_WIDTH 180 // fit the Russian text #define BUTTON_SPACE 10 #include "ca_bundle_data_src.c" @@ -40,59 +42,58 @@ #define snprintf sprintf_s #endif -static const char -self_signed_cert_text[] = - "This Panda3D application uses a self-signed certificate. " - "This means the author's name can't be verified, and you have " - "no way of knowing for sure who wrote it.\n\n" +static LanguageIndex li = LI_default; - "We recommend you click Cancel to avoid running this application."; +static LanguageIndex detect_language() { + // First consult the LANGUAGE variable, which is a GNU extension that can + // contain multiple languages in order of preference. + const char *lang = getenv("LANGUAGE"); + while (lang != NULL && lang[0] != 0) { + size_t len; + const char *next = strchr(lang, ':'); + if (next == NULL) { + len = strlen(lang); + } else { + len = (next - lang); + ++next; + } -static const char -unknown_auth_cert_text[] = - "This Panda3D application has been signed, but we don't recognize " - "the authority that verifies the signature. This means the author's " - "name can't be trusted, and you have no way of knowing " - "for sure who wrote it.\n\n" + if (len >= 2 && !isalnum(lang[2])) { + // It may be a two-letter language code; match it in our list. + for (int i = 0; i < LI_COUNT; ++i) { + const char *lang_code = language_codes[i]; + if (lang_code != NULL && strncasecmp(lang, lang_code, 2) == 0) { + return (LanguageIndex)i; + } + } + } - "We recommend you click Cancel to avoid running this application."; + lang = next; + } -static const char -verified_cert_text[] = - "This Panda3D application has been signed by %s. " - "If you trust %s, then click the Run button below " - "to run this application on your computer. This will also " - "automatically approve this and any other applications signed by " - "%s in the future.\n\n" + // Fall back to the C locale functions. + setlocale(LC_ALL, ""); + lang = setlocale(LC_MESSAGES, NULL); - "If you are unsure about this application, " - "you should click Cancel instead."; + if (lang == NULL || lang[0] == 0 || strcmp(lang, "C") == 0) { + // Try the LANG variable. + lang = getenv("LANG"); + } -static const char -expired_cert_text[] = - "This Panda3D application has been signed by %s, " - "but the certificate has expired.\n\n" - - "You should check the current date set on your computer's clock " - "to make sure it is correct.\n\n" - - "If your computer's date is correct, we recommend " - "you click Cancel to avoid running this application."; - -static const char -generic_error_cert_text[] = - "This Panda3D application has been signed, but there is a problem " - "with the certificate (OpenSSL error code %d).\n\n" - - "We recommend you click Cancel to avoid running this application."; - -static const char -no_cert_text[] = - "This Panda3D application has not been signed. This means you have " - "no way of knowing for sure who wrote it.\n\n" - - "Click Cancel to avoid running this application."; + if (lang == NULL || strlen(lang) < 2 || isalnum(lang[2])) { + // Couldn't extract a meaningful two-letter code. + return LI_default; + } + // It may be a two-letter language code; match it in our list. + for (int i = 0; i < LI_COUNT; ++i) { + const char *lang_code = language_codes[i]; + if (lang_code != NULL && strncasecmp(lang, lang_code, 2) == 0) { + return (LanguageIndex)i; + } + } + return LI_default; +} #ifdef _WIN32 int WINAPI @@ -107,6 +108,8 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdS return 1; } + li = detect_language(); + wstring cert_filename (argv[0]); wstring cert_dir (argv[1]); LocalFree(argv); @@ -126,6 +129,8 @@ int main(int argc, char **argv) { return 1; } + li = detect_language(); + string cert_filename (argv[1]); string cert_dir (argv[2]); @@ -510,19 +515,19 @@ layout() { short bx = (w() - nbuttons * BUTTON_WIDTH - (nbuttons - 1) * BUTTON_SPACE) / 2; if (_verify_result == 0 && _cert != NULL) { - Fl_Return_Button *run_button = new Fl_Return_Button(bx, next_y, BUTTON_WIDTH, 25, "Run"); + Fl_Return_Button *run_button = new Fl_Return_Button(bx, next_y, BUTTON_WIDTH, 25, run_title[li]); run_button->callback(this->run_clicked, this); bx += BUTTON_WIDTH + BUTTON_SPACE; } if (_cert != NULL) { - Fl_Button *view_button = new Fl_Button(bx, next_y, BUTTON_WIDTH, 25, "View Certificate"); + Fl_Button *view_button = new Fl_Button(bx, next_y, BUTTON_WIDTH, 25, show_cert_title[li]); view_button->callback(this->view_cert_clicked, this); bx += BUTTON_WIDTH + BUTTON_SPACE; } Fl_Button *cancel_button; - cancel_button = new Fl_Button(bx, next_y, BUTTON_WIDTH, 25, "Cancel"); + cancel_button = new Fl_Button(bx, next_y, BUTTON_WIDTH, 25, cancel_title[li]); cancel_button->callback(this->cancel_clicked, this); next_y += 42; @@ -542,12 +547,12 @@ void AuthDialog:: get_text(char *header, size_t hlen, char *text, size_t tlen) { switch (_verify_result) { case -1: - strncpy(header, "No signature!", hlen); - strncpy(text, no_cert_text, tlen); + strncpy(header, no_cert_title[li], hlen); + strncpy(text, no_cert_text[li], tlen); break; case 0: - snprintf(text, tlen, verified_cert_text, _friendly_name.c_str(), + snprintf(text, tlen, verified_cert_text[li], _friendly_name.c_str(), _friendly_name.c_str(), _friendly_name.c_str()); break; @@ -555,24 +560,24 @@ get_text(char *header, size_t hlen, char *text, size_t tlen) { case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_CRL_NOT_YET_VALID: case X509_V_ERR_CRL_HAS_EXPIRED: - strncpy(header, "Expired signature!", hlen); - snprintf(text, tlen, expired_cert_text, _friendly_name.c_str()); + strncpy(header, expired_cert_title[li], hlen); + snprintf(text, tlen, expired_cert_text[li], _friendly_name.c_str()); break; case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: - strncpy(header, "Unverified signature!", hlen); - snprintf(text, tlen, unknown_auth_cert_text); + strncpy(header, unverified_cert_title[li], hlen); + strncpy(text, unknown_auth_cert_text[li], tlen); break; case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: - strncpy(header, "Unverified signature!", hlen); - strncpy(text, self_signed_cert_text, tlen); + strncpy(header, unverified_cert_title[li], hlen); + strncpy(text, self_signed_cert_text[li], tlen); break; default: - strncpy(header, "Unverified signature!", hlen); - snprintf(text, tlen, generic_error_cert_text, _verify_result); + strncpy(header, unverified_cert_title[li], hlen); + snprintf(text, tlen, generic_error_cert_text[li], _verify_result); } } @@ -583,7 +588,7 @@ get_text(char *header, size_t hlen, char *text, size_t tlen) { //////////////////////////////////////////////////////////////////// ViewCertDialog:: ViewCertDialog(AuthDialog *auth_dialog, X509 *cert) : - Fl_Window(600, 400, "View Certificate"), + Fl_Window(600, 400, show_cert_title[li]), _auth_dialog(auth_dialog), _cert(cert) { @@ -660,12 +665,12 @@ layout() { short bx = (w() - BUTTON_WIDTH * 2 - BUTTON_SPACE) / 2; - Fl_Return_Button *run_button = new Fl_Return_Button(bx, 360, BUTTON_WIDTH, 25, "Run"); + Fl_Return_Button *run_button = new Fl_Return_Button(bx, 360, BUTTON_WIDTH, 25, run_title[li]); run_button->callback(this->run_clicked, this); bx += BUTTON_WIDTH + BUTTON_SPACE; - Fl_Button *cancel_button = new Fl_Button(bx, 360, BUTTON_WIDTH, 25, "Cancel"); + Fl_Button *cancel_button = new Fl_Button(bx, 360, BUTTON_WIDTH, 25, cancel_title[li]); cancel_button->callback(this->cancel_clicked, this); end(); diff --git a/direct/src/plugin/p3dCert.h b/direct/src/plugin/p3dCert.h index dd434409b6..abc5deed4e 100644 --- a/direct/src/plugin/p3dCert.h +++ b/direct/src/plugin/p3dCert.h @@ -92,9 +92,9 @@ private: X509 *_cert; STACK_OF(X509) *_stack; - char _header[32]; - char _text[512]; - char _text_clean[1024]; + char _header[64]; + char _text[1024]; + char _text_clean[2048]; string _friendly_name; int _verify_result; diff --git a/direct/src/plugin/p3dCert_strings.cxx b/direct/src/plugin/p3dCert_strings.cxx new file mode 100644 index 0000000000..e33f2adba9 --- /dev/null +++ b/direct/src/plugin/p3dCert_strings.cxx @@ -0,0 +1,570 @@ +// Filename: p3dCert_strings.h +// Created by: rdb (25Mar15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "p3dCert_strings.h" + +// Translations kindly provided by: +// eng: drwr +// nld: rdb +// deu: Sebastian Hoffmann +// spa: Imanol Celaya +// ita: Flavio Clava +// rus: montreal + +const char *language_codes[LI_COUNT] = + {"en", "nl", "de", "es", "it", "eo", "ru"}; + +// https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693%28v=vs.85%29.aspx +const unsigned char language_ids[LI_COUNT] = + {0x09, 0x13, 0x07, 0x0A, 0x10, 0, 0x19}; + +const char * +run_title[LI_COUNT] = { + "Run", + "Uitvoeren", + "Starten", + "Ejecutar", + "Lancia", + "Lan\304\211i", + "\320\227\320\260\320\277\321\203\321\201\321\202\320\270\321\202\321\214", +}; + +const char * +cancel_title[LI_COUNT] = { + "Cancel", + "Annuleren", + "Abbrechen", + "Cancelar", + "Cancella", + "Nuligi", + "\320\236\321\202\320\274\320\265\320\275\320\260", +}; + +const char * +show_cert_title[LI_COUNT] = { + "Show Certificate", + "Toon Certificaat", + "Zertifikat anzeigen", + "Mostrar certificado", + "Mostra certificato", + "Montri Ateston", + "\320\237\320\276\320\272\320\260\320\267\320\260\321\202\321\214 \321\201" + "\320\265\321\200\321\202\320\270\321\204\320\270\320\272\320\260\321\202", +}; + +const char * +new_application_title[LI_COUNT] = { + "New Panda3D Application", + "Nieuwe Panda3D Applicatie", + "Neue Panda3D-Anwendung", + "Nueva aplicaci\303\263n de Panda3D", + "Nuova applicazione Panda3D", + "Nova aplika\304\265o de Panda3D", + "\320\235\320\276\320\262\320\276\320\265 Panda3D-\320\277\321\200\320\270" + "\320\273\320\276\320\266\320\265\320\275\320\270\320\265", +}; + +const char * +no_cert_title[LI_COUNT] = { + "No signature!", + "Geen handtekening!", + "Keine Signatur!", + "Sin firma!", + "Nessuna firma!", + "Ne subskribo!", + "\320\235\320\265\321\202 \320\277\320\276\320\264\320\277\320\270\321\201" + "\320\270!", +}; + +const char * +unverified_cert_title[LI_COUNT] = { + "Unverified signature!", + "Ongeverifieerde handtekening!", + "Unbest\303\244tigte Signatur!", + "Firma sin verificar!", + "Firma non verificata!", + "Nekontrolita subskribo!", + "\320\235\320\265\320\277\321\200\320\276\320\262\320\265\321\200\320\265" + "\320\275\320\275\320\260\321\217 \320\277\320\276\320\264\320\277\320\270" + "\321\201\321\214!", +}; + +const char * +expired_cert_title[LI_COUNT] = { + "Expired signature!", + "Verlopen handtekening!", + "Abgelaufene Signatur!", + "Firma caducada!", + "Firma scaduta!", + "Eksvalidi\304\235inta subskribo!", + "\320\241\321\200\320\276\320\272 \320\264\320\265\320\271\321\201\321\202" + "\320\262\320\270\321\217 \320\277\320\276\320\264\320\277\320\270\321\201" + "\320\270 \320\270\321\201\321\202\321\221\320\272!", +}; + + +const char * +self_signed_cert_text[LI_COUNT] = { + // eng + "This Panda3D application uses a self-signed certificate. " + "This means the author's name can't be verified, and you have " + "no way of knowing for sure who wrote it.\n" + "\n" + "We recommend you click Cancel to avoid running this application.", + + // nld + "Deze Panda3D applicatie gebruikt een zelf-getekend certificaat. " + "Dit betekent dat de auteursnaam niet kan worden geverifieerd, en het " + "niet zeker is of de applicatie te vertrouwen is.\n" + "\n" + "Het is aanbevolen om op Annuleren te klikken om de applicatie af te " + "sluiten.", + + // deu + "Diese Panda3D-Anwendung benutzt ein selbst-signiertes Zertifikat. Dies " + "bedeutet, dass weder der Name des Autors \303\274berpr\303\274ft werden " + "kann, noch dass garantiert werden kann, dass tats\303\244chlich die " + "angegebene Person diese Anwendung geschrieben hat.\n" + "\n" + "Wir empfehlen, dass Sie Abbrechen dr\303\274cken um diese Anwendung nicht " + "auszuf\303\274hren.", + + // spa + "Esta aplicaci\303\263n de Panda3D usa un certificado autofirmado. " + "Esto significa que el nombre del autor no puede ser verificado y no se " + "puede conocer seguro quien la ha escrito.\n" + "\n" + "Se recomienda cancelar para evitar ejecutar esta aplicaci\303\263n.", + + // ita + "Questa applicazione Panda3D usa un certificato autofirmato. Ci\303\262 " + "significa che il nome dell'autore non pu\303\262 essere verificato, e " + "che non hai modo di assicurarti circa chi la abbia scritta.\n" + "\n" + "Raccomandiamo di cliccare su Cancella per evitare di lanciare questa " + "applicazione.", + + // epo + "\304\210i tiu aplika\304\265o de Panda3D uzas memsubskribitan ateston. " + "Tio signifas ke la nomo de la verkanto ne povas esti kontrolita, kaj vi " + "ne havas certan scimanieron pri la vera verkanto de la aplika\304\265o.\n" + "\n" + "Ni rekomendas ke vi premas la butonon 'Nuligi' por eviti lan\304\211on de " + "\304\211i tiu aplika\304\265o.", + + // rus + "\320\255\321\202\320\276 \320\277\321\200\320\270\320\273\320\276\320\266" + "\320\265\320\275\320\270\320\265 \320\270\321\201\320\277\320\276\320\273" + "\321\214\320\267\321\203\320\265\321\202 \321\201\320\260\320\274\320\276" + "\320\267\320\260\320\262\320\265\321\200\320\265\320\275\320\275\321\213" + "\320\271 \321\201\320\265\321\200\321\202\320\270\321\204\320\270\320\272" + "\320\260\321\202. \320\255\321\202\320\276 \320\276\320\267\320\275" + "\320\260\321\207\320\260\320\265\321\202, \321\207\321\202\320\276 " + "\320\270\320\274\321\217 \320\260\320\262\321\202\320\276\321\200\320\260 " + "\320\275\320\265 \320\274\320\276\320\266\320\265\321\202 \320\261\321\213" + "\321\202\321\214 \320\277\320\276\320\264\321\202\320\262\320\265\320\266" + "\320\264\320\265\320\275\320\276, \320\270 \320\262\321\213 \320\275" + "\320\265 \320\274\320\276\320\266\320\265\321\202\320\265 \320\267\320\275" + "\320\260\321\202\321\214, \320\272\321\202\320\276 \320\275\320\260" + "\320\277\320\270\321\201\320\260\320\273 \321\215\321\202\320\276 \320\277" + "\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270\320\265.\n" + "\n" + "\320\234\321\213 \321\200\320\265\320\272\320\276\320\274\320\265\320\275" + "\320\264\321\203\320\265\320\274 \320\262\320\260\320\274 \320\275\320\260" + "\320\266\320\260\321\202\321\214 \"\320\236\321\202\320\274\320\265" + "\320\275\320\260\" \320\270 \320\275\320\265 \320\267\320\260\320\277" + "\321\203\321\201\320\272\320\260\321\202\321\214 \321\215\321\202\320\276 " + "\320\277\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270" + "\320\265.", +}; + + +const char * +unknown_auth_cert_text[LI_COUNT] = { + "This Panda3D application has been signed, but we don't recognize " + "the authority that verifies the signature. This means the author's " + "name can't be verified, and you have no way of knowing " + "for sure who wrote it.\n" + "\n" + "We recommend you click Cancel to avoid running this application.", + + // nld + "Deze Panda3D applicatie is ondertekend, maar de certificaatautoriteit " + "die het certificaat heeft uitgegeven wordt niet herkend. Dit betekent " + "dat de auteursnaam niet te vertrouwen is, en het niet zeker is wie de " + "applicatie gemaakt heeft.\n" + "\n" + "Het is aanbevolen om op Annuleren te klikken om de applicatie af te " + "sluiten.", + + // deu + "Diese Panda3D-Anwendung wurde signiert, aber die " + "\303\234berpr\303\274fungsstelle wurde nicht anerkannt. Dies bedeutet, " + "dass weder der Name des Autors \303\274berpr\303\274ft werden kann, noch " + "dass garantiert werden kann, dass tats\303\244chlich die angegebene " + "Person diese Anwendung geschrieben hat.\n" + "\n" + "Wir empfehlen, dass Sie Abbrechen dr\303\274cken um diese Anwendung nicht " + "auszuf\303\274hren.", + + // spa + "Esta aplicaci\303\263n de Panda3D esta firmada, pero no reconocemos la " + "autoridad que la verifica. Esto significa que el nombre del autor no " + "puede ser verificado y no se puede conocer seguro quien la ha escrito.\n" + "\n" + "Se recomienda cancelar para evitar ejecutar esta aplicaci\303\263n.", + + // ita + "Questa applicazione Panda3D \303\250 stata firmata, ma non riconosciamo " + "l'autorit\303\240 che verifica la firma. Ci\303\262 significa che il " + "nome dell'autore non pu\303\262 essere verificato, e che non hai modo " + "di assicurarti circa chi la abbia scritta.\n" + "\n" + "Raccomandiamo di cliccare su Cancella per evitare di lanciare questa " + "applicazione.", + + // epo + "\304\210i tiu aplika\304\265o estas subskribita, sed ni ne rekonas " + "la a\305\255toritaton, kiu kontrolas la subskribon. Tio signifas ke la " + "nomo de la verkanto ne povas esti konfidata, kaj vi ne havas certan " + "scimanieron pri la vera verkanto de la aplika\304\265o.\n" + "\n" + "Ni rekomendas ke vi premas la butonon 'Nuligi' por eviti lan\304\211on " + "de \304\211i tiu aplika\304\265o.", + + // rus + "\320\243 \321\215\321\202\320\276\320\263\320\276 \320\277\321\200\320\270" + "\320\273\320\276\320\266\320\265\320\275\320\270\321\217 \320\265\321\201" + "\321\202\321\214 \320\277\320\276\320\264\320\277\320\270\321\201\321\214," + " \320\277\320\276 \320\272\320\276\321\202\320\276\321\200\320\276\320\271" + " \320\274\321\213 \320\275\320\265 \320\274\320\276\320\266\320\265" + "\320\274 \321\200\320\260\321\201\320\277\320\276\320\267\320\275\320\260" + "\321\202\321\214 \320\262\320\273\320\260\320\264\320\265\320\273\321\214" + "\321\206\320\260. \320\255\321\202\320\276 \320\276\320\267\320\275" + "\320\260\321\207\320\260\320\265\321\202, \321\207\321\202\320\276 " + "\320\270\320\274\321\217 \320\260\320\262\321\202\320\276\321\200\320\260 " + "\320\275\320\265 \320\274\320\276\320\266\320\265\321\202 \320\261\321\213" + "\321\202\321\214 \320\276\320\277\321\200\320\265\320\264\320\265\320\273" + "\320\265\320\275\320\276, \320\270 \320\275\320\265\320\262\320\276" + "\320\267\320\274\320\276\320\266\320\275\320\276 \321\202\320\276\321\207" + "\320\275\320\276 \321\203\320\267\320\275\320\260\321\202\321\214, " + "\320\272\321\202\320\276 \320\275\320\260\320\277\320\270\321\201\320\260" + "\320\273 \321\215\321\202\320\276 \320\277\321\200\320\270\320\273\320\276" + "\320\266\320\265\320\275\320\270\320\265.\n" + "\n" + "\320\234\321\213 \321\200\320\265\320\272\320\276\320\274\320\265\320\275" + "\320\264\321\203\320\265\320\274 \320\262\320\260\320\274 \320\275\320\260" + "\320\266\320\260\321\202\321\214 \"\320\236\321\202\320\274\320\265" + "\320\275\320\260\" \320\270 \320\275\320\265 \320\267\320\260\320\277" + "\321\203\321\201\320\272\320\260\321\202\321\214 \321\215\321\202\320\276 " + "\320\277\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270" + "\320\265.", +}; + + +const char * +verified_cert_text[LI_COUNT] = { + // eng + "This Panda3D application has been signed by %s. " + "If you trust %s, then click the Run button below " + "to run this application on your computer. This will also " + "automatically approve this and any other applications signed by " + "%s in the future.\n" + "\n" + "If you are unsure about this application, " + "you should click Cancel instead.", + + // nld + "Deze Panda3D applicatie is ondertekend door %s. " + "Als u %s vertrouwt, klik dan de onderstaande knop Uitvoeren om de applicatie " + "op uw computer uit te voeren. Dit zal ook deze en andere door %s getekende " + "applicaties in het vervolg toestaan.\n" + "\n" + "Als u niet zeker bent over deze applicatie is het aanbevolen om op " + "Annuleren te klikken.", + + // deu + "Diese Panda3D-Anwendung wurde von %s signiert. Falls Sie %s vertrauen, " + "dr\303\274cken Sie den Starten-Knopf, um diese Anwendung auszuf\303\274hren. " + "Zudem werden in der Zukunft diese und alle anderen von %s signierten " + "Anwendungen automatisch als vertrauensw\303\274rdig anerkannt.\n" + "\n" + "Falls Sie sich unsicher \303\274ber diese Anwendung sind, sollten Sie " + "Abbrechen dr\303\274cken.", + + // spa + "Esta aplicaci\303\263n de Panda3D ha sido firmada por %s. Si se considera %s" + "de confianza el bot\303\263n inferior ejecutar\303\241 la aplicaci\303\263n." + "Esto validara esta y cualquier otra applizacion firmada por %s en el futuro.\n" + "\n" + "Si se duda de la aplicaci\303\263nse recomienda cancelar." + + // ita + "Questa applicazione Panda3D \303\250 stata firmata da %s. Se %s \303\250 " + "un'entit\303\240 fidata, allora clicca il bottone Lancia sottostante per " + "lanciare questa applicazione sul tuo computer. Inoltre, ci\303\262 " + "approver\303\240 automaticamente questa e ogni altra applicazione " + "firmata da %s in futuro.\n" + "\n" + "Se non sei sicuro circa questa applicazione, dovresti invece cliccare " + "su Cancella.", + + // epo + "\304\210i tiu aplika\304\265o estas subskribita de %s. " + "Se %s estas fidinda la\305\255 vi, premu la butonon 'Lan\304\211i' sube por " + "lan\304\211i \304\211i tiun aplika\304\265on per via komputilo. Anka\305\255 tio a\305\255tomate estonece " + "aprobos \304\211i tiun kaj alian ajn aplika\304\265on, kiu estas subskribita de %s.\n" + "\n" + "Se vi ne estas certa pri \304\211i tiu aplika\304\265o, " + "vi anstata\305\255e povus premi la butonon 'Nuligi'.", + + // rus + "\320\255\321\202\320\276 \320\277\321\200\320\270\320\273\320\276\320\266" + "\320\265\320\275\320\270\320\265 \320\277\320\276\320\264\320\277\320\270" + "\321\201\320\260\320\275\320\276 %s. " + "\320\225\321\201\320\273\320\270 \320\262\321\213 \320\264\320\276\320\262" + "\320\265\321\200\321\217\320\265\321\202\320\265 %s, \320\275\320\260" + "\320\266\320\274\320\270\321\202\320\265 \320\272\320\275\320\276\320\277" + "\320\272\321\203 \"\320\227\320\260\320\277\321\203\321\201\321\202" + "\320\270\321\202\321\214\" \320\262\320\275\320\270\320\267\321\203, " + "\321\207\321\202\320\276\320\261\321\213 \320\267\320\260\320\277\321\203" + "\321\201\321\202\320\270\321\202\321\214 \321\215\321\202\320\276 \320\277" + "\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270\320\265 " + "\320\275\320\260 \320\262\320\260\321\210\320\265\320\274 \320\272\320\276" + "\320\274\320\277\321\214\321\216\321\202\320\265\321\200\320\265. \320\255" + "\321\202\320\276 \321\202\320\260\320\272\320\266\320\265 \320\260\320\262" + "\321\202\320\276\320\274\320\260\321\202\320\270\321\207\320\265\321\201" + "\320\272\320\270 \320\277\320\276\320\264\321\202\320\262\320\265\321\200" + "\320\264\320\270\321\202 \321\215\321\202\320\276 \320\270 \320\264" + "\321\200\321\203\320\263\320\270\320\265 \320\277\321\200\320\270\320\273" + "\320\276\320\266\320\265\320\275\320\270\321\217, \320\275\320\260\320\277" + "\320\270\321\201\320\260\320\275\320\275\321\213\320\265 %s \320\262 " + "\320\261\321\203\320\264\321\203\321\211\320\265\320\274.\n" + "\n" + "\320\225\321\201\320\273\320\270 \320\262\321\213 \320\275\320\265 " + "\321\203\320\262\320\265\321\200\320\265\320\275\321\213 \320\262 \321\215" + "\321\202\320\276\320\274 \320\277\321\200\320\270\320\273\320\276\320\266" + "\320\265\320\275\320\270\320\270, \320\275\320\260\320\266\320\274\320\270" + "\321\202\320\265 \320\272\320\275\320\276\320\277\320\272\321\203 \"" + "\320\236\321\202\320\274\320\265\320\275\320\260\".", +}; + + +const char * +expired_cert_text[LI_COUNT] = { + // eng + "This Panda3D application has been signed by %s, " + "but the certificate has expired.\n" + "\n" + "You should check the current date set on your computer's clock " + "to make sure it is correct.\n" + "\n" + "If your computer's date is correct, we recommend " + "you click Cancel to avoid running this application.", + + // nld + "Deze Panda3D applicatie is ondertekend door %s, maar de geldigheidsdatum " + "van het certificaat is verstreken.\n" + "\n" + "Controleer de datum op uw computerklok om te zorgen dat deze juist is " + "ingesteld.\n" + "\n" + "Als de datum op uw computer juist is, is het aanbevolen om op Annuleren te " + "klikken om de applicatie af te sluiten.", + + // deu + "Diese Anwendung wurde von %s signiert, aber das Zertifikat ist abgelaufen.\n" + "\n" + "Sie sollten die aktuelle Uhrzeit auf Ihrem Computer " + "\303\274berpr\303\274fen, um sicherzugehen, dass sie korrekt ist.\n" + "\n" + "Falls die Uhrzeit auf Ihrem Computer korrekt ist, empfehlen wir Ihnen " + "Abbrechen zu dr\303\274cken.", + + // spa + "Esta aplicaci\303\263n Panda3D ha sido firmada por %s pero el certificado ha" + "caducado.\n" + "\n" + "Se recomienda comprobar la fecha del reloj.\n" + "\n" + "Si la fecha del reloj es correcta se recomienda cancelar.", + + // ita + "Questa applicazione Panda3D \303\250 stata firmata da %s, ma il " + "certificato \303\250 scaduto.\n" + "\n" + "Dovresti controllare la data attuale impostata nell'orologio del tuo " + "computer per assicurarti che sia corretta.\n" + "\n" + "Se la data del tuo computer \303\250 corretta, raccomandiamo di cliccare " + "Cancella per evitare di lanciare questa applicazione." + + // epo + "\304\210i tiu aplika\304\265o de Panda3D estas subskribita de %s, " + "sed la atesto eksvalidi\304\235is.\n" + "\n" + "Vi povus kontroli la aktualan daton, kiu estas agordata sur la horlo\304\235o de " + "via komputilo por certigi ke \304\235i estas korekta.\n" + "\n" + "Se la dato de via komputilo estas korekta, ni rekomendas ke vi premas la " + "butonon 'Nuligi' por eviti lan\304\211on de \304\211i tiu aplika\304\265o.", + + // rus + "\320\255\321\202\320\276 \320\277\321\200\320\270\320\273\320\276\320\266" + "\320\265\320\275\320\270\320\265 \320\277\320\276\320\264\320\277\320\270" + "\321\201\320\260\320\275\320\276 %s, \320\276\320\264\320\275\320\260" + "\320\272\320\276 \321\201\321\200\320\276\320\272 \320\264\320\265\320\271" + "\321\201\321\202\320\262\320\270\321\217 \321\201\320\265\321\200\321\202" + "\320\270\321\204\320\270\320\272\320\260\321\202\320\260 \320\270\321\201" + "\321\202\321\221\320\272.\n" + "\n" + "\320\237\321\200\320\276\320\262\320\265\321\200\321\214\321\202\320\265, " + "\320\277\320\276\320\266\320\260\320\273\321\203\320\271\321\201\321\202" + "\320\260, \320\264\320\260\321\202\321\203 \320\275\320\260 \320\262" + "\320\260\321\210\320\265\320\274 \320\272\320\276\320\274\320\277\321\214" + "\321\216\321\202\320\265\321\200\320\265.\n" + "\n" + "\320\225\321\201\320\273\320\270 \320\275\320\260 \320\262\320\260\321\210" + "\320\265\320\274 \320\272\320\276\320\274\320\277\321\214\321\216\321\202" + "\320\265\321\200\320\265 \321\203\321\201\321\202\320\260\320\275\320\276" + "\320\262\320\273\320\265\320\275\320\276 \320\277\321\200\320\260\320\262" + "\320\270\320\273\321\214\320\275\320\276\320\265 \320\262\321\200\320\265" + "\320\274\321\217, \320\274\321\213 \321\200\320\265\320\272\320\276" + "\320\274\320\265\320\275\320\264\321\203\320\265\320\274 \320\262\320\260" + "\320\274 \320\275\320\260\320\266\320\260\321\202\321\214 \320\272\320\275" + "\320\276\320\277\320\272\321\203 \"\320\236\321\202\320\274\320\265" + "\320\275\320\260\" \320\270 \320\275\320\265 \320\267\320\260\320\277" + "\321\203\321\201\320\272\320\260\321\202\321\214 \321\215\321\202\320\276 " + "\320\277\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270" + "\320\265.", +}; + + +const char * +generic_error_cert_text[LI_COUNT] = { + // eng + "This Panda3D application has been signed, but there is a problem " + "with the certificate (OpenSSL error code %d).\n" + "\n" + "We recommend you click Cancel to avoid running this application.", + + // nld + "Deze Panda3D applicatie is ondertekend, maar er is een probleem " + "met het certificaat opgetreden (OpenSSL foutcode %d).\n" + "\n" + "Het is aanbevolen om op Annuleren te klikken om de applicatie af te " + "sluiten.", + + // deu + "Diese Panda3D-Anwendung wurde signiert, aber es gibt ein Problem mit " + "dem Zertifikat (OpenSSL Fehlercode %d).\n" + "\n" + "Wir empfehlen, dass Sie Abbrechen dr\303\274cken um diese Anwendung nicht " + "auszuf\303\274hren.", + + // spa + "Esta aplicaci\303\263n de Panda3D esta firmada pero hay un problema con el " + "certificado (Error de OpenSSL %d).\n" + "\n" + "Se recomienda cancelar para evitar ejecutar esta aplicaci\303\263n.", + + // ita + "Questa applicazione Panda3D \303\250 stata firmata, ma c'\303\250 un " + "problema col certificato (codice di errore OpenSSL %s).\n" + "\n" + "Raccomandiamo di cliccare su Cancella per evitare di lanciare questa " + "applicazione.", + + // epo + "\304\210i tiu aplika\304\265o de Panda3D estas subskribita, sed la " + "atesto havas problemon (OpenSSL erarkodo %d).\n" + "\n" + "Ni rekomendas ke vi premas la butonon 'Nuligi' por eviti lan\304\211on " + "de \304\211i tiu aplika\304\265o.", + + // rus + "\320\243 \321\215\321\202\320\276\320\263\320\276 \320\277\321\200\320\270" + "\320\273\320\276\320\266\320\265\320\275\320\270\321\217 \320\265\321\201" + "\321\202\321\214 \320\277\320\276\320\264\320\277\320\270\321\201\321\214," + " \320\275\320\276 \320\262\320\276\320\267\320\275\320\270\320\272\320\273" + "\320\260 \320\277\321\200\320\276\320\261\320\273\320\265\320\274\320\260 " + "\321\201 \321\201\320\265\321\200\321\202\320\270\321\204\320\270\320\272" + "\320\260\321\202\320\276\320\274 (\320\232\320\276\320\264 \320\276" + "\321\210\320\270\320\261\320\272\320\270 OpenSSL %d).\n" + "\n" + "\320\234\321\213 \321\200\320\265\320\272\320\276\320\274\320\265\320\275" + "\320\264\321\203\320\265\320\274 \320\262\320\260\320\274 \320\275\320\260" + "\320\266\320\260\321\202\321\214 \"\320\236\321\202\320\274\320\265" + "\320\275\320\260\" \320\270 \320\275\320\265 \320\267\320\260\320\277" + "\321\203\321\201\320\272\320\260\321\202\321\214 \321\215\321\202\320\276 " + "\320\277\321\200\320\270\320\273\320\276\320\266\320\265\320\275\320\270" + "\320\265.", +}; + + +const char * +no_cert_text[LI_COUNT] = { + "This Panda3D application has not been signed. This means you have " + "no way of knowing for sure who wrote it.\n" + "\n" + "Click Cancel to avoid running this application.", + + // nld + "Deze Panda3D applicatie is niet ondertekend. Dit betekent dat het niet " + "mogelijk is om de auteur te verifi\303\253ren.\n" + "\n" + "Klik op Annuleren om de applicatie af te sluiten.", + + // deu + "Diese Panda3D-Anwendung wurde nicht signiert. Es gibt keine " + "M\303\266glichkeit festzustellen, wer diese entwickelt hat.\n" + "\n" + "Dr\303\274cken Sie Abbrechen, um diese Anwendung nicht auszuf\303\274hren.", + + // spa + "Esta aplicaci\303\263n de Panda3D no esta firmada, no hay forma de conocer " + "quien la ha escrito.\n" + "\n" + "Cancelar para evitar ejecutar la aplicaci\303\263n.", + + // ita + "Questa applicazione Panda3D non \303\250 stata firmata. Ci\303\262 " + "significa che non hai modo di assicurarti circa chi la abbia scritta.\n" + "\n" + "Clicca Cancella per evitare di lanciare questa applicazione.", + + // epo + "\304\210i tiu aplika\304\265o de Panda3D ne estas subskribita. Tio " + "signifas ke vi ne havas certan scimanieron pri la vera verkanto de " + "la aplika\304\265o.\n" + "\n" + "Premu la butonon 'Nuligi' por eviti lan\304\211on de \304\211i tiu " + "aplika\304\265o.", + + // rus + "\320\243 \321\215\321\202\320\276\320\263\320\276 \320\277\321\200\320\270" + "\320\273\320\276\320\266\320\265\320\275\320\270\321\217 \320\275\320\265" + "\321\202 \320\277\320\276\320\264\320\277\320\270\321\201\320\270. " + "\320\255\321\202\320\276 \320\276\320\267\320\275\320\260\321\207\320\260" + "\320\265\321\202, \321\207\321\202\320\276 \320\262\321\213 \320\275" + "\320\265 \320\274\320\276\320\266\320\265\321\202\320\265 \320\267\320\275" + "\320\260\321\202\321\214, \320\272\321\202\320\276 \320\265\320\263" + "\320\276 \320\275\320\260\320\277\320\270\321\201\320\260\320\273.\n" + "\n" + "\320\235\320\260\320\266\320\274\320\270\321\202\320\265 \"\320\236" + "\321\202\320\274\320\265\320\275\320\260\", \321\207\321\202\320\276" + "\320\261\321\213 \320\275\320\265 \320\267\320\260\320\277\321\203\321\201" + "\320\272\320\260\321\202\321\214 \320\277\321\200\320\270\320\273\320\276" + "\320\266\320\265\320\275\320\270\320\265.", +}; diff --git a/direct/src/plugin/p3dCert_strings.h b/direct/src/plugin/p3dCert_strings.h new file mode 100644 index 0000000000..064a04360e --- /dev/null +++ b/direct/src/plugin/p3dCert_strings.h @@ -0,0 +1,45 @@ +// Filename: p3dCert_strings.h +// Created by: rdb (25Mar15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +enum LanguageIndex { + LI_en, // English + LI_nl, // Dutch + LI_de, // German + LI_es, // Spanish + LI_it, // Italian + LI_eo, // Esperanto + LI_ru, // Russian + LI_COUNT, + + LI_default = LI_en +}; + +extern const char *language_codes[LI_COUNT]; +extern const unsigned char language_ids[LI_COUNT]; + +extern const char *run_title[LI_COUNT]; +extern const char *cancel_title[LI_COUNT]; +extern const char *show_cert_title[LI_COUNT]; + +extern const char *new_application_title[LI_COUNT]; +extern const char *no_cert_title[LI_COUNT]; +extern const char *unverified_cert_title[LI_COUNT]; +extern const char *expired_cert_title[LI_COUNT]; + +extern const char *self_signed_cert_text[LI_COUNT]; +extern const char *unknown_auth_cert_text[LI_COUNT]; +extern const char *verified_cert_text[LI_COUNT]; +extern const char *expired_cert_text[LI_COUNT]; +extern const char *generic_error_cert_text[LI_COUNT]; +extern const char *no_cert_text[LI_COUNT]; diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 27361a8d85..0c2f13e4a8 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -891,11 +891,13 @@ start_p3dpython(P3DInstance *inst) { // These are the enviroment variables we forward from the current // environment, if they are set. const char *keep[] = { - "HOME", "USER", + "HOME", "USER", #ifdef _WIN32 "SYSTEMROOT", "USERPROFILE", "COMSPEC", "SYSTEMDRIVE", "ALLUSERSPROFILE", "APPDATA", "COMMONPROGRAMFILES", "PROGRAMFILES", "WINDIR", "PROGRAMDATA", "USERDOMAIN", +#else + "LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG", #endif #ifdef HAVE_X11 "DISPLAY", "XAUTHORITY", diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 64c624100d..6e3f367be3 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -4915,9 +4915,11 @@ if (RTDIST or RUNTIME): if (PkgSkip("FLTK")==0): OPTS.append("FLTK") TargetAdd('plugin_p3dCert.obj', opts=OPTS, input='p3dCert.cxx') + TargetAdd('plugin_p3dCert_strings.obj', opts=OPTS, input='p3dCert_strings.cxx') TargetAdd('p3dcert.exe', input='plugin_mkdir_complete.obj') TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj') TargetAdd('p3dcert.exe', input='plugin_p3dCert.obj') + TargetAdd('p3dcert.exe', input='plugin_p3dCert_strings.obj') OPTS=['OPENSSL', 'FLTK', 'X11', 'WINCOMCTL', 'WINSOCK', 'WINGDI', 'WINUSER', 'ADVAPI', 'WINOLE', 'WINSHELL', 'SUBSYSTEM:WINDOWS'] if GetTarget() == 'darwin': OPTS += ['OPT:2'] From 58963a167c04cf62e394963e739ce9e02aeaec62 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 11 Sep 2015 15:43:22 +0200 Subject: [PATCH 121/200] Implement user preferred language detection on Mac --- direct/src/plugin/p3dCert.cxx | 46 ++++++++++++++++++++++++++- direct/src/plugin/p3dCert_strings.cxx | 7 ++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/direct/src/plugin/p3dCert.cxx b/direct/src/plugin/p3dCert.cxx index 8d78ff7485..6fa6c7d3e6 100644 --- a/direct/src/plugin/p3dCert.cxx +++ b/direct/src/plugin/p3dCert.cxx @@ -42,8 +42,51 @@ #define snprintf sprintf_s #endif +#ifdef __APPLE__ +#include +#endif + static LanguageIndex li = LI_default; +#ifdef __APPLE__ +static LanguageIndex detect_language() { + // Get and iterate through the list of preferred languages. + CFArrayRef langs = CFLocaleCopyPreferredLanguages(); + CFIndex num_langs = CFArrayGetCount(langs); + + for (long i = 0; i < num_langs; ++i) { + CFStringRef lang = (CFStringRef)CFArrayGetValueAtIndex(langs, i); + + CFIndex length = CFStringGetLength(lang); + if (length < 2) { + continue; + } + + CFIndex max_size = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1; + char *buffer = (char *)alloca(max_size); + if (!CFStringGetCString(lang, buffer, max_size, kCFStringEncodingUTF8)) { + continue; + } + + if (isalnum(buffer[2])) { + // It's not a two-letter code. + continue; + } + + // See if we support this language. + for (int j = 0; j < LI_COUNT; ++j) { + const char *lang_code = language_codes[j]; + if (lang_code != NULL && strncasecmp(buffer, lang_code, 2) == 0) { + CFRelease(langs); + return (LanguageIndex)j; + } + } + } + + CFRelease(langs); + return LI_default; +} +#else static LanguageIndex detect_language() { // First consult the LANGUAGE variable, which is a GNU extension that can // contain multiple languages in order of preference. @@ -94,6 +137,7 @@ static LanguageIndex detect_language() { } return LI_default; } +#endif #ifdef _WIN32 int WINAPI @@ -153,7 +197,7 @@ AuthDialog(const wstring &cert_filename, const wstring &cert_dir) : AuthDialog:: AuthDialog(const string &cert_filename, const string &cert_dir) : #endif - Fl_Window(435, 242, "New Panda3D Application"), + Fl_Window(435, 242, new_application_title[li]), _cert_dir(cert_dir) { _view_cert_dialog = NULL; diff --git a/direct/src/plugin/p3dCert_strings.cxx b/direct/src/plugin/p3dCert_strings.cxx index e33f2adba9..1f111cd645 100644 --- a/direct/src/plugin/p3dCert_strings.cxx +++ b/direct/src/plugin/p3dCert_strings.cxx @@ -323,8 +323,9 @@ verified_cert_text[LI_COUNT] = { // epo "\304\210i tiu aplika\304\265o estas subskribita de %s. " "Se %s estas fidinda la\305\255 vi, premu la butonon 'Lan\304\211i' sube por " - "lan\304\211i \304\211i tiun aplika\304\265on per via komputilo. Anka\305\255 tio a\305\255tomate estonece " - "aprobos \304\211i tiun kaj alian ajn aplika\304\265on, kiu estas subskribita de %s.\n" + "lan\304\211i \304\211i tiun aplika\304\265on per via komputilo. Anka\305\255 " + "tio a\305\255tomate estonece aprobos \304\211i tiun kaj alian ajn " + "aplika\304\265on, kiu estas subskribita de %s.\n" "\n" "Se vi ne estas certa pri \304\211i tiu aplika\304\265o, " "vi anstata\305\255e povus premi la butonon 'Nuligi'.", @@ -546,7 +547,7 @@ no_cert_text[LI_COUNT] = { // epo "\304\210i tiu aplika\304\265o de Panda3D ne estas subskribita. Tio " - "signifas ke vi ne havas certan scimanieron pri la vera verkanto de " + "signifas ke vi ne havas certan scimanieron pri la vera verkanto de " "la aplika\304\265o.\n" "\n" "Premu la butonon 'Nuligi' por eviti lan\304\211on de \304\211i tiu " From c9a45f288c4ae4f760e420780e86d31469b21ea3 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 11 Sep 2015 17:32:49 +0200 Subject: [PATCH 122/200] Proper display language detection on Windows --- direct/src/plugin/p3dCert.cxx | 56 ++++++++++++++++++++++++++- direct/src/plugin/p3dCert_strings.cxx | 2 +- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/direct/src/plugin/p3dCert.cxx b/direct/src/plugin/p3dCert.cxx index 6fa6c7d3e6..0d84e1058e 100644 --- a/direct/src/plugin/p3dCert.cxx +++ b/direct/src/plugin/p3dCert.cxx @@ -38,6 +38,7 @@ #define WIN32_LEAN_AND_MEAN #include #include +#include #define snprintf sprintf_s #endif @@ -48,7 +49,51 @@ static LanguageIndex li = LI_default; -#ifdef __APPLE__ +#if defined(_WIN32) +static LanguageIndex detect_language() { + // This function was introduced in Windows Vista; it may not be available + // on older systems. + typedef BOOL (*GUPL)(DWORD, PULONG, PZZWSTR, PULONG); + GUPL pGetUserPreferredUILanguages = (GUPL)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), + TEXT("GetUserPreferredUILanguages")); + if (pGetUserPreferredUILanguages != NULL) { + ULONG num_langs = 0; + ULONG buffer_size = 0; + pGetUserPreferredUILanguages(8, &num_langs, NULL, &buffer_size); + PZZWSTR buffer = (PZZWSTR)_alloca(buffer_size); + if (pGetUserPreferredUILanguages(8, &num_langs, buffer, &buffer_size)) { + for (ULONG i = 0; i < num_langs; ++i) { + size_t len = wcslen(buffer); + if (len >= 2 && (buffer[2] == 0 || buffer[2] == L'-')) { + // It may be a two-letter code; match it in our list. + for (int j = 0; j < LI_COUNT; ++j) { + const char *lang_code = language_codes[j]; + if (lang_code != NULL && lang_code[0] == buffer[0] && + lang_code[1] == buffer[1]) { + return (LanguageIndex)j; + } + } + } + buffer += len + 1; + } + } + } + + // Fall back to the old Windows XP function. + LANGID lang = GetUserDefaultUILanguage() & 0x3ff; + if (lang == 0) { + return LI_default; + } + + for (int i = 0; i < LI_COUNT; ++i) { + if (language_ids[i] != 0 && language_ids[i] == lang) { + return (LanguageIndex)i; + } + } + return LI_default; +} + +#elif defined(__APPLE__) static LanguageIndex detect_language() { // Get and iterate through the list of preferred languages. CFArrayRef langs = CFLocaleCopyPreferredLanguages(); @@ -86,6 +131,7 @@ static LanguageIndex detect_language() { CFRelease(langs); return LI_default; } + #else static LanguageIndex detect_language() { // First consult the LANGUAGE variable, which is a GNU extension that can @@ -364,12 +410,20 @@ read_cert_file(const string &cert_filename) { #endif // _WIN32 if (fp == NULL) { +#ifdef _WIN32 + wcerr << L"Couldn't read " << cert_filename.c_str() << L"\n"; +#else cerr << "Couldn't read " << cert_filename.c_str() << "\n"; +#endif return; } _cert = PEM_read_X509(fp, NULL, NULL, (void *)""); if (_cert == NULL) { +#ifdef _WIN32 + wcerr << L"Could not read certificate in " << cert_filename.c_str() << L".\n"; +#else cerr << "Could not read certificate in " << cert_filename.c_str() << ".\n"; +#endif fclose(fp); return; } diff --git a/direct/src/plugin/p3dCert_strings.cxx b/direct/src/plugin/p3dCert_strings.cxx index 1f111cd645..bd191768e0 100644 --- a/direct/src/plugin/p3dCert_strings.cxx +++ b/direct/src/plugin/p3dCert_strings.cxx @@ -27,7 +27,7 @@ const char *language_codes[LI_COUNT] = // https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693%28v=vs.85%29.aspx const unsigned char language_ids[LI_COUNT] = - {0x09, 0x13, 0x07, 0x0A, 0x10, 0, 0x19}; + {0x09, 0x13, 0x07, 0x0A, 0x10, 0x8F, 0x19}; const char * run_title[LI_COUNT] = { From bed4fdd5af90fb50a39d6918cca656024e39bbca Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 11 Sep 2015 19:13:30 +0200 Subject: [PATCH 123/200] Fix issue that caused pdeploy to spit out broken win32 installer alongside win_i386 installer --- direct/src/p3d/DeploymentTools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/direct/src/p3d/DeploymentTools.py b/direct/src/p3d/DeploymentTools.py index 78b2378eda..e55edc1d76 100644 --- a/direct/src/p3d/DeploymentTools.py +++ b/direct/src/p3d/DeploymentTools.py @@ -99,6 +99,9 @@ class Standalone: if len(platforms) == 0: Standalone.notify.warning("No platforms found to build for!") + if 'win32' in platforms and 'win_i386' in platforms: + platforms.remove('win32') + outputDir = Filename(outputDir + "/") outputDir.makeDir() for platform in platforms: @@ -669,6 +672,9 @@ class Installer: if len(platforms) == 0: Installer.notify.warning("No platforms found to build for!") + if 'win32' in platforms and 'win_i386' in platforms: + platforms.remove('win32') + outputDir = Filename(outputDir + "/") outputDir.makeDir() for platform in platforms: From 6fce996cebd50c386c8949e557ce8ab7e3c6cf01 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 15 Sep 2015 17:15:12 +0200 Subject: [PATCH 124/200] Add 'ast' module to morepy package --- direct/src/p3d/panda3d.pdef | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/p3d/panda3d.pdef b/direct/src/p3d/panda3d.pdef index 87a42eff2b..beac7049b5 100644 --- a/direct/src/p3d/panda3d.pdef +++ b/direct/src/p3d/panda3d.pdef @@ -195,7 +195,7 @@ class morepy(package): 'termios', 'tty', 'pty', 'fcntl', 'pipes', 'posixfile', 'resource', 'nis', 'syslog', 'commands', 'ic', 'MacOS', 'macostools', 'findertools', 'EasyDialogs', 'FrameWork', - 'autoGIL', 'ColorPicker') + 'autoGIL', 'ColorPicker', 'ast') # To add the multitude of standard Python string encodings. module('encodings', 'encodings.*') From 5736e7a4b07fc4ef2f3719f42b4807356c67f011 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 18 Sep 2015 21:19:09 +0200 Subject: [PATCH 125/200] Fix crash when passing None to Filename constructor --- dtool/src/dtoolutil/filename.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index 650f7d84a6..f01d03483e 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -60,10 +60,11 @@ public: F_pattern = 0x40, }; + INLINE Filename(const char *filename); + PUBLISHED: INLINE Filename(const string &filename = ""); INLINE Filename(const wstring &filename); - INLINE Filename(const char *filename); INLINE Filename(const Filename ©); Filename(const Filename &dirname, const Filename &basename); INLINE ~Filename(); From 445c3461d66745b8c7fbb18f1888ff2b5c777237 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 18 Sep 2015 21:20:25 +0200 Subject: [PATCH 126/200] Python 3 support to rtdist, reimplement VFS open() on top of io.IOBase, allow freezing into .c target, make VFSImporter and friends frozen into p3dpython --- direct/src/p3d/AppRunner.py | 30 +- direct/src/p3d/HostInfo.py | 23 +- direct/src/p3d/PackageInfo.py | 4 +- direct/src/p3d/Packager.py | 65 ++-- direct/src/p3d/packp3d.py | 4 +- direct/src/p3d/panda3d.pdef | 2 +- direct/src/plugin/p3dPythonRun.cxx | 62 ++- direct/src/showbase/VFSImporter.py | 56 ++- direct/src/showutil/FreezeTool.py | 141 ++++--- direct/src/showutil/pfreeze.py | 49 ++- direct/src/stdpy/file.py | 362 ++++++++---------- dtool/src/prc/streamReader.cxx | 41 +- dtool/src/prc/streamReader.h | 8 +- makepanda/makepanda.py | 42 +- panda/src/express/p3express_ext_composite.cxx | 1 + panda/src/express/ramfile.h | 13 +- panda/src/express/ramfile_ext.cxx | 57 +++ panda/src/express/ramfile_ext.h | 6 +- panda/src/express/streamReader_ext.cxx | 68 +++- panda/src/express/streamReader_ext.h | 3 + panda/src/express/virtualFile.h | 7 +- panda/src/express/virtualFile_ext.cxx | 83 ++++ panda/src/express/virtualFile_ext.h | 42 ++ 23 files changed, 725 insertions(+), 444 deletions(-) create mode 100644 panda/src/express/virtualFile_ext.cxx create mode 100644 panda/src/express/virtualFile_ext.h diff --git a/direct/src/p3d/AppRunner.py b/direct/src/p3d/AppRunner.py index 64bc774d9c..68443e4601 100644 --- a/direct/src/p3d/AppRunner.py +++ b/direct/src/p3d/AppRunner.py @@ -13,22 +13,9 @@ __all__ = ["AppRunner", "dummyAppRunner", "ArgumentError"] import sys import os -import __builtin__ - -if 'VFSImporter' in sys.modules: - # If we've already got a VFSImporter module defined at the - # toplevel, we must have come in here by way of the - # p3dPythonRun.cxx program, which starts out by importing a frozen - # VFSImporter. Let's make sure we don't have two VFSImporter - # modules. - import VFSImporter - import direct.showbase - direct.showbase.VFSImporter = VFSImporter - sys.modules['direct.showbase.VFSImporter'] = VFSImporter -else: - # Otherwise, we can import the VFSImporter normally. - from direct.showbase import VFSImporter +import __builtin__ as builtins +from direct.showbase import VFSImporter from direct.showbase.DirectObject import DirectObject from panda3d.core import VirtualFileSystem, Filename, Multifile, loadPrcFileData, unloadPrcFile, getModelPath, WindowProperties, ExecutionEnvironment, PandaSystem, Notify, StreamWriter, ConfigVariableString, ConfigPageManager from panda3d.direct import init_app_for_gui @@ -570,14 +557,14 @@ class AppRunner(DirectObject): for packageData in hostData.packages: totalSize += packageData.totalSize self.notify.info("Total Panda3D disk space used: %s MB" % ( - (totalSize + 524288) / 1048576)) + (totalSize + 524288) // 1048576)) if self.verifyContents == self.P3DVCNever: # We're not allowed to delete anything anyway. return self.notify.info("Configured max usage is: %s MB" % ( - (self.maxDiskUsage + 524288) / 1048576)) + (self.maxDiskUsage + 524288) // 1048576)) if totalSize <= self.maxDiskUsage: # Still within budget; no need to clean up anything. return @@ -638,7 +625,7 @@ class AppRunner(DirectObject): except SystemExit as err: # Presumably the window has already been shut down here, but shut # it down again for good measure. - if hasattr(__builtin__, "base"): + if hasattr(builtins, "base"): base.destroy() self.notify.info("Normal exit with status %s." % repr(err.code)) @@ -697,9 +684,10 @@ class AppRunner(DirectObject): # Replace the builtin open and file symbols so user code will get # our versions by default, which can open and read files out of # the multifile. - __builtin__.file = file.file - __builtin__.open = file.open - __builtin__.execfile = file.execfile + builtins.open = file.open + if sys.version_info < (3, 0): + builtins.file = file.open + builtins.execfile = file.execfile os.listdir = file.listdir os.walk = file.walk os.path.join = file.join diff --git a/direct/src/p3d/HostInfo.py b/direct/src/p3d/HostInfo.py index 82fa5001cd..da5d9723c4 100644 --- a/direct/src/p3d/HostInfo.py +++ b/direct/src/p3d/HostInfo.py @@ -161,14 +161,14 @@ class HostInfo: self.notify.info("Downloading contents file %s" % (request)) statusCode = None statusString = '' - for attempt in range(ConfigVariableInt('contents-xml-dl-attempts', 3)): + for attempt in range(int(ConfigVariableInt('contents-xml-dl-attempts', 3))): if attempt > 0: self.notify.info("Retrying (%s)..."%(attempt,)) rf = Ramfile() channel = http.makeChannel(False) channel.getDocument(request) if channel.downloadToRam(rf): - self.notify.warning("Successfully downloaded %s" % (url,)) + self.notify.info("Successfully downloaded %s" % (url,)) break else: rf = None @@ -369,7 +369,7 @@ class HostInfo: assert self.hostDir self.__findHostXmlForHostDir(xcontents) - if not self.hostDir: + if self.rootDir and not self.hostDir: self.hostDir = self.__determineHostDir(None, self.hostUrl) # Get the list of packages available for download and/or import. @@ -403,7 +403,7 @@ class HostInfo: self.hasContentsFile = True # Now save the contents.xml file into the standard location. - if not self.appRunner or self.appRunner.verifyContents != self.appRunner.P3DVCNever: + if self.appRunner and self.appRunner.verifyContents != self.appRunner.P3DVCNever: assert self.hostDir filename = Filename(self.hostDir, 'contents.xml') filename.makeDir() @@ -476,7 +476,7 @@ class HostInfo: self.descriptiveName = descriptiveName hostDirBasename = xhost.Attribute('host_dir') - if not self.hostDir: + if self.rootDir and not self.hostDir: self.hostDir = self.__determineHostDir(hostDirBasename, self.hostUrl) # Get the "download" URL, which is the source from which we @@ -514,8 +514,9 @@ class HostInfo: if not platform: # Ensure that we're on the same page with non-specified - # platforms. We always use None, not empty string. - platform = None + # platforms. We have to use the empty string, not None, + # since Python 3 can't sort lists with both strings and None. + platform = "" platforms = self.packages.setdefault((name, version), {}) package = platforms.get(platform, None) @@ -581,14 +582,12 @@ class HostInfo: result = [] - items = self.packages.items() - items.sort() + items = sorted(self.packages.items()) for key, platforms in items: if self.perPlatform or includeAllPlatforms: # If we maintain a different answer per platform, # return all of them. - pitems = platforms.items() - pitems.sort() + pitems = sorted(platforms.items()) for pkey, package in pitems: result.append(package) else: @@ -701,7 +700,7 @@ class HostInfo: # If we successfully got a hostname, we don't really need the # full hash. We'll keep half of it. - keepHash = keepHash / 2; + keepHash = keepHash // 2 md = HashVal() md.hashString(hostUrl) diff --git a/direct/src/p3d/PackageInfo.py b/direct/src/p3d/PackageInfo.py index cceb2164c6..b48392dd28 100644 --- a/direct/src/p3d/PackageInfo.py +++ b/direct/src/p3d/PackageInfo.py @@ -277,7 +277,7 @@ class PackageInfo: # We've already got one. yield self.stepComplete; return - if self.host.appRunner and self.host.appRunner.verifyContents != self.host.appRunner.P3DVCNever: + if not self.host.appRunner or self.host.appRunner.verifyContents != self.host.appRunner.P3DVCNever: # We're allowed to download it. self.http = http @@ -1151,7 +1151,7 @@ class PackageInfo: thisDir = ScanDirectoryNode(self.getPackageDir(), ignoreUsageXml = True) diskSpace = thisDir.getTotalSize() self.notify.info("Package %s uses %s MB" % ( - self.packageName, (diskSpace + 524288) / 1048576)) + self.packageName, (diskSpace + 524288) // 1048576)) return diskSpace def markUsed(self): diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 4d65d80937..791bad6b8e 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -186,7 +186,7 @@ class Packager: def getKey(self): """ Returns a tuple used for sorting the PackageEntry objects uniquely per package. """ - return (self.packageName, self.platform, self.version) + return (self.packageName, self.platform or "", self.version or "") def fromFile(self, packageName, platform, version, solo, perPlatform, installDir, descFilename, importDescFilename): @@ -300,8 +300,7 @@ class Packager: xhost.InsertEndChild(xmirror) if packager: - altHosts = self.altHosts.items() - altHosts.sort() + altHosts = sorted(self.altHosts.items()) for keyword, alt in altHosts: he = packager.hosts.get(alt, None) if he: @@ -393,8 +392,7 @@ class Packager: raise PackagerError, message if self.ignoredDirFiles: - exts = list(self.ignoredDirFiles.keys()) - exts.sort() + exts = sorted(self.ignoredDirFiles.keys()) total = sum([x for x in self.ignoredDirFiles.values()]) self.notify.warning("excluded %s files not marked for inclusion: %s" \ % (total, ", ".join(["'" + ext + "'" for ext in exts]))) @@ -590,8 +588,7 @@ class Packager: # Add known module names. self.moduleNames = {} - modules = self.freezer.modules.items() - modules.sort() + modules = sorted(self.freezer.modules.items()) for newName, mdef in modules: if mdef.guess: # Not really a module. @@ -2766,11 +2763,15 @@ class Packager: # errors, and that the pdef file doesn't contain any really # crazy Python code, all this will do is fill in the # '__statements' list in the module scope. + fn = packageDef.toOsSpecific() + f = open(fn) + code = compile(f.read(), fn, 'exec') + f.close() # It appears that having a separate globals and locals # dictionary causes problems with resolving symbols within a # class scope. So, we just use one dictionary, the globals. - execfile(packageDef.toOsSpecific(), globals) + exec(code, globals) packages = [] @@ -3351,42 +3352,27 @@ class Packager: producing their own custom panda3d for download. Should be called before any other Python modules are named. """ - # First, freeze just VFSImporter.py into its own - # _vfsimporter.pyd file. This one is a special case, because - # we need this code in order to load python files from the - # Multifile, so this file can't itself be in the Multifile. + # This module and all its dependencies come frozen into p3dpython. + # We should mark them as having already been added so that we don't + # add them again to the Multifile. + self.do_module('direct.showbase.VFSImporter') + self.currentPackage.freezer.done(addStartupModules=True) + self.currentPackage.freezer.writeCode(None) + self.currentPackage.addExtensionModules() + self.currentPackage.freezer.reset() - # This requires a bit of care, because we only want to freeze - # VFSImporter.py, and not any other part of direct. We do - # also want panda3d/__init__.py, though, since it would - # otherwise be part of the multifile. - self.do_excludeModule('direct') - - # Import the actual VFSImporter module to get its filename on - # disk. - from direct.showbase import VFSImporter - filename = Filename.fromOsSpecific(VFSImporter.__file__) - - self.do_module('VFSImporter', filename = filename) - self.do_freeze('_vfsimporter', compileToExe = False) - - self.do_file('panda3d/_core.pyd'); - - # Now that we're done freezing, explicitly add 'direct' to - # counteract the previous explicit excludeModule(). - self.do_module('direct') + self.do_file('panda3d/_core.pyd', newDir='panda3d') # This is the key Python module that is imported at runtime to # start an application running. self.do_module('direct.p3d.AppRunner') # This is the main program that drives the runtime Python. It - # is responsible for loading _vfsimporter.pyd, and then - # importing direct.p3d.AppRunner, to start an application - # running. The program comes in two parts: an executable, and - # an associated dynamic library. Note that the .exe and .dll - # extensions are automatically replaced with the appropriate - # platform-specific extensions. + # is responsible for importing direct.p3d.AppRunner to start an + # application running. The program comes in two parts: an + # executable, and an associated dynamic library. Note that the + # .exe and .dll extensions are automatically replaced with the + # appropriate platform-specific extensions. if self.platform.startswith('osx'): # On Mac, we package up a P3DPython.app bundle. This @@ -3469,7 +3455,7 @@ class Packager: freezer.addModule(moduleName, newName = newName) else: freezer.modules[newName] = freezer.modules[moduleName] - freezer.done(compileToExe = compileToExe) + freezer.done(addStartupModules = compileToExe) dirname = '' basename = filename @@ -3850,8 +3836,7 @@ class Packager: xhost = he.makeXml(packager = self) xcontents.InsertEndChild(xhost) - contents = self.contents.items() - contents.sort() + contents = sorted(self.contents.items()) for key, pe in contents: xpackage = pe.makeXml() xcontents.InsertEndChild(xpackage) diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index 53a703b5eb..e1cebf2137 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -164,10 +164,10 @@ def makePackedApp(args): PandaSystem.getPackageHostUrl(), os.path.split(sys.argv[0])[1], '%s.%s' % (sys.version_info[0], sys.version_info[1])) - sys.exit(1) + sys.exit(0) if not appFilename: - raise ArgumentError, "No target app specified. Use:\n%s -o app.p3d" % (os.path.split(sys.argv[0])[1]) + raise ArgumentError, "No target app specified. Use:\n %s -o app.p3d\nUse -h to get more usage information." % (os.path.split(sys.argv[0])[1]) if args: raise ArgumentError, "Extra arguments on command line." diff --git a/direct/src/p3d/panda3d.pdef b/direct/src/p3d/panda3d.pdef index 87a42eff2b..d298e0e3c1 100644 --- a/direct/src/p3d/panda3d.pdef +++ b/direct/src/p3d/panda3d.pdef @@ -61,7 +61,7 @@ class panda3d(package): 'panda3d.physics') # Include various standard Python encodings. The rest is in morepy. - module('encodings', 'encodings.aliases', 'encodings.undefined,' + module('encodings', 'encodings.aliases', 'encodings.undefined', 'encodings.utf_8', 'encodings.ascii', 'encodings.string_escape', 'encodings.mbcs', 'encodings.latin_1', 'io') diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index 28f004933f..459d1015ce 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -21,6 +21,9 @@ #include "py_panda.h" +// This has been compiled-in by the build system, if all is well. +extern struct _frozen _PyImport_FrozenModules[]; + // There is only one P3DPythonRun object in any given process space. // Makes the statics easier to deal with, and we don't need multiple // instances of this thing. @@ -85,17 +88,30 @@ P3DPythonRun(const char *program_name, const char *archive_file, // Turn off the automatic load of site.py at startup. extern int Py_NoSiteFlag; Py_NoSiteFlag = 1; + Py_NoUserSiteDirectory = 1; + + // Tell Python not to write bytecode files for loaded modules. + Py_DontWriteBytecodeFlag = 1; + + // Prevent Python from complaining about finding the standard modules. + Py_FrozenFlag = 1; + + // This contains the modules we need in order to call Py_Initialize, + // as well as the VFSImporter. + PyImport_FrozenModules = _PyImport_FrozenModules; // Initialize Python. It appears to be important to do this before // we open the pipe streams and spawn the thread, below. #if PY_MAJOR_VERSION >= 3 Py_SetProgramName((wchar_t *)_program_name.c_str()); + Py_SetPythonHome((wchar_t *)L""); #else Py_SetProgramName((char *)_program_name.c_str()); + Py_SetPythonHome((char *)""); #endif Py_Initialize(); PyEval_InitThreads(); - PySys_SetArgv(_py_argc, _py_argv); + PySys_SetArgvEx(_py_argc, _py_argv, 0); // Open the error output before we do too much more. if (log_pathname != NULL && *log_pathname != '\0') { @@ -170,38 +186,44 @@ run_python() { // setting __path__ of frozen modules properly. PyObject *panda3d_module = PyImport_AddModule("panda3d"); if (panda3d_module == NULL) { - nout << "Failed to create panda3d module:\n"; + nout << "Failed to add panda3d module:\n"; PyErr_Print(); return 1; } - // Set the __path__ such that it can find panda3d/core.pyd, etc. + // Set the __path__ such that it can find panda3d/_core.pyd, etc. Filename panda3d_dir(dir, "panda3d"); string dir_str = panda3d_dir.to_os_specific(); - PyObject *panda3d_dict = PyModule_GetDict(panda3d_module); - PyObject *panda3d_path = Py_BuildValue("[s#]", dir_str.data(), dir_str.length()); - PyDict_SetItemString(panda3d_dict, "__path__", panda3d_path); - Py_DECREF(panda3d_path); + PyModule_AddObject(panda3d_module, "__path__", Py_BuildValue("[s#]", dir_str.data(), dir_str.length())); + PyModule_AddStringConstant(panda3d_module, "__package__", "panda3d"); - // Now we can load _vfsimporter.pyd. Since this is a magic frozen - // pyd, importing it automatically makes all of its frozen contents - // available to import as well. - PyObject *vfsimporter = PyImport_ImportModule("_vfsimporter"); - if (vfsimporter == NULL) { - nout << "Failed to import _vfsimporter:\n"; - PyErr_Print(); - return 1; - } - Py_DECREF(vfsimporter); - - // And now we can import the VFSImporter module that was so defined. - PyObject *vfsimporter_module = PyImport_ImportModule("VFSImporter"); + // Import the VFSImporter module that was frozen in. + PyObject *vfsimporter_module = PyImport_ImportModule("direct.showbase.VFSImporter"); if (vfsimporter_module == NULL) { nout << "Failed to import VFSImporter:\n"; PyErr_Print(); return 1; } + // Now repair the "direct" and "direct.showbase" trees, which were + // presumably frozen along with the VFSImporter, by setting their + // __path__ such that we can still find the other direct modules. + Filename direct_dir(dir, "direct"); + PyObject *direct_module = PyImport_AddModule("direct"); + if (direct_module != NULL) { + dir_str = direct_dir.to_os_specific(); + PyModule_AddObject(direct_module, "__path__", Py_BuildValue("[s#]", dir_str.data(), dir_str.length())); + PyModule_AddStringConstant(direct_module, "__package__", "direct"); + } + + PyObject *showbase_module = PyImport_AddModule("direct.showbase"); + if (showbase_module != NULL) { + Filename showbase_dir(direct_dir, "showbase"); + dir_str = showbase_dir.to_os_specific(); + PyModule_AddObject(showbase_module, "__path__", Py_BuildValue("[s#]", dir_str.data(), dir_str.length())); + PyModule_AddStringConstant(showbase_module, "__package__", "direct.showbase"); + } + // And register the VFSImporter. PyObject *result = PyObject_CallMethod(vfsimporter_module, (char *)"register", (char *)""); if (result == NULL) { diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py index 16b1ac4bec..e7be781c45 100644 --- a/direct/src/showbase/VFSImporter.py +++ b/direct/src/showbase/VFSImporter.py @@ -136,7 +136,7 @@ class VFSLoader: code = self._read_code() if not code: - raise ImportError, 'No Python code in %s' % (fullname) + raise ImportError('No Python code in %s' % (fullname)) mod = sys.modules.setdefault(fullname, imp.new_module(fullname)) mod.__file__ = self.filename.toOsSpecific() @@ -230,6 +230,10 @@ class VFSLoader: #print >>sys.stderr, "importing frozen %s" % (fullname) module = imp.load_module(fullname, None, fullname, ('', '', imp.PY_FROZEN)) + + # Workaround for bug in Python 2. + if getattr(module, '__path__', None) == fullname: + module.__path__ = [] return module def _read_code(self): @@ -243,7 +247,7 @@ class VFSLoader: pycVfile = vfs.getFile(self.filename, False) if pycVfile: return self._loadPyc(pycVfile, None) - raise IOError, 'Could not read %s' % (self.filename) + raise IOError('Could not read %s' % (self.filename)) elif self.fileType == FTExtensionModule: return None @@ -281,16 +285,21 @@ class VFSLoader: code = None data = vfile.readFile(True) - if data[:4] == imp.get_magic(): + if data[:4] != imp.get_magic(): + raise ValueError("Bad magic number in %s" % (vfile)) + + if sys.version_info >= (3, 0): + t = int.from_bytes(data[4:8], 'little') + data = data[12:] + else: t = ord(data[4]) + (ord(data[5]) << 8) + \ (ord(data[6]) << 16) + (ord(data[7]) << 24) - if not timestamp or t == timestamp: - code = marshal.loads(data[8:]) - else: - raise ValueError, 'Timestamp wrong on %s' % (vfile) + data = data[8:] + + if not timestamp or t == timestamp: + return marshal.loads(data) else: - raise ValueError, 'Bad magic number in %s' % (vfile) - return code + raise ValueError("Timestamp wrong on %s" % (vfile)) def _compile(self, filename, source): @@ -310,15 +319,16 @@ class VFSLoader: except IOError: pass else: - f.write('\0\0\0\0') - f.write(chr(self.timestamp & 0xff) + - chr((self.timestamp >> 8) & 0xff) + - chr((self.timestamp >> 16) & 0xff) + - chr((self.timestamp >> 24) & 0xff)) - f.write(marshal.dumps(code)) - f.flush() - f.seek(0, 0) f.write(imp.get_magic()) + if sys.version_info >= (3, 0): + f.write((self.timestamp & 0xffffffff).to_bytes(4, 'little')) + f.write(b'\0\0\0\0') + else: + f.write(chr(self.timestamp & 0xff) + + chr((self.timestamp >> 8) & 0xff) + + chr((self.timestamp >> 16) & 0xff) + + chr((self.timestamp >> 24) & 0xff)) + f.write(marshal.dumps(code)) f.close() return code @@ -388,7 +398,7 @@ class VFSSharedImporter: """ Returns the directory name that the indicated conventionally-loaded module must have been loaded from. """ - if not hasattr(mod, __file__) or mod.__file__ is None: + if not getattr(mod, '__file__', None): return None fullname = mod.__name__ @@ -433,6 +443,9 @@ class VFSSharedLoader: if self.reload: mod = sys.modules[fullname] path = mod.__path__ or [] + if path == fullname: + # Work around Python bug setting __path__ of frozen modules. + path = [] vfs_shared_path = getattr(mod, '_vfs_shared_path', []) for loader in self.loaders: @@ -450,11 +463,12 @@ class VFSSharedLoader: if mod is None: # If all of them failed to load, raise ImportError. - raise ImportError, message + raise ImportError(message) # If at least one of them loaded successfully, return the # union of loaded modules. mod.__path__ = path + mod.__package__ = fullname # Also set this special symbol, which records that this is a # shared package, and also lists the paths we have already @@ -515,7 +529,9 @@ def reloadSharedPackages(): #print >> sys.stderr, "reloadSharedPackages, path = %s, sharedPackages = %s" % (sys.path, sharedPackages.keys()) - for fullname in sharedPackages.keys(): + # Sort the list, just to make sure parent packages are reloaded + # before child packages are. + for fullname in sorted(sharedPackages.keys()): mod = sys.modules.get(fullname, None) if not mod: continue diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index 50f1077e30..cd303697f2 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -31,14 +31,12 @@ isDebugBuild = (python.lower().endswith('_d')) # must be frozen in any main.exe. startupModules = [ 'site', 'sitecustomize', 'os', 'encodings.cp1252', - 'org', + 'encodings.latin_1', 'encodings.utf_8', 'io', 'org', ] # These are missing modules that we've reported already this session. reportedMissing = {} -# Our own Python source trees to watch out for. -sourceTrees = ['direct'] class CompilationEnvironment: """ Create an instance of this class to record the commands to @@ -445,7 +443,7 @@ extend_frozen_modules(const struct _frozen *new_modules, int new_count) { } %(dllexport)svoid init%(moduleName)s() { - extend_frozen_modules(_PyImport_FrozenModules, %(newcount)s); + extend_frozen_modules(_PyImport_FrozenModules, sizeof(_PyImport_FrozenModules) / sizeof(struct _frozen)); Py_InitModule("%(moduleName)s", nullMethods); } """ @@ -458,7 +456,7 @@ programFile = """ %(moduleDefs)s -static struct _frozen _PyImport_FrozenModules[] = { +struct _frozen _PyImport_FrozenModules[] = { %(moduleList)s {NULL, NULL, 0} }; @@ -485,7 +483,7 @@ okMissing = [ 'Carbon.Folder', 'Carbon.Folders', 'HouseGlobals', 'Carbon.File', 'MacOS', '_emx_link', 'ce', 'mac', 'org.python.core', 'os.path', 'os2', 'posix', 'pwd', 'readline', 'riscos', 'riscosenviron', - 'riscospath', 'dbm', 'fcntl', 'win32api', + 'riscospath', 'dbm', 'fcntl', 'win32api', 'usercustomize', '_winreg', 'ctypes', 'ctypes.wintypes', 'nt','msvcrt', 'EasyDialogs', 'SOCKS', 'ic', 'rourl2path', 'termios', 'OverrideFrom23._Res', 'email', 'email.Utils', 'email.Generator', @@ -613,20 +611,14 @@ class Freezer: self.mf = None - # Make sure we know how to find "direct". - for sourceTree in sourceTrees: - try: - module = __import__(sourceTree) - except: - pass - # Actually, make sure we know how to find all of the # already-imported modules. (Some of them might do their own # special path mangling.) for moduleName, module in sys.modules.items(): if module and hasattr(module, '__path__'): path = getattr(module, '__path__') - modulefinder.AddPackagePath(moduleName, path[0]) + if path: + modulefinder.AddPackagePath(moduleName, path[0]) def excludeFrom(self, freezer): """ Excludes all modules that have already been processed by @@ -827,7 +819,7 @@ class Freezer: moduleName, filename = filename, implicit = implicit, guess = guess, fromSource = fromSource, text = text) - def done(self, compileToExe = False): + def done(self, addStartupModules = False): """ Call this method after you have added all modules with addModule(). You may then call generateCode() or writeMultifile() to dump the resulting output. After a call @@ -838,7 +830,9 @@ class Freezer: # If we are building an exe, we also need to implicitly # bring in Python's startup modules. - if compileToExe: + if addStartupModules: + self.modules['_frozen_importlib'] = self.ModuleDef('importlib._bootstrap', implicit = True) + for moduleName in startupModules: if moduleName not in self.modules: self.modules[moduleName] = self.ModuleDef(moduleName, implicit = True) @@ -1071,8 +1065,12 @@ class Freezer: def __addPyc(self, multifile, filename, code, compressionLevel): if code: - data = imp.get_magic() + b'\0\0\0\0' + \ - marshal.dumps(code) + data = imp.get_magic() + b'\0\0\0\0' + + if sys.version_info >= (3, 0): + data += b'\0\0\0\0' + + data += marshal.dumps(code) stream = StringStream(data) multifile.addSubfile(filename, stream, compressionLevel) @@ -1214,22 +1212,9 @@ class Freezer: multifile.flush() multifile.repack() - def generateCode(self, basename, compileToExe = False): - """ After a call to done(), this freezes all of the - accumulated python code into either an executable program (if - compileToExe is true) or a dynamic library (if compileToExe is - false). The basename is the name of the file to write, - without the extension. - - The return value is the newly-generated filename, including - the filename extension. Additional extension modules are - listed in self.extras. """ - - if compileToExe: - # We must have a __main__ module to make an exe file. - if not self.__writingModule('__main__'): - message = "Can't generate an executable without a __main__ module." - raise StandardError, message + def writeCode(self, filename, initCode = ""): + """ After a call to done(), this freezes all of the accumulated + Python code into a C source file. """ self.__replacePaths() @@ -1247,38 +1232,57 @@ class Freezer: # Allow importing this module. module = self.mf.modules.get(origName, None) code = getattr(module, "__code__", None) - if not code and moduleName in startupModules: + if code: + code = marshal.dumps(code) + + mangledName = self.mangleName(moduleName) + moduleDefs.append(self.makeModuleDef(mangledName, code)) + moduleList.append(self.makeModuleListEntry(mangledName, code, moduleName, module)) + + elif moduleName in startupModules: # Forbid the loading of this startup module. moduleList.append(self.makeForbiddenModuleListEntry(moduleName)) + else: - if origName in sourceTrees: - # This is one of Panda3D's own Python source - # trees. These are a special case: we don't - # compile the __init__.py files within them, - # since their only purpose is to munge the - # __path__ variable anyway. Instead, we - # pretend the __init__.py files are empty. - code = compile('', moduleName, 'exec') - - if code: - code = marshal.dumps(code) - - mangledName = self.mangleName(moduleName) - moduleDefs.append(self.makeModuleDef(mangledName, code)) - moduleList.append(self.makeModuleListEntry(mangledName, code, moduleName, module)) + # This is a module with no associated Python + # code. It must be an extension module. Get the + # filename. + extensionFilename = getattr(module, '__file__', None) + if extensionFilename: + self.extras.append((moduleName, extensionFilename)) else: + # It doesn't even have a filename; it must + # be a built-in module. No worries about + # this one, then. + pass - # This is a module with no associated Python - # code. It must be an extension module. Get the - # filename. - extensionFilename = getattr(module, '__file__', None) - if extensionFilename: - self.extras.append((moduleName, extensionFilename)) - else: - # It doesn't even have a filename; it must - # be a built-in module. No worries about - # this one, then. - pass + text = programFile % { + 'moduleDefs': '\n'.join(moduleDefs), + 'moduleList': '\n'.join(moduleList), + 'initCode': initCode + } + + if filename is not None: + file = open(filename, 'w') + file.write(text) + file.close() + + def generateCode(self, basename, compileToExe = False): + """ After a call to done(), this freezes all of the + accumulated python code into either an executable program (if + compileToExe is true) or a dynamic library (if compileToExe is + false). The basename is the name of the file to write, + without the extension. + + The return value is the newly-generated filename, including + the filename extension. Additional extension modules are + listed in self.extras. """ + + if compileToExe: + # We must have a __main__ module to make an exe file. + if not self.__writingModule('__main__'): + message = "Can't generate an executable without a __main__ module." + raise StandardError, message filename = basename + self.sourceExtension @@ -1317,21 +1321,12 @@ class Freezer: initCode = dllInitCode % { 'moduleName' : os.path.basename(basename), - 'newcount' : len(moduleList), 'dllexport' : dllexport, 'dllimport' : dllimport, } compileFunc = self.cenv.compileDll - text = programFile % { - 'moduleDefs' : '\n'.join(moduleDefs), - 'moduleList' : '\n'.join(moduleList), - 'initCode' : initCode, - } - - file = open(filename, 'w') - file.write(text) - file.close() + self.writeCode(filename, initCode=initCode) try: compileFunc(filename, basename) @@ -1390,9 +1385,9 @@ class PandaModuleFinder(modulefinder.ModuleFinder): def __init__(self, *args, **kw): modulefinder.ModuleFinder.__init__(self, *args, **kw) - def find_module(self, name, path, parent=None): + def find_module(self, name, path, *args, **kwargs): try: - return modulefinder.ModuleFinder.find_module(self, name, path, parent = parent) + return modulefinder.ModuleFinder.find_module(self, name, path, *args, **kwargs) except ImportError: # It wasn't found through the normal channels. Maybe it's # one of ours, or maybe it's frozen? diff --git a/direct/src/showutil/pfreeze.py b/direct/src/showutil/pfreeze.py index ca43c25703..5bcc3c41ee 100755 --- a/direct/src/showutil/pfreeze.py +++ b/direct/src/showutil/pfreeze.py @@ -40,6 +40,11 @@ Options: of the __path__ variable, and thus must be actually imported to determine the true value of __path__. + -s + Adds the standard set of modules that are necessary for embedding + the Python interpreter. Implicitly set if an executable is + generated. + """ import getopt @@ -58,9 +63,10 @@ def usage(code, msg = ''): freezer = FreezeTool.Freezer() basename = None +addStartupModules = False try: - opts, args = getopt.getopt(sys.argv[1:], 'o:i:x:p:h') + opts, args = getopt.getopt(sys.argv[1:], 'o:i:x:p:sh') except getopt.error, msg: usage(1, msg) @@ -76,48 +82,57 @@ for opt, arg in opts: elif opt == '-p': for module in arg.split(','): freezer.handleCustomPath(module) + elif opt == '-s': + addStartupModules = True elif opt == '-h': usage(0) else: print 'illegal option: ' + flag sys.exit(1) -if not args: - usage(0) - if not basename: usage(1, 'You did not specify an output file.') -if len(args) != 1: +if len(args) > 1: usage(1, 'Only one main file may be specified.') outputType = 'exe' bl = basename.lower() if bl.endswith('.mf'): outputType = 'mf' +elif bl.endswith('.c'): + outputType = 'c' elif bl.endswith('.dll') or bl.endswith('.pyd') or bl.endswith('.so'): basename = os.path.splitext(basename)[0] outputType = 'dll' elif bl.endswith('.exe'): basename = os.path.splitext(basename)[0] -startfile = args[0] -startmod = startfile -if startfile.endswith('.py') or startfile.endswith('.pyw') or \ - startfile.endswith('.pyc') or startfile.endswith('.pyo'): - startmod = os.path.splitext(startfile)[0] - compileToExe = False -if outputType == 'dll': - freezer.addModule(startmod, filename = startfile) -else: - freezer.addModule('__main__', filename = startfile) - compileToExe = True +if args: + startfile = args[0] + startmod = startfile + if startfile.endswith('.py') or startfile.endswith('.pyw') or \ + startfile.endswith('.pyc') or startfile.endswith('.pyo'): + startmod = os.path.splitext(startfile)[0] -freezer.done(compileToExe = compileToExe) + if outputType == 'dll' or outputType == 'c': + freezer.addModule(startmod, filename = startfile) + else: + freezer.addModule('__main__', filename = startfile) + compileToExe = True + addStartupModules = True + +elif outputType == 'exe': + # We must have a main module when making an executable. + usage(0) + +freezer.done(addStartupModules = addStartupModules) if outputType == 'mf': freezer.writeMultifile(basename) +elif outputType == 'c': + freezer.writeCode(basename) else: freezer.generateCode(basename, compileToExe = compileToExe) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index a3e114738c..c9524e845e 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -5,175 +5,185 @@ SIMPLE_THREADS model, by avoiding blocking all threads while waiting for I/O to complete. """ __all__ = [ - 'file', 'open', 'listdir', 'walk', 'join', + 'open', 'listdir', 'walk', 'join', 'isfile', 'isdir', 'exists', 'lexists', 'getmtime', 'getsize', 'execfile', ] -from panda3d import core +import panda3d._core as core import sys -import types import os +import io _vfs = core.VirtualFileSystem.getGlobalPtr() -class file: - def __init__(self, filename, mode = 'r', bufsize = None, - autoUnwrap = False): - self.__stream = None - self.__needsVfsClose = False - self.__reader = None - self.__writer = None - self.closed = True - self.encoding = None - self.errors = None - self.__lastWrite = False +def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True): + if sys.version_info >= (3, 0): + # Python 3 is much stricter than Python 2, which lets + # unknown flags fall through. + for ch in mode: + if ch not in 'rwxabt+U': + raise IOError("invalid mode: '%s'" % (mode)) - self.mode = mode - self.name = None - self.filename = None - self.newlines = None - self.softspace = False + creating = 'x' in mode + writing = 'w' in mode + appending = 'a' in mode + updating = '+' in mode + binary = 'b' in mode + universal = 'U' in mode + reading = universal or 'r' in mode - readMode = False - writeMode = False + if binary and 't' in mode: + raise IOError("can't have text and binary mode at once") - if isinstance(filename, core.Istream) or isinstance(filename, core.Ostream): - # If we were given a stream instead of a filename, assign - # it directly. - self.__stream = filename - readMode = isinstance(filename, core.Istream) - writeMode = isinstance(filename, core.Ostream) + if creating + reading + writing + appending > 1: + raise ValueError("must have exactly one of create/read/write/append mode") - elif isinstance(filename, core.VirtualFile): + if binary: + if encoding: + raise ValueError("binary mode doesn't take an encoding argument") + if errors: + raise ValueError("binary mode doesn't take an errors argument") + if newline: + raise ValueError("binary mode doesn't take a newline argument") + + if isinstance(file, core.Istream) or isinstance(file, core.Ostream): + # If we were given a stream instead of a filename, assign + # it directly. + raw = StreamIOWrapper(file) + raw.mode = mode + + else: + vfile = None + + if isinstance(file, core.VirtualFile): # We can also "open" a VirtualFile object for reading. - self.__stream = filename.openReadFile(autoUnwrap) - if not self.__stream: - message = 'Could not read virtual file %s' % (repr(filename)) - raise IOError, message - self.__needsVfsClose = True - readMode = True - + vfile = file + filename = vfile.getFilename() + filename.setBinary() else: # Otherwise, we must have been given a filename. Open it. - if isinstance(filename, types.StringTypes): + if isinstance(file, unicode): # If a raw string is given, assume it's an os-specific # filename. - filename = core.Filename.fromOsSpecific(filename) + filename = core.Filename.fromOsSpecificW(file) + elif isinstance(file, str): + filename = core.Filename.fromOsSpecific(file) else: # If a Filename is given, make a writable copy anyway. - filename = core.Filename(filename) + filename = core.Filename(file) - self.filename = filename - self.name = filename.toOsSpecific() + filename.setBinary() + vfile = _vfs.getFile(filename) - if sys.version_info >= (3, 0): - # Python 3 is much stricter than Python 2, which lets - # unknown flags fall through. - for ch in mode: - if not ch in 'rwxabt+U': - raise IOError("invalid mode: " + mode) + if not vfile: + if reading: + raise FileNotFoundError("No such file or directory: '%s'" % (filename)) - binary = False - if 'b' in mode and 't' in mode: - raise IOError("can't have text and binary mode at once") - - if 'b' in mode: - # Strip 'b'. This means a binary file. - i = mode.index('b') - mode = mode[:i] + mode[i + 1:] - binary = True - elif 't' in mode: - # Strip 't'. This means a text file (redundant, yes). - i = mode.index('t') - mode = mode[:i] + mode[i + 1:] - binary = False + vfile = _vfs.createFile(filename) + if not vfile: + raise IOError("Failed to create file: '%s'" % (filename)) - if 'U' in mode: - # Strip 'U'. We don't use it; universal-newline support - # is built into Panda, and can't be changed at runtime. - i = mode.index('U') - mode = mode[:i] + mode[i + 1:] - binary = False + elif creating: + # In 'creating' mode, we have to raise FileExistsError + # if the file already exists. Otherwise, it's the same + # as 'writing' mode. + raise FileExistsError("File exists: '%s'" % (filename)) - if mode == '': - mode = 'r' + elif vfile.isDirectory(): + raise IsADirectoryError("Is a directory: '%s'" % (filename)) - # Per Python docs, we insist this is true. - modeType = mode[0] - assert modeType in 'rwa' - - if binary: - filename.setBinary() + # Actually open the streams. + if reading: + if updating: + stream = vfile.openReadWriteFile(False) else: - filename.setText() - - # Actually open the streams, taking care to - # ignore unknown chars in the mode string. - # We already asserted that it starts with a mode - # char above, so locate the '+' - if modeType == 'w' and '+' in mode: - self.__stream = _vfs.openReadWriteFile(filename, True) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError(message) - readMode = True - writeMode = True + stream = vfile.openReadFile(False) - elif modeType == 'a' and '+' in mode: - self.__stream = _vfs.openReadAppendFile(filename) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError(message) - readMode = True - writeMode = True + if not stream: + raise IOError("Could not open %s for reading" % (filename)) - elif modeType == 'r' and '+' in mode: - self.__stream = _vfs.openReadWriteFile(filename, False) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError(message) - readMode = True - writeMode = True - - elif modeType == 'w': - self.__stream = _vfs.openWriteFile(filename, autoUnwrap, True) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError(message) - writeMode = True - - elif modeType == 'a': - self.__stream = _vfs.openAppendFile(filename) - if not self.__stream: - message = 'Could not open %s for writing' % (filename) - raise IOError(message) - writeMode = True - - elif modeType == 'r': - self.__stream = _vfs.openReadFile(filename, autoUnwrap) - if not self.__stream: - if not _vfs.exists(filename): - message = 'No such file: %s' % (filename) - else: - message = 'Could not open %s for reading' % (filename) - raise IOError(message) - readMode = True - + elif writing or creating: + if updating: + stream = vfile.openReadWriteFile(True) else: - # should not get here unless there's a bug above - raise IOError("Unhandled mode flags: " + mode) + stream = vfile.openWriteFile(False) - self.__needsVfsClose = True + if not stream: + raise IOError("Could not open %s for writing" % (filename)) - if readMode: + elif appending: + if updating: + stream = vfile.openReadAppendFile() + else: + stream = vfile.openAppendFile() + + if not stream: + raise IOError("Could not open %s for appending" % (filename)) + + else: + raise ValueError("Must have exactly one of create/read/write/append mode and at most one plus") + + raw = StreamIOWrapper(stream, needsVfsClose=True) + raw.mode = mode + raw.name = vfile.getFilename().toOsSpecific() + + # If a binary stream was requested, return the stream we've created. + if binary: + return raw + + line_buffering = False + if buffering == 1: + line_buffering = True + elif buffering == 0: + raise ValueError("can't have unbuffered text I/O") + + # Otherwise, create a TextIOWrapper object to wrap it. + wrapper = io.TextIOWrapper(raw, encoding, errors, newline, line_buffering) + wrapper.mode = mode + return wrapper + + +if sys.version_info < (3, 0): + # Python 2 had an alias for open() called file(). + __all__.append('file') + file = open + + +class StreamIOWrapper(io.IOBase): + """ This is a file-like object that wraps around a C++ istream and/or + ostream object. It only deals with binary data; to work with text I/O, + create an io.TextIOWrapper object around this, or use the open() + function that is also provided with this module. """ + + def __init__(self, stream, needsVfsClose=False): + self.__stream = stream + self.__needsVfsClose = needsVfsClose + self.__reader = None + self.__writer = None + self.__lastWrite = False + + if isinstance(stream, core.Istream): self.__reader = core.StreamReader(self.__stream, False) - if writeMode: - self.__writer = core.StreamWriter(self.__stream, False) + + if isinstance(stream, core.Ostream): + self.__writer = core.StreamWriter(stream, False) self.__lastWrite = True - def __del__(self): - self.close() + def __repr__(self): + s = "= 0: + if size is not None and size >= 0: result = self.__reader.extractBytes(size) else: # Read to end-of-file. - result = '' + result = b'' while not self.__stream.eof(): - result += self.__reader.extractBytes(1024) + result += self.__reader.extractBytes(512) return result - def readline(self, size = -1): + def readline(self, size=-1): if not self.__reader: if not self.__writer: # The stream is not even open at all. - message = 'I/O operation on closed file' - raise ValueError, message + raise ValueError("I/O operation on closed file") + # The stream is open only in write mode. - message = 'Attempt to read from write-only stream' - raise IOError, message + raise IOError("Attempt to read from write-only stream") self.__stream.clear() # clear eof flag self.__lastWrite = False return self.__reader.readline() - def readlines(self, sizehint = -1): - lines = [] - line = self.readline() - while line: - lines.append(line) - line = self.readline() - return lines - - xreadlines = readlines - def seek(self, offset, whence = 0): if self.__stream: self.__stream.clear() # clear eof flag @@ -264,58 +253,43 @@ class file: else: if self.__reader: return self.__stream.tellg() - message = 'I/O operation on closed file' - raise ValueError, message + raise ValueError("I/O operation on closed file") - def truncate(self): - """ Sorry, this isn't supported by Panda's low-level I/O, - because it isn't supported by the standard C++ library. """ - raise NotImplementedError - - def write(self, str): + def write(self, b): if not self.__writer: if not self.__reader: # The stream is not even open at all. - message = 'I/O operation on closed file' - raise ValueError, message + raise ValueError("I/O operation on closed file") + # The stream is open only in read mode. - message = 'Attempt to write to read-only stream' - raise IOError, message + raise IOError("Attempt to write to read-only stream") self.__stream.clear() # clear eof flag - self.__writer.appendData(str) + self.__writer.appendData(b) self.__lastWrite = True def writelines(self, lines): if not self.__writer: if not self.__reader: # The stream is not even open at all. - message = 'I/O operation on closed file' - raise ValueError, message + raise ValueError("I/O operation on closed file") + # The stream is open only in read mode. - message = 'Attempt to write to read-only stream' - raise IOError, message + raise IOError("Attempt to write to read-only stream") self.__stream.clear() # clear eof flag for line in lines: self.__writer.appendData(line) self.__lastWrite = True - def __enter__(self): - return self - - def __exit__(self, t, v, tb): - self.close() - -open = file def listdir(path): """ Implements os.listdir over vfs. """ files = [] dirlist = _vfs.scanDirectory(core.Filename.fromOsSpecific(path)) if dirlist is None: - message = 'No such file or directory: %s' % (path) - raise OSError, message + raise OSError("No such file or directory: '%s'" % (path)) + for file in dirlist: files.append(file.getFilename().getBasename()) return files diff --git a/dtool/src/prc/streamReader.cxx b/dtool/src/prc/streamReader.cxx index 27708563bd..c469309b53 100644 --- a/dtool/src/prc/streamReader.cxx +++ b/dtool/src/prc/streamReader.cxx @@ -112,25 +112,6 @@ skip_bytes(size_t size) { } } -//////////////////////////////////////////////////////////////////// -// Function: StreamReader::extract_bytes -// Access: Published -// Description: Extracts the indicated number of bytes in the -// stream and returns them as a string. Returns empty -// string at end-of-file. -//////////////////////////////////////////////////////////////////// -string StreamReader:: -extract_bytes(size_t size) { - if (_in->eof() || _in->fail()) { - return string(); - } - - char *buffer = (char *)alloca(size); - _in->read(buffer, size); - size_t read_bytes = _in->gcount(); - return string(buffer, read_bytes); -} - //////////////////////////////////////////////////////////////////// // Function: StreamReader::extract_bytes // Access: Published @@ -150,9 +131,28 @@ extract_bytes(unsigned char *into, size_t size) { return _in->gcount(); } +//////////////////////////////////////////////////////////////////// +// Function: StreamReader::extract_bytes +// Access: Public +// Description: Extracts the indicated number of bytes in the +// stream and returns them as a string. Returns empty +// string at end-of-file. +//////////////////////////////////////////////////////////////////// +string StreamReader:: +extract_bytes(size_t size) { + if (_in->eof() || _in->fail()) { + return string(); + } + + char *buffer = (char *)alloca(size); + _in->read(buffer, size); + size_t read_bytes = _in->gcount(); + return string(buffer, read_bytes); +} + //////////////////////////////////////////////////////////////////// // Function: StreamReader::readline -// Access: Published +// Access: Public // Description: Assumes the stream represents a text file, and // extracts one line up to and including the trailing // newline character. Returns empty string when the end @@ -177,4 +177,3 @@ readline() { return line; } - diff --git a/dtool/src/prc/streamReader.h b/dtool/src/prc/streamReader.h index 8d71cf6b9b..9560cfef5e 100644 --- a/dtool/src/prc/streamReader.h +++ b/dtool/src/prc/streamReader.h @@ -66,12 +66,16 @@ PUBLISHED: BLOCKING string get_fixed_string(size_t size); BLOCKING void skip_bytes(size_t size); - BLOCKING string extract_bytes(size_t size); BLOCKING size_t extract_bytes(unsigned char *into, size_t size); + EXTENSION(BLOCKING PyObject *extract_bytes(size_t size)); - BLOCKING string readline(); + EXTENSION(BLOCKING PyObject *readline()); EXTENSION(BLOCKING PyObject *readlines()); +public: + BLOCKING string extract_bytes(size_t size); + BLOCKING string readline(); + private: istream *_in; bool _owns_stream; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b34c655f56..687aa70510 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -381,9 +381,10 @@ if (RUNTIME or RTDIST): if (RUNTIME): outputdir_suffix += "_rt" - RTDIST_VERSION = DISTRIBUTOR.strip() + "_" + MAJOR_VERSION -elif (DISTRIBUTOR == ""): +if DISTRIBUTOR == "": DISTRIBUTOR = "makepanda" +else: + RTDIST_VERSION = DISTRIBUTOR.strip() + "_" + MAJOR_VERSION if not IsCustomOutputDir(): if GetTarget() == "windows" and GetTargetArch() == 'x64': @@ -1800,10 +1801,25 @@ def FreezePy(target, inputs, opts): if sys.version_info >= (2, 6): cmdstr += "-B " - cmdstr += os.path.join("direct", "src", "showutil", "pfreeze.py") - src = inputs.pop(0) + cmdstr += os.path.join(GetOutputDir(), "direct", "showutil", "pfreeze.py") + + if 'FREEZE_STARTUP' in opts: + cmdstr += " -s" + + if GetOrigExt(target) == '.exe': + src = inputs.pop(0) + else: + src = "" + for i in inputs: - cmdstr += " -i " + os.path.splitext(i)[0] + i = os.path.splitext(i)[0] + i = i.replace('/', '.') + + if i.startswith('direct.src'): + i = i.replace('.src.', '.') + + cmdstr += " -i " + i + cmdstr += " -o " + target + " " + src if ("LINK_PYTHON_STATIC" in opts): @@ -1919,6 +1935,7 @@ def CompileAnything(target, inputs, opts, progress = None): exit("No input files for target "+target) infile = inputs[0] origsuffix = GetOrigExt(target) + if (len(inputs) == 1 and origsuffix == GetOrigExt(infile)): # It must be a simple copy operation. ProgressOutput(progress, "Copying file", target) @@ -1926,15 +1943,26 @@ def CompileAnything(target, inputs, opts, progress = None): if (origsuffix==".exe" and GetHost() != "windows"): os.system("chmod +x \"%s\"" % target) return + elif (target.endswith(".py")): ProgressOutput(progress, "Generating", target) return GenPyExtensions(target, inputs, opts) + elif (infile.endswith(".py")): - if (origsuffix==".exe"): + if origsuffix == ".obj": + source = os.path.splitext(target)[0] + ".c" + SetOrigExt(source, ".c") + ProgressOutput(progress, "Building frozen source", source) + FreezePy(source, inputs, opts) + ProgressOutput(progress, "Building C++ object", target) + return CompileCxx(target, source, opts) + + if origsuffix == ".exe": ProgressOutput(progress, "Building frozen executable", target) else: ProgressOutput(progress, "Building frozen library", target) return FreezePy(target, inputs, opts) + elif (infile.endswith(".idl")): ProgressOutput(progress, "Compiling MIDL file", infile) return CompileMIDL(target, infile, opts) @@ -5021,10 +5049,12 @@ if (RTDIST or RUNTIME): TargetAdd("libp3d_plugin_static.ilb", input='plugin_get_twirl_data.obj') if (PkgSkip("PYTHON")==0 and RTDIST): + TargetAdd('p3dpython_frozen.obj', opts=['DIR:direct/src/showbase', 'FREEZE_STARTUP'], input='VFSImporter.py') TargetAdd('p3dpython_p3dpython_composite1.obj', opts=OPTS, input='p3dpython_composite1.cxx') TargetAdd('p3dpython_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx') TargetAdd('p3dpython.exe', input='p3dpython_p3dpython_composite1.obj') TargetAdd('p3dpython.exe', input='p3dpython_p3dPythonMain.obj') + TargetAdd('p3dpython.exe', input='p3dpython_frozen.obj') TargetAdd('p3dpython.exe', input=COMMON_PANDA_LIBS) TargetAdd('p3dpython.exe', input='libp3tinyxml.ilb') TargetAdd('p3dpython.exe', input='libp3interrogatedb.dll') diff --git a/panda/src/express/p3express_ext_composite.cxx b/panda/src/express/p3express_ext_composite.cxx index 7956bce4de..1dab5d4477 100644 --- a/panda/src/express/p3express_ext_composite.cxx +++ b/panda/src/express/p3express_ext_composite.cxx @@ -5,3 +5,4 @@ #include "streamReader_ext.cxx" #include "typeHandle_ext.cxx" #include "virtualFileSystem_ext.cxx" +#include "virtualFile_ext.cxx" diff --git a/panda/src/express/ramfile.h b/panda/src/express/ramfile.h index d8006400a4..d09aaae98e 100644 --- a/panda/src/express/ramfile.h +++ b/panda/src/express/ramfile.h @@ -18,6 +18,7 @@ #include "pandabase.h" #include "typedef.h" #include "referenceCount.h" +#include "extension.h" //////////////////////////////////////////////////////////////////// // Class : Ramfile @@ -30,17 +31,23 @@ PUBLISHED: INLINE void seek(size_t pos); INLINE size_t tell() const; - string read(size_t length); - string readline(); + EXTENSION(PyObject *read(size_t length)); + EXTENSION(PyObject *readline()); EXTENSION(PyObject *readlines()); - INLINE const string &get_data() const; + EXTENSION(PyObject *get_data() const); INLINE size_t get_data_size() const; INLINE void clear(); public: + string read(size_t length); + string readline(); + INLINE const string &get_data() const; + size_t _pos; string _data; + + friend class Extension; }; #include "ramfile.I" diff --git a/panda/src/express/ramfile_ext.cxx b/panda/src/express/ramfile_ext.cxx index 366395df8d..e2082d4948 100644 --- a/panda/src/express/ramfile_ext.cxx +++ b/panda/src/express/ramfile_ext.cxx @@ -16,6 +16,49 @@ #ifdef HAVE_PYTHON +//////////////////////////////////////////////////////////////////// +// Function: Ramfile::read +// Access: Published +// Description: Extracts the indicated number of bytes in the +// stream and returns them as a string (or bytes, +// in Python 3). Returns empty string at end-of-file. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +read(size_t length) { + size_t data_length = _this->get_data_size(); + const char *data = _this->_data.data() + _this->_pos; + length = min(length, data_length - _this->_pos); + _this->_pos = min(_this->_pos + length, data_length); + +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize((char *)data, length); +#else + return PyString_FromStringAndSize((char *)data, length); +#endif +} + +//////////////////////////////////////////////////////////////////// +// Function: Ramfile::readline +// Access: Published +// Description: Assumes the stream represents a text file, and +// extracts one line up to and including the trailing +// newline character. Returns empty string when the end +// of file is reached. +// +// The interface here is intentionally designed to be +// similar to that for Python's File.readline() +// function. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +readline() { + string line = _this->readline(); +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize(line.data(), line.size()); +#else + return PyString_FromStringAndSize(line.data(), line.size()); +#endif +} + //////////////////////////////////////////////////////////////////// // Function: Ramfile::readlines // Access: Published @@ -44,5 +87,19 @@ readlines() { return lst; } +//////////////////////////////////////////////////////////////////// +// Function: Ramfile::get_data +// Access: Published +// Description: Returns the entire buffer contents as a string, +// regardless of the current data pointer. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +get_data() const { +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize(_this->_data.data(), _this->_data.size()); +#else + return PyString_FromStringAndSize(_this->_data.data(), _this->_data.size()); #endif +} +#endif diff --git a/panda/src/express/ramfile_ext.h b/panda/src/express/ramfile_ext.h index 8f90eb52ad..6ece9d3d7c 100644 --- a/panda/src/express/ramfile_ext.h +++ b/panda/src/express/ramfile_ext.h @@ -32,7 +32,11 @@ template<> class Extension : public ExtensionBase { public: - BLOCKING PyObject *readlines(); + PyObject *read(size_t length); + PyObject *readline(); + PyObject *readlines(); + + PyObject *get_data() const; }; #endif // HAVE_PYTHON diff --git a/panda/src/express/streamReader_ext.cxx b/panda/src/express/streamReader_ext.cxx index c0aa00f26a..8adb05556c 100644 --- a/panda/src/express/streamReader_ext.cxx +++ b/panda/src/express/streamReader_ext.cxx @@ -16,6 +16,59 @@ #ifdef HAVE_PYTHON +//////////////////////////////////////////////////////////////////// +// Function: StreamReader::extract_bytes +// Access: Published +// Description: Extracts the indicated number of bytes in the +// stream and returns them as a string (or bytes, +// in Python 3). Returns empty string at end-of-file. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +extract_bytes(size_t size) { + unsigned char *buffer = (unsigned char *)alloca(size); + size_t read_bytes = _this->extract_bytes(buffer, size); + +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize((char *)buffer, read_bytes); +#else + return PyString_FromStringAndSize((char *)buffer, read_bytes); +#endif +} + +//////////////////////////////////////////////////////////////////// +// Function: Extension::readline +// Access: Published +// Description: Assumes the stream represents a text file, and +// extracts one line up to and including the trailing +// newline character. Returns empty string when the end +// of file is reached. +// +// The interface here is intentionally designed to be +// similar to that for Python's File.readline() +// function. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +readline() { + istream *in = _this->get_istream(); + + string line; + int ch = in->get(); + while (!in->eof() && !in->fail()) { + line += ch; + if (ch == '\n') { + // Here's the newline character. + break; + } + ch = in->get(); + } + +#if PY_MAJOR_VERSION >= 3 + return PyBytes_FromStringAndSize(line.data(), line.size()); +#else + return PyString_FromStringAndSize(line.data(), line.size()); +#endif +} + //////////////////////////////////////////////////////////////////// // Function: StreamReader::readlines // Access: Published @@ -29,16 +82,17 @@ readlines() { return NULL; } - string line = _this->readline(); - while (!line.empty()) { -#if PY_MAJOR_VERSION >= 3 - PyObject *py_line = PyBytes_FromStringAndSize(line.data(), line.size()); -#else - PyObject *py_line = PyString_FromStringAndSize(line.data(), line.size()); -#endif + PyObject *py_line = readline(); +#if PY_MAJOR_VERSION >= 3 + while (PyBytes_GET_SIZE(py_line) > 0) { +#else + while (PyString_GET_SIZE(py_line) > 0) { +#endif PyList_Append(lst, py_line); Py_DECREF(py_line); + + py_line = readline(); } return lst; diff --git a/panda/src/express/streamReader_ext.h b/panda/src/express/streamReader_ext.h index dfc2e9f0b1..eb5877f321 100644 --- a/panda/src/express/streamReader_ext.h +++ b/panda/src/express/streamReader_ext.h @@ -32,7 +32,10 @@ template<> class Extension : public ExtensionBase { public: + BLOCKING PyObject *extract_bytes(size_t size); + BLOCKING PyObject *readline(); BLOCKING PyObject *readlines(); + BLOCKING PyObject *get_data() const; }; #endif // HAVE_PYTHON diff --git a/panda/src/express/virtualFile.h b/panda/src/express/virtualFile.h index 397d82664f..3b773cd10b 100644 --- a/panda/src/express/virtualFile.h +++ b/panda/src/express/virtualFile.h @@ -58,12 +58,12 @@ PUBLISHED: BLOCKING void ls(ostream &out = cout) const; BLOCKING void ls_all(ostream &out = cout) const; - BLOCKING INLINE string read_file(bool auto_unwrap) const; + EXTENSION(BLOCKING PyObject *read_file(bool auto_unwrap) const); BLOCKING virtual istream *open_read_file(bool auto_unwrap) const; BLOCKING virtual void close_read_file(istream *stream) const; virtual bool was_read_successful() const; - BLOCKING INLINE bool write_file(const string &data, bool auto_wrap); + EXTENSION(BLOCKING PyObject *write_file(PyObject *data, bool auto_wrap)); BLOCKING virtual ostream *open_write_file(bool auto_wrap, bool truncate); BLOCKING virtual ostream *open_append_file(); BLOCKING virtual void close_write_file(ostream *stream); @@ -82,6 +82,9 @@ public: virtual bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents); virtual bool atomic_read_contents(string &contents) const; + INLINE string read_file(bool auto_unwrap) const; + INLINE bool write_file(const string &data, bool auto_wrap); + INLINE void set_original_filename(const Filename &filename); bool read_file(string &result, bool auto_unwrap) const; virtual bool read_file(pvector &result, bool auto_unwrap) const; diff --git a/panda/src/express/virtualFile_ext.cxx b/panda/src/express/virtualFile_ext.cxx new file mode 100644 index 0000000000..3d1c738e8e --- /dev/null +++ b/panda/src/express/virtualFile_ext.cxx @@ -0,0 +1,83 @@ +// Filename: virtualFile_ext.cxx +// Created by: rdb (15Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "virtualFile_ext.h" +#include "vector_uchar.h" + +#ifdef HAVE_PYTHON + +//////////////////////////////////////////////////////////////////// +// Function: VirtualFile::read_file +// Access: Published +// Description: Convenience function; returns the entire contents of +// the indicated file as a string (or as a bytes object, +// in Python 3). +// +// This variant on read_file() is implemented directly +// for Python, as a small optimization, to avoid the +// double-construction of a string object that would be +// otherwise required for the return value. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +read_file(bool auto_unwrap) const { + vector_uchar pv; + bool okflag = _this->read_file(pv, auto_unwrap); + nassertr(okflag, NULL); + +#if PY_MAJOR_VERSION >= 3 + if (pv.empty()) { + return PyBytes_FromStringAndSize("", 0); + } else { + return PyBytes_FromStringAndSize((const char *)&pv[0], pv.size()); + } +#else + if (pv.empty()) { + return PyString_FromStringAndSize("", 0); + } else { + return PyString_FromStringAndSize((const char *)&pv[0], pv.size()); + } +#endif +} + +//////////////////////////////////////////////////////////////////// +// Function: VirtualFile::write_file +// Access: Published +// Description: Convenience function; writes the entire contents of +// the indicated file as a string. +// +// This variant on write_file() is implemented directly +// for Python, as a small optimization, to avoid the +// double-construction of a string object that would be +// otherwise required. +//////////////////////////////////////////////////////////////////// +PyObject *Extension:: +write_file(PyObject *data, bool auto_wrap) { + char *buffer; + Py_ssize_t length; + +#if PY_MAJOR_VERSION >= 3 + if (PyBytes_AsStringAndSize(data, &buffer, &length) == -1) { + return NULL; + } +#else + if (PyString_AsStringAndSize(data, &buffer, &length) == -1) { + return NULL; + } +#endif + + bool result = _this->write_file((const unsigned char *)buffer, length, auto_wrap); + return PyBool_FromLong(result); +} + +#endif // HAVE_PYTHON diff --git a/panda/src/express/virtualFile_ext.h b/panda/src/express/virtualFile_ext.h new file mode 100644 index 0000000000..dd6262067b --- /dev/null +++ b/panda/src/express/virtualFile_ext.h @@ -0,0 +1,42 @@ +// Filename: virtualFile_ext.h +// Created by: rdb (15Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef VIRTUALFILE_EXT_H +#define VIRTUALFILE_EXT_H + +#include "dtoolbase.h" + +#ifdef HAVE_PYTHON + +#include "extension.h" +#include "virtualFile.h" +#include "py_panda.h" + +//////////////////////////////////////////////////////////////////// +// Class : Extension +// Description : This class defines the extension methods for +// VirtualFile, which are called instead of +// any C++ methods with the same prototype. +//////////////////////////////////////////////////////////////////// +template<> +class Extension : public ExtensionBase { +public: + PyObject *read_file(bool auto_unwrap) const; + PyObject *write_file(PyObject *data, bool auto_wrap); +}; + +#endif // HAVE_PYTHON + +#endif // VIRTUALFILE_EXT_H + From 1d9aff0c48d22b9052164acbed5e736459cabd18 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 19 Sep 2015 14:50:59 +0200 Subject: [PATCH 127/200] Fix wrapper for operator bool of TypeHandle --- dtool/src/interrogate/functionRemap.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dtool/src/interrogate/functionRemap.cxx b/dtool/src/interrogate/functionRemap.cxx index 2bf2fb06da..1b7315f1eb 100644 --- a/dtool/src/interrogate/functionRemap.cxx +++ b/dtool/src/interrogate/functionRemap.cxx @@ -146,20 +146,17 @@ call_function(ostream &out, int indent_level, bool convert_result, } else if (_type == T_typecast_method) { // A typecast method can be invoked implicitly. - string cast_expr = - "(" + _return_type->get_orig_type()->get_local_name(&parser) + ")"; + ostringstream cast_expr; + cast_expr << "(" + << _return_type->get_orig_type()->get_local_name(&parser) << ")"; - if (TypeManager::is_handle(_cpptype)) { - cast_expr += "(" + container + ")"; - } else { - cast_expr += "(*" + container + ")"; - } + _parameters[0]._remap->pass_parameter(cast_expr, container); if (!convert_result) { - return_expr = cast_expr; + return_expr = cast_expr.str(); } else { string new_str = - _return_type->prepare_return_expr(out, indent_level, cast_expr); + _return_type->prepare_return_expr(out, indent_level, cast_expr.str()); return_expr = _return_type->get_return_expr(new_str); } From 62217c652e5032e6e5cbf3e485e55d76e68023e8 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 20 Sep 2015 01:37:49 +0200 Subject: [PATCH 128/200] Fix various link issues on Windows when building rtdist --- direct/src/plugin/p3dPythonRun.cxx | 6 ++++-- direct/src/stdpy/file.py | 1 + makepanda/makepanda.py | 2 ++ panda/src/downloader/stringStream.I | 4 ++-- panda/src/downloader/stringStream.cxx | 2 +- panda/src/downloader/stringStream.h | 3 ++- panda/src/downloader/stringStreamBuf.I | 4 ++-- panda/src/downloader/stringStreamBuf.h | 8 ++++---- panda/src/downloader/stringStream_ext.cxx | 2 +- panda/src/express/streamReader_ext.h | 1 - 10 files changed, 19 insertions(+), 14 deletions(-) diff --git a/direct/src/plugin/p3dPythonRun.cxx b/direct/src/plugin/p3dPythonRun.cxx index 459d1015ce..3c8e8628c6 100644 --- a/direct/src/plugin/p3dPythonRun.cxx +++ b/direct/src/plugin/p3dPythonRun.cxx @@ -21,8 +21,10 @@ #include "py_panda.h" -// This has been compiled-in by the build system, if all is well. -extern struct _frozen _PyImport_FrozenModules[]; +extern "C" { + // This has been compiled-in by the build system, if all is well. + extern struct _frozen _PyImport_FrozenModules[]; +}; // There is only one P3DPythonRun object in any given process space. // Makes the statics easier to deal with, and we don't need multiple diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index c9524e845e..4321a01ed7 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -14,6 +14,7 @@ import panda3d._core as core import sys import os import io +import encodings _vfs = core.VirtualFileSystem.getGlobalPtr() diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 687aa70510..8e5017d4fa 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -5061,6 +5061,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dpython.exe', opts=['PYTHON', 'WINUSER']) TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj') + TargetAdd('libp3dpython.dll', input='p3dpython_frozen.obj') TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb') TargetAdd('libp3dpython.dll', input='libp3interrogatedb.dll') @@ -5073,6 +5074,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dpythonw_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx') TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dpython_composite1.obj') TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj') + TargetAdd('p3dpythonw.exe', input='p3dpython_frozen.obj') TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS) TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb') TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll') diff --git a/panda/src/downloader/stringStream.I b/panda/src/downloader/stringStream.I index 66481c69ee..5bb892f32f 100644 --- a/panda/src/downloader/stringStream.I +++ b/panda/src/downloader/stringStream.I @@ -63,7 +63,7 @@ get_data_size() { INLINE string StringStream:: get_data() { flush(); - const pvector &data = _buf.get_data(); + const vector_uchar &data = _buf.get_data(); if (!data.empty()) { return string((char *)&data[0], data.size()); } @@ -91,7 +91,7 @@ set_data(const string &data) { // internal buffer. //////////////////////////////////////////////////////////////////// INLINE void StringStream:: -swap_data(pvector &data) { +swap_data(vector_uchar &data) { flush(); _buf.swap_data(data); } diff --git a/panda/src/downloader/stringStream.cxx b/panda/src/downloader/stringStream.cxx index a15172ea08..1a72c17f6a 100644 --- a/panda/src/downloader/stringStream.cxx +++ b/panda/src/downloader/stringStream.cxx @@ -23,7 +23,7 @@ void StringStream:: set_data(const unsigned char *data, size_t size) { _buf.clear(); - pvector pv; + vector_uchar pv; pv.insert(pv.end(), data, data + size); _buf.swap_data(pv); } diff --git a/panda/src/downloader/stringStream.h b/panda/src/downloader/stringStream.h index cc295e5357..158f6194ca 100644 --- a/panda/src/downloader/stringStream.h +++ b/panda/src/downloader/stringStream.h @@ -17,6 +17,7 @@ #include "pandabase.h" #include "stringStreamBuf.h" +#include "vector_uchar.h" #include "extension.h" //////////////////////////////////////////////////////////////////// @@ -49,7 +50,7 @@ public: void set_data(const unsigned char *data, size_t size); #endif - INLINE void swap_data(pvector &data); + INLINE void swap_data(vector_uchar &data); private: StringStreamBuf _buf; diff --git a/panda/src/downloader/stringStreamBuf.I b/panda/src/downloader/stringStreamBuf.I index acd79da1d8..0c0a54bda6 100644 --- a/panda/src/downloader/stringStreamBuf.I +++ b/panda/src/downloader/stringStreamBuf.I @@ -21,7 +21,7 @@ // or the iostream buffer. //////////////////////////////////////////////////////////////////// INLINE void StringStreamBuf:: -swap_data(pvector &data) { +swap_data(vector_uchar &data) { _data.swap(data); } @@ -31,7 +31,7 @@ swap_data(pvector &data) { // Description: Returns a reference to the contents of the internal // buffer, without any of the iostream buffer. //////////////////////////////////////////////////////////////////// -INLINE const pvector &StringStreamBuf:: +INLINE const vector_uchar &StringStreamBuf:: get_data() const { return _data; } diff --git a/panda/src/downloader/stringStreamBuf.h b/panda/src/downloader/stringStreamBuf.h index 2fe5936a2f..ae42cf623d 100644 --- a/panda/src/downloader/stringStreamBuf.h +++ b/panda/src/downloader/stringStreamBuf.h @@ -16,7 +16,7 @@ #define STRINGSTREAMBUF_H #include "pandabase.h" -#include "pvector.h" +#include "vector_uchar.h" //////////////////////////////////////////////////////////////////// // Class : StringStreamBuf @@ -32,8 +32,8 @@ public: void clear(); - INLINE void swap_data(pvector &data); - INLINE const pvector &get_data() const; + INLINE void swap_data(vector_uchar &data); + INLINE const vector_uchar &get_data() const; size_t read_chars(char *start, size_t length); void write_chars(const char *start, size_t length); @@ -47,7 +47,7 @@ protected: virtual int underflow(); private: - pvector _data; + vector_uchar _data; char *_buffer; size_t _ppos; size_t _gpos; diff --git a/panda/src/downloader/stringStream_ext.cxx b/panda/src/downloader/stringStream_ext.cxx index a1c46d6cef..54c889d7e3 100644 --- a/panda/src/downloader/stringStream_ext.cxx +++ b/panda/src/downloader/stringStream_ext.cxx @@ -34,7 +34,7 @@ __init__(PyObject *source) { PyObject *Extension:: get_data() { _this->flush(); - const pvector &data = _this->_buf.get_data(); + const vector_uchar &data = _this->_buf.get_data(); if (!data.empty()) { #if PY_MAJOR_VERSION >= 3 return PyBytes_FromStringAndSize((char *)&data[0], data.size()); diff --git a/panda/src/express/streamReader_ext.h b/panda/src/express/streamReader_ext.h index eb5877f321..49edcd6426 100644 --- a/panda/src/express/streamReader_ext.h +++ b/panda/src/express/streamReader_ext.h @@ -35,7 +35,6 @@ public: BLOCKING PyObject *extract_bytes(size_t size); BLOCKING PyObject *readline(); BLOCKING PyObject *readlines(); - BLOCKING PyObject *get_data() const; }; #endif // HAVE_PYTHON From 6d4d23cf6c06b1278b029bf60798a1552a5f781c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 20 Sep 2015 16:01:49 +0200 Subject: [PATCH 129/200] Fix some p3dCert issues --- direct/src/plugin/p3dCert_strings.cxx | 4 ++-- makepanda/makepanda.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/plugin/p3dCert_strings.cxx b/direct/src/plugin/p3dCert_strings.cxx index bd191768e0..307c9b7f44 100644 --- a/direct/src/plugin/p3dCert_strings.cxx +++ b/direct/src/plugin/p3dCert_strings.cxx @@ -82,7 +82,7 @@ no_cert_title[LI_COUNT] = { "Keine Signatur!", "Sin firma!", "Nessuna firma!", - "Ne subskribo!", + "Neniu subskribo!", "\320\235\320\265\321\202 \320\277\320\276\320\264\320\277\320\270\321\201" "\320\270!", }; @@ -157,7 +157,7 @@ self_signed_cert_text[LI_COUNT] = { // epo "\304\210i tiu aplika\304\265o de Panda3D uzas memsubskribitan ateston. " - "Tio signifas ke la nomo de la verkanto ne povas esti kontrolita, kaj vi " + "Tio signifas ke la nomo de la verkanto ne povas esti kontrolita, kaj vi " "ne havas certan scimanieron pri la vera verkanto de la aplika\304\265o.\n" "\n" "Ni rekomendas ke vi premas la butonon 'Nuligi' por eviti lan\304\211on de " diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 6e3f367be3..b1c31930ea 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -4925,7 +4925,7 @@ if (RTDIST or RUNTIME): OPTS += ['OPT:2'] TargetAdd('p3dcert.exe', opts=OPTS) elif (PkgSkip("WX")==0): - OPTS.append("WX") + OPTS += ["WX", "RTTI"] TargetAdd('plugin_p3dCert.obj', opts=OPTS, input='p3dCert_wx.cxx') TargetAdd('p3dcert.exe', input='plugin_mkdir_complete.obj') TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj') From 49088fb7ce86d058b61642cbebef7d76b09156b6 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 21 Sep 2015 15:13:21 +0200 Subject: [PATCH 130/200] Fix some issues with new VFS open() implementation --- direct/src/directnotify/Notifier.py | 2 +- direct/src/stdpy/file.py | 34 ++++++++++------ dtool/src/prc/streamWriter.I | 4 +- dtool/src/prc/streamWriter.h | 7 +++- panda/src/express/p3express_ext_composite.cxx | 1 + panda/src/express/streamWriter_ext.cxx | 39 ++++++++++++++++++ panda/src/express/streamWriter_ext.h | 40 +++++++++++++++++++ 7 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 panda/src/express/streamWriter_ext.cxx create mode 100644 panda/src/express/streamWriter_ext.h diff --git a/direct/src/directnotify/Notifier.py b/direct/src/directnotify/Notifier.py index 816ab8c0df..a49bbf0d03 100644 --- a/direct/src/directnotify/Notifier.py +++ b/direct/src/directnotify/Notifier.py @@ -235,7 +235,7 @@ class Notifier: Prints the string to output followed by a newline. """ if self.streamWriter: - self.streamWriter.appendData(string + '\n') + self.streamWriter.write(string + '\n') else: print >> sys.stderr, string diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index 4321a01ed7..463eb8639c 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -61,20 +61,22 @@ def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, # We can also "open" a VirtualFile object for reading. vfile = file filename = vfile.getFilename() + elif isinstance(file, unicode): + # If a raw string is given, assume it's an os-specific + # filename. + filename = core.Filename.fromOsSpecificW(file) + elif isinstance(file, str): + filename = core.Filename.fromOsSpecific(file) + else: + # If a Filename is given, make a writable copy anyway. + filename = core.Filename(file) + + if binary or sys.version_info >= (3, 0): filename.setBinary() else: - # Otherwise, we must have been given a filename. Open it. - if isinstance(file, unicode): - # If a raw string is given, assume it's an os-specific - # filename. - filename = core.Filename.fromOsSpecificW(file) - elif isinstance(file, str): - filename = core.Filename.fromOsSpecific(file) - else: - # If a Filename is given, make a writable copy anyway. - filename = core.Filename(file) + filename.setText() - filename.setBinary() + if not vfile: vfile = _vfs.getFile(filename) if not vfile: @@ -108,7 +110,7 @@ def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, if updating: stream = vfile.openReadWriteFile(True) else: - stream = vfile.openWriteFile(False) + stream = vfile.openWriteFile(False, True) if not stream: raise IOError("Could not open %s for writing" % (filename)) @@ -133,6 +135,10 @@ def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, if binary: return raw + # If we're in Python 2, we don't decode unicode strings by default. + if not encoding and sys.version_info < (3, 0): + return raw + line_buffering = False if buffering == 1: line_buffering = True @@ -165,7 +171,7 @@ class StreamIOWrapper(io.IOBase): self.__lastWrite = False if isinstance(stream, core.Istream): - self.__reader = core.StreamReader(self.__stream, False) + self.__reader = core.StreamReader(stream, False) if isinstance(stream, core.Ostream): self.__writer = core.StreamWriter(stream, False) @@ -226,6 +232,8 @@ class StreamIOWrapper(io.IOBase): result += self.__reader.extractBytes(512) return result + read1 = read + def readline(self, size=-1): if not self.__reader: if not self.__writer: diff --git a/dtool/src/prc/streamWriter.I b/dtool/src/prc/streamWriter.I index ce4500a475..4c388c387f 100644 --- a/dtool/src/prc/streamWriter.I +++ b/dtool/src/prc/streamWriter.I @@ -395,7 +395,7 @@ add_fixed_string(const string &str, size_t size) { //////////////////////////////////////////////////////////////////// // Function: StreamWriter::append_data -// Access: Published +// Access: Public // Description: Appends some more raw data to the end of the // streamWriter. //////////////////////////////////////////////////////////////////// @@ -406,7 +406,7 @@ append_data(const void *data, size_t size) { //////////////////////////////////////////////////////////////////// // Function: StreamWriter::append_data -// Access: Published +// Access: Public // Description: Appends some more raw data to the end of the // streamWriter. //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/prc/streamWriter.h b/dtool/src/prc/streamWriter.h index b63feaf6b1..eb1f3bcf67 100644 --- a/dtool/src/prc/streamWriter.h +++ b/dtool/src/prc/streamWriter.h @@ -71,13 +71,16 @@ PUBLISHED: BLOCKING INLINE void add_fixed_string(const string &str, size_t size); BLOCKING void pad_bytes(size_t size); - BLOCKING INLINE void append_data(const void *data, size_t size); - BLOCKING INLINE void append_data(const string &data); + EXTENSION(void append_data(PyObject *data)); BLOCKING INLINE void flush(); BLOCKING INLINE void write(const string &str); +public: + BLOCKING INLINE void append_data(const void *data, size_t size); + BLOCKING INLINE void append_data(const string &data); + private: ostream *_out; bool _owns_stream; diff --git a/panda/src/express/p3express_ext_composite.cxx b/panda/src/express/p3express_ext_composite.cxx index 1dab5d4477..e034261ae3 100644 --- a/panda/src/express/p3express_ext_composite.cxx +++ b/panda/src/express/p3express_ext_composite.cxx @@ -3,6 +3,7 @@ #include "memoryUsagePointers_ext.cxx" #include "ramfile_ext.cxx" #include "streamReader_ext.cxx" +#include "streamWriter_ext.cxx" #include "typeHandle_ext.cxx" #include "virtualFileSystem_ext.cxx" #include "virtualFile_ext.cxx" diff --git a/panda/src/express/streamWriter_ext.cxx b/panda/src/express/streamWriter_ext.cxx new file mode 100644 index 0000000000..552b2a7dbd --- /dev/null +++ b/panda/src/express/streamWriter_ext.cxx @@ -0,0 +1,39 @@ +// Filename: streamWriter_ext.cxx +// Created by: rdb (19Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "streamWriter_ext.h" + +#ifdef HAVE_PYTHON + +//////////////////////////////////////////////////////////////////// +// Function: StreamWriter::append_data +// Access: Published +// Description: Appends some more raw data to the end of the +// StreamWriter. +//////////////////////////////////////////////////////////////////// +void Extension:: +append_data(PyObject *data) { + cerr << "getting here: " << data << "\n"; + Py_buffer view; + if (PyObject_GetBuffer(data, &view, PyBUF_CONTIG_RO) == -1) { + //PyErr_SetString(PyExc_TypeError, + // "append_data() requires a contiguous buffer"); + return; + } + + _this->append_data(view.buf, view.len); + PyBuffer_Release(&view); +} + +#endif diff --git a/panda/src/express/streamWriter_ext.h b/panda/src/express/streamWriter_ext.h new file mode 100644 index 0000000000..e8e1b270cd --- /dev/null +++ b/panda/src/express/streamWriter_ext.h @@ -0,0 +1,40 @@ +// Filename: streamWriter_ext.h +// Created by: rdb (19Sep15) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef STREAMWRITER_EXT_H +#define STREAMWRITER_EXT_H + +#include "dtoolbase.h" + +#ifdef HAVE_PYTHON + +#include "extension.h" +#include "streamWriter.h" +#include "py_panda.h" + +//////////////////////////////////////////////////////////////////// +// Class : Extension +// Description : This class defines the extension methods for +// StreamWriter, which are called instead of +// any C++ methods with the same prototype. +//////////////////////////////////////////////////////////////////// +template<> +class Extension : public ExtensionBase { +public: + void append_data(PyObject *data); +}; + +#endif // HAVE_PYTHON + +#endif // STREAMWriter_EXT_H From 532bee3b9ef50c5080797f9454fa86767d9ad361 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 23 Sep 2015 11:57:55 +0200 Subject: [PATCH 131/200] More fixes to Python 3 rtdist, frozen p3dpython building, new open --- direct/src/showbase/VFSImporter.py | 48 ++++++++++------------ direct/src/showutil/FreezeTool.py | 4 ++ makepanda/makepanda.py | 6 ++- makepanda/makepandacore.py | 56 ++++++++++++++------------ panda/src/express/streamWriter_ext.cxx | 5 +-- 5 files changed, 64 insertions(+), 55 deletions(-) diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py index e7be781c45..e092775e6e 100644 --- a/direct/src/showbase/VFSImporter.py +++ b/direct/src/showbase/VFSImporter.py @@ -25,12 +25,6 @@ sharedPackages = {} vfs = VirtualFileSystem.getGlobalPtr() -# Possible file types. -FTPythonSource = 0 -FTPythonCompiled = 1 -FTExtensionModule = 2 -FTFrozenModule = 3 - compiledExtensions = [ 'pyc', 'pyo' ] if not __debug__: # In optimized mode, we prefer loading .pyo files over .pyc files. @@ -44,7 +38,10 @@ class VFSImporter: (among other places). """ def __init__(self, path): - self.dir_path = Filename.fromOsSpecific(path) + if isinstance(path, Filename): + self.dir_path = Filename(path) + else: + self.dir_path = Filename.fromOsSpecific(path) def find_module(self, fullname, path = None): if path is None: @@ -60,7 +57,8 @@ class VFSImporter: filename.setExtension('py') vfile = vfs.getFile(filename, True) if vfile: - return VFSLoader(dir_path, vfile, filename, FTPythonSource) + return VFSLoader(dir_path, vfile, filename, + desc=('.py', 'U', imp.PY_SOURCE)) # If there's no .py file, but there's a .pyc file, load that # anyway. @@ -69,7 +67,8 @@ class VFSImporter: filename.setExtension(ext) vfile = vfs.getFile(filename, True) if vfile: - return VFSLoader(dir_path, vfile, filename, FTPythonCompiled) + return VFSLoader(dir_path, vfile, filename, + desc=('.'+ext, 'rb', imp.PY_COMPILED)) # Look for a C/C++ extension module. for desc in imp.get_suffixes(): @@ -79,22 +78,21 @@ class VFSImporter: filename = Filename(path + desc[0]) vfile = vfs.getFile(filename, True) if vfile: - return VFSLoader(dir_path, vfile, filename, FTExtensionModule, - desc = desc) + return VFSLoader(dir_path, vfile, filename, desc=desc) # Finally, consider a package, i.e. a directory containing # __init__.py. filename = Filename(path, '__init__.py') vfile = vfs.getFile(filename, True) if vfile: - return VFSLoader(dir_path, vfile, filename, FTPythonSource, - packagePath = path) + return VFSLoader(dir_path, vfile, filename, packagePath=path, + desc=('.py', 'U', imp.PY_SOURCE)) for ext in compiledExtensions: filename = Filename(path, '__init__.' + ext) vfile = vfs.getFile(filename, True) if vfile: - return VFSLoader(dir_path, vfile, filename, FTPythonCompiled, - packagePath = path) + return VFSLoader(dir_path, vfile, filename, packagePath=path, + desc=('.'+ext, 'rb', imp.PY_COMPILED)) #print >>sys.stderr, "not found." return None @@ -103,22 +101,20 @@ class VFSLoader: """ The second part of VFSImporter, this is created for a particular .py file or directory. """ - def __init__(self, dir_path, vfile, filename, fileType, - desc = None, packagePath = None): + def __init__(self, dir_path, vfile, filename, desc, packagePath=None): self.dir_path = dir_path self.timestamp = None if vfile: self.timestamp = vfile.getTimestamp() self.filename = filename - self.fileType = fileType self.desc = desc self.packagePath = packagePath def load_module(self, fullname, loadingShared = False): #print >>sys.stderr, "load_module(%s), dir_path = %s, filename = %s" % (fullname, self.dir_path, self.filename) - if self.fileType == FTFrozenModule: + if self.desc[2] == imp.PY_FROZEN: return self._import_frozen_module(fullname) - if self.fileType == FTExtensionModule: + if self.desc[2] == imp.C_EXTENSION: return self._import_extension_module(fullname) # Check if this is a child of a shared package. @@ -152,7 +148,7 @@ class VFSLoader: path = Filename(self.dir_path, Filename.fromOsSpecific(path)) vfile = vfs.getFile(path) if not vfile: - raise IOError + raise IOError("Could not find '%s'" % (path)) return vfile.readFile(True) def is_package(self, fullname): @@ -171,8 +167,8 @@ class VFSLoader: """ Returns the Python source for this file, if it is available, or None if it is not. May raise IOError. """ - if self.fileType == FTPythonCompiled or \ - self.fileType == FTExtensionModule: + if self.desc[2] == imp.PY_COMPILED or \ + self.desc[2] == imp.C_EXTENSION: return None filename = Filename(self.filename) @@ -180,7 +176,7 @@ class VFSLoader: filename.setText() vfile = vfs.getFile(filename) if not vfile: - raise IOError + raise IOError("Could not find '%s'" % (filename)) return vfile.readFile(True) def _import_extension_module(self, fullname): @@ -242,14 +238,14 @@ class VFSLoader: ValueError, SyntaxError, or a number of other errors generated by the low-level system. """ - if self.fileType == FTPythonCompiled: + if self.desc[2] == imp.PY_COMPILED: # It's a pyc file; just read it directly. pycVfile = vfs.getFile(self.filename, False) if pycVfile: return self._loadPyc(pycVfile, None) raise IOError('Could not read %s' % (self.filename)) - elif self.fileType == FTExtensionModule: + elif self.desc[2] == imp.C_EXTENSION: return None # It's a .py file (or an __init__.py file; same thing). Read diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index cd303697f2..4b186d1eeb 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -1386,6 +1386,10 @@ class PandaModuleFinder(modulefinder.ModuleFinder): modulefinder.ModuleFinder.__init__(self, *args, **kw) def find_module(self, name, path, *args, **kwargs): + if imp.is_frozen(name): + # Don't pick up modules that are frozen into p3dpython. + raise ImportError("'%s' is a frozen module" % (name)) + try: return modulefinder.ModuleFinder.find_module(self, name, path, *args, **kwargs) except ImportError: diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 464f798ced..b536140238 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -5049,7 +5049,11 @@ if (RTDIST or RUNTIME): TargetAdd("libp3d_plugin_static.ilb", input='plugin_get_twirl_data.obj') if (PkgSkip("PYTHON")==0 and RTDIST): - TargetAdd('p3dpython_frozen.obj', opts=['DIR:direct/src/showbase', 'FREEZE_STARTUP'], input='VFSImporter.py') + # Freeze VFSImporter and its dependency modules into p3dpython. + # Mark panda3d.core as a dependency to make sure to build that first. + TargetAdd('p3dpython_frozen.obj', input='VFSImporter.py', opts=['DIR:direct/src/showbase', 'FREEZE_STARTUP']) + TargetAdd('p3dpython_frozen.obj', dep='panda3d/core.py') + TargetAdd('p3dpython_p3dpython_composite1.obj', opts=OPTS, input='p3dpython_composite1.cxx') TargetAdd('p3dpython_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx') TargetAdd('p3dpython.exe', input='p3dpython_p3dpython_composite1.obj') diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index e5913a1c84..c9639ab1c7 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2302,7 +2302,9 @@ def SetupBuildEnvironment(compiler): print("Target arch: %s" % GetTargetArch()) # Set to English so we can safely parse the result of gcc commands. - os.environ["LC_ALL"] = "C" + # Setting it to UTF-8 is necessary for Python 3 modules to import + # correctly. + os.environ["LC_ALL"] = "en_US.UTF-8" if compiler == "MSVC": # Add the visual studio tools to PATH et al. @@ -2842,11 +2844,11 @@ class Target: TARGET_LIST = [] TARGET_TABLE = {} -def TargetAdd(target, dummy=0, opts=0, input=0, dep=0, ipath=0, winrc=0): +def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None): if (dummy != 0): exit("Syntax error in TargetAdd "+target) - if (ipath == 0): ipath = opts - if (ipath == 0): ipath = [] + if ipath is None: ipath = opts + if not ipath: ipath = [] if (type(input) == str): input = [input] if (type(dep) == str): dep = [dep] @@ -2867,30 +2869,34 @@ def TargetAdd(target, dummy=0, opts=0, input=0, dep=0, ipath=0, winrc=0): else: t = TARGET_TABLE[full] - if opts != 0: - for x in opts: - if (t.opts.count(x)==0): - t.opts.append(x) + for x in opts: + if x not in t.opts: + t.opts.append(x) ipath = [OUTPUTDIR + "/tmp"] + GetListOption(ipath, "DIR:") + [OUTPUTDIR+"/include"] - if input != 0: - for x in input: - fullinput = FindLocation(x, ipath) - t.inputs.append(fullinput) - # Don't re-link a library or binary if just its dependency dlls have been altered. - # This should work out fine in most cases, and often reduces recompilation time. - if (os.path.splitext(x)[-1] not in SUFFIX_DLL): - t.deps[fullinput] = 1 - (base,suffix) = os.path.splitext(x) - if (SUFFIX_INC.count(suffix)): - for d in CxxCalcDependencies(fullinput, ipath, []): - t.deps[d] = 1 - if dep != 0: - for x in dep: - fulldep = FindLocation(x, ipath) - t.deps[fulldep] = 1 + for x in input: + fullinput = FindLocation(x, ipath) + t.inputs.append(fullinput) + # Don't re-link a library or binary if just its dependency dlls have been altered. + # This should work out fine in most cases, and often reduces recompilation time. + if (os.path.splitext(x)[-1] not in SUFFIX_DLL): + t.deps[fullinput] = 1 + (base,suffix) = os.path.splitext(x) + if (SUFFIX_INC.count(suffix)): + for d in CxxCalcDependencies(fullinput, ipath, []): + t.deps[d] = 1 - if winrc != 0 and GetTarget() == 'windows': + if x.endswith(".in"): + # Mark the _igate.cxx file as a dependency also. + outbase = os.path.basename(x)[:-3] + woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" + t.deps[woutc] = 1 + + for x in dep: + fulldep = FindLocation(x, ipath) + t.deps[fulldep] = 1 + + if winrc and GetTarget() == 'windows': TargetAdd(target, input=WriteResourceFile(target.split("/")[-1].split(".")[0], **winrc)) if target.endswith(".in"): diff --git a/panda/src/express/streamWriter_ext.cxx b/panda/src/express/streamWriter_ext.cxx index 552b2a7dbd..68d7d39bc0 100644 --- a/panda/src/express/streamWriter_ext.cxx +++ b/panda/src/express/streamWriter_ext.cxx @@ -24,11 +24,10 @@ //////////////////////////////////////////////////////////////////// void Extension:: append_data(PyObject *data) { - cerr << "getting here: " << data << "\n"; Py_buffer view; if (PyObject_GetBuffer(data, &view, PyBUF_CONTIG_RO) == -1) { - //PyErr_SetString(PyExc_TypeError, - // "append_data() requires a contiguous buffer"); + PyErr_SetString(PyExc_TypeError, + "append_data() requires a contiguous buffer"); return; } From fcd3bfd15ce941771367e44f7092468659011df9 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 28 Sep 2015 13:08:38 +0200 Subject: [PATCH 132/200] Fix interrogate issues with long, streampos, streamoff, streamsize and ptrdiff_t --- .../interfaceMakerPythonNative.cxx | 50 +++++++++++-------- dtool/src/interrogate/typeManager.cxx | 39 ++++++++++++++- dtool/src/interrogate/typeManager.h | 1 + dtool/src/interrogatedb/py_panda.h | 2 + dtool/src/parser-inc/iostream | 8 +++ dtool/src/parser-inc/stdint.h | 2 +- 6 files changed, 80 insertions(+), 22 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 1078582d53..5a2dd24e41 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -4848,17 +4848,32 @@ write_function_instance(ostream &out, FunctionRemap *remap, // Windows, where longs are the same size as ints. // BUG: does not catch negative values on Windows when going through // the PyArg_ParseTuple case. - extra_convert - << "#if (SIZEOF_LONG > SIZEOF_INT) && !defined(NDEBUG)\n" - << "if (" << param_name << " > UINT_MAX) {\n"; + if (!TypeManager::is_long(type)) { + extra_convert + << "#if (SIZEOF_LONG > SIZEOF_INT) && !defined(NDEBUG)\n" + << "if (" << param_name << " > UINT_MAX) {\n"; - error_raise_return(extra_convert, 2, return_flags, "OverflowError", - "value %lu out of range for unsigned integer", - param_name); - extra_convert - << "}\n" - << "#endif\n"; + error_raise_return(extra_convert, 2, return_flags, "OverflowError", + "value %lu out of range for unsigned integer", + param_name); + extra_convert + << "}\n" + << "#endif\n"; + } + expected_params += "int"; + only_pyobjects = false; + + } else if (TypeManager::is_long(type)) { + // Signed longs are equivalent to Python's int type. + if (args_type == AT_single_arg) { + pexpr_string = "PyLongOrInt_AS_LONG(arg)"; + type_check = "PyLongOrInt_Check(arg)"; + } else { + indent(out, indent_level) << "long " << param_name << default_expr << ";\n"; + format_specifiers += "l"; + parameter_list += ", &" + param_name; + } expected_params += "int"; only_pyobjects = false; @@ -4877,6 +4892,7 @@ write_function_instance(ostream &out, FunctionRemap *remap, error_raise_return(extra_convert, 2, return_flags, "OverflowError", "value %ld out of range for signed integer", "arg_val"); + extra_convert << "}\n" << "#endif\n"; @@ -5934,6 +5950,10 @@ pack_return_value(ostream &out, int indent_level, FunctionRemap *remap, indent(out, indent_level) << "return PyBool_FromLong(" << return_expr << ");\n"; + } else if (TypeManager::is_ssize(type)) { + indent(out, indent_level) + << "return PyLongOrInt_FromSsize_t(" << return_expr << ");\n"; + } else if (TypeManager::is_size(type)) { indent(out, indent_level) << "return PyLongOrInt_FromSize_t(" << return_expr << ");\n"; @@ -5960,22 +5980,12 @@ pack_return_value(ostream &out, int indent_level, FunctionRemap *remap, << "return PyLong_FromLongLong(" << return_expr << ");\n"; } else if (TypeManager::is_unsigned_integer(type)){ - out << "#if PY_MAJOR_VERSION >= 3\n"; - indent(out, indent_level) - << "return PyLong_FromUnsignedLong(" << return_expr << ");\n"; - out << "#else\n"; indent(out, indent_level) << "return PyLongOrInt_FromUnsignedLong(" << return_expr << ");\n"; - out << "#endif\n"; } else if (TypeManager::is_integer(type)) { - out << "#if PY_MAJOR_VERSION >= 3\n"; indent(out, indent_level) - << "return PyLong_FromLong(" << return_expr << ");\n"; - out << "#else\n"; - indent(out, indent_level) - << "return PyInt_FromLong(" << return_expr << ");\n"; - out << "#endif\n"; + << "return PyLongOrInt_FromLong(" << return_expr << ");\n"; } else if (TypeManager::is_float(type)) { indent(out, indent_level) diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index fa78d89664..ab048b52c8 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -1142,6 +1142,9 @@ is_size(CPPType *type) { // Access: Public, Static // Description: Returns true if the indicated type is the "ssize_t" // type, or a const ssize_t, or a typedef to either. +// ptrdiff_t and streamsize are also accepted, since +// they are usually also defined as the signed +// counterpart to size_t. //////////////////////////////////////////////////////////////////// bool TypeManager:: is_ssize(CPPType *type) { @@ -1151,7 +1154,9 @@ is_ssize(CPPType *type) { case CPPDeclaration::ST_typedef: if (type->get_simple_name() == "Py_ssize_t" || - type->get_simple_name() == "ssize_t") { + type->get_simple_name() == "ssize_t" || + type->get_simple_name() == "ptrdiff_t" || + type->get_simple_name() == "streamsize") { return is_integer(type->as_typedef_type()->_type); } else { return is_ssize(type->as_typedef_type()->_type); @@ -1164,6 +1169,38 @@ is_ssize(CPPType *type) { return false; } +//////////////////////////////////////////////////////////////////// +// Function: TypeManager::is_long +// Access: Public, Static +// Description: Returns true if the indicated type is the "long" +// type, whether signed or unsigned. +//////////////////////////////////////////////////////////////////// +bool TypeManager:: +is_long(CPPType *type) { + switch (type->get_subtype()) { + case CPPDeclaration::ST_const: + return is_long(type->as_const_type()->_wrapped_around); + + case CPPDeclaration::ST_simple: + { + CPPSimpleType *simple_type = type->as_simple_type(); + if (simple_type != (CPPSimpleType *)NULL) { + return (simple_type->_type == CPPSimpleType::T_int && + (simple_type->_flags & CPPSimpleType::F_long) != 0); + } + } + break; + + case CPPDeclaration::ST_typedef: + return is_long(type->as_typedef_type()->_type); + + default: + break; + } + + return false; +} + //////////////////////////////////////////////////////////////////// // Function: TypeManager::is_short // Access: Public, Static diff --git a/dtool/src/interrogate/typeManager.h b/dtool/src/interrogate/typeManager.h index 16b9dfda22..4b29845971 100644 --- a/dtool/src/interrogate/typeManager.h +++ b/dtool/src/interrogate/typeManager.h @@ -89,6 +89,7 @@ public: static bool is_unsigned_integer(CPPType *type); static bool is_size(CPPType *type); static bool is_ssize(CPPType *type); + static bool is_long(CPPType *type); static bool is_short(CPPType *type); static bool is_unsigned_short(CPPType *type); static bool is_longlong(CPPType *type); diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index 7ad2e5857a..0c4c47f3f3 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -112,6 +112,7 @@ inline PyObject* doPy_RETURN_FALSE() #define PyLongOrInt_Check(x) PyLong_Check(x) #define PyLongOrInt_FromSize_t PyLong_FromSize_t +#define PyLongOrInt_FromSsize_t PyLong_FromSsize_t #define PyLongOrInt_FromLong PyLong_FromLong #define PyLongOrInt_FromUnsignedLong PyLong_FromUnsignedLong #define PyLongOrInt_AS_LONG PyLong_AS_LONG @@ -122,6 +123,7 @@ inline PyObject* doPy_RETURN_FALSE() #define PyLongOrInt_Check(x) (PyInt_Check(x) || PyLong_Check(x)) // PyInt_FromSize_t automatically picks the right type. #define PyLongOrInt_FromSize_t PyInt_FromSize_t +#define PyLongOrInt_FromSsize_t PyInt_FromSsize_t #define PyLongOrInt_FromLong PyInt_FromLong #define PyLongOrInt_AS_LONG PyInt_AsLong diff --git a/dtool/src/parser-inc/iostream b/dtool/src/parser-inc/iostream index 87fd92ebcd..fac16148b4 100644 --- a/dtool/src/parser-inc/iostream +++ b/dtool/src/parser-inc/iostream @@ -47,8 +47,16 @@ __published: class ios : public ios_base { __published: typedef long fmtflags; +#ifdef _WIN64 + typedef unsigned __int64 streampos; + typedef __int64 streamoff; +#elif defined(_WIN32) typedef unsigned long streampos; typedef long streamoff; +#else + typedef unsigned long long streampos; + typedef long long streamoff; +#endif bool good() const; bool eof() const; diff --git a/dtool/src/parser-inc/stdint.h b/dtool/src/parser-inc/stdint.h index 060dbf82e7..11fba7a776 100644 --- a/dtool/src/parser-inc/stdint.h +++ b/dtool/src/parser-inc/stdint.h @@ -15,7 +15,7 @@ #ifndef _STDINT_H #define _STDINT_H -#ifdef _LP64 +#if defined(_LP64) || defined(_WIN64) #define __WORDSIZE 64 #else #define __WORDSIZE 32 From a902f1628b24a6123b9279333944585aa7689d80 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 28 Sep 2015 13:25:17 +0200 Subject: [PATCH 133/200] Fix Win64 compilation --- dtool/src/parser-inc/iostream | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dtool/src/parser-inc/iostream b/dtool/src/parser-inc/iostream index fac16148b4..296a324149 100644 --- a/dtool/src/parser-inc/iostream +++ b/dtool/src/parser-inc/iostream @@ -47,15 +47,13 @@ __published: class ios : public ios_base { __published: typedef long fmtflags; -#ifdef _WIN64 - typedef unsigned __int64 streampos; - typedef __int64 streamoff; -#elif defined(_WIN32) - typedef unsigned long streampos; - typedef long streamoff; -#else +#if defined(_WIN64) || !defined(_WIN32) typedef unsigned long long streampos; typedef long long streamoff; +#else + // 32-bit Windows uses 32-bit stream offsets. + typedef unsigned long streampos; + typedef long streamoff; #endif bool good() const; From 1ccf1cf29b73cc7d1817d90cda666a50ce7e4910 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 30 Sep 2015 14:06:12 +0200 Subject: [PATCH 134/200] Port pdeploy to Python 3 --- direct/src/p3d/DeploymentTools.py | 107 +++++++++++++++++------------- direct/src/p3d/HostInfo.py | 23 +++---- direct/src/p3d/PackageInfo.py | 3 +- direct/src/stdpy/file.py | 15 +---- 4 files changed, 75 insertions(+), 73 deletions(-) diff --git a/direct/src/p3d/DeploymentTools.py b/direct/src/p3d/DeploymentTools.py index 880a32f7f5..7f18bd10e7 100644 --- a/direct/src/p3d/DeploymentTools.py +++ b/direct/src/p3d/DeploymentTools.py @@ -5,7 +5,7 @@ to build for as many platforms as possible. """ __all__ = ["Standalone", "Installer"] import os, sys, subprocess, tarfile, shutil, time, zipfile, socket, getpass, struct -from cStringIO import StringIO +from io import BytesIO, TextIOWrapper from direct.directnotify.DirectNotifyGlobal import * from direct.showbase.AppRunnerGlobal import appRunner from panda3d.core import PandaSystem, HTTPClient, Filename, VirtualFileSystem, Multifile @@ -21,8 +21,8 @@ try: except ImportError: pwd = None -# Make sure this matches with the magic in p3dEmbed.cxx. -P3DEMBED_MAGIC = "\xFF\x3D\x3D\x00" +# Make sure this matches with the magic in p3dEmbedMain.cxx. +P3DEMBED_MAGIC = 0xFF3D3D00 # This filter function is used when creating # an archive that should be owned by root. @@ -161,10 +161,10 @@ class Standalone: # Find the magic size string and replace it with the real size, # regardless of the endianness of the p3dembed executable. - hex_size = hex(size)[2:].rjust(8, "0") - enc_size = "".join([chr(int(hex_size[i] + hex_size[i + 1], 16)) for i in range(0, len(hex_size), 2)]) - p3dembed_data = p3dembed_data.replace(P3DEMBED_MAGIC, enc_size) - p3dembed_data = p3dembed_data.replace(P3DEMBED_MAGIC[::-1], enc_size[::-1]) + p3dembed_data = p3dembed_data.replace(struct.pack('>I', P3DEMBED_MAGIC), + struct.pack('>I', size)) + p3dembed_data = p3dembed_data.replace(struct.pack('>controlfile, "Package: %s" % self.shortname.lower() - print >>controlfile, "Version: %s" % self.version - print >>controlfile, "Maintainer: %s <%s>" % (self.authorname, self.authoremail) - print >>controlfile, "Section: games" - print >>controlfile, "Priority: optional" - print >>controlfile, "Architecture: %s" % arch - print >>controlfile, "Installed-Size: %d" % -(-totsize / 1024) - print >>controlfile, "Description: %s" % self.fullname - print >>controlfile, "Depends: libc6, libgcc1, libstdc++6, libx11-6" + controlfile = BytesIO() + cout = TextIOWrapper(controlfile, encoding='utf-8', newline='') + cout.write(u"Package: %s\n" % self.shortname.lower()) + cout.write(u"Version: %s\n" % self.version) + cout.write(u"Maintainer: %s <%s>\n" % (self.authorname, self.authoremail)) + cout.write(u"Section: games\n") + cout.write(u"Priority: optional\n") + cout.write(u"Architecture: %s\n" % arch) + cout.write(u"Installed-Size: %d\n" % -(-totsize // 1024)) + cout.write(u"Description: %s\n" % self.fullname) + cout.write(u"Depends: libc6, libgcc1, libstdc++6, libx11-6\n") + cout.flush() controlinfo = TarInfoRoot("control") controlinfo.mtime = modtime controlinfo.size = controlfile.tell() @@ -820,33 +825,43 @@ class Installer: if output.exists(): output.unlink() debfile = open(output.toOsSpecific(), "wb") - debfile.write("!\x0A") - debfile.write("debian-binary %-12lu0 0 100644 %-10ld\x60\x0A" % (modtime, 4)) - debfile.write("2.0\x0A") + debfile.write(b"!\x0A") + pad_mtime = str(modtime).encode().ljust(12, b' ') - # Write the control.tar.gz to the archive. - debfile.write("control.tar.gz %-12lu0 0 100644 %-10ld\x60\x0A" % (modtime, 0)) + # The first entry is a special file that marks it a .deb. + debfile.write(b"debian-binary ") + debfile.write(pad_mtime) + debfile.write(b"0 0 100644 4 \x60\x0A") + debfile.write(b"2.0\x0A") + + # Write the control.tar.gz to the archive. We'll leave the + # size 0 for now, and go back and fill it in later. + debfile.write(b"control.tar.gz ") + debfile.write(pad_mtime) + debfile.write(b"0 0 100644 0 \x60\x0A") ctaroffs = debfile.tell() ctarfile = tarfile.open("control.tar.gz", "w:gz", debfile, tarinfo = TarInfoRoot) ctarfile.addfile(controlinfo, controlfile) ctarfile.close() ctarsize = debfile.tell() - ctaroffs - if (ctarsize & 1): debfile.write("\x0A") + if (ctarsize & 1): debfile.write(b"\x0A") - # Write the data.tar.gz to the archive. - debfile.write("data.tar.gz %-12lu0 0 100644 %-10ld\x60\x0A" % (modtime, 0)) + # Write the data.tar.gz to the archive. Again, leave size 0. + debfile.write(b"data.tar.gz ") + debfile.write(pad_mtime) + debfile.write(b"0 0 100644 0 \x60\x0A") dtaroffs = debfile.tell() dtarfile = tarfile.open("data.tar.gz", "w:gz", debfile, tarinfo = TarInfoRoot) dtarfile.add(Filename(tempdir, "usr").toOsSpecific(), "/usr") dtarfile.close() dtarsize = debfile.tell() - dtaroffs - if (dtarsize & 1): debfile.write("\x0A") + if (dtarsize & 1): debfile.write(b"\x0A") # Write the correct sizes of the archives. debfile.seek(ctaroffs - 12) - debfile.write("%-10ld" % ctarsize) + debfile.write(str(ctarsize).encode().ljust(10, b' ')) debfile.seek(dtaroffs - 12) - debfile.write("%-10ld" % dtarsize) + debfile.write(str(dtarsize).encode().ljust(10, b' ')) debfile.close() @@ -873,18 +888,20 @@ class Installer: tempdir, totsize = self.__buildTempLinux(platform) # Create a pkginfo file in memory. - pkginfo = StringIO() - print >>pkginfo, "# Generated using pdeploy" - print >>pkginfo, "# %s" % time.ctime(modtime) - print >>pkginfo, "pkgname = %s" % self.shortname.lower() - print >>pkginfo, "pkgver = %s" % pkgver - print >>pkginfo, "pkgdesc = %s" % self.fullname - print >>pkginfo, "builddate = %s" % modtime - print >>pkginfo, "packager = %s <%s>" % (self.authorname, self.authoremail) - print >>pkginfo, "size = %d" % totsize - print >>pkginfo, "arch = %s" % arch + pkginfo = BytesIO() + pout = TextIOWrapper(pkginfo, encoding='utf-8', newline='') + pout.write(u"# Generated using pdeploy\n") + pout.write(u"# %s\n" % time.ctime(modtime)) + pout.write(u"pkgname = %s\n" % self.shortname.lower()) + pout.write(u"pkgver = %s\n" % pkgver) + pout.write(u"pkgdesc = %s\n" % self.fullname) + pout.write(u"builddate = %s\n" % modtime) + pout.write(u"packager = %s <%s>\n" % (self.authorname, self.authoremail)) + pout.write(u"size = %d\n" % totsize) + pout.write(u"arch = %s\n" % arch) if self.licensename != "": - print >>pkginfo, "license = %s" % self.licensename + pout.write(u"license = %s\n" % self.licensename) + pout.flush() pkginfoinfo = TarInfoRoot(".PKGINFO") pkginfoinfo.mtime = modtime pkginfoinfo.size = pkginfo.tell() diff --git a/direct/src/p3d/HostInfo.py b/direct/src/p3d/HostInfo.py index da5d9723c4..ad9942c6a0 100644 --- a/direct/src/p3d/HostInfo.py +++ b/direct/src/p3d/HostInfo.py @@ -513,18 +513,15 @@ class HostInfo: PackageInfo, returns it. """ if not platform: - # Ensure that we're on the same page with non-specified - # platforms. We have to use the empty string, not None, - # since Python 3 can't sort lists with both strings and None. - platform = "" + platform = None - platforms = self.packages.setdefault((name, version), {}) - package = platforms.get(platform, None) + platforms = self.packages.setdefault((name, version or ""), {}) + package = platforms.get("", None) if not package: package = PackageInfo(self, name, version, platform = platform, solo = solo, asMirror = self.asMirror, perPlatform = perPlatform) - platforms[platform] = package + platforms[platform or ""] = package return package @@ -534,12 +531,12 @@ class HostInfo: platform, if one is provided by this host, or None if not. """ assert self.hasContentsFile - platforms = self.packages.get((name, version or None), {}) + platforms = self.packages.get((name, version or ""), {}) - if platform is not None: + if platform: # In this case, we are looking for a specific platform # only. - return platforms.get(platform or None, None) + return platforms.get(platform, None) # We are looking for one matching the current runtime # platform. First, look for a package matching the current @@ -548,7 +545,7 @@ class HostInfo: # If not found, look for one matching no particular platform. if not package: - package = platforms.get(None, None) + package = platforms.get("", None) return package @@ -564,7 +561,7 @@ class HostInfo: if name and pn != name: continue - if platform is None: + if not platform: for p2 in platforms: package = self.getPackage(pn, version, platform = p2) if package: @@ -596,7 +593,7 @@ class HostInfo: # current platform, or no particular platform. package = platforms.get(PandaSystem.getPlatform(), None) if not package: - package = platforms.get(None, None) + package = platforms.get("", None) if package: result.append(package) diff --git a/direct/src/p3d/PackageInfo.py b/direct/src/p3d/PackageInfo.py index b48392dd28..08a73365b8 100644 --- a/direct/src/p3d/PackageInfo.py +++ b/direct/src/p3d/PackageInfo.py @@ -523,7 +523,8 @@ class PackageInfo: # In case of unexpected failures on the internet, we will retry # the full download instead of just giving up. - for retry in range(core.ConfigVariableInt('package-full-dl-retries', 1)): + retries = core.ConfigVariableInt('package-full-dl-retries', 1).getValue() + for retry in range(retries): self.installPlans.append(planB[:]) pc.stop() diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index 463eb8639c..c7b198be50 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -15,6 +15,7 @@ import sys import os import io import encodings +from posixpath import join _vfs = core.VirtualFileSystem.getGlobalPtr() @@ -331,20 +332,6 @@ def walk(top, topdown = True, onerror = None, followlinks = True): if not topdown: yield (top, dirnames, filenames) -def join(path, *args): - for part in args: - if part == '': - continue - - if part.startswith('/'): - path = part - elif path.endswith('/'): - path = path + part - else: - path = '/'.join((path, part)) - - return path - def isfile(path): return _vfs.isRegularFile(core.Filename.fromOsSpecific(path)) From 30a26bc530bfe4a481219ec17fc211e18d29d734 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 30 Sep 2015 16:07:37 +0200 Subject: [PATCH 135/200] Match up interrogate standard typedefs better with gcc/msvc standard typedefs --- dtool/src/dtoolbase/dtoolbase_cc.h | 3 +-- dtool/src/parser-inc/iostream | 23 +++++++++++++---------- dtool/src/parser-inc/stdtypedefs.h | 19 ++++++++++++------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 60ea4bd37f..a49d5b1477 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -48,7 +48,6 @@ using namespace std; // this maps to public. #define PUBLISHED __published -typedef int streamsize; typedef int ios_openmode; typedef int ios_fmtflags; typedef int ios_iostate; @@ -100,7 +99,7 @@ typedef basic_string wstring; #ifndef HAVE_STREAMSIZE // Some C++ libraries (Irix) don't define this. -typedef int streamsize; +typedef long streamsize; #endif #ifndef HAVE_IOS_TYPEDEFS diff --git a/dtool/src/parser-inc/iostream b/dtool/src/parser-inc/iostream index ea8ac836df..82357c0b96 100644 --- a/dtool/src/parser-inc/iostream +++ b/dtool/src/parser-inc/iostream @@ -20,6 +20,19 @@ #ifndef IOSTREAM_H #define IOSTREAM_H +#include + +#ifdef _WIN64 +typedef long long streamoff; +typedef long long streamsize; +#elif defined(_WIN32) +typedef long streamoff; +typedef int streamsize; +#else +typedef long long streamoff; +typedef ptrdiff_t streamsize; +#endif + // We don't care (much) about the actual definition of the various // iostream classes, but we do need to know the classnames that are // available. @@ -50,14 +63,6 @@ protected: class ios : public ios_base { __published: typedef long fmtflags; -#if defined(_WIN64) || !defined(_WIN32) - typedef unsigned long long streampos; - typedef long long streamoff; -#else - // 32-bit Windows uses 32-bit stream offsets. - typedef unsigned long streampos; - typedef long streamoff; -#endif bool good() const; bool eof() const; @@ -114,6 +119,4 @@ extern istream cin; extern ostream cout; extern ostream cerr; -typedef long streamoff; - #endif diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 99280ebb4f..cae3ec4c04 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -19,25 +19,30 @@ #ifndef STDTYPEDEFS_H #define STDTYPEDEFS_H -#ifndef __APPLE__ -typedef unsigned long size_t; -typedef long ssize_t; typedef int off_t; -typedef unsigned int time_t; -typedef int clock_t; +typedef long time_t; +typedef long clock_t; struct FILE; namespace std { } -#endif -typedef int ptrdiff_t; typedef unsigned int uint; typedef unsigned long ulong; typedef unsigned short ushort; typedef unsigned char uchar; +#ifdef _WIN64 +typedef unsigned long long size_t; +typedef long long ssize_t; +typedef long long ptrdiff_t; +#else +typedef unsigned long size_t; +typedef long ssize_t; +typedef long ptrdiff_t; +#endif + #ifdef __cplusplus #define NULL 0L #else From 9bb968cc8b6869015b9751466fd7c280b85b5016 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 4 Oct 2015 12:56:45 +0200 Subject: [PATCH 136/200] Remove unused methods --- panda/src/pgraph/cullTraverser.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/panda/src/pgraph/cullTraverser.h b/panda/src/pgraph/cullTraverser.h index a174be5b3d..21aa8619d7 100644 --- a/panda/src/pgraph/cullTraverser.h +++ b/panda/src/pgraph/cullTraverser.h @@ -112,9 +112,6 @@ private: static CPT(RenderState) get_bounds_outer_viz_state(); static CPT(RenderState) get_bounds_inner_viz_state(); static CPT(RenderState) get_depth_offset_state(); - void start_decal(const CullTraverserData &data); - CullableObject *r_get_decals(CullTraverserData &data, - CullableObject *decals); GraphicsStateGuardianBase *_gsg; Thread *_current_thread; From 433ed001fa79c0456c7b0830d18ed9e07c67d58d Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 4 Oct 2015 13:00:25 +0200 Subject: [PATCH 137/200] Using strong CMPXCH seems necessary to avoid crash on ARM --- dtool/src/dtoolbase/atomicAdjustGccImpl.I | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtool/src/dtoolbase/atomicAdjustGccImpl.I b/dtool/src/dtoolbase/atomicAdjustGccImpl.I index 3e462f01cf..6831a16a1e 100644 --- a/dtool/src/dtoolbase/atomicAdjustGccImpl.I +++ b/dtool/src/dtoolbase/atomicAdjustGccImpl.I @@ -125,7 +125,7 @@ compare_and_exchange(TVOLATILE AtomicAdjustGccImpl::Integer &mem, AtomicAdjustGccImpl::Integer old_value, AtomicAdjustGccImpl::Integer new_value) { - __atomic_compare_exchange_n(&mem, &old_value, new_value, true, + __atomic_compare_exchange_n(&mem, &old_value, new_value, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return old_value; } @@ -142,7 +142,7 @@ compare_and_exchange_ptr(TVOLATILE AtomicAdjustGccImpl::Pointer &mem, AtomicAdjustGccImpl::Pointer old_value, AtomicAdjustGccImpl::Pointer new_value) { - __atomic_compare_exchange_n(&mem, &old_value, new_value, true, + __atomic_compare_exchange_n(&mem, &old_value, new_value, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return old_value; } From 893740478c1276f511d007d32838d45366a977df Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 4 Oct 2015 17:20:49 +0200 Subject: [PATCH 138/200] Fix sporadic interrogate parser issue --- dtool/src/cppparser/cppPreprocessor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 4f6384e89d..decd7e30da 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -1469,7 +1469,7 @@ handle_include_directive(const string &args, int first_line, // Don't include it if we included it before and it had #pragma once. ParsedFiles::const_iterator it = _parsed_files.find(file); - if (it->_pragma_once) { + if (it != _parsed_files.end() && it->_pragma_once) { return; } From c6a1626cd3d1e63a86d8ff936b76f8382a15ce75 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 4 Oct 2015 20:20:10 +0200 Subject: [PATCH 139/200] Fix bug: x2egg replaced face normals with vertex normals --- pandatool/src/xfileegg/xFileMesh.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pandatool/src/xfileegg/xFileMesh.cxx b/pandatool/src/xfileegg/xFileMesh.cxx index 73e473b087..979650d74e 100644 --- a/pandatool/src/xfileegg/xFileMesh.cxx +++ b/pandatool/src/xfileegg/xFileMesh.cxx @@ -212,6 +212,13 @@ add_material(EggPrimitive *egg_prim) { //////////////////////////////////////////////////////////////////// int XFileMesh:: add_vertex(XFileVertex *vertex) { + if (vertex->_has_color) { + _has_colors = true; + } + if (vertex->_has_uv) { + _has_uvs = true; + } + int next_index = _vertices.size(); _unique_vertices.insert(UniqueVertices::value_type(vertex, next_index)); _vertices.push_back(vertex); @@ -228,6 +235,10 @@ add_vertex(XFileVertex *vertex) { //////////////////////////////////////////////////////////////////// int XFileMesh:: add_normal(XFileNormal *normal) { + if (normal->_has_normal) { + _has_normals = true; + } + int next_index = _normals.size(); _unique_normals.insert(UniqueNormals::value_type(normal, next_index)); _normals.push_back(normal); @@ -244,6 +255,10 @@ add_normal(XFileNormal *normal) { //////////////////////////////////////////////////////////////////// int XFileMesh:: add_material(XFileMaterial *material) { + if (material->has_material()) { + _has_materials = true; + } + int next_index = _materials.size(); _unique_materials.insert(UniqueMaterials::value_type(material, next_index)); _materials.push_back(material); From cb7a0e25200783808e1dde6fee1b4efedc823f23 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 5 Oct 2015 00:45:55 +0200 Subject: [PATCH 140/200] Fix PandaSystem.getCompiler() for clang (it erroneously reported GCC) --- dtool/src/dtoolutil/pandaSystem.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/dtoolutil/pandaSystem.cxx b/dtool/src/dtoolutil/pandaSystem.cxx index d54029ecf2..2663797172 100644 --- a/dtool/src/dtoolutil/pandaSystem.cxx +++ b/dtool/src/dtoolutil/pandaSystem.cxx @@ -270,6 +270,11 @@ get_compiler() { return strm.str(); +#elif defined(__clang__) + // Clang has this macro. This case has to go before __GNUC__ + // because that is also defined by clang. + return "Clang " __clang_version__; + #elif defined(__GNUC__) // GCC defines this simple macro. return "GCC " __VERSION__; From ca37b6b6c0a0a3d8307919fe1a2d24433b9deddc Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 5 Oct 2015 02:12:46 +0200 Subject: [PATCH 141/200] Fix VC2015 compile errors, allow selecting any WinSDK/MSVC version. All experimental, still. --- dtool/src/dtoolbase/dtoolbase.h | 2 + dtool/src/dtoolbase/dtoolbase_cc.h | 8 ++ dtool/src/dtoolbase/stl_compares.I | 4 + dtool/src/dtoolutil/lineStream.h | 4 + dtool/src/dtoolutil/pfstream.h | 8 ++ dtool/src/prc/encryptStream.h | 8 ++ makepanda/makepanda.py | 82 +++++++++------ makepanda/makepandacore.py | 118 ++++++++++++++++------ panda/src/downloader/httpDate.cxx | 9 +- panda/src/downloader/multiplexStream.h | 4 + panda/src/downloader/stringStream.h | 4 + panda/src/express/checksumHashGenerator.I | 4 + panda/src/express/subStream.h | 12 +++ panda/src/express/zStream.h | 12 ++- 14 files changed, 211 insertions(+), 68 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 4398036e3a..eee43d50de 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -55,6 +55,8 @@ #pragma warning (disable : 4355) /* C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data */ #pragma warning (disable : 4244) +/* C4577: 'noexcept' used with no exception handling mode specified */ +#pragma warning (disable : 4577) #if _MSC_VER >= 1300 #if _MSC_VER >= 1310 diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index a49d5b1477..abcf7ad3f5 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -166,6 +166,14 @@ typedef ios::seekdir ios_seekdir; # define FINAL final # define OVERRIDE override # define MOVE(x) move(x) +#elif defined(_MSC_VER) && _MSC_VER >= 1900 +// MSVC 2015 supports all of this goodness. +# define CONSTEXPR constexpr +# define NOEXCEPT noexcept +# define USE_MOVE_SEMANTICS +# define FINAL final +# define OVERRIDE override +# define MOVE(x) move(x) #elif defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC 2010 has move semantics. Not much else. # define CONSTEXPR INLINE diff --git a/dtool/src/dtoolbase/stl_compares.I b/dtool/src/dtoolbase/stl_compares.I index 31ac164cad..e0d51b74dd 100644 --- a/dtool/src/dtoolbase/stl_compares.I +++ b/dtool/src/dtoolbase/stl_compares.I @@ -132,7 +132,11 @@ add_hash(size_t hash, const Key &key) { INLINE size_t pointer_hash:: add_hash(size_t hash, const void *key) { // We don't mind if this loses precision. +#ifdef _MSC_VER + PN_uint32 key32 = PtrToUlong(key); +#else PN_uint32 key32 = (PN_uint32)reinterpret_cast(key); +#endif return AddHash::add_hash(hash, &key32, 1); } diff --git a/dtool/src/dtoolutil/lineStream.h b/dtool/src/dtoolutil/lineStream.h index 63358a18ac..fe0e271933 100644 --- a/dtool/src/dtoolutil/lineStream.h +++ b/dtool/src/dtoolutil/lineStream.h @@ -37,6 +37,10 @@ class EXPCL_DTOOL LineStream : public ostream { PUBLISHED: INLINE LineStream(); +#if _MSC_VER >= 1800 + INLINE LineStream(const LineStream ©) = delete; +#endif + INLINE bool is_text_available() const; INLINE string get_line(); INLINE bool has_newline() const; diff --git a/dtool/src/dtoolutil/pfstream.h b/dtool/src/dtoolutil/pfstream.h index d9875f9090..fb6d29f0aa 100644 --- a/dtool/src/dtoolutil/pfstream.h +++ b/dtool/src/dtoolutil/pfstream.h @@ -21,6 +21,10 @@ class EXPCL_DTOOL IPipeStream : public istream { PUBLISHED: INLINE IPipeStream(const std::string); +#if _MSC_VER >= 1800 + INLINE IPipeStream(const IPipeStream ©) = delete; +#endif + INLINE void flush(); private: @@ -33,6 +37,10 @@ class EXPCL_DTOOL OPipeStream : public ostream { PUBLISHED: INLINE OPipeStream(const std::string); +#if _MSC_VER >= 1800 + INLINE OPipeStream(const OPipeStream ©) = delete; +#endif + INLINE void flush(); private: diff --git a/dtool/src/prc/encryptStream.h b/dtool/src/prc/encryptStream.h index bca9c8dc4d..75787d26e8 100644 --- a/dtool/src/prc/encryptStream.h +++ b/dtool/src/prc/encryptStream.h @@ -40,6 +40,10 @@ PUBLISHED: INLINE IDecryptStream(istream *source, bool owns_source, const string &password); +#if _MSC_VER >= 1800 + INLINE IDecryptStream(const IDecryptStream ©) = delete; +#endif + INLINE IDecryptStream &open(istream *source, bool owns_source, const string &password); INLINE IDecryptStream &close(); @@ -69,6 +73,10 @@ PUBLISHED: INLINE OEncryptStream(ostream *dest, bool owns_dest, const string &password); +#if _MSC_VER >= 1800 + INLINE OEncryptStream(const OEncryptStream ©) = delete; +#endif + INLINE OEncryptStream &open(ostream *dest, bool owns_dest, const string &password); INLINE OEncryptStream &close(); diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b536140238..77712197de 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -64,9 +64,10 @@ PLUGIN_VERSION=None OSXTARGET=None OSX_ARCHS=[] HOST_URL=None -global STRDXSDKVERSION, STRMSPLATFORMVERSION, BOOUSEINTELCOMPILER +global STRDXSDKVERSION, BOOUSEINTELCOMPILER STRDXSDKVERSION = 'default' -STRMSPLATFORMVERSION = 'default' +WINDOWS_SDK = None +MSVC_VERSION = None BOOUSEINTELCOMPILER = False OPENCV_VER_23 = False @@ -152,7 +153,8 @@ def usage(problem): print(" --nothing (disable every third-party lib)") print(" --everything (enable every third-party lib)") print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009, mar2009, aug2006)") - print(" --platform-sdk=X (specify MSPlatSdk to use: win71, win61, win60A, winserver2003r2)") + print(" --windows-sdk=X (specify Windows SDK version, eg. 7.0, 7.1 or 10. Default is 7.1)") + print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14. Default is 10)") print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)") print("") print("The simplest way to compile panda is to just type:") @@ -165,13 +167,13 @@ def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,OSX_ARCHS,HOST_URL global DEBVERSION,RPMRELEASE,GIT_COMMIT,P3DSUFFIX - global STRDXSDKVERSION, STRMSPLATFORMVERSION, BOOUSEINTELCOMPILER + global STRDXSDKVERSION, WINDOWS_SDK, MSVC_VERSION, BOOUSEINTELCOMPILER longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host=","debversion=","rpmrelease=","p3dsuffix=", - "directx-sdk=", "platform-sdk=", "use-icl", + "directx-sdk=", "windows-sdk=", "msvc-version=", "use-icl", "universal", "target=", "arch=", "git-commit="] anything = 0 optimize = "" @@ -222,11 +224,10 @@ def parseopts(args): if STRDXSDKVERSION == '': print("No DirectX SDK version specified. Using 'default' DirectX SDK search") STRDXSDKVERSION = 'default' - elif (option=="--platform-sdk"): - STRMSPLATFORMVERSION = value.strip().lower() - if STRMSPLATFORMVERSION == '': - print("No MS Platform SDK version specified. Using 'default' MS Platform SDK search") - STRMSPLATFORMVERSION = 'default' + elif (option=="--windows-sdk"): + WINDOWS_SDK = value.strip().lower() + elif (option=="--msvc-version"): + MSVC_VERSION = value.strip().lower() elif (option=="--use-icl"): BOOUSEINTELCOMPILER = True else: for pkg in PkgListGet(): @@ -302,17 +303,30 @@ def parseopts(args): if GIT_COMMIT is not None and not re.match("^[a-f0-9]{40}$", GIT_COMMIT): usage("Invalid SHA-1 hash given for --git-commit option!") - is_win7 = False - if GetHost() == "windows": - if (STRMSPLATFORMVERSION not in ['winserver2003r2', 'win60A']): - platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder") + if GetTarget() == 'windows': + if not MSVC_VERSION: + print("No MSVC version specified. Defaulting to 10 (Visual Studio 2010).") + MSVC_VERSION = 10 - if sys.platform == "win32": - # Note: not available in cygwin. - winver = sys.getwindowsversion() - if platsdk and os.path.isdir(platsdk) and winver[0] >= 6 and winver[1] >= 1: - is_win7 = True - if RUNTIME or not is_win7: + try: + MSVC_VERSION = int(MSVC_VERSION) + except: + usage("Invalid setting for --msvc-version") + + if not WINDOWS_SDK: + print("No Windows SDK version specified. Defaulting to '7.1'.") + WINDOWS_SDK = '7.1' + + is_win7 = False + if sys.platform == 'win32': + # Note: not available in cygwin. + winver = sys.getwindowsversion() + if winver[0] >= 6 and winver[1] >= 1: + is_win7 = True + + if RUNTIME or not is_win7: + PkgDisable("TOUCHINPUT") + else: PkgDisable("TOUCHINPUT") parseopts(sys.argv[1:]) @@ -444,8 +458,8 @@ SdkLocateMaya() SdkLocateMax() SdkLocateMacOSX(OSXTARGET) SdkLocatePython(RTDIST) -SdkLocateVisualStudio() -SdkLocateMSPlatform(STRMSPLATFORMVERSION) +SdkLocateVisualStudio(MSVC_VERSION) +SdkLocateWindows(WINDOWS_SDK) SdkLocatePhysX() SdkLocateSpeedTree() SdkLocateAndroid() @@ -1050,6 +1064,10 @@ def CompileCxx(obj,src,opts): if GetTargetArch() == 'x64': cmd += " /DWIN64_VC /DWIN64" + if WINDOWS_SDK.startswith('7.') and MSVC_VERSION > 10: + # To preserve Windows XP compatibility. + cmd += " /D_USING_V110_SDK71_" + cmd += " /W3 " + BracketNameWithQuotes(src) oscmd(cmd) else: @@ -1485,9 +1503,13 @@ def CompileLink(dll, obj, opts): cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd += ' /OUT:' + BracketNameWithQuotes(dll) - subsystem = GetValueOption(opts, "SUBSYSTEM:") - if subsystem: - cmd += " /SUBSYSTEM:" + subsystem + # Set the subsystem. Specify that we want to target Windows XP. + subsystem = GetValueOption(opts, "SUBSYSTEM:") or "CONSOLE" + cmd += " /SUBSYSTEM:" + subsystem + if GetTargetArch() == 'x64': + cmd += ",5.02" + else: + cmd += ",5.01" if dll.endswith(".dll"): cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(dll))[0] + ".lib" @@ -5096,7 +5118,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj') TargetAdd('p3dcert.exe', input='plugin_p3dCert.obj') TargetAdd('p3dcert.exe', input='plugin_p3dCert_strings.obj') - OPTS=['OPENSSL', 'FLTK', 'X11', 'WINCOMCTL', 'WINSOCK', 'WINGDI', 'WINUSER', 'ADVAPI', 'WINOLE', 'WINSHELL', 'SUBSYSTEM:WINDOWS'] + OPTS=['SUBSYSTEM:WINDOWS', 'OPENSSL', 'FLTK', 'X11', 'WINCOMCTL', 'WINSOCK', 'WINGDI', 'WINUSER', 'ADVAPI', 'WINOLE', 'WINSHELL', 'SUBSYSTEM:WINDOWS'] if GetTarget() == 'darwin': OPTS += ['OPT:2'] TargetAdd('p3dcert.exe', opts=OPTS) @@ -5106,7 +5128,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dcert.exe', input='plugin_mkdir_complete.obj') TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj') TargetAdd('p3dcert.exe', input='plugin_p3dCert.obj') - OPTS=['OPENSSL', 'WX', 'CARBON', 'WINOLE', 'WINOLEAUT', 'WINUSER', 'ADVAPI', 'WINSHELL', 'WINCOMCTL', 'WINGDI', 'WINCOMDLG'] + OPTS=['SUBSYSTEM:WINDOWS', 'OPENSSL', 'WX', 'CARBON', 'WINOLE', 'WINOLEAUT', 'WINUSER', 'ADVAPI', 'WINSHELL', 'WINCOMCTL', 'WINGDI', 'WINCOMDLG'] if GetTarget() == "darwin": OPTS += ['GL', 'OPT:2'] TargetAdd('p3dcert.exe', opts=OPTS) @@ -5236,7 +5258,7 @@ if (RUNTIME): TargetAdd('panda3dw.exe', input='libp3dtool.dll') TargetAdd('panda3dw.exe', input='libp3pystub.lib') TargetAdd('panda3dw.exe', input='libp3tinyxml.ilb') - TargetAdd('panda3dw.exe', opts=['OPENSSL', 'ZLIB', 'WINGDI', 'WINUSER', 'WINSHELL', 'ADVAPI', 'WINSOCK2', 'WINOLE', 'CARBON']) + TargetAdd('panda3dw.exe', opts=['SUBSYSTEM:WINDOWS', 'OPENSSL', 'ZLIB', 'WINGDI', 'WINUSER', 'WINSHELL', 'ADVAPI', 'WINSOCK2', 'WINOLE', 'CARBON']) if (RTDIST): OPTS=['BUILDING:P3D_PLUGIN', 'DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'OPENSSL', 'ZLIB'] @@ -5312,7 +5334,7 @@ if (RTDIST): TargetAdd('p3dembedw.exe', input='plugin_common.obj') TargetAdd('p3dembedw.exe', input='libp3tinyxml.ilb') TargetAdd('p3dembedw.exe', input='libp3d_plugin_static.ilb') - TargetAdd('p3dembedw.exe', opts=['NOICON', 'WINGDI', 'WINSOCK2', 'ZLIB', 'WINUSER', 'OPENSSL', 'WINOLE', 'MSIMG', 'WINCOMCTL', 'ADVAPI', 'WINSHELL']) + TargetAdd('p3dembedw.exe', opts=['SUBSYSTEM:WINDOWS', 'NOICON', 'WINGDI', 'WINSOCK2', 'ZLIB', 'WINUSER', 'OPENSSL', 'WINOLE', 'MSIMG', 'WINCOMCTL', 'ADVAPI', 'WINSHELL']) # # DIRECTORY: pandatool/src/pandatoolbase/ @@ -6041,7 +6063,7 @@ if (PkgSkip("PANDATOOL")==0 and (GetTarget() == 'windows' or PkgSkip("GTK2")==0) TargetAdd('pstats.exe', input='libp3pandatoolbase.lib') TargetAdd('pstats.exe', input=COMMON_PANDA_LIBS) TargetAdd('pstats.exe', input='libp3pystub.lib') - TargetAdd('pstats.exe', opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'GTK2']) + TargetAdd('pstats.exe', opts=['SUBSYSTEM:WINDOWS', 'WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'GTK2']) # # DIRECTORY: pandatool/src/xfileprogs/ diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index c9639ab1c7..7d921ee9d2 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -531,10 +531,12 @@ def oscmd(cmd, ignoreError = False): if res != 0 and not ignoreError: if "interrogate" in cmd.split(" ", 1)[0] and GetVerbose(): print(ColorText("red", "Interrogate failed, retrieving debug output...")) + sys.stdout.flush() + verbose_cmd = cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1] if sys.platform == "win32": - os.spawnl(os.P_WAIT, exe, cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1]) + os.spawnl(os.P_WAIT, exe_path, verbose_cmd) else: - os.system(cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1]) + os.system(verbose_cmd) exit("The following command returned a non-zero value: " + str(cmd)) return res @@ -1946,18 +1948,21 @@ def SdkLocatePython(prefer_thirdparty_python=False): else: print("Using Python %s" % (SDK["PYTHONVERSION"][6:9])) -def SdkLocateVisualStudio(): +def SdkLocateVisualStudio(version=10): if (GetHost() != "windows"): return - vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "10.0") + + version = str(version) + '.0' + + vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", version) if (vcdir != 0) and (vcdir[-4:] == "\\VC\\"): vcdir = vcdir[:-3] SDK["VISUALSTUDIO"] = vcdir - elif (os.path.isfile("C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\bin\\cl.exe")): - SDK["VISUALSTUDIO"] = "C:\\Program Files\\Microsoft Visual Studio 10.0\\" + elif (os.path.isfile("C:\\Program Files\\Microsoft Visual Studio %s\\VC\\bin\\cl.exe" % (version))): + SDK["VISUALSTUDIO"] = "C:\\Program Files\\Microsoft Visual Studio %s\\" % (version) - elif (os.path.isfile("C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin\\cl.exe")): - SDK["VISUALSTUDIO"] = "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\" + elif (os.path.isfile("C:\\Program Files (x86)\\Microsoft Visual Studio %s\\VC\\bin\\cl.exe")): + SDK["VISUALSTUDIO"] = "C:\\Program Files (x86)\\Microsoft Visual Studio %s\\" % (version) elif "VCINSTALLDIR" in os.environ: vcdir = os.environ["VCINSTALLDIR"] @@ -1968,26 +1973,49 @@ def SdkLocateVisualStudio(): SDK["VISUALSTUDIO"] = vcdir -def SdkLocateMSPlatform(strMode = 'default'): + else: + exit("Couldn't find Visual Studio %s. To use a different version, use the --msvc-version option." % version) + + SDK["VISUALSTUDIO_VERSION"] = version + + if GetVerbose(): + print("Using Visual Studio %s located at %s" % (version, SDK["VISUALSTUDIO"])) + else: + print("Using Visual Studio %s" % (version)) + +def SdkLocateWindows(version = '7.1'): if (GetHost() != "windows"): return - platsdk = None - platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder") - if (platsdk and not os.path.isdir(platsdk)): - platsdk = None + version = version.upper() - if not platsdk: - # Most common location. Worth a try. - platsdk = "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1" - if not os.path.isdir(platsdk): - platsdk = None + if version == '10': + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots", "KitsRoot10") + elif version == '8.0': + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots", "KitsRoot") + else: + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v" + version, "InstallationFolder") - if not platsdk: - exit("Couldn't find Windows SDK v7.1") + if not platsdk or not os.path.isdir(platsdk): + # Most common location. Worth a try. + platsdk = GetProgramFiles() + "\\Microsoft SDKs\\Windows\\v" + version + if not os.path.isdir(platsdk): + if not version.endswith('A'): + # Try the stripped-down version that is bundled with Visual Studio. + return SdkLocateWindows(version + 'A') + platsdk = None + + if not platsdk or not os.path.isdir(platsdk): + exit("Couldn't find Windows SDK version %s. To use a different version, use the --windows-sdk option." % (version)) if not platsdk.endswith("\\"): platsdk += "\\" SDK["MSPLATFORM"] = platsdk + SDK["MSPLATFORM_VERSION"] = version + + if GetVerbose(): + print("Using Windows SDK %s located at %s" % (version, platsdk)) + else: + print("Using Windows SDK %s" % (version)) def SdkLocateMacOSX(osxtarget = None): if (GetHost() != "darwin"): return @@ -2225,20 +2253,44 @@ def SetupVisualStudioEnviron(): AddToPathEnv("INCLUDE", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\include") AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\lib\\" + libdir) AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\lib\\" + libdir) - AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin") - AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include") - AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\atl") - AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\mfc") - if (arch != 'x64'): - AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib") - AddToPathEnv("PATH",SDK["VISUALSTUDIO"] + "VC\\redist\\x86\\Microsoft.VC100.CRT") - AddToPathEnv("PATH",SDK["VISUALSTUDIO"] + "VC\\redist\\x86\\Microsoft.VC100.MFC") - elif (os.path.isdir(SDK["MSPLATFORM"] + "lib\\x64")): - AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib\\x64") - elif (os.path.isdir(SDK["MSPLATFORM"] + "lib\\amd64")): - AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib\\amd64") + + if SDK["MSPLATFORM_VERSION"] == '10': + AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin\\" + arch) + + # Windows Kit 10 introduces the "universal CRT". + inc_dir = SDK["MSPLATFORM"] + "Include\\10.0.10240.0\\" + lib_dir = SDK["MSPLATFORM"] + "Lib\\10.0.10240.0\\" + AddToPathEnv("INCLUDE", inc_dir + "shared") + AddToPathEnv("INCLUDE", inc_dir + "ucrt") + AddToPathEnv("INCLUDE", inc_dir + "um") + AddToPathEnv("LIB", lib_dir + "ucrt\\" + arch) + AddToPathEnv("LIB", lib_dir + "um\\" + arch) else: - exit("Could not locate 64-bits libraries in Platform SDK!") + AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin") + AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include") + AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\atl") + AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\mfc") + + if arch != 'x64': + AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib") + AddToPathEnv("PATH",SDK["VISUALSTUDIO"] + "VC\\redist\\x86\\Microsoft.VC100.CRT") + AddToPathEnv("PATH",SDK["VISUALSTUDIO"] + "VC\\redist\\x86\\Microsoft.VC100.MFC") + + elif os.path.isdir(SDK["MSPLATFORM"] + "lib\\x64"): + AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib\\x64") + + elif os.path.isdir(SDK["MSPLATFORM"] + "lib\\amd64"): + AddToPathEnv("LIB", SDK["MSPLATFORM"] + "lib\\amd64") + + else: + exit("Could not locate 64-bits libraries in Windows SDK directory!\nUsing directory: %s" % SDK["MSPLATFORM"]) + + # Targeting the 7.1 SDK (which is the only way to have Windows XP support) + # with Visual Studio 2015 requires use of the Universal CRT. + if SDK["MSPLATFORM_VERSION"] == '7.1' and SDK["VISUALSTUDIO_VERSION"] == '14.0': + win_kit = GetRegistryKey("SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots", "KitsRoot10") + AddToPathEnv("LIB", win_kit + "Lib\\10.0.10150.0\\ucrt\\" + arch) + AddToPathEnv("INCLUDE", win_kit + "Include\\10.0.10150.0\\ucrt") ######################################################################## # diff --git a/panda/src/downloader/httpDate.cxx b/panda/src/downloader/httpDate.cxx index ea143e0bfa..726306e8ae 100644 --- a/panda/src/downloader/httpDate.cxx +++ b/panda/src/downloader/httpDate.cxx @@ -223,14 +223,17 @@ HTTPDate(const string &format) { if (_time != (time_t)-1) { // Unfortunately, mktime() assumes local time; convert this back // to GMT. -#ifdef IS_FREEBSD +#if defined(IS_FREEBSD) time_t now = time(NULL); struct tm *tp = localtime(&now); _time -= tp->tm_gmtoff; -#else /* IS_FREEBSD */ +#elif defined(_WIN32) + extern long int _timezone; + _time -= _timezone; +#else extern long int timezone; _time -= timezone; -#endif /* IS_FREEBSD */ +#endif } #endif // __GNUC__ } diff --git a/panda/src/downloader/multiplexStream.h b/panda/src/downloader/multiplexStream.h index 1b4a5e8fc5..a82ed96233 100644 --- a/panda/src/downloader/multiplexStream.h +++ b/panda/src/downloader/multiplexStream.h @@ -36,6 +36,10 @@ class EXPCL_PANDAEXPRESS MultiplexStream : public ostream { PUBLISHED: INLINE MultiplexStream(); +#if _MSC_VER >= 1800 + INLINE MultiplexStream(const MultiplexStream ©) = delete; +#endif + INLINE void add_ostream(ostream *out, bool delete_later = false); INLINE bool add_stdio_file(FILE *file, bool close_when_done); INLINE void add_standard_output(); diff --git a/panda/src/downloader/stringStream.h b/panda/src/downloader/stringStream.h index 158f6194ca..6970887a25 100644 --- a/panda/src/downloader/stringStream.h +++ b/panda/src/downloader/stringStream.h @@ -35,6 +35,10 @@ PUBLISHED: EXTENSION(StringStream(PyObject *source)); INLINE StringStream(); +#if _MSC_VER >= 1800 + INLINE StringStream(const StringStream ©) = delete; +#endif + INLINE void clear_data(); INLINE size_t get_data_size(); diff --git a/panda/src/express/checksumHashGenerator.I b/panda/src/express/checksumHashGenerator.I index 63f31897c5..2a094eda4c 100644 --- a/panda/src/express/checksumHashGenerator.I +++ b/panda/src/express/checksumHashGenerator.I @@ -68,5 +68,9 @@ add_fp(double number, double threshold) { //////////////////////////////////////////////////////////////////// INLINE void ChecksumHashGenerator:: add_pointer(void *ptr) { +#ifdef _WIN32 + add_int(PtrToLong(ptr)); +#else add_int((long)ptr); +#endif } diff --git a/panda/src/express/subStream.h b/panda/src/express/subStream.h index 71171f350a..7dbfab475f 100644 --- a/panda/src/express/subStream.h +++ b/panda/src/express/subStream.h @@ -36,6 +36,10 @@ PUBLISHED: INLINE ISubStream(); INLINE ISubStream(IStreamWrapper *source, streampos start, streampos end); +#if _MSC_VER >= 1800 + INLINE ISubStream(const ISubStream ©) = delete; +#endif + INLINE ISubStream &open(IStreamWrapper *source, streampos start, streampos end); INLINE ISubStream &close(); @@ -60,6 +64,10 @@ PUBLISHED: INLINE OSubStream(); INLINE OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append = false); +#if _MSC_VER >= 1800 + INLINE OSubStream(const OSubStream ©) = delete; +#endif + INLINE OSubStream &open(OStreamWrapper *dest, streampos start, streampos end, bool append = false); INLINE OSubStream &close(); @@ -77,6 +85,10 @@ PUBLISHED: INLINE SubStream(); INLINE SubStream(StreamWrapper *nested, streampos start, streampos end, bool append = false); +#if _MSC_VER >= 1800 + INLINE SubStream(const SubStream ©) = delete; +#endif + INLINE SubStream &open(StreamWrapper *nested, streampos start, streampos end, bool append = false); INLINE SubStream &close(); diff --git a/panda/src/express/zStream.h b/panda/src/express/zStream.h index 1df8aa6416..1f4289bc2a 100644 --- a/panda/src/express/zStream.h +++ b/panda/src/express/zStream.h @@ -39,6 +39,10 @@ PUBLISHED: INLINE IDecompressStream(); INLINE IDecompressStream(istream *source, bool owns_source); +#if _MSC_VER >= 1800 + INLINE IDecompressStream(const IDecompressStream ©) = delete; +#endif + INLINE IDecompressStream &open(istream *source, bool owns_source); INLINE IDecompressStream &close(); @@ -61,10 +65,14 @@ private: class EXPCL_PANDAEXPRESS OCompressStream : public ostream { PUBLISHED: INLINE OCompressStream(); - INLINE OCompressStream(ostream *dest, bool owns_dest, + INLINE OCompressStream(ostream *dest, bool owns_dest, int compression_level = 6); - INLINE OCompressStream &open(ostream *dest, bool owns_dest, +#if _MSC_VER >= 1800 + INLINE OCompressStream(const OCompressStream ©) = delete; +#endif + + INLINE OCompressStream &open(ostream *dest, bool owns_dest, int compression_level = 6); INLINE OCompressStream &close(); From 7f3f546cdd2b8fe5602e34446a010305773c26bf Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 5 Oct 2015 02:56:40 +0200 Subject: [PATCH 142/200] Interrogate now parses "volatile" qualifier in instance identifiers correctly --- dtool/src/cppparser/cppBison.yxx | 20 +++++++++++++++++++ dtool/src/cppparser/cppInstanceIdentifier.cxx | 5 +++++ dtool/src/cppparser/cppInstanceIdentifier.h | 1 + makepanda/makepanda.py | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 644fcac1de..7fd639d497 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -1233,6 +1233,11 @@ instance_identifier: { $$ = $2; $$->add_modifier(IIT_const); +} + | KW_VOLATILE instance_identifier %prec UNARY +{ + $$ = $2; + $$->add_modifier(IIT_volatile); } | '*' instance_identifier %prec UNARY { @@ -1435,6 +1440,11 @@ not_paren_formal_parameter_identifier: { $$ = $2; $$->add_modifier(IIT_const); +} + | KW_VOLATILE not_paren_formal_parameter_identifier %prec UNARY +{ + $$ = $2; + $$->add_modifier(IIT_volatile); } | '*' not_paren_formal_parameter_identifier %prec UNARY { @@ -1480,6 +1490,11 @@ formal_parameter_identifier: { $$ = $2; $$->add_modifier(IIT_const); +} + | KW_VOLATILE formal_parameter_identifier %prec UNARY +{ + $$ = $2; + $$->add_modifier(IIT_volatile); } | '*' formal_parameter_identifier %prec UNARY { @@ -1528,6 +1543,11 @@ empty_instance_identifier: { $$ = $2; $$->add_modifier(IIT_const); +} + | KW_VOLATILE empty_instance_identifier %prec UNARY +{ + $$ = $2; + $$->add_modifier(IIT_volatile); } | '*' empty_instance_identifier %prec UNARY { diff --git a/dtool/src/cppparser/cppInstanceIdentifier.cxx b/dtool/src/cppparser/cppInstanceIdentifier.cxx index 45379e5f70..ffef7523b9 100644 --- a/dtool/src/cppparser/cppInstanceIdentifier.cxx +++ b/dtool/src/cppparser/cppInstanceIdentifier.cxx @@ -286,6 +286,11 @@ r_unroll_type(CPPType *start_type, result = new CPPConstType(r_unroll_type(start_type, mi)); break; + case IIT_volatile: + // Just pass it through for now. + result = r_unroll_type(start_type, mi); + break; + case IIT_paren: result = r_unroll_type(start_type, mi); break; diff --git a/dtool/src/cppparser/cppInstanceIdentifier.h b/dtool/src/cppparser/cppInstanceIdentifier.h index b906a4f386..3efe9fc1b3 100644 --- a/dtool/src/cppparser/cppInstanceIdentifier.h +++ b/dtool/src/cppparser/cppInstanceIdentifier.h @@ -36,6 +36,7 @@ enum CPPInstanceIdentifierType { IIT_scoped_pointer, IIT_array, IIT_const, + IIT_volatile, IIT_paren, IIT_func, IIT_initializer, diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 77712197de..9a077f6f58 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1354,7 +1354,7 @@ def CompileIgate(woutd,wsrc,opts): # Assume that interrogate is on the PATH somewhere. cmd = 'interrogate' - cmd += ' -srcdir %s -I%s -Dvolatile -Dmutable' % (srcdir, srcdir) + cmd += ' -srcdir %s -I%s' % (srcdir, srcdir) cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus=201103L' if (COMPILER=="MSVC"): cmd += ' -D__inline -D_X86_ -DWIN32_VC -DWIN32 -D_WIN32' From 43958e820cf26005000ae425b9b5bfec03e9abde Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Mon, 5 Oct 2015 20:42:16 -0700 Subject: [PATCH 143/200] Assimp: Add support for skinned meshes (no animations yet). --- pandatool/src/assimp/assimpLoader.cxx | 153 +++++++++++++++++++++++++- pandatool/src/assimp/assimpLoader.h | 18 +++ 2 files changed, 169 insertions(+), 2 deletions(-) diff --git a/pandatool/src/assimp/assimpLoader.cxx b/pandatool/src/assimp/assimpLoader.cxx index a198a29121..258e160c77 100644 --- a/pandatool/src/assimp/assimpLoader.cxx +++ b/pandatool/src/assimp/assimpLoader.cxx @@ -31,12 +31,24 @@ #include "pointLight.h" #include "look_at.h" #include "texturePool.h" +#include "character.h" +#include "pvector.h" #include "pandaIOSystem.h" #include "pandaLogger.h" #include "assimp/postprocess.h" +struct BoneWeight { + CPT(JointVertexTransform) joint_vertex_xform; + float weight; + + BoneWeight(CPT(JointVertexTransform) joint_vertex_xform, float weight) + : joint_vertex_xform(joint_vertex_xform), weight(weight) + {} +}; +typedef pvector BoneWeightList; + //////////////////////////////////////////////////////////////////// // Function: AssimpLoader::Constructor // Access: Public @@ -156,6 +168,29 @@ build_graph() { delete[] _geom_matindices; } +//////////////////////////////////////////////////////////////////// +// Function: AssimpLoader::find_ndoe +// Access: Private +// Description: Finds a node by name. +//////////////////////////////////////////////////////////////////// +const aiNode *AssimpLoader:: +find_node(const aiNode &root, const aiString &name) { + const aiNode *node; + + if (root.mName == name) { + return &root; + } else { + for (size_t i = 0; i < root.mNumChildren; ++i) { + node = find_node(*root.mChildren[i], name); + if (node) { + return node; + } + } + } + + return NULL; +} + //////////////////////////////////////////////////////////////////// // Function: AssimpLoader::load_texture // Access: Private @@ -377,6 +412,28 @@ load_material(size_t index) { _mat_states[index] = state; } +//////////////////////////////////////////////////////////////////// +// Function: AssimpLoader::create_joint +// Access: Private +// Description: Creates a CharacterJoint from an aiNode +//////////////////////////////////////////////////////////////////// +void AssimpLoader:: +create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node) +{ + const aiMatrix4x4 &t = node.mTransformation; + LMatrix4 mat(t.a1, t.b1, t.c1, t.d1, + t.a2, t.b2, t.c2, t.d2, + t.a3, t.b3, t.c3, t.d3, + t.a4, t.b4, t.c4, t.d4); + PT(CharacterJoint) joint = new CharacterJoint(character, bundle, parent, node.mName.C_Str(), mat); + + for (size_t i = 0; i < node.mNumChildren; ++i) { + if (_bonemap.find(node.mChildren[i]->mName.C_Str()) != _bonemap.end()) { + create_joint(character, bundle, joint, *node.mChildren[i]); + } + } +} + //////////////////////////////////////////////////////////////////// // Function: AssimpLoader::load_mesh // Access: Private @@ -386,6 +443,48 @@ void AssimpLoader:: load_mesh(size_t index) { const aiMesh &mesh = *_scene->mMeshes[index]; + // Check if we need to make a Character + PT(Character) character = NULL; + if (mesh.HasBones()) { + assimp_cat.debug() + << "Creating character for " << mesh.mName.C_Str() << "\n"; + + // Find and add all bone nodes to the bone map + for (size_t i = 0; i < mesh.mNumBones; ++i) { + const aiBone &bone = *mesh.mBones[i]; + const aiNode *node = find_node(*_scene->mRootNode, bone.mName); + _bonemap[bone.mName.C_Str()] = node; + } + + // Find the root bone node + const aiNode *root = _bonemap[mesh.mBones[0]->mName.C_Str()]; + while (root->mParent && _bonemap.find(root->mParent->mName.C_Str()) != _bonemap.end()) { + root = root->mParent; + } + + // Now create a character from the bones + character = new Character(mesh.mName.C_Str()); + PT(CharacterJointBundle) bundle = character->get_bundle(0); + PT(PartGroup) skeleton = new PartGroup(bundle, ""); + create_joint(character, bundle, skeleton, *root); + } + + // Create transform blend table + PT(TransformBlendTable) tbtable = new TransformBlendTable; + pvector bone_weights(mesh.mNumVertices); + if (character) { + for (size_t i = 0; i < mesh.mNumBones; ++i) { + const aiBone &bone = *mesh.mBones[i]; + CPT(JointVertexTransform) jvt = new JointVertexTransform(character->find_joint(bone.mName.C_Str())); + + for (size_t j = 0; j < bone.mNumWeights; ++j) { + const aiVertexWeight &weight = bone.mWeights[j]; + + bone_weights[weight.mVertexId].push_back(BoneWeight(jvt, weight.mWeight)); + } + } + } + // Create the vertex format. PT(GeomVertexArrayFormat) aformat = new GeomVertexArrayFormat; aformat->add_column(InternalName::get_vertex(), 3, Geom::NT_stdfloat, Geom::C_point); @@ -405,14 +504,28 @@ load_mesh(size_t index) { aformat->add_column(InternalName::get_texcoord_name(out.str()), 3, Geom::NT_stdfloat, Geom::C_texcoord); } } + + PT(GeomVertexArrayFormat) tb_aformat = new GeomVertexArrayFormat; + tb_aformat->add_column(InternalName::make("transform_blend"), 1, Geom::NT_uint16, Geom::C_index); + //TODO: if there is only one UV set, hackily iterate over the texture stages and clear the texcoord name things PT(GeomVertexFormat) format = new GeomVertexFormat; format->add_array(aformat); + if (character) { + format->add_array(tb_aformat); + + GeomVertexAnimationSpec aspec; + aspec.set_panda(); + format->set_animation(aspec); + } // Create the GeomVertexData. string name (mesh.mName.data, mesh.mName.length); PT(GeomVertexData) vdata = new GeomVertexData(name, GeomVertexFormat::register_format(format), Geom::UH_static); + if (character) { + vdata->set_transform_blend_table(tbtable); + } vdata->unclean_set_num_rows(mesh.mNumVertices); // Read out the vertices. @@ -459,6 +572,22 @@ load_mesh(size_t index) { } } + // Now the transform blend table + if (character) { + GeomVertexWriter transform_blend (vdata, InternalName::get_transform_blend()); + + for (size_t i = 0; i < mesh.mNumVertices; ++i) { + TransformBlend tblend; + + for (size_t j = 0; j < bone_weights[i].size(); ++j) { + tblend.add_transform(bone_weights[i][j].joint_vertex_xform, bone_weights[i][j].weight); + } + transform_blend.add_data1i(tbtable->add_blend(tblend)); + } + + tbtable->set_rows(SparseArray::lower_on(vdata->get_num_rows())); + } + // Now read out the primitives. // Keep in mind that we called ReadFile with the aiProcess_Triangulate // flag earlier, so we don't have to worry about polygons. @@ -501,6 +630,10 @@ load_mesh(size_t index) { _geoms[index] = geom; _geom_matindices[index] = mesh.mMaterialIndex; + + if (character) { + _charmap[mesh.mName.C_Str()] = character; + } } //////////////////////////////////////////////////////////////////// @@ -511,6 +644,12 @@ load_mesh(size_t index) { void AssimpLoader:: load_node(const aiNode &node, PandaNode *parent) { PT(PandaNode) pnode; + PT(Character) character; + + // Skip nodes we've converted to joints + if (_bonemap.find(node.mName.C_Str()) != _bonemap.end()) { + return; + } // Create the node and give it a name. string name (node.mName.data, node.mName.length); @@ -519,7 +658,13 @@ load_node(const aiNode &node, PandaNode *parent) { } else { pnode = new PandaNode(name); } - parent->add_child(pnode); + + if (_charmap.find(node.mName.C_Str()) != _charmap.end()) { + character = _charmap[node.mName.C_Str()]; + parent->add_child(character); + } else { + parent->add_child(pnode); + } // Load in the transformation matrix. const aiMatrix4x4 &t = node.mTransformation; @@ -545,7 +690,6 @@ load_node(const aiNode &node, PandaNode *parent) { meshIndex = node.mMeshes[0]; gnode->add_geom(_geoms[meshIndex]); gnode->set_state(_mat_states[_geom_matindices[meshIndex]]); - } else { for (size_t i = 0; i < node.mNumMeshes; ++i) { meshIndex = node.mMeshes[i]; @@ -553,6 +697,11 @@ load_node(const aiNode &node, PandaNode *parent) { _mat_states[_geom_matindices[meshIndex]]); } } + + if (character) { + assimp_cat.debug() << "Adding char to geom\n"; + character->add_child(gnode); + } } } diff --git a/pandatool/src/assimp/assimpLoader.h b/pandatool/src/assimp/assimpLoader.h index 3c8391b324..851ccc3a24 100644 --- a/pandatool/src/assimp/assimpLoader.h +++ b/pandatool/src/assimp/assimpLoader.h @@ -19,10 +19,23 @@ #include "filename.h" #include "modelRoot.h" #include "texture.h" +#include "pmap.h" #include "assimp/scene.h" #include "assimp/Importer.hpp" +class Character; +class CharacterJointBundle; +class PartGroup; + +struct char_cmp { + bool operator () (const char *a, const char *b) const { + return strcmp(a,b) < 0; + } +}; +typedef phash_map BoneMap; +typedef phash_map CharacterMap; + //////////////////////////////////////////////////////////////////// // Class : AssimpLoader // Description : Class that interfaces with Assimp and builds Panda @@ -54,10 +67,15 @@ private: CPT(RenderState) *_mat_states; PT(Geom) *_geoms; unsigned int *_geom_matindices; + BoneMap _bonemap; + CharacterMap _charmap; + + const aiNode *find_node(const aiNode &root, const aiString &name); void load_texture(size_t index); void load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(TextureAttrib) &tattr); void load_material(size_t index); + void create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node); void load_mesh(size_t index); void load_node(const aiNode &node, PandaNode *parent); void load_light(const aiLight &light); From 706f6f7de531692c4346ad5be8f7555a1b8e23df Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 6 Oct 2015 17:05:40 +0200 Subject: [PATCH 144/200] Squelch some of the type conversion warnings in MSVC --- dtool/src/dconfig/dconfig.I | 2 +- dtool/src/dtoolbase/cmath.I | 2 +- dtool/src/dtoolbase/dtoolbase.h | 2 ++ dtool/src/dtoolbase/typeRegistry.I | 2 +- dtool/src/prc/configVariable.I | 2 +- panda/src/display/drawableRegion.I | 6 ++--- panda/src/express/datagram.I | 4 ++-- panda/src/express/memoryUsage.I | 16 ++++++------- panda/src/gobj/shader.I | 4 ++-- panda/src/linmath/configVariableColor.I | 28 ++++++++++++---------- panda/src/linmath/lcast_to_src.I | 32 ++++++++++++------------- panda/src/linmath/lvector3_src.I | 2 +- 12 files changed, 54 insertions(+), 48 deletions(-) diff --git a/dtool/src/dconfig/dconfig.I b/dtool/src/dconfig/dconfig.I index c7575db59e..ffa809820e 100644 --- a/dtool/src/dconfig/dconfig.I +++ b/dtool/src/dconfig/dconfig.I @@ -28,7 +28,7 @@ GetInt(const string &sym, int def) { float DConfig:: GetFloat(const string &sym, float def) { ConfigVariableDouble var(sym, def, "DConfig", ConfigFlags::F_dconfig); - return var.get_value(); + return (float)var.get_value(); } double DConfig:: diff --git a/dtool/src/dtoolbase/cmath.I b/dtool/src/dtoolbase/cmath.I index 03b03f5640..6e8ed6e618 100644 --- a/dtool/src/dtoolbase/cmath.I +++ b/dtool/src/dtoolbase/cmath.I @@ -142,7 +142,7 @@ cacos(float v) { //////////////////////////////////////////////////////////////////// INLINE float cmod(float x, float y) { - return x - cfloor(x / y) * y; + return x - floor(x / y) * y; } //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 4c8b9b28cb..2c883f8220 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -55,6 +55,8 @@ #pragma warning (disable : 4355) /* C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data */ #pragma warning (disable : 4244) +/* C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data */ +#pragma warning (disable : 4267) #if _MSC_VER >= 1300 #if _MSC_VER >= 1310 diff --git a/dtool/src/dtoolbase/typeRegistry.I b/dtool/src/dtoolbase/typeRegistry.I index 21f15f1f1d..3ba8796c45 100644 --- a/dtool/src/dtoolbase/typeRegistry.I +++ b/dtool/src/dtoolbase/typeRegistry.I @@ -64,5 +64,5 @@ look_up(TypeHandle handle, TypedObject *object) const { return look_up_invalid(handle, object); } #endif - return _handle_registry[handle._index]; + return _handle_registry[(size_t)handle._index]; } diff --git a/dtool/src/prc/configVariable.I b/dtool/src/prc/configVariable.I index 42500be57f..2b50e2a542 100644 --- a/dtool/src/prc/configVariable.I +++ b/dtool/src/prc/configVariable.I @@ -311,7 +311,7 @@ set_int_word(int n, int value) { INLINE void ConfigVariable:: set_int64_word(int n, PN_int64 value) { nassertv(is_constructed()); - _core->make_local_value()->set_int_word(n, value); + _core->make_local_value()->set_int64_word(n, value); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/drawableRegion.I b/panda/src/display/drawableRegion.I index 269c02c1a1..6383b5a40f 100644 --- a/panda/src/display/drawableRegion.I +++ b/panda/src/display/drawableRegion.I @@ -240,7 +240,7 @@ set_clear_stencil(const unsigned int stencil) { //////////////////////////////////////////////////////////////////// INLINE unsigned int DrawableRegion:: get_clear_stencil() const { - return (int)(get_clear_value(RTP_stencil)[0]); + return (unsigned int)(get_clear_value(RTP_stencil)[0]); } //////////////////////////////////////////////////////////////////// @@ -306,9 +306,9 @@ INLINE void DrawableRegion:: update_pixel_factor() { PN_stdfloat new_pixel_factor; if (supports_pixel_zoom()) { - new_pixel_factor = 1.0 / sqrt(max(_pixel_zoom, (PN_stdfloat)1.0)); + new_pixel_factor = (PN_stdfloat)1 / sqrt(max(_pixel_zoom, (PN_stdfloat)1.0)); } else { - new_pixel_factor = 1.0; + new_pixel_factor = 1; } if (new_pixel_factor != _pixel_factor) { _pixel_factor = new_pixel_factor; diff --git a/panda/src/express/datagram.I b/panda/src/express/datagram.I index 123d428b1b..2853fe6447 100644 --- a/panda/src/express/datagram.I +++ b/panda/src/express/datagram.I @@ -353,7 +353,7 @@ add_string(const string &str) { nassertv(str.length() <= (PN_uint16)0xffff); // Strings always are preceded by their length - add_uint16(str.length()); + add_uint16((PN_uint16)str.length()); // Add the string append_data(str); @@ -368,7 +368,7 @@ add_string(const string &str) { INLINE void Datagram:: add_string32(const string &str) { // Strings always are preceded by their length - add_uint32(str.length()); + add_uint32((PN_uint32)str.length()); // Add the string append_data(str); diff --git a/panda/src/express/memoryUsage.I b/panda/src/express/memoryUsage.I index 8f52d9172d..ba2f8c197e 100644 --- a/panda/src/express/memoryUsage.I +++ b/panda/src/express/memoryUsage.I @@ -133,7 +133,7 @@ get_total_cpp_size() { //////////////////////////////////////////////////////////////////// INLINE size_t MemoryUsage:: get_panda_heap_single_size() { - return AtomicAdjust::get(get_global_ptr()->_total_heap_single_size); + return (size_t)AtomicAdjust::get(get_global_ptr()->_total_heap_single_size); } //////////////////////////////////////////////////////////////////// @@ -144,7 +144,7 @@ get_panda_heap_single_size() { //////////////////////////////////////////////////////////////////// INLINE size_t MemoryUsage:: get_panda_heap_array_size() { - return AtomicAdjust::get(get_global_ptr()->_total_heap_array_size); + return (size_t)AtomicAdjust::get(get_global_ptr()->_total_heap_array_size); } //////////////////////////////////////////////////////////////////// @@ -159,7 +159,7 @@ INLINE size_t MemoryUsage:: get_panda_heap_overhead() { #if defined(USE_MEMORY_DLMALLOC) || defined(USE_MEMORY_PTMALLOC2) MemoryUsage *mu = get_global_ptr(); - return AtomicAdjust::get(mu->_requested_heap_size) - AtomicAdjust::get(mu->_total_heap_single_size) - AtomicAdjust::get(mu->_total_heap_array_size); + return (size_t)(AtomicAdjust::get(mu->_requested_heap_size) - AtomicAdjust::get(mu->_total_heap_single_size) - AtomicAdjust::get(mu->_total_heap_array_size)); #else return 0; #endif @@ -173,7 +173,7 @@ get_panda_heap_overhead() { //////////////////////////////////////////////////////////////////// INLINE size_t MemoryUsage:: get_panda_mmap_size() { - return AtomicAdjust::get(get_global_ptr()->_total_mmap_size); + return (size_t)AtomicAdjust::get(get_global_ptr()->_total_mmap_size); } //////////////////////////////////////////////////////////////////// @@ -206,7 +206,7 @@ get_external_size() { #else // Without alternative malloc, the Panda allocated memory is also // included in total_size, so we have to subtract it out. - return mu->_total_size - mu->_total_heap_single_size - mu->_total_heap_array_size; + return mu->_total_size - (size_t)mu->_total_heap_single_size - (size_t)mu->_total_heap_array_size; #endif } else { return 0; @@ -223,12 +223,12 @@ INLINE size_t MemoryUsage:: get_total_size() { MemoryUsage *mu = get_global_ptr(); if (mu->_count_memory_usage) { - return mu->_total_size + mu->_requested_heap_size; + return mu->_total_size + (size_t)mu->_requested_heap_size; } else { #if defined(USE_MEMORY_DLMALLOC) || defined(USE_MEMORY_PTMALLOC2) - return mu->_requested_heap_size; + return (size_t)mu->_requested_heap_size; #else - return AtomicAdjust::get(mu->_total_heap_single_size) + AtomicAdjust::get(mu->_total_heap_array_size); + return (size_t)(AtomicAdjust::get(mu->_total_heap_single_size) + AtomicAdjust::get(mu->_total_heap_array_size)); #endif } } diff --git a/panda/src/gobj/shader.I b/panda/src/gobj/shader.I index 1c00d40197..a381cfffdd 100644 --- a/panda/src/gobj/shader.I +++ b/panda/src/gobj/shader.I @@ -682,7 +682,7 @@ ShaderPtrData(const LVecBase2i &vec) : INLINE void Shader::ShaderPtrData:: write_datagram(Datagram &dg) const { dg.add_uint8(_type); - dg.add_uint32(_size); + dg.add_uint32((PN_uint32)_size); if (_type == SPT_double) { const double *data = (const double *) _ptr; @@ -867,7 +867,7 @@ get_filename_from_index(int index, ShaderType type) const { } } else if (glsl_preprocess && index >= 2048 && (index - 2048) < (int)_included_files.size()) { - return _included_files[index - 2048]; + return _included_files[(size_t)index - 2048]; } // Must be a mistake. Quietly put back the integer. char str[32]; diff --git a/panda/src/linmath/configVariableColor.I b/panda/src/linmath/configVariableColor.I index a686c988c5..1c5031bfb3 100644 --- a/panda/src/linmath/configVariableColor.I +++ b/panda/src/linmath/configVariableColor.I @@ -126,19 +126,23 @@ get_value() const { switch (get_num_words()) { case 1: - _cache.set(get_double_word(0), get_double_word(0), get_double_word(0), 1); + _cache.set((PN_stdfloat)get_double_word(0), (PN_stdfloat)get_double_word(0), + (PN_stdfloat)get_double_word(0), 1); break; case 2: - _cache.set(get_double_word(0), get_double_word(0), get_double_word(0), get_double_word(1)); + _cache.set((PN_stdfloat)get_double_word(0), (PN_stdfloat)get_double_word(0), + (PN_stdfloat)get_double_word(0), (PN_stdfloat)get_double_word(1)); break; case 3: - _cache.set(get_double_word(0), get_double_word(1), get_double_word(2), 1); + _cache.set((PN_stdfloat)get_double_word(0), (PN_stdfloat)get_double_word(1), + (PN_stdfloat)get_double_word(2), 1); break; case 4: - _cache.set(get_double_word(0), get_double_word(1), get_double_word(2), get_double_word(3)); + _cache.set((PN_stdfloat)get_double_word(0), (PN_stdfloat)get_double_word(1), + (PN_stdfloat)get_double_word(2), (PN_stdfloat)get_double_word(3)); break; default: @@ -161,17 +165,17 @@ get_default_value() const { if (decl != (ConfigDeclaration *)NULL) { switch (decl->get_num_words()) { case 1: - return LColor(decl->get_double_word(0), decl->get_double_word(0), - decl->get_double_word(0), 1); + return LColor((PN_stdfloat)decl->get_double_word(0), (PN_stdfloat)decl->get_double_word(0), + (PN_stdfloat)decl->get_double_word(0), 1); case 2: - return LColor(decl->get_double_word(0), decl->get_double_word(0), - decl->get_double_word(0), decl->get_double_word(1)); + return LColor((PN_stdfloat)decl->get_double_word(0), (PN_stdfloat)decl->get_double_word(0), + (PN_stdfloat)decl->get_double_word(0), (PN_stdfloat)decl->get_double_word(1)); case 3: - return LColor(decl->get_double_word(0), decl->get_double_word(1), - decl->get_double_word(2), 1); + return LColor((PN_stdfloat)decl->get_double_word(0), (PN_stdfloat)decl->get_double_word(1), + (PN_stdfloat)decl->get_double_word(2), 1); case 4: - return LColor(decl->get_double_word(0), decl->get_double_word(1), - decl->get_double_word(2), decl->get_double_word(3)); + return LColor((PN_stdfloat)decl->get_double_word(0), (PN_stdfloat)decl->get_double_word(1), + (PN_stdfloat)decl->get_double_word(2), (PN_stdfloat)decl->get_double_word(3)); default: prc_cat->warning() << "Invalid default color value for ConfigVariable " diff --git a/panda/src/linmath/lcast_to_src.I b/panda/src/linmath/lcast_to_src.I index acfcad19d5..9c4f83ca3e 100644 --- a/panda/src/linmath/lcast_to_src.I +++ b/panda/src/linmath/lcast_to_src.I @@ -74,47 +74,47 @@ lcast_to(FLOATTYPE *, const FLOATNAME(LMatrix4) &source) { INLINE_LINMATH FLOATNAME2(LVecBase2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase2) &source) { - return FLOATNAME2(LVecBase2)(source[0], source[1]); + return FLOATNAME2(LVecBase2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LVecBase3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase3) &source) { - return FLOATNAME2(LVecBase3)(source[0], source[1], source[2]); + return FLOATNAME2(LVecBase3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LVecBase4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase4) &source) { - return FLOATNAME2(LVecBase4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LVecBase4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } INLINE_LINMATH FLOATNAME2(LVector2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector2) &source) { - return FLOATNAME2(LVector2)(source[0], source[1]); + return FLOATNAME2(LVector2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LVector3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector3) &source) { - return FLOATNAME2(LVector3)(source[0], source[1], source[2]); + return FLOATNAME2(LVector3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LVector4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector4) &source) { - return FLOATNAME2(LVector4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LVector4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } INLINE_LINMATH FLOATNAME2(LPoint2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint2) &source) { - return FLOATNAME2(LPoint2)(source[0], source[1]); + return FLOATNAME2(LPoint2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LPoint3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint3) &source) { - return FLOATNAME2(LPoint3)(source[0], source[1], source[2]); + return FLOATNAME2(LPoint3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LPoint4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint4) &source) { - return FLOATNAME2(LPoint4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LPoint4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } INLINE_LINMATH FLOATNAME2(LQuaternion) @@ -125,16 +125,16 @@ lcast_to(FLOATTYPE2 *, const FLOATNAME(LQuaternion) &c) { INLINE_LINMATH FLOATNAME2(LMatrix3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix3) &source) { return FLOATNAME2(LMatrix3) - (source(0, 0), source(0, 1), source(0, 2), - source(1, 0), source(1, 1), source(1, 2), - source(2, 0), source(2, 1), source(2, 2)); + ((FLOATTYPE2)source(0, 0), (FLOATTYPE2)source(0, 1), (FLOATTYPE2)source(0, 2), + (FLOATTYPE2)source(1, 0), (FLOATTYPE2)source(1, 1), (FLOATTYPE2)source(1, 2), + (FLOATTYPE2)source(2, 0), (FLOATTYPE2)source(2, 1), (FLOATTYPE2)source(2, 2)); } INLINE_LINMATH FLOATNAME2(LMatrix4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix4) &source) { return FLOATNAME2(LMatrix4) - (source(0, 0), source(0, 1), source(0, 2), source(0, 3), - source(1, 0), source(1, 1), source(1, 2), source(1, 3), - source(2, 0), source(2, 1), source(2, 2), source(2, 3), - source(3, 0), source(3, 1), source(3, 2), source(3, 3)); + ((FLOATTYPE2)source(0, 0), (FLOATTYPE2)source(0, 1), (FLOATTYPE2)source(0, 2), (FLOATTYPE2)source(0, 3), + (FLOATTYPE2)source(1, 0), (FLOATTYPE2)source(1, 1), (FLOATTYPE2)source(1, 2), (FLOATTYPE2)source(1, 3), + (FLOATTYPE2)source(2, 0), (FLOATTYPE2)source(2, 1), (FLOATTYPE2)source(2, 2), (FLOATTYPE2)source(2, 3), + (FLOATTYPE2)source(3, 0), (FLOATTYPE2)source(3, 1), (FLOATTYPE2)source(3, 2), (FLOATTYPE2)source(3, 3)); } diff --git a/panda/src/linmath/lvector3_src.I b/panda/src/linmath/lvector3_src.I index 5a23e12c43..318d32d2c9 100644 --- a/panda/src/linmath/lvector3_src.I +++ b/panda/src/linmath/lvector3_src.I @@ -319,7 +319,7 @@ relative_angle_rad(const FLOATNAME(LVector3) &other) const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVector3):: relative_angle_deg(const FLOATNAME(LVector3) &other) const { - return relative_angle_rad(other)*180/3.1415926535; + return relative_angle_rad(other) * FLOATCONST(180.0) / FLOATCONST(3.1415926535); } #endif // FLOATTYPE_IS_INT From 45e1f4d25ef736f025fafe535c7451ae6da07924 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 6 Oct 2015 20:41:16 -0700 Subject: [PATCH 145/200] Assimp: Cleanup skeletal mesh code. * Use pmap instead of phash_map * Remove PT() in create_joint() function header --- pandatool/src/assimp/assimpLoader.cxx | 2 +- pandatool/src/assimp/assimpLoader.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandatool/src/assimp/assimpLoader.cxx b/pandatool/src/assimp/assimpLoader.cxx index 258e160c77..f0322dc506 100644 --- a/pandatool/src/assimp/assimpLoader.cxx +++ b/pandatool/src/assimp/assimpLoader.cxx @@ -418,7 +418,7 @@ load_material(size_t index) { // Description: Creates a CharacterJoint from an aiNode //////////////////////////////////////////////////////////////////// void AssimpLoader:: -create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node) +create_joint(Character *character, CharacterJointBundle *bundle, PartGroup *parent, const aiNode &node) { const aiMatrix4x4 &t = node.mTransformation; LMatrix4 mat(t.a1, t.b1, t.c1, t.d1, diff --git a/pandatool/src/assimp/assimpLoader.h b/pandatool/src/assimp/assimpLoader.h index 851ccc3a24..f9544d2ed5 100644 --- a/pandatool/src/assimp/assimpLoader.h +++ b/pandatool/src/assimp/assimpLoader.h @@ -33,8 +33,8 @@ struct char_cmp { return strcmp(a,b) < 0; } }; -typedef phash_map BoneMap; -typedef phash_map CharacterMap; +typedef pmap BoneMap; +typedef pmap CharacterMap; //////////////////////////////////////////////////////////////////// // Class : AssimpLoader @@ -75,7 +75,7 @@ private: void load_texture(size_t index); void load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(TextureAttrib) &tattr); void load_material(size_t index); - void create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node); + void create_joint(Character *character, CharacterJointBundle *bundle, PartGroup *parent, const aiNode &node); void load_mesh(size_t index); void load_node(const aiNode &node, PandaNode *parent); void load_light(const aiLight &light); From 9543d0800de26cc61b56ee7eab26bce283113313 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 15:41:18 +0200 Subject: [PATCH 146/200] Don't add -pyX.Y suffix to runtime installer on Windows --- makepanda/makepanda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 9a077f6f58..3d379ecdeb 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -7033,7 +7033,7 @@ try: fn += VERSION - if SDK["PYTHONVERSION"] != "python2.7": + if not RUNTIME and SDK["PYTHONVERSION"] != "python2.7": fn += '-py' + SDK["PYTHONVERSION"][6:] if GetOptimize() <= 2: From 389d73a485337c68f5982da41df5287c39ea70c1 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 15:51:56 +0200 Subject: [PATCH 147/200] Include Eigen headers in Windows SDK to prevent people from having to grab the thirdparty packages --- makepanda/makepanda.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b1c31930ea..8c28cc20cc 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2676,6 +2676,11 @@ if (PkgSkip("PYTHON")==0 and os.path.isdir(GetThirdpartyBase()+"/Pmw")): CopyTree(GetOutputDir()+'/Pmw', GetThirdpartyBase()+'/Pmw') ConditionalWriteFile(GetOutputDir()+'/include/ctl3d.h', '/* dummy file to make MAX happy */') +# Since Eigen is included by all sorts of core headers, as a convenience +# to C++ users on Windows, we include it in the Panda include directory. +if not PkgSkip("EIGEN") and GetTarget() == "windows" and GetThirdpartyDir(): + CopyTree(GetOutputDir()+'/include/Eigen', GetThirdpartyDir()+'eigen/include/Eigen') + ######################################################################## # # Copy header files to the built/include/parser-inc directory. From 18ad6d1543db352107f808ed725bc4df722635a8 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 18:58:26 +0200 Subject: [PATCH 148/200] Replace many int params with size_t params where appropriate, and work towards fixing type conversion warnings --- dtool/src/dtoolbase/indent.I | 4 +- dtool/src/dtoolbase/typeHandle.cxx | 2 +- dtool/src/dtoolbase/typeHandle.h | 4 +- dtool/src/dtoolbase/typeRegistry.cxx | 12 +++--- dtool/src/dtoolbase/typeRegistryNode.cxx | 2 +- dtool/src/dtoolutil/dSearchPath.I | 4 +- dtool/src/dtoolutil/dSearchPath.cxx | 18 ++++---- dtool/src/dtoolutil/dSearchPath.h | 14 +++---- dtool/src/dtoolutil/executionEnvironment.I | 4 +- dtool/src/dtoolutil/executionEnvironment.cxx | 10 ++--- dtool/src/dtoolutil/executionEnvironment.h | 8 ++-- dtool/src/dtoolutil/filename.I | 4 +- dtool/src/dtoolutil/filename.cxx | 18 ++++---- dtool/src/dtoolutil/filename.h | 2 +- dtool/src/dtoolutil/lineStreamBuf.I | 2 +- dtool/src/dtoolutil/lineStreamBuf.cxx | 4 +- dtool/src/dtoolutil/lineStreamBuf.h | 2 +- dtool/src/dtoolutil/pandaSystem.cxx | 6 +-- dtool/src/dtoolutil/pandaSystem.h | 4 +- dtool/src/dtoolutil/textEncoder.I | 14 +++---- dtool/src/dtoolutil/textEncoder.h | 10 ++--- dtool/src/dtoolutil/unicodeLatinMap.cxx | 4 +- .../interfaceMakerPythonNative.cxx | 26 ++++++------ dtool/src/prc/configDeclaration.I | 24 +++++------ dtool/src/prc/configDeclaration.cxx | 24 +++++------ dtool/src/prc/configDeclaration.h | 42 +++++++++---------- dtool/src/prc/configPage.cxx | 22 +++++----- dtool/src/prc/configPage.h | 12 +++--- dtool/src/prc/configPageManager.I | 30 ++++++------- dtool/src/prc/configPageManager.h | 20 ++++----- dtool/src/prc/configVariable.I | 32 +++++++------- dtool/src/prc/configVariable.h | 32 +++++++------- dtool/src/prc/configVariableBool.I | 8 ++-- dtool/src/prc/configVariableBool.h | 8 ++-- dtool/src/prc/configVariableCore.I | 20 ++++----- dtool/src/prc/configVariableCore.cxx | 6 +-- dtool/src/prc/configVariableCore.h | 16 +++---- dtool/src/prc/configVariableDouble.I | 8 ++-- dtool/src/prc/configVariableDouble.h | 8 ++-- dtool/src/prc/configVariableEnum.I | 8 ++-- dtool/src/prc/configVariableEnum.h | 8 ++-- dtool/src/prc/configVariableFilename.I | 6 +-- dtool/src/prc/configVariableFilename.h | 6 +-- dtool/src/prc/configVariableInt.I | 8 ++-- dtool/src/prc/configVariableInt.h | 8 ++-- dtool/src/prc/configVariableInt64.I | 20 ++++----- dtool/src/prc/configVariableInt64.h | 16 +++---- dtool/src/prc/configVariableList.I | 12 +++--- dtool/src/prc/configVariableList.cxx | 8 ++-- dtool/src/prc/configVariableList.h | 12 +++--- dtool/src/prc/configVariableManager.I | 6 +-- dtool/src/prc/configVariableManager.cxx | 28 ++++++------- dtool/src/prc/configVariableManager.h | 8 ++-- dtool/src/prc/configVariableSearchPath.I | 6 +-- dtool/src/prc/configVariableSearchPath.cxx | 4 +- dtool/src/prc/configVariableSearchPath.h | 8 ++-- dtool/src/prc/configVariableString.I | 8 ++-- dtool/src/prc/configVariableString.h | 6 +-- dtool/src/prc/encryptStreamBuf.cxx | 14 +++---- dtool/src/prc/notify.cxx | 2 +- dtool/src/prc/notifyCategory.cxx | 6 +-- dtool/src/prc/notifyCategory.h | 5 ++- dtool/src/prc/prcKeyRegistry.cxx | 22 +++++----- dtool/src/prc/prcKeyRegistry.h | 15 +++---- dtool/src/prc/streamReader.cxx | 4 +- dtool/src/prc/streamWriter.I | 4 +- dtool/src/prckeys/makePrcKey.cxx | 10 ++--- panda/src/display/windowProperties.h | 2 +- panda/src/express/datagram.cxx | 4 +- panda/src/express/datagramIterator.I | 4 +- panda/src/express/datagramIterator.cxx | 8 ++-- panda/src/express/datagramIterator.h | 2 +- panda/src/express/hashVal.cxx | 4 +- panda/src/express/memoryUsagePointers.cxx | 22 +++++----- panda/src/express/memoryUsagePointers.h | 14 +++---- panda/src/express/memoryUsagePointers_ext.cxx | 2 +- panda/src/express/memoryUsagePointers_ext.h | 2 +- panda/src/express/multifile.cxx | 2 +- panda/src/express/nodeReferenceCount.I | 2 +- panda/src/express/referenceCount.I | 2 +- panda/src/express/virtualFileList.I | 12 +++--- panda/src/express/virtualFileList.h | 8 ++-- panda/src/gobj/adaptiveLru.h | 2 +- panda/src/gobj/geomPrimitive.cxx | 2 +- panda/src/gobj/geomVertexArrayData.I | 4 +- panda/src/gobj/geomVertexArrayData.h | 4 +- panda/src/gobj/geomVertexArrayFormat.I | 8 ++-- panda/src/gobj/geomVertexArrayFormat.h | 4 +- panda/src/gobj/geomVertexData.cxx | 2 +- panda/src/gobj/geomVertexFormat.I | 38 ++++++++--------- panda/src/gobj/geomVertexFormat.cxx | 38 ++++++++--------- panda/src/gobj/geomVertexFormat.h | 40 +++++++++--------- panda/src/gobj/lens.I | 4 +- panda/src/gobj/sliderTable.I | 10 ++--- panda/src/gobj/sliderTable.cxx | 18 ++++---- panda/src/gobj/sliderTable.h | 14 +++---- panda/src/gobj/texture.I | 2 +- panda/src/gobj/texture.cxx | 2 +- panda/src/gobj/texture.h | 2 +- panda/src/gobj/transformBlend.I | 18 ++++---- panda/src/gobj/transformBlend.h | 10 ++--- panda/src/gobj/transformBlendTable.I | 6 +-- panda/src/gobj/transformBlendTable.cxx | 22 +++++----- panda/src/gobj/transformBlendTable.h | 10 ++--- panda/src/gobj/transformTable.I | 6 +-- panda/src/gobj/transformTable.cxx | 12 +++--- panda/src/gobj/transformTable.h | 10 ++--- panda/src/gobj/vertexDataBook.I | 2 +- panda/src/gobj/vertexDataBook.h | 2 +- panda/src/linmath/lcast_to_src.I | 20 ++++----- panda/src/linmath/lorientation_src.I | 10 ++--- panda/src/linmath/lorientation_src.h | 2 +- panda/src/linmath/lquaternion_src.I | 6 +-- panda/src/linmath/lvecBase2_ext_src.I | 2 +- panda/src/linmath/lvecBase3_ext_src.I | 2 +- panda/src/linmath/lvecBase3_src.I | 2 + panda/src/linmath/lvecBase3_src.h | 2 + panda/src/linmath/lvecBase4_ext_src.I | 2 +- panda/src/nativenet/socket_address.I | 14 +++---- panda/src/nativenet/socket_address.h | 10 ++--- panda/src/nativenet/socket_portable.h | 10 ++--- panda/src/nativenet/time_clock.h | 10 ++--- panda/src/pgraph/renderAttribRegistry.I | 2 +- panda/src/pgraph/renderState.I | 16 +++---- panda/src/pgraph/renderState.h | 16 +++---- panda/src/pgraph/shaderAttrib.I | 2 +- panda/src/pgraph/transformState.I | 16 +++---- panda/src/pgraph/transformState.h | 16 +++---- panda/src/pgraphnodes/sceneGraphAnalyzer.I | 3 +- panda/src/pgraphnodes/sceneGraphAnalyzer.h | 2 +- panda/src/pnmimage/convert_srgb.I | 4 +- panda/src/pnmimage/pnmImage.I | 6 +-- panda/src/pstatclient/pStatClient.I | 4 +- panda/src/pstatclient/pStatFrameData.I | 25 ++++++----- panda/src/pstatclient/pStatFrameData.h | 14 +++---- panda/src/putil/bitArray.I | 11 +++-- panda/src/putil/bitArray.cxx | 8 ++-- panda/src/putil/bitArray.h | 8 ++-- panda/src/putil/buttonMap.I | 8 ++-- panda/src/putil/buttonMap.h | 8 ++-- .../putil/cachedTypedWritableReferenceCount.I | 2 +- panda/src/putil/nodeCachedReferenceCount.I | 2 +- panda/src/putil/pbitops.I | 6 +-- panda/src/putil/simpleHashMap.I | 6 +-- panda/src/putil/simpleHashMap.h | 4 +- panda/src/putil/sparseArray.I | 10 ++--- panda/src/putil/sparseArray.h | 6 +-- panda/src/putil/weakKeyHashMap.I | 6 +-- panda/src/putil/weakKeyHashMap.h | 4 +- 149 files changed, 721 insertions(+), 726 deletions(-) diff --git a/dtool/src/dtoolbase/indent.I b/dtool/src/dtoolbase/indent.I index 79e949c564..aeeaea1262 100644 --- a/dtool/src/dtoolbase/indent.I +++ b/dtool/src/dtoolbase/indent.I @@ -39,7 +39,7 @@ write_long_list(ostream &out, int indent_level, string str = item.str(); indent(out, indent_level) << first_prefix << str; - int col = indent_level + first_prefix.length() + str.length(); + int col = indent_level + (int)(first_prefix.length() + str.length()); ++first; @@ -52,7 +52,7 @@ write_long_list(ostream &out, int indent_level, if (col > max_col) { out << "\n"; indent(out, indent_level) << later_prefix << str; - col = indent_level + later_prefix.length() + str.length(); + col = indent_level + (int)(later_prefix.length() + str.length()); } else { out << " " << str; diff --git a/dtool/src/dtoolbase/typeHandle.cxx b/dtool/src/dtoolbase/typeHandle.cxx index d807a298b6..c5bb0a7005 100644 --- a/dtool/src/dtoolbase/typeHandle.cxx +++ b/dtool/src/dtoolbase/typeHandle.cxx @@ -28,7 +28,7 @@ TypeHandle TypeHandle::_none; // only updated if track-memory-usage is set true in // your Config.prc file. //////////////////////////////////////////////////////////////////// -int TypeHandle:: +size_t TypeHandle:: get_memory_usage(MemoryClass memory_class) const { assert((int)memory_class >= 0 && (int)memory_class < (int)MC_limit); if ((*this) == TypeHandle::none()) { diff --git a/dtool/src/dtoolbase/typeHandle.h b/dtool/src/dtoolbase/typeHandle.h index c05e25dd46..d7c211ff68 100644 --- a/dtool/src/dtoolbase/typeHandle.h +++ b/dtool/src/dtoolbase/typeHandle.h @@ -126,11 +126,11 @@ PUBLISHED: int get_best_parent_from_Set(const std::set< int > &legal_vals) const; #ifdef DO_MEMORY_USAGE - int get_memory_usage(MemoryClass memory_class) const; + size_t get_memory_usage(MemoryClass memory_class) const; void inc_memory_usage(MemoryClass memory_class, size_t size); void dec_memory_usage(MemoryClass memory_class, size_t size); #else - static CONSTEXPR int get_memory_usage(MemoryClass) { return 0; } + static CONSTEXPR size_t get_memory_usage(MemoryClass) { return 0; } INLINE void inc_memory_usage(MemoryClass, size_t) { } INLINE void dec_memory_usage(MemoryClass, size_t) { } #endif // DO_MEMORY_USAGE diff --git a/dtool/src/dtoolbase/typeRegistry.cxx b/dtool/src/dtoolbase/typeRegistry.cxx index f88f923f04..16d64830ee 100644 --- a/dtool/src/dtoolbase/typeRegistry.cxx +++ b/dtool/src/dtoolbase/typeRegistry.cxx @@ -59,7 +59,7 @@ register_type(TypeHandle &type_handle, const string &name) { // class has been defined. TypeHandle new_handle; - new_handle._index = _handle_registry.size(); + new_handle._index = (int)_handle_registry.size(); TypeRegistryNode *rnode = new TypeRegistryNode(new_handle, name, type_handle); _handle_registry.push_back(rnode); @@ -73,7 +73,7 @@ register_type(TypeHandle &type_handle, const string &name) { TypeRegistryNode *rnode = (*ri).second; assert(rnode->_name == (*ri).first); assert(rnode->_handle._index >= 0 && - rnode->_handle._index < (int)_handle_registry.size()); + rnode->_handle._index < (int)_handle_registry.size()); assert(_handle_registry[rnode->_handle._index] == rnode); assert(rnode->_handle._index != 0); @@ -137,7 +137,7 @@ register_dynamic_type(const string &name) { // has something unique to point to. This doesn't really mean // anything, though. TypeHandle *new_handle = new TypeHandle; - new_handle->_index = _handle_registry.size(); + new_handle->_index = (int)_handle_registry.size(); TypeRegistryNode *rnode = new TypeRegistryNode(*new_handle, name, *new_handle); _handle_registry.push_back(rnode); @@ -365,7 +365,7 @@ int TypeRegistry:: get_num_root_classes() { _lock->acquire(); freshen_derivations(); - int num_roots = _root_classes.size(); + int num_roots = (int)_root_classes.size(); _lock->release(); return num_roots; } @@ -410,7 +410,7 @@ get_num_parent_classes(TypeHandle child, TypedObject *child_object) const { _lock->acquire(); TypeRegistryNode *rnode = look_up(child, child_object); assert(rnode != (TypeRegistryNode *)NULL); - int num_parents = rnode->_parent_classes.size(); + int num_parents = (int)rnode->_parent_classes.size(); _lock->release(); return num_parents; } @@ -452,7 +452,7 @@ get_num_child_classes(TypeHandle child, TypedObject *child_object) const { _lock->acquire(); TypeRegistryNode *rnode = look_up(child, child_object); assert(rnode != (TypeRegistryNode *)NULL); - int num_children = rnode->_child_classes.size(); + int num_children = (int)rnode->_child_classes.size(); _lock->release(); return num_children; } diff --git a/dtool/src/dtoolbase/typeRegistryNode.cxx b/dtool/src/dtoolbase/typeRegistryNode.cxx index 09e36a7ceb..065cea8051 100644 --- a/dtool/src/dtoolbase/typeRegistryNode.cxx +++ b/dtool/src/dtoolbase/typeRegistryNode.cxx @@ -294,7 +294,7 @@ r_build_subtrees(TypeRegistryNode *top, int bit_count, // Now, how many more bits do we need to encode each of our // children? - int num_children = _child_classes.size(); + int num_children = (int)_child_classes.size(); int more_bits = 0; int i = num_children - 1; while (i > 0) { diff --git a/dtool/src/dtoolutil/dSearchPath.I b/dtool/src/dtoolutil/dSearchPath.I index 15bc87241b..5dc035a848 100644 --- a/dtool/src/dtoolutil/dSearchPath.I +++ b/dtool/src/dtoolutil/dSearchPath.I @@ -21,7 +21,7 @@ // list in Python. //////////////////////////////////////////////////////////////////// INLINE Filename DSearchPath::Results:: -operator [] (int n) const { +operator [] (size_t n) const { return get_file(n); } @@ -32,7 +32,7 @@ operator [] (int n) const { // is defined to make the Results object appear to be a // list in Python. //////////////////////////////////////////////////////////////////// -INLINE int DSearchPath::Results:: +INLINE size_t DSearchPath::Results:: size() const { return get_num_files(); } diff --git a/dtool/src/dtoolutil/dSearchPath.cxx b/dtool/src/dtoolutil/dSearchPath.cxx index 16984a48cf..89105253a7 100644 --- a/dtool/src/dtoolutil/dSearchPath.cxx +++ b/dtool/src/dtoolutil/dSearchPath.cxx @@ -72,7 +72,7 @@ clear() { // Access: Published // Description: Returns the number of files on the result list. //////////////////////////////////////////////////////////////////// -int DSearchPath::Results:: +size_t DSearchPath::Results:: get_num_files() const { return _files.size(); } @@ -83,8 +83,8 @@ get_num_files() const { // Description: Returns the nth file on the result list. //////////////////////////////////////////////////////////////////// const Filename &DSearchPath::Results:: -get_file(int n) const { - assert(n >= 0 && n < (int)_files.size()); +get_file(size_t n) const { + assert(n < _files.size()); return _files[n]; } @@ -299,7 +299,7 @@ is_empty() const { // Access: Published // Description: Returns the number of directories on the search list. //////////////////////////////////////////////////////////////////// -int DSearchPath:: +size_t DSearchPath:: get_num_directories() const { return _directories.size(); } @@ -310,8 +310,8 @@ get_num_directories() const { // Description: Returns the nth directory on the search list. //////////////////////////////////////////////////////////////////// const Filename &DSearchPath:: -get_directory(int n) const { - assert(n >= 0 && n < (int)_directories.size()); +get_directory(size_t n) const { + assert(n < _directories.size()); return _directories[n]; } @@ -368,10 +368,10 @@ find_file(const Filename &filename) const { // the results list first; otherwise, the newly-found // files will be appended to the list. //////////////////////////////////////////////////////////////////// -int DSearchPath:: +size_t DSearchPath:: find_all_files(const Filename &filename, DSearchPath::Results &results) const { - int num_added = 0; + size_t num_added = 0; if (filename.is_local()) { if (_directories.empty()) { @@ -446,5 +446,3 @@ write(ostream &out, int indent_level) const { out << (*di) << "\n"; } } - - diff --git a/dtool/src/dtoolutil/dSearchPath.h b/dtool/src/dtoolutil/dSearchPath.h index e61e4c5f41..3ae3fe6ac7 100644 --- a/dtool/src/dtoolutil/dSearchPath.h +++ b/dtool/src/dtoolutil/dSearchPath.h @@ -39,11 +39,11 @@ PUBLISHED: ~Results(); void clear(); - int get_num_files() const; - const Filename &get_file(int n) const; + size_t get_num_files() const; + const Filename &get_file(size_t n) const; - INLINE Filename operator [] (int n) const; - INLINE int size() const; + INLINE Filename operator [] (size_t n) const; + INLINE size_t size() const; void output(ostream &out) const; void write(ostream &out, int indent_level = 0) const; @@ -72,12 +72,12 @@ PUBLISHED: void prepend_path(const DSearchPath &path); bool is_empty() const; - int get_num_directories() const; - const Filename &get_directory(int n) const; + size_t get_num_directories() const; + const Filename &get_directory(size_t n) const; MAKE_SEQ(get_directories, get_num_directories, get_directory); Filename find_file(const Filename &filename) const; - int find_all_files(const Filename &filename, Results &results) const; + size_t find_all_files(const Filename &filename, Results &results) const; INLINE Results find_all_files(const Filename &filename) const; INLINE static Filename diff --git a/dtool/src/dtoolutil/executionEnvironment.I b/dtool/src/dtoolutil/executionEnvironment.I index 7c7fa57c33..518d0cee41 100644 --- a/dtool/src/dtoolutil/executionEnvironment.I +++ b/dtool/src/dtoolutil/executionEnvironment.I @@ -80,7 +80,7 @@ clear_shadow(const string &var) { // Description: Returns the number of command-line arguments // available, not counting arg 0, the binary name. //////////////////////////////////////////////////////////////////// -INLINE int ExecutionEnvironment:: +INLINE size_t ExecutionEnvironment:: get_num_args() { return get_ptr()->ns_get_num_args(); } @@ -94,7 +94,7 @@ get_num_args() { // parameter, not the binary name. //////////////////////////////////////////////////////////////////// INLINE string ExecutionEnvironment:: -get_arg(int n) { +get_arg(size_t n) { return get_ptr()->ns_get_arg(n); } diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx index 8c67ace1c8..4117bbf86f 100644 --- a/dtool/src/dtoolutil/executionEnvironment.cxx +++ b/dtool/src/dtoolutil/executionEnvironment.cxx @@ -420,7 +420,7 @@ ns_clear_shadow(const string &var) { // available, not counting arg 0, the binary name. The // nonstatic implementation. //////////////////////////////////////////////////////////////////// -int ExecutionEnvironment:: +size_t ExecutionEnvironment:: ns_get_num_args() const { return _args.size(); } @@ -435,8 +435,8 @@ ns_get_num_args() const { // implementation. //////////////////////////////////////////////////////////////////// string ExecutionEnvironment:: -ns_get_arg(int n) const { - assert(n >= 0 && n < ns_get_num_args()); +ns_get_arg(size_t n) const { + assert(n < ns_get_num_args()); return _args[n]; } @@ -719,9 +719,9 @@ read_args() { if (_binary_name.empty()) { char readlinkbuf [PATH_MAX]; #ifdef HAVE_PROC_CURPROC_FILE - int pathlen = readlink("/proc/curproc/file", readlinkbuf, PATH_MAX - 1); + ssize_t pathlen = readlink("/proc/curproc/file", readlinkbuf, PATH_MAX - 1); #else - int pathlen = readlink("/proc/self/exe", readlinkbuf, PATH_MAX - 1); + ssize_t pathlen = readlink("/proc/self/exe", readlinkbuf, PATH_MAX - 1); #endif if (pathlen > 0) { readlinkbuf[pathlen] = 0; diff --git a/dtool/src/dtoolutil/executionEnvironment.h b/dtool/src/dtoolutil/executionEnvironment.h index bfbb6adf44..716b956258 100644 --- a/dtool/src/dtoolutil/executionEnvironment.h +++ b/dtool/src/dtoolutil/executionEnvironment.h @@ -44,8 +44,8 @@ PUBLISHED: static string expand_string(const string &str); - INLINE static int get_num_args(); - INLINE static string get_arg(int n); + INLINE static size_t get_num_args(); + INLINE static string get_arg(size_t n); INLINE static string get_binary_name(); INLINE static string get_dtool_name(); @@ -62,8 +62,8 @@ private: void ns_shadow_environment_variable(const string &var, const string &value); void ns_clear_shadow(const string &var); - int ns_get_num_args() const; - string ns_get_arg(int n) const; + size_t ns_get_num_args() const; + string ns_get_arg(size_t n) const; string ns_get_binary_name() const; string ns_get_dtool_name() const; diff --git a/dtool/src/dtoolutil/filename.I b/dtool/src/dtoolutil/filename.I index 3d91bb987a..f8fa8fff4e 100644 --- a/dtool/src/dtoolutil/filename.I +++ b/dtool/src/dtoolutil/filename.I @@ -332,8 +332,8 @@ length() const { // Description: //////////////////////////////////////////////////////////////////// INLINE char Filename:: -operator [] (int n) const { - assert(n >= 0 && n < (int)_filename.length()); +operator [] (size_t n) const { + assert(n < _filename.length()); return _filename[n]; } diff --git a/dtool/src/dtoolutil/filename.cxx b/dtool/src/dtoolutil/filename.cxx index a4152d5db1..143bbde0a3 100644 --- a/dtool/src/dtoolutil/filename.cxx +++ b/dtool/src/dtoolutil/filename.cxx @@ -728,7 +728,7 @@ set_dirname(const string &s) { // Remove the directory prefix altogether. _filename.replace(0, _basename_start, ""); - int length_change = - ((int)_basename_start); + ssize_t length_change = - ((ssize_t)_basename_start); _dirname_end = 0; _basename_start += length_change; @@ -746,7 +746,7 @@ set_dirname(const string &s) { ss = s+'/'; } - int length_change = ss.length() - _basename_start; + ssize_t length_change = ss.length() - _basename_start; _filename.replace(0, _basename_start, ss); @@ -791,7 +791,7 @@ set_basename(const string &s) { //////////////////////////////////////////////////////////////////// void Filename:: set_fullpath_wo_extension(const string &s) { - int length_change = s.length() - _basename_end; + ssize_t length_change = s.length() - _basename_end; _filename.replace(0, _basename_end, s); @@ -811,7 +811,7 @@ set_fullpath_wo_extension(const string &s) { //////////////////////////////////////////////////////////////////// void Filename:: set_basename_wo_extension(const string &s) { - int length_change = s.length() - (_basename_end - _basename_start); + ssize_t length_change = s.length() - (_basename_end - _basename_start); if (_basename_end == string::npos) { _filename.replace(_basename_start, string::npos, s); @@ -875,8 +875,8 @@ get_filename_index(int index) const { if (_hash_end != _hash_start) { ostringstream strm; - strm << _filename.substr(0, _hash_start) - << setw(_hash_end - _hash_start) << setfill('0') << index + strm << _filename.substr(0, _hash_start) + << setw((int)(_hash_end - _hash_start)) << setfill('0') << index << _filename.substr(_hash_end); file.set_fullpath(strm.str()); } @@ -1822,12 +1822,12 @@ find_on_searchpath(const DSearchPath &searchpath) { return -1; } - int num_directories = searchpath.get_num_directories(); - for (int i = 0; i < num_directories; i++) { + size_t num_directories = searchpath.get_num_directories(); + for (size_t i = 0; i < num_directories; ++i) { Filename directory = searchpath.get_directory(i); directory.make_absolute(); if (make_relative_to(directory, false)) { - return i; + return (int)i; } } diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index f01d03483e..127e9dcbcc 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -121,7 +121,7 @@ PUBLISHED: INLINE const char *c_str() const; INLINE bool empty() const; INLINE size_t length() const; - INLINE char operator [] (int n) const; + INLINE char operator [] (size_t n) const; EXTENSION(PyObject *__repr__() const); diff --git a/dtool/src/dtoolutil/lineStreamBuf.I b/dtool/src/dtoolutil/lineStreamBuf.I index 4d95406bc2..a1a8daf99e 100644 --- a/dtool/src/dtoolutil/lineStreamBuf.I +++ b/dtool/src/dtoolutil/lineStreamBuf.I @@ -41,7 +41,7 @@ has_newline() const { // into the memory buffer. //////////////////////////////////////////////////////////////////// INLINE void LineStreamBuf:: -write_chars(const char *start, int length) { +write_chars(const char *start, size_t length) { if (length > 0) { _data += string(start, length); } diff --git a/dtool/src/dtoolutil/lineStreamBuf.cxx b/dtool/src/dtoolutil/lineStreamBuf.cxx index 5e84ccb0d8..c1d35a42cb 100644 --- a/dtool/src/dtoolutil/lineStreamBuf.cxx +++ b/dtool/src/dtoolutil/lineStreamBuf.cxx @@ -84,7 +84,7 @@ int LineStreamBuf:: sync() { streamsize n = pptr() - pbase(); write_chars(pbase(), n); - pbump(-n); // Reset pptr(). + pbump(-(int)n); // Reset pptr(). return 0; // EOF to indicate write full. } @@ -104,7 +104,7 @@ overflow(int ch) { if (ch != EOF) { // Write one more character. - char c = ch; + char c = (char)ch; write_chars(&c, 1); } diff --git a/dtool/src/dtoolutil/lineStreamBuf.h b/dtool/src/dtoolutil/lineStreamBuf.h index 78106ce525..02c5b7e4b1 100644 --- a/dtool/src/dtoolutil/lineStreamBuf.h +++ b/dtool/src/dtoolutil/lineStreamBuf.h @@ -40,7 +40,7 @@ protected: virtual int sync(); private: - INLINE void write_chars(const char *start, int length); + INLINE void write_chars(const char *start, size_t length); string _data; bool _has_newline; diff --git a/dtool/src/dtoolutil/pandaSystem.cxx b/dtool/src/dtoolutil/pandaSystem.cxx index 2663797172..c4c94a59e1 100644 --- a/dtool/src/dtoolutil/pandaSystem.cxx +++ b/dtool/src/dtoolutil/pandaSystem.cxx @@ -349,7 +349,7 @@ has_system(const string &system) const { // get_system() to iterate through the entire list of // available Panda subsystems. //////////////////////////////////////////////////////////////////// -int PandaSystem:: +size_t PandaSystem:: get_num_systems() const { return _systems.size(); } @@ -362,8 +362,8 @@ get_num_systems() const { // order. //////////////////////////////////////////////////////////////////// string PandaSystem:: -get_system(int n) const { - if (n < 0 || n >= (int)_systems.size()) { +get_system(size_t n) const { + if (n >= _systems.size()) { return string(); } diff --git a/dtool/src/dtoolutil/pandaSystem.h b/dtool/src/dtoolutil/pandaSystem.h index f69b8adde1..2f100414fa 100644 --- a/dtool/src/dtoolutil/pandaSystem.h +++ b/dtool/src/dtoolutil/pandaSystem.h @@ -50,8 +50,8 @@ PUBLISHED: static string get_platform(); bool has_system(const string &system) const; - int get_num_systems() const; - string get_system(int n) const; + size_t get_num_systems() const; + string get_system(size_t n) const; MAKE_SEQ(get_systems, get_num_systems, get_system); string get_system_tag(const string &system, const string &tag) const; diff --git a/dtool/src/dtoolutil/textEncoder.I b/dtool/src/dtoolutil/textEncoder.I index aa0690337a..c8ef58751f 100644 --- a/dtool/src/dtoolutil/textEncoder.I +++ b/dtool/src/dtoolutil/textEncoder.I @@ -215,7 +215,7 @@ append_unicode_char(int character) { // This is a count of wide characters, after the string // has been decoded according to set_encoding(). //////////////////////////////////////////////////////////////////// -INLINE int TextEncoder:: +INLINE size_t TextEncoder:: get_num_chars() const { return get_wtext().length(); } @@ -229,9 +229,9 @@ get_num_chars() const { // according to set_encoding(). //////////////////////////////////////////////////////////////////// INLINE int TextEncoder:: -get_unicode_char(int index) const { +get_unicode_char(size_t index) const { get_wtext(); - if (index >= 0 && index < (int)_wtext.length()) { + if (index < _wtext.length()) { return _wtext[index]; } return 0; @@ -246,9 +246,9 @@ get_unicode_char(int index) const { // according to set_encoding(). //////////////////////////////////////////////////////////////////// INLINE void TextEncoder:: -set_unicode_char(int index, int character) { +set_unicode_char(size_t index, int character) { get_wtext(); - if (index >= 0 && index < (int)_wtext.length()) { + if (index < _wtext.length()) { _wtext[index] = character; _flags &= ~F_got_text; } @@ -261,7 +261,7 @@ set_unicode_char(int index, int character) { // two-, or three-byte encoded string. //////////////////////////////////////////////////////////////////// INLINE string TextEncoder:: -get_encoded_char(int index) const { +get_encoded_char(size_t index) const { return get_encoded_char(index, get_encoding()); } @@ -272,7 +272,7 @@ get_encoded_char(int index) const { // two-, or three-byte encoded string. //////////////////////////////////////////////////////////////////// INLINE string TextEncoder:: -get_encoded_char(int index, TextEncoder::Encoding encoding) const { +get_encoded_char(size_t index, TextEncoder::Encoding encoding) const { wstring wch(1, (wchar_t)get_unicode_char(index)); return encode_wtext(wch, encoding); } diff --git a/dtool/src/dtoolutil/textEncoder.h b/dtool/src/dtoolutil/textEncoder.h index 78499eaba6..5a8d7ecf9b 100644 --- a/dtool/src/dtoolutil/textEncoder.h +++ b/dtool/src/dtoolutil/textEncoder.h @@ -63,11 +63,11 @@ PUBLISHED: INLINE string get_text(Encoding encoding) const; INLINE void append_text(const string &text); INLINE void append_unicode_char(int character); - INLINE int get_num_chars() const; - INLINE int get_unicode_char(int index) const; - INLINE void set_unicode_char(int index, int character); - INLINE string get_encoded_char(int index) const; - INLINE string get_encoded_char(int index, Encoding encoding) const; + INLINE size_t get_num_chars() const; + INLINE int get_unicode_char(size_t index) const; + INLINE void set_unicode_char(size_t index, int character); + INLINE string get_encoded_char(size_t index) const; + INLINE string get_encoded_char(size_t index, Encoding encoding) const; INLINE string get_text_as_ascii() const; INLINE static string reencode_text(const string &text, Encoding from, Encoding to); diff --git a/dtool/src/dtoolutil/unicodeLatinMap.cxx b/dtool/src/dtoolutil/unicodeLatinMap.cxx index 5483df4138..b7348ff4e9 100644 --- a/dtool/src/dtoolutil/unicodeLatinMap.cxx +++ b/dtool/src/dtoolutil/unicodeLatinMap.cxx @@ -1299,7 +1299,7 @@ static const UnicodeLatinMap::Entry latin_map[] = { UnicodeLatinMap::AT_curl, 0 }, }; #ifndef CPPPARSER -static const int latin_map_length = sizeof(latin_map) / sizeof(UnicodeLatinMap::Entry); +static const size_t latin_map_length = sizeof(latin_map) / sizeof(UnicodeLatinMap::Entry); #endif @@ -1338,7 +1338,7 @@ void UnicodeLatinMap:: init() { if (!_initialized) { _by_character = new ByCharacter; - for (int i = 0; i < latin_map_length; i++) { + for (size_t i = 0; i < latin_map_length; i++) { const UnicodeLatinMap::Entry *entry = &latin_map[i]; // The first 256 characters are very common in Latin-alphabet diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 4c3dce249c..7f5859a233 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -3460,23 +3460,23 @@ write_function_for_name(ostream &out, Object *obj, if (map_sets.size() > 1) { switch (args_type) { case AT_keyword_args: - indent(out, 2) << "int parameter_count = PyTuple_Size(args);\n"; + indent(out, 2) << "Py_ssize_t parameter_count = PyTuple_Size(args);\n"; indent(out, 2) << "if (kwds != NULL) {\n"; indent(out, 2) << " parameter_count += PyDict_Size(kwds);\n"; indent(out, 2) << "}\n"; break; case AT_varargs: - indent(out, 2) << "int parameter_count = PyTuple_Size(args);\n"; + indent(out, 2) << "Py_ssize_t parameter_count = PyTuple_Size(args);\n"; break; case AT_single_arg: // It shouldn't get here, but we'll handle these cases nonetheless. - indent(out, 2) << "const int parameter_count = 1;\n"; + indent(out, 2) << "const Py_ssize_t parameter_count = 1;\n"; break; default: - indent(out, 2) << "const int parameter_count = 0;\n"; + indent(out, 2) << "const Py_ssize_t parameter_count = 0;\n"; break; } @@ -3571,19 +3571,19 @@ write_function_for_name(ostream &out, Object *obj, switch (args_type) { case AT_keyword_args: out << " if (PyTuple_Size(args) > 0 || (kwds != NULL && PyDict_Size(kwds) > 0)) {\n"; - out << " int parameter_count = PyTuple_Size(args);\n"; + out << " Py_ssize_t parameter_count = PyTuple_Size(args);\n"; out << " if (kwds != NULL) {\n"; out << " parameter_count += PyDict_Size(kwds);\n"; out << " }\n"; break; case AT_varargs: out << " if (PyTuple_Size(args) > 0) {\n"; - out << " const int parameter_count = PyTuple_GET_SIZE(args);\n"; + out << " const Py_ssize_t parameter_count = PyTuple_GET_SIZE(args);\n"; break; case AT_single_arg: // Shouldn't happen, but let's handle this case nonetheless. out << " {\n"; - out << " const int parameter_count = 1;\n"; + out << " const Py_ssize_t parameter_count = 1;\n"; break; case AT_no_args: break; @@ -3603,7 +3603,7 @@ write_function_for_name(ostream &out, Object *obj, } else if (args_type == AT_keyword_args && max_required_args == 1 && mii->first == 1) { // Check this to be sure, as we handle the case of only 1 keyword arg // in write_function_forset (not using ParseTupleAndKeywords). - out << " int parameter_count = PyTuple_Size(args);\n" + out << " Py_ssize_t parameter_count = PyTuple_Size(args);\n" " if (kwds != NULL) {\n" " parameter_count += PyDict_Size(kwds);\n" " }\n" @@ -3724,7 +3724,7 @@ write_coerce_constructor(ostream &out, Object *obj, bool is_const) { map_sets[i].insert(remap); } - int parameter_size = remap->_parameters.size(); + size_t parameter_size = remap->_parameters.size(); map_sets[parameter_size].insert(remap); } } @@ -3762,7 +3762,7 @@ write_coerce_constructor(ostream &out, Object *obj, bool is_const) { map_sets[i].insert(remap); } - int parameter_size = remap->_parameters.size(); + size_t parameter_size = remap->_parameters.size(); map_sets[parameter_size].insert(remap); } } @@ -6679,7 +6679,7 @@ is_remap_legal(FunctionRemap *remap) { } // all non-optional params must be legal - for (int pn = 0; pn < (int)remap->_parameters.size(); pn++) { + for (size_t pn = 0; pn < remap->_parameters.size(); pn++) { ParameterRemap *param = remap->_parameters[pn]._remap; CPPType *orig_type = param->get_orig_type(); if (param->get_default_value() == NULL && !is_cpp_type_legal(orig_type)) { @@ -6767,12 +6767,12 @@ is_remap_coercion_possible(FunctionRemap *remap) { return false; } - int pn = 0; + size_t pn = 0; if (remap->_has_this) { // Skip the "this" parameter. It's never coercible. ++pn; } - while (pn < (int)remap->_parameters.size()) { + while (pn < remap->_parameters.size()) { CPPType *type = remap->_parameters[pn]._remap->get_new_type(); if (TypeManager::is_char_pointer(type)) { diff --git a/dtool/src/prc/configDeclaration.I b/dtool/src/prc/configDeclaration.I index bcb759c5d3..ac080d58ac 100644 --- a/dtool/src/prc/configDeclaration.I +++ b/dtool/src/prc/configDeclaration.I @@ -86,7 +86,7 @@ set_string_value(const string &string_value) { // value. A word is defined as a sequence of // non-whitespace characters delimited by whitespace. //////////////////////////////////////////////////////////////////// -INLINE int ConfigDeclaration:: +INLINE size_t ConfigDeclaration:: get_num_words() const { if (!_got_words) { ((ConfigDeclaration *)this)->get_words(); @@ -103,11 +103,11 @@ get_num_words() const { // the value. //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -has_string_word(int n) const { +has_string_word(size_t n) const { if (!_got_words) { ((ConfigDeclaration *)this)->get_words(); } - return (n >= 0 && n < (int)_words.size()); + return (n < _words.size()); } //////////////////////////////////////////////////////////////////// @@ -117,7 +117,7 @@ has_string_word(int n) const { // boolean value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -has_bool_word(int n) const { +has_bool_word(size_t n) const { if (has_string_word(n)) { ((ConfigDeclaration *)this)->check_bool_word(n); return (_words[n]._flags & F_valid_bool) != 0; @@ -132,7 +132,7 @@ has_bool_word(int n) const { // integer value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -has_int_word(int n) const { +has_int_word(size_t n) const { if (has_string_word(n)) { ((ConfigDeclaration *)this)->check_int_word(n); return (_words[n]._flags & F_valid_int) != 0; @@ -147,7 +147,7 @@ has_int_word(int n) const { // int64 value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -has_int64_word(int n) const { +has_int64_word(size_t n) const { if (has_string_word(n)) { ((ConfigDeclaration *)this)->check_int64_word(n); return (_words[n]._flags & F_valid_int64) != 0; @@ -162,7 +162,7 @@ has_int64_word(int n) const { // integer value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -has_double_word(int n) const { +has_double_word(size_t n) const { if (has_string_word(n)) { ((ConfigDeclaration *)this)->check_double_word(n); return (_words[n]._flags & F_valid_double) != 0; @@ -178,7 +178,7 @@ has_double_word(int n) const { // nth value. See also has_string_word(). //////////////////////////////////////////////////////////////////// INLINE string ConfigDeclaration:: -get_string_word(int n) const { +get_string_word(size_t n) const { if (has_string_word(n)) { return _words[n]._str; } @@ -193,7 +193,7 @@ get_string_word(int n) const { // value. See also has_bool_word(). //////////////////////////////////////////////////////////////////// INLINE bool ConfigDeclaration:: -get_bool_word(int n) const { +get_bool_word(size_t n) const { // We use has_string_word() instead of has_bool_word(), so we can // return a partial answer if there was one. if (has_string_word(n)) { @@ -211,7 +211,7 @@ get_bool_word(int n) const { // See also has_int_word(). //////////////////////////////////////////////////////////////////// INLINE int ConfigDeclaration:: -get_int_word(int n) const { +get_int_word(size_t n) const { // We use has_string_word() instead of has_int_word(), so we can // return a partial answer if there was one. if (has_string_word(n)) { @@ -229,7 +229,7 @@ get_int_word(int n) const { // See also has_int64_word(). //////////////////////////////////////////////////////////////////// INLINE PN_int64 ConfigDeclaration:: -get_int64_word(int n) const { +get_int64_word(size_t n) const { // We use has_string_word() instead of has_int64_word(), so we can // return a partial answer if there was one. if (has_string_word(n)) { @@ -247,7 +247,7 @@ get_int64_word(int n) const { // See also has_double_word(). //////////////////////////////////////////////////////////////////// INLINE double ConfigDeclaration:: -get_double_word(int n) const { +get_double_word(size_t n) const { // We use has_string_word() instead of has_double_word(), so we can // return a partial answer if there was one. if (has_string_word(n)) { diff --git a/dtool/src/prc/configDeclaration.cxx b/dtool/src/prc/configDeclaration.cxx index 141c8d8adf..c2661e0035 100644 --- a/dtool/src/prc/configDeclaration.cxx +++ b/dtool/src/prc/configDeclaration.cxx @@ -58,7 +58,7 @@ ConfigDeclaration:: // affecting the other words. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -set_string_word(int n, const string &value) { +set_string_word(size_t n, const string &value) { if (!_got_words) { get_words(); } @@ -92,7 +92,7 @@ set_string_word(int n, const string &value) { // affecting the other words. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -set_bool_word(int n, bool value) { +set_bool_word(size_t n, bool value) { set_string_word(n, value ? "1" : "0"); _words[n]._flags |= (F_checked_bool | F_valid_bool); @@ -107,7 +107,7 @@ set_bool_word(int n, bool value) { // affecting the other words. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -set_int_word(int n, int value) { +set_int_word(size_t n, int value) { set_string_word(n, format_string(value)); _words[n]._flags |= (F_checked_int | F_valid_int); @@ -122,7 +122,7 @@ set_int_word(int n, int value) { // affecting the other words. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -set_int64_word(int n, PN_int64 value) { +set_int64_word(size_t n, PN_int64 value) { set_string_word(n, format_string(value)); _words[n]._flags |= (F_checked_int64 | F_valid_int64); @@ -137,7 +137,7 @@ set_int64_word(int n, PN_int64 value) { // affecting the other words. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -set_double_word(int n, double value) { +set_double_word(size_t n, double value) { set_string_word(n, format_string(value)); _words[n]._flags |= (F_checked_double | F_valid_double); @@ -202,7 +202,7 @@ get_words() { // boolean value. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -check_bool_word(int n) { +check_bool_word(size_t n) { if (!_got_words) { get_words(); } @@ -249,7 +249,7 @@ check_bool_word(int n) { // integer value. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -check_int_word(int n) { +check_int_word(size_t n) { if (!_got_words) { get_words(); } @@ -309,7 +309,7 @@ check_int_word(int n) { // integer value. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -check_int64_word(int n) { +check_int64_word(size_t n) { if (!_got_words) { get_words(); } @@ -367,7 +367,7 @@ check_int64_word(int n) { // floating-point value. //////////////////////////////////////////////////////////////////// void ConfigDeclaration:: -check_double_word(int n) { +check_double_word(size_t n) { if (!_got_words) { get_words(); } @@ -403,9 +403,9 @@ check_double_word(int n) { // // The return value is the number of words extracted. //////////////////////////////////////////////////////////////////// -int ConfigDeclaration:: +size_t ConfigDeclaration:: extract_words(const string &str, vector_string &words) { - int num_words = 0; + size_t num_words = 0; size_t pos = 0; while (pos < str.length() && isspace((unsigned int)str[pos])) { @@ -439,7 +439,7 @@ downcase(const string &s) { result.reserve(s.size()); string::const_iterator p; for (p = s.begin(); p != s.end(); ++p) { - result += tolower(*p); + result += (char)tolower(*p); } return result; } diff --git a/dtool/src/prc/configDeclaration.h b/dtool/src/prc/configDeclaration.h index 532b03f211..ecbabc92be 100644 --- a/dtool/src/prc/configDeclaration.h +++ b/dtool/src/prc/configDeclaration.h @@ -49,25 +49,25 @@ PUBLISHED: INLINE const string &get_string_value() const; INLINE void set_string_value(const string &value); - INLINE int get_num_words() const; + INLINE size_t get_num_words() const; - INLINE bool has_string_word(int n) const; - INLINE bool has_bool_word(int n) const; - INLINE bool has_int_word(int n) const; - INLINE bool has_int64_word(int n) const; - INLINE bool has_double_word(int n) const; + INLINE bool has_string_word(size_t n) const; + INLINE bool has_bool_word(size_t n) const; + INLINE bool has_int_word(size_t n) const; + INLINE bool has_int64_word(size_t n) const; + INLINE bool has_double_word(size_t n) const; - INLINE string get_string_word(int n) const; - INLINE bool get_bool_word(int n) const; - INLINE int get_int_word(int n) const; - INLINE PN_int64 get_int64_word(int n) const; - INLINE double get_double_word(int n) const; + INLINE string get_string_word(size_t n) const; + INLINE bool get_bool_word(size_t n) const; + INLINE int get_int_word(size_t n) const; + INLINE PN_int64 get_int64_word(size_t n) const; + INLINE double get_double_word(size_t n) const; - void set_string_word(int n, const string &value); - void set_bool_word(int n, bool value); - void set_int_word(int n, int value); - void set_int64_word(int n, PN_int64 value); - void set_double_word(int n, double value); + void set_string_word(size_t n, const string &value); + void set_bool_word(size_t n, bool value); + void set_int_word(size_t n, int value); + void set_int64_word(size_t n, PN_int64 value); + void set_double_word(size_t n, double value); INLINE int get_decl_seq() const; @@ -75,15 +75,15 @@ PUBLISHED: void write(ostream &out) const; public: - static int extract_words(const string &str, vector_string &words); + static size_t extract_words(const string &str, vector_string &words); static string downcase(const string &s); private: void get_words(); - void check_bool_word(int n); - void check_int_word(int n); - void check_int64_word(int n); - void check_double_word(int n); + void check_bool_word(size_t n); + void check_int_word(size_t n); + void check_int64_word(size_t n); + void check_double_word(size_t n); private: ConfigPage *_page; diff --git a/dtool/src/prc/configPage.cxx b/dtool/src/prc/configPage.cxx index 247ce864a2..4148c64ca7 100644 --- a/dtool/src/prc/configPage.cxx +++ b/dtool/src/prc/configPage.cxx @@ -321,7 +321,7 @@ delete_declaration(ConfigDeclaration *decl) { // Access: Published // Description: Returns the number of declarations on the page. //////////////////////////////////////////////////////////////////// -int ConfigPage:: +size_t ConfigPage:: get_num_declarations() const { return _declarations.size(); } @@ -332,8 +332,8 @@ get_num_declarations() const { // Description: Returns the nth declaration on the page. //////////////////////////////////////////////////////////////////// const ConfigDeclaration *ConfigPage:: -get_declaration(int n) const { - nassertr(n >= 0 && n < (int)_declarations.size(), (ConfigDeclaration *)NULL); +get_declaration(size_t n) const { + nassertr(n < _declarations.size(), (ConfigDeclaration *)NULL); return _declarations[n]; } @@ -346,8 +346,8 @@ get_declaration(int n) const { // ConfigPage::write(). //////////////////////////////////////////////////////////////////// ConfigDeclaration *ConfigPage:: -modify_declaration(int n) { - nassertr(n >= 0 && n < (int)_declarations.size(), (ConfigDeclaration *)NULL); +modify_declaration(size_t n) { + nassertr(n < _declarations.size(), (ConfigDeclaration *)NULL); return _declarations[n]; } @@ -358,8 +358,8 @@ modify_declaration(int n) { // the page. //////////////////////////////////////////////////////////////////// string ConfigPage:: -get_variable_name(int n) const { - nassertr(n >= 0 && n < (int)_declarations.size(), string()); +get_variable_name(size_t n) const { + nassertr(n < _declarations.size(), string()); return _declarations[n]->get_variable()->get_name(); } @@ -370,8 +370,8 @@ get_variable_name(int n) const { // the page. //////////////////////////////////////////////////////////////////// string ConfigPage:: -get_string_value(int n) const { - nassertr(n >= 0 && n < (int)_declarations.size(), string()); +get_string_value(size_t n) const { + nassertr(n < _declarations.size(), string()); return _declarations[n]->get_string_value(); } @@ -382,8 +382,8 @@ get_string_value(int n) const { // the page has been used by code, false otherwise. //////////////////////////////////////////////////////////////////// bool ConfigPage:: -is_variable_used(int n) const { - nassertr(n >= 0 && n < (int)_declarations.size(), false); +is_variable_used(size_t n) const { + nassertr(n < _declarations.size(), false); return _declarations[n]->get_variable()->is_used(); } diff --git a/dtool/src/prc/configPage.h b/dtool/src/prc/configPage.h index 62fb66f694..fe2ba92d4e 100644 --- a/dtool/src/prc/configPage.h +++ b/dtool/src/prc/configPage.h @@ -63,12 +63,12 @@ PUBLISHED: ConfigDeclaration *make_declaration(ConfigVariableCore *variable, const string &value); bool delete_declaration(ConfigDeclaration *decl); - int get_num_declarations() const; - const ConfigDeclaration *get_declaration(int n) const; - ConfigDeclaration *modify_declaration(int n); - string get_variable_name(int n) const; - string get_string_value(int n) const; - bool is_variable_used(int n) const; + size_t get_num_declarations() const; + const ConfigDeclaration *get_declaration(size_t n) const; + ConfigDeclaration *modify_declaration(size_t n); + string get_variable_name(size_t n) const; + string get_string_value(size_t n) const; + bool is_variable_used(size_t n) const; void output(ostream &out) const; void output_brief_signature(ostream &out) const; diff --git a/dtool/src/prc/configPageManager.I b/dtool/src/prc/configPageManager.I index f6ad1f78cc..9ca0abb8ca 100644 --- a/dtool/src/prc/configPageManager.I +++ b/dtool/src/prc/configPageManager.I @@ -66,7 +66,7 @@ get_search_path() { // specified with the PRC_FILENAME variable in // Config.pp. //////////////////////////////////////////////////////////////////// -INLINE int ConfigPageManager:: +INLINE size_t ConfigPageManager:: get_num_prc_patterns() const { return _prc_patterns.size(); } @@ -79,8 +79,8 @@ get_num_prc_patterns() const { // get_num_prc_patterns(). //////////////////////////////////////////////////////////////////// INLINE string ConfigPageManager:: -get_prc_pattern(int n) const { - nassertr(n >= 0 && n < (int)_prc_patterns.size(), string()); +get_prc_pattern(size_t n) const { + nassertr(n < _prc_patterns.size(), string()); return _prc_patterns[n].get_pattern(); } @@ -91,7 +91,7 @@ get_prc_pattern(int n) const { // are compiled in that will be searched for as special // config files that are understood to be encrypted. //////////////////////////////////////////////////////////////////// -INLINE int ConfigPageManager:: +INLINE size_t ConfigPageManager:: get_num_prc_encrypted_patterns() const { return _prc_encrypted_patterns.size(); } @@ -104,8 +104,8 @@ get_num_prc_encrypted_patterns() const { // file. See get_num_prc_encrypted_patterns(). //////////////////////////////////////////////////////////////////// INLINE string ConfigPageManager:: -get_prc_encrypted_pattern(int n) const { - nassertr(n >= 0 && n < (int)_prc_patterns.size(), string()); +get_prc_encrypted_pattern(size_t n) const { + nassertr(n < _prc_patterns.size(), string()); return _prc_encrypted_patterns[n].get_pattern(); } @@ -118,7 +118,7 @@ get_prc_encrypted_pattern(int n) const { // and their output taken to be input. This is normally // empty. //////////////////////////////////////////////////////////////////// -INLINE int ConfigPageManager:: +INLINE size_t ConfigPageManager:: get_num_prc_executable_patterns() const { return _prc_executable_patterns.size(); } @@ -131,8 +131,8 @@ get_num_prc_executable_patterns() const { // file. See get_num_prc_executable_patterns(). //////////////////////////////////////////////////////////////////// INLINE string ConfigPageManager:: -get_prc_executable_pattern(int n) const { - nassertr(n >= 0 && n < (int)_prc_patterns.size(), string()); +get_prc_executable_pattern(size_t n) const { + nassertr(n < _prc_patterns.size(), string()); return _prc_executable_patterns[n].get_pattern(); } @@ -144,7 +144,7 @@ get_prc_executable_pattern(int n) const { // were automatically discovered on the disk as .prc // files. //////////////////////////////////////////////////////////////////// -INLINE int ConfigPageManager:: +INLINE size_t ConfigPageManager:: get_num_implicit_pages() const { return _implicit_pages.size(); } @@ -156,9 +156,9 @@ get_num_implicit_pages() const { // See get_num_implicit_pages(). //////////////////////////////////////////////////////////////////// INLINE ConfigPage *ConfigPageManager:: -get_implicit_page(int n) const { +get_implicit_page(size_t n) const { check_sort_pages(); - nassertr(n >= 0 && n < (int)_implicit_pages.size(), (ConfigPage *)NULL); + nassertr(n < _implicit_pages.size(), (ConfigPage *)NULL); return _implicit_pages[n]; } @@ -170,7 +170,7 @@ get_implicit_page(int n) const { // were loaded dynamically at runtime by explicit calls // to ConfigPageManager::make_explicit_page(). //////////////////////////////////////////////////////////////////// -INLINE int ConfigPageManager:: +INLINE size_t ConfigPageManager:: get_num_explicit_pages() const { return _explicit_pages.size(); } @@ -182,9 +182,9 @@ get_num_explicit_pages() const { // See get_num_explicit_pages(). //////////////////////////////////////////////////////////////////// INLINE ConfigPage *ConfigPageManager:: -get_explicit_page(int n) const { +get_explicit_page(size_t n) const { check_sort_pages(); - nassertr(n >= 0 && n < (int)_explicit_pages.size(), (ConfigPage *)NULL); + nassertr(n < _explicit_pages.size(), (ConfigPage *)NULL); return _explicit_pages[n]; } diff --git a/dtool/src/prc/configPageManager.h b/dtool/src/prc/configPageManager.h index c3ce0a757c..acc5acd0e1 100644 --- a/dtool/src/prc/configPageManager.h +++ b/dtool/src/prc/configPageManager.h @@ -43,23 +43,23 @@ PUBLISHED: INLINE DSearchPath &get_search_path(); - INLINE int get_num_prc_patterns() const; - INLINE string get_prc_pattern(int n) const; + INLINE size_t get_num_prc_patterns() const; + INLINE string get_prc_pattern(size_t n) const; - INLINE int get_num_prc_encrypted_patterns() const; - INLINE string get_prc_encrypted_pattern(int n) const; + INLINE size_t get_num_prc_encrypted_patterns() const; + INLINE string get_prc_encrypted_pattern(size_t n) const; - INLINE int get_num_prc_executable_patterns() const; - INLINE string get_prc_executable_pattern(int n) const; + INLINE size_t get_num_prc_executable_patterns() const; + INLINE string get_prc_executable_pattern(size_t n) const; ConfigPage *make_explicit_page(const string &name); bool delete_explicit_page(ConfigPage *page); - INLINE int get_num_implicit_pages() const; - INLINE ConfigPage *get_implicit_page(int n) const; + INLINE size_t get_num_implicit_pages() const; + INLINE ConfigPage *get_implicit_page(size_t n) const; - INLINE int get_num_explicit_pages() const; - INLINE ConfigPage *get_explicit_page(int n) const; + INLINE size_t get_num_explicit_pages() const; + INLINE ConfigPage *get_explicit_page(size_t n) const; void output(ostream &out) const; void write(ostream &out) const; diff --git a/dtool/src/prc/configVariable.I b/dtool/src/prc/configVariable.I index 2b50e2a542..435233e459 100644 --- a/dtool/src/prc/configVariable.I +++ b/dtool/src/prc/configVariable.I @@ -122,7 +122,7 @@ clear_value() { // value. A word is defined as a sequence of // non-whitespace characters delimited by whitespace. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariable:: +INLINE size_t ConfigVariable:: get_num_words() const { nassertr(is_constructed(), 0); const ConfigDeclaration *decl = _core->get_declaration(0); @@ -138,7 +138,7 @@ get_num_words() const { // the value. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -has_string_word(int n) const { +has_string_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->has_string_word(n); @@ -151,7 +151,7 @@ has_string_word(int n) const { // boolean value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -has_bool_word(int n) const { +has_bool_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->has_bool_word(n); @@ -164,7 +164,7 @@ has_bool_word(int n) const { // integer value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -has_int_word(int n) const { +has_int_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->has_int_word(n); @@ -177,7 +177,7 @@ has_int_word(int n) const { // 64-bit integer value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -has_int64_word(int n) const { +has_int64_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->has_int64_word(n); @@ -190,7 +190,7 @@ has_int64_word(int n) const { // integer value for the nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -has_double_word(int n) const { +has_double_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->has_double_word(n); @@ -204,7 +204,7 @@ has_double_word(int n) const { // nth value. See also has_string_word(). //////////////////////////////////////////////////////////////////// INLINE string ConfigVariable:: -get_string_word(int n) const { +get_string_word(size_t n) const { nassertr(is_constructed(), string()); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_string_word(n); @@ -218,7 +218,7 @@ get_string_word(int n) const { // value. See also has_bool_word(). //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariable:: -get_bool_word(int n) const { +get_bool_word(size_t n) const { nassertr(is_constructed(), false); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_bool_word(n); @@ -232,7 +232,7 @@ get_bool_word(int n) const { // See also has_int_word(). //////////////////////////////////////////////////////////////////// INLINE int ConfigVariable:: -get_int_word(int n) const { +get_int_word(size_t n) const { nassertr(is_constructed(), 0); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_int_word(n); @@ -246,7 +246,7 @@ get_int_word(int n) const { // See also has_int_word(). //////////////////////////////////////////////////////////////////// INLINE PN_int64 ConfigVariable:: -get_int64_word(int n) const { +get_int64_word(size_t n) const { nassertr(is_constructed(), 0); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_int64_word(n); @@ -260,7 +260,7 @@ get_int64_word(int n) const { // See also has_double_word(). //////////////////////////////////////////////////////////////////// INLINE double ConfigVariable:: -get_double_word(int n) const { +get_double_word(size_t n) const { nassertr(is_constructed(), 0.0); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_double_word(n); @@ -273,7 +273,7 @@ get_double_word(int n) const { // affecting the other words. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariable:: -set_string_word(int n, const string &value) { +set_string_word(size_t n, const string &value) { nassertv(is_constructed()); _core->make_local_value()->set_string_word(n, value); } @@ -285,7 +285,7 @@ set_string_word(int n, const string &value) { // affecting the other words. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariable:: -set_bool_word(int n, bool value) { +set_bool_word(size_t n, bool value) { nassertv(is_constructed()); _core->make_local_value()->set_bool_word(n, value); } @@ -297,7 +297,7 @@ set_bool_word(int n, bool value) { // affecting the other words. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariable:: -set_int_word(int n, int value) { +set_int_word(size_t n, int value) { nassertv(is_constructed()); _core->make_local_value()->set_int_word(n, value); } @@ -309,7 +309,7 @@ set_int_word(int n, int value) { // affecting the other words. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariable:: -set_int64_word(int n, PN_int64 value) { +set_int64_word(size_t n, PN_int64 value) { nassertv(is_constructed()); _core->make_local_value()->set_int64_word(n, value); } @@ -321,7 +321,7 @@ set_int64_word(int n, PN_int64 value) { // affecting the other words. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariable:: -set_double_word(int n, double value) { +set_double_word(size_t n, double value) { nassertv(is_constructed()); _core->make_local_value()->set_double_word(n, value); } diff --git a/dtool/src/prc/configVariable.h b/dtool/src/prc/configVariable.h index abc8575412..17e251a307 100644 --- a/dtool/src/prc/configVariable.h +++ b/dtool/src/prc/configVariable.h @@ -48,25 +48,25 @@ PUBLISHED: INLINE void set_string_value(const string &value); INLINE void clear_value(); - INLINE int get_num_words() const; + INLINE size_t get_num_words() const; - INLINE bool has_string_word(int n) const; - INLINE bool has_bool_word(int n) const; - INLINE bool has_int_word(int n) const; - INLINE bool has_int64_word(int n) const; - INLINE bool has_double_word(int n) const; + INLINE bool has_string_word(size_t n) const; + INLINE bool has_bool_word(size_t n) const; + INLINE bool has_int_word(size_t n) const; + INLINE bool has_int64_word(size_t n) const; + INLINE bool has_double_word(size_t n) const; - INLINE string get_string_word(int n) const; - INLINE bool get_bool_word(int n) const; - INLINE int get_int_word(int n) const; - INLINE PN_int64 get_int64_word(int n) const; - INLINE double get_double_word(int n) const; + INLINE string get_string_word(size_t n) const; + INLINE bool get_bool_word(size_t n) const; + INLINE int get_int_word(size_t n) const; + INLINE PN_int64 get_int64_word(size_t n) const; + INLINE double get_double_word(size_t n) const; - INLINE void set_string_word(int n, const string &value); - INLINE void set_bool_word(int n, bool value); - INLINE void set_int_word(int n, int value); - INLINE void set_int64_word(int n, PN_int64 value); - INLINE void set_double_word(int n, double value); + INLINE void set_string_word(size_t n, const string &value); + INLINE void set_bool_word(size_t n, bool value); + INLINE void set_int_word(size_t n, int value); + INLINE void set_int64_word(size_t n, PN_int64 value); + INLINE void set_double_word(size_t n, double value); protected: INLINE bool is_constructed() const; diff --git a/dtool/src/prc/configVariableBool.I b/dtool/src/prc/configVariableBool.I index 717ae70033..7336bb44ba 100644 --- a/dtool/src/prc/configVariableBool.I +++ b/dtool/src/prc/configVariableBool.I @@ -89,7 +89,7 @@ operator bool () const { // Access: Published // Description: Returns the number of unique words in the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableBool:: +INLINE size_t ConfigVariableBool:: size() const { return get_num_words(); } @@ -100,7 +100,7 @@ size() const { // Description: Returns the value of the variable's nth word. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariableBool:: -operator [] (int n) const { +operator [] (size_t n) const { return get_word(n); } @@ -150,7 +150,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE bool ConfigVariableBool:: -get_word(int n) const { +get_word(size_t n) const { return get_bool_word(n); } @@ -161,6 +161,6 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableBool:: -set_word(int n, bool value) { +set_word(size_t n, bool value) { set_bool_word(n, value); } diff --git a/dtool/src/prc/configVariableBool.h b/dtool/src/prc/configVariableBool.h index 433c2ebccc..4dbeeaee2e 100644 --- a/dtool/src/prc/configVariableBool.h +++ b/dtool/src/prc/configVariableBool.h @@ -34,15 +34,15 @@ PUBLISHED: INLINE void operator = (bool value); INLINE operator bool () const; - INLINE int size() const; - INLINE bool operator [] (int n) const; + INLINE size_t size() const; + INLINE bool operator [] (size_t n) const; INLINE void set_value(bool value); INLINE bool get_value() const; INLINE bool get_default_value() const; - INLINE bool get_word(int n) const; - INLINE void set_word(int n, bool value); + INLINE bool get_word(size_t n) const; + INLINE void set_word(size_t n, bool value); private: AtomicAdjust::Integer _local_modified; diff --git a/dtool/src/prc/configVariableCore.I b/dtool/src/prc/configVariableCore.I index faa68c8c88..2512a4e7bb 100644 --- a/dtool/src/prc/configVariableCore.I +++ b/dtool/src/prc/configVariableCore.I @@ -166,7 +166,7 @@ has_local_value() const { // variable. This is not exactly the same as the number // of declarations; see get_reference(). //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableCore:: +INLINE size_t ConfigVariableCore:: get_num_references() const { check_sort_declarations(); return _declarations.size(); @@ -184,9 +184,9 @@ get_num_references() const { // untrusted files. //////////////////////////////////////////////////////////////////// INLINE const ConfigDeclaration *ConfigVariableCore:: -get_reference(int n) const { +get_reference(size_t n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_declarations.size(), (ConfigDeclaration *)NULL); + nassertr(n < _declarations.size(), (ConfigDeclaration *)NULL); return _declarations[n]; } @@ -197,7 +197,7 @@ get_reference(int n) const { // reference this variable. See also // get_num_references(). //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableCore:: +INLINE size_t ConfigVariableCore:: get_num_trusted_references() const { check_sort_declarations(); return _trusted_declarations.size(); @@ -218,9 +218,9 @@ get_num_trusted_references() const { // untrusted ones. //////////////////////////////////////////////////////////////////// INLINE const ConfigDeclaration *ConfigVariableCore:: -get_trusted_reference(int n) const { +get_trusted_reference(size_t n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_trusted_declarations.size(), (ConfigDeclaration *)NULL); + nassertr(n < _trusted_declarations.size(), (ConfigDeclaration *)NULL); return _trusted_declarations[n]; } @@ -230,7 +230,7 @@ get_trusted_reference(int n) const { // Description: Returns the number of trusted, unique (by string // value) values there exist for this variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableCore:: +INLINE size_t ConfigVariableCore:: get_num_unique_references() const { check_sort_declarations(); return _unique_declarations.size(); @@ -245,9 +245,9 @@ get_num_unique_references() const { // are removed. //////////////////////////////////////////////////////////////////// INLINE const ConfigDeclaration *ConfigVariableCore:: -get_unique_reference(int n) const { +get_unique_reference(size_t n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_unique_declarations.size(), (ConfigDeclaration *)NULL); + nassertr(n < _unique_declarations.size(), (ConfigDeclaration *)NULL); return _unique_declarations[n]; } @@ -263,7 +263,7 @@ check_sort_declarations() const { // loaded. This may unsort the list by adding a bunch more // declarations. ConfigPageManager::get_global_ptr()->load_implicit_pages(); - + // Then sort the list if it needs it. if (!_declarations_sorted) { ((ConfigVariableCore *)this)->sort_declarations(); diff --git a/dtool/src/prc/configVariableCore.cxx b/dtool/src/prc/configVariableCore.cxx index a511efd8bf..ce8c32a669 100644 --- a/dtool/src/prc/configVariableCore.cxx +++ b/dtool/src/prc/configVariableCore.cxx @@ -318,7 +318,7 @@ has_value() const { // defined, this will always be at least 1 (for the // default value, at least). //////////////////////////////////////////////////////////////////// -int ConfigVariableCore:: +size_t ConfigVariableCore:: get_num_declarations() const { if (has_local_value()) { return 1; @@ -343,7 +343,7 @@ get_num_declarations() const { // variable. //////////////////////////////////////////////////////////////////// const ConfigDeclaration *ConfigVariableCore:: -get_declaration(int n) const { +get_declaration(size_t n) const { ((ConfigVariableCore *)this)->_value_queried = true; if (_default_value == (ConfigDeclaration *)NULL) { prc_cat->warning() @@ -356,7 +356,7 @@ get_declaration(int n) const { return _local_value; } check_sort_declarations(); - if (n >= 0 && n < (int)_trusted_declarations.size()) { + if (n < _trusted_declarations.size()) { return _trusted_declarations[n]; } return _default_value; diff --git a/dtool/src/prc/configVariableCore.h b/dtool/src/prc/configVariableCore.h index 96cf536c8f..e8b74bc59a 100644 --- a/dtool/src/prc/configVariableCore.h +++ b/dtool/src/prc/configVariableCore.h @@ -64,20 +64,20 @@ PUBLISHED: INLINE bool has_local_value() const; bool has_value() const; - int get_num_declarations() const; - const ConfigDeclaration *get_declaration(int n) const; + size_t get_num_declarations() const; + const ConfigDeclaration *get_declaration(size_t n) const; MAKE_SEQ(get_declarations, get_num_declarations, get_declaration); - INLINE int get_num_references() const; - INLINE const ConfigDeclaration *get_reference(int n) const; + INLINE size_t get_num_references() const; + INLINE const ConfigDeclaration *get_reference(size_t n) const; MAKE_SEQ(get_references, get_num_references, get_reference); - INLINE int get_num_trusted_references() const; - INLINE const ConfigDeclaration *get_trusted_reference(int n) const; + INLINE size_t get_num_trusted_references() const; + INLINE const ConfigDeclaration *get_trusted_reference(size_t n) const; MAKE_SEQ(get_trusted_references, get_num_trusted_references, get_trusted_reference); - INLINE int get_num_unique_references() const; - INLINE const ConfigDeclaration *get_unique_reference(int n) const; + INLINE size_t get_num_unique_references() const; + INLINE const ConfigDeclaration *get_unique_reference(size_t n) const; MAKE_SEQ(get_unique_references, get_num_unique_references, get_unique_reference); void output(ostream &out) const; diff --git a/dtool/src/prc/configVariableDouble.I b/dtool/src/prc/configVariableDouble.I index 561fb46fae..2daafb82a3 100644 --- a/dtool/src/prc/configVariableDouble.I +++ b/dtool/src/prc/configVariableDouble.I @@ -89,7 +89,7 @@ operator double () const { // Access: Published // Description: Returns the number of unique words in the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableDouble:: +INLINE size_t ConfigVariableDouble:: size() const { return get_num_words(); } @@ -100,7 +100,7 @@ size() const { // Description: Returns the value of the variable's nth word. //////////////////////////////////////////////////////////////////// INLINE double ConfigVariableDouble:: -operator [] (int n) const { +operator [] (size_t n) const { return get_word(n); } @@ -150,7 +150,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE double ConfigVariableDouble:: -get_word(int n) const { +get_word(size_t n) const { return get_double_word(n); } @@ -161,6 +161,6 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableDouble:: -set_word(int n, double value) { +set_word(size_t n, double value) { set_double_word(n, value); } diff --git a/dtool/src/prc/configVariableDouble.h b/dtool/src/prc/configVariableDouble.h index 17ad4bb235..9a55c98357 100644 --- a/dtool/src/prc/configVariableDouble.h +++ b/dtool/src/prc/configVariableDouble.h @@ -36,15 +36,15 @@ PUBLISHED: INLINE void operator = (double value); INLINE operator double () const; - INLINE int size() const; - INLINE double operator [] (int n) const; + INLINE size_t size() const; + INLINE double operator [] (size_t n) const; INLINE void set_value(double value); INLINE double get_value() const; INLINE double get_default_value() const; - INLINE double get_word(int n) const; - INLINE void set_word(int n, double value); + INLINE double get_word(size_t n) const; + INLINE void set_word(size_t n, double value); private: void set_default_value(double default_value); diff --git a/dtool/src/prc/configVariableEnum.I b/dtool/src/prc/configVariableEnum.I index cd0883eea5..a65d6e18d6 100644 --- a/dtool/src/prc/configVariableEnum.I +++ b/dtool/src/prc/configVariableEnum.I @@ -95,7 +95,7 @@ operator EnumType () const { // Description: Returns the number of unique words in the variable. //////////////////////////////////////////////////////////////////// template -INLINE int ConfigVariableEnum:: +INLINE size_t ConfigVariableEnum:: size() const { return get_num_words(); } @@ -107,7 +107,7 @@ size() const { //////////////////////////////////////////////////////////////////// template INLINE EnumType ConfigVariableEnum:: -operator [] (int n) const { +operator [] (size_t n) const { return get_word(n); } @@ -163,7 +163,7 @@ get_default_value() const { //////////////////////////////////////////////////////////////////// template INLINE EnumType ConfigVariableEnum:: -get_word(int n) const { +get_word(size_t n) const { return (EnumType)parse_string(get_string_word(n)); } @@ -175,7 +175,7 @@ get_word(int n) const { //////////////////////////////////////////////////////////////////// template INLINE void ConfigVariableEnum:: -set_word(int n, EnumType value) { +set_word(size_t n, EnumType value) { set_string_word(n, format_enum(value)); } diff --git a/dtool/src/prc/configVariableEnum.h b/dtool/src/prc/configVariableEnum.h index 5bbb9433d9..b8dbfd2860 100644 --- a/dtool/src/prc/configVariableEnum.h +++ b/dtool/src/prc/configVariableEnum.h @@ -45,15 +45,15 @@ public: INLINE void operator = (EnumType value); INLINE operator EnumType () const; - INLINE int size() const; - INLINE EnumType operator [] (int n) const; + INLINE size_t size() const; + INLINE EnumType operator [] (size_t n) const; INLINE void set_value(EnumType value); INLINE EnumType get_value() const; INLINE EnumType get_default_value() const; - INLINE EnumType get_word(int n) const; - INLINE void set_word(int n, EnumType value); + INLINE EnumType get_word(size_t n) const; + INLINE void set_word(size_t n, EnumType value); private: INLINE EnumType parse_string(const string &value) const; diff --git a/dtool/src/prc/configVariableFilename.I b/dtool/src/prc/configVariableFilename.I index e6e4fc0778..e1cec7974c 100644 --- a/dtool/src/prc/configVariableFilename.I +++ b/dtool/src/prc/configVariableFilename.I @@ -101,7 +101,7 @@ length() const { // Description: //////////////////////////////////////////////////////////////////// INLINE char ConfigVariableFilename:: -operator [] (int n) const { +operator [] (size_t n) const { return get_ref_value()[n]; } @@ -254,7 +254,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE Filename ConfigVariableFilename:: -get_word(int n) const { +get_word(size_t n) const { return Filename::expand_from(get_string_word(n)); } @@ -265,7 +265,7 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableFilename:: -set_word(int n, const Filename &value) { +set_word(size_t n, const Filename &value) { set_string_word(n, value); } diff --git a/dtool/src/prc/configVariableFilename.h b/dtool/src/prc/configVariableFilename.h index 6fb450aa5f..b6dc02ea5e 100644 --- a/dtool/src/prc/configVariableFilename.h +++ b/dtool/src/prc/configVariableFilename.h @@ -41,7 +41,7 @@ PUBLISHED: INLINE const char *c_str() const; INLINE bool empty() const; INLINE size_t length() const; - INLINE char operator [] (int n) const; + INLINE char operator [] (size_t n) const; INLINE string get_fullpath() const; INLINE string get_dirname() const; @@ -59,8 +59,8 @@ PUBLISHED: INLINE Filename get_value() const; INLINE Filename get_default_value() const; - INLINE Filename get_word(int n) const; - INLINE void set_word(int n, const Filename &value); + INLINE Filename get_word(size_t n) const; + INLINE void set_word(size_t n, const Filename &value); private: void reload_cache(); diff --git a/dtool/src/prc/configVariableInt.I b/dtool/src/prc/configVariableInt.I index 17383bebe4..8d56e00c52 100644 --- a/dtool/src/prc/configVariableInt.I +++ b/dtool/src/prc/configVariableInt.I @@ -89,7 +89,7 @@ operator int () const { // Access: Published // Description: Returns the number of unique words in the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableInt:: +INLINE size_t ConfigVariableInt:: size() const { return get_num_words(); } @@ -100,7 +100,7 @@ size() const { // Description: Returns the value of the variable's nth word. //////////////////////////////////////////////////////////////////// INLINE int ConfigVariableInt:: -operator [] (int n) const { +operator [] (size_t n) const { return get_word(n); } @@ -150,7 +150,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE int ConfigVariableInt:: -get_word(int n) const { +get_word(size_t n) const { return get_int_word(n); } @@ -161,7 +161,7 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableInt:: -set_word(int n, int value) { +set_word(size_t n, int value) { set_int_word(n, value); } diff --git a/dtool/src/prc/configVariableInt.h b/dtool/src/prc/configVariableInt.h index c84031f0b0..508d6ba358 100644 --- a/dtool/src/prc/configVariableInt.h +++ b/dtool/src/prc/configVariableInt.h @@ -36,15 +36,15 @@ PUBLISHED: INLINE void operator = (int value); INLINE operator int () const; - INLINE int size() const; - INLINE int operator [] (int n) const; + INLINE size_t size() const; + INLINE int operator [] (size_t n) const; INLINE void set_value(int value); INLINE int get_value() const; INLINE int get_default_value() const; - INLINE int get_word(int n) const; - INLINE void set_word(int n, int value); + INLINE int get_word(size_t n) const; + INLINE void set_word(size_t n, int value); private: void set_default_value(int default_value); diff --git a/dtool/src/prc/configVariableInt64.I b/dtool/src/prc/configVariableInt64.I index b026e74625..d45511df4d 100644 --- a/dtool/src/prc/configVariableInt64.I +++ b/dtool/src/prc/configVariableInt64.I @@ -29,11 +29,11 @@ ConfigVariableInt64(const string &name) : //////////////////////////////////////////////////////////////////// // Function: ConfigVariableInt64::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ConfigVariableInt64:: -ConfigVariableInt64(const string &name, PN_int64 default_value, - const string &description, PN_int64 flags) : +ConfigVariableInt64(const string &name, PN_int64 default_value, + const string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int64, description, flags), #else @@ -48,11 +48,11 @@ ConfigVariableInt64(const string &name, PN_int64 default_value, //////////////////////////////////////////////////////////////////// // Function: ConfigVariableInt64::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ConfigVariableInt64:: -ConfigVariableInt64(const string &name, const string &default_value, - const string &description, PN_int64 flags) : +ConfigVariableInt64(const string &name, const string &default_value, + const string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int64, description, flags), #else @@ -89,7 +89,7 @@ operator PN_int64 () const { // Access: Published // Description: Returns the number of unique words in the variable. //////////////////////////////////////////////////////////////////// -INLINE PN_int64 ConfigVariableInt64:: +INLINE size_t ConfigVariableInt64:: size() const { return get_num_words(); } @@ -100,7 +100,7 @@ size() const { // Description: Returns the value of the variable's nth word. //////////////////////////////////////////////////////////////////// INLINE PN_int64 ConfigVariableInt64:: -operator [] (int n) const { +operator [] (size_t n) const { return get_word(n); } @@ -150,7 +150,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE PN_int64 ConfigVariableInt64:: -get_word(int n) const { +get_word(size_t n) const { return get_int64_word(n); } @@ -161,7 +161,7 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableInt64:: -set_word(int n, PN_int64 value) { +set_word(size_t n, PN_int64 value) { set_int64_word(n, value); } diff --git a/dtool/src/prc/configVariableInt64.h b/dtool/src/prc/configVariableInt64.h index 07cb78e336..d108fb701a 100644 --- a/dtool/src/prc/configVariableInt64.h +++ b/dtool/src/prc/configVariableInt64.h @@ -28,24 +28,24 @@ class EXPCL_DTOOLCONFIG ConfigVariableInt64 : public ConfigVariable { PUBLISHED: INLINE ConfigVariableInt64(const string &name); INLINE ConfigVariableInt64(const string &name, PN_int64 default_value, - const string &description = string(), - PN_int64 flags = 0); + const string &description = string(), + int flags = 0); INLINE ConfigVariableInt64(const string &name, const string &default_value, - const string &description = string(), - PN_int64 flags = 0); + const string &description = string(), + int flags = 0); INLINE void operator = (PN_int64 value); INLINE operator PN_int64 () const; - INLINE PN_int64 size() const; - INLINE PN_int64 operator [] (int n) const; + INLINE size_t size() const; + INLINE PN_int64 operator [] (size_t n) const; INLINE void set_value(PN_int64 value); INLINE PN_int64 get_value() const; INLINE PN_int64 get_default_value() const; - INLINE PN_int64 get_word(int n) const; - INLINE void set_word(int n, PN_int64 value); + INLINE PN_int64 get_word(size_t n) const; + INLINE void set_word(size_t n, PN_int64 value); private: void set_default_value(PN_int64 default_value); diff --git a/dtool/src/prc/configVariableList.I b/dtool/src/prc/configVariableList.I index 740b846ead..0b89f3855d 100644 --- a/dtool/src/prc/configVariableList.I +++ b/dtool/src/prc/configVariableList.I @@ -50,7 +50,7 @@ ConfigVariableList(const string &name, // Access: Published // Description: Returns the number of values in the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableList:: +INLINE size_t ConfigVariableList:: get_num_values() const { nassertr(_core != (ConfigVariableCore *)NULL, 0); return _core->get_num_trusted_references(); @@ -62,7 +62,7 @@ get_num_values() const { // Description: Returns the nth value of the variable. //////////////////////////////////////////////////////////////////// INLINE string ConfigVariableList:: -get_string_value(int n) const { +get_string_value(size_t n) const { nassertr(_core != (ConfigVariableCore *)NULL, string()); const ConfigDeclaration *decl = _core->get_trusted_reference(n); if (decl != (ConfigDeclaration *)NULL) { @@ -76,7 +76,7 @@ get_string_value(int n) const { // Access: Published // Description: Returns the number of unique values in the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableList:: +INLINE size_t ConfigVariableList:: get_num_unique_values() const { nassertr(_core != (ConfigVariableCore *)NULL, 0); return _core->get_num_unique_references(); @@ -88,7 +88,7 @@ get_num_unique_values() const { // Description: Returns the nth unique value of the variable. //////////////////////////////////////////////////////////////////// INLINE string ConfigVariableList:: -get_unique_value(int n) const { +get_unique_value(size_t n) const { nassertr(_core != (ConfigVariableCore *)NULL, string()); const ConfigDeclaration *decl = _core->get_unique_reference(n); if (decl != (ConfigDeclaration *)NULL) { @@ -102,7 +102,7 @@ get_unique_value(int n) const { // Access: Published // Description: Returns the number of unique values of the variable. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableList:: +INLINE size_t ConfigVariableList:: size() const { return get_num_unique_values(); } @@ -116,7 +116,7 @@ size() const { // get_num_unique_values(). //////////////////////////////////////////////////////////////////// INLINE string ConfigVariableList:: -operator [] (int n) const { +operator [] (size_t n) const { return get_unique_value(n); } diff --git a/dtool/src/prc/configVariableList.cxx b/dtool/src/prc/configVariableList.cxx index 33503c98f6..bc0f10c1e5 100644 --- a/dtool/src/prc/configVariableList.cxx +++ b/dtool/src/prc/configVariableList.cxx @@ -17,7 +17,7 @@ //////////////////////////////////////////////////////////////////// // Function: ConfigVariableList::output // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ConfigVariableList:: output(ostream &out) const { @@ -27,12 +27,12 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ConfigVariableList::write // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ConfigVariableList:: write(ostream &out) const { - int num_values = get_num_values(); - for (int i = 0; i < num_values; ++i) { + size_t num_values = get_num_values(); + for (size_t i = 0; i < num_values; ++i) { out << get_string_value(i) << "\n"; } } diff --git a/dtool/src/prc/configVariableList.h b/dtool/src/prc/configVariableList.h index 601e52664d..69a289b119 100644 --- a/dtool/src/prc/configVariableList.h +++ b/dtool/src/prc/configVariableList.h @@ -39,14 +39,14 @@ PUBLISHED: int flags = 0); INLINE ~ConfigVariableList(); - INLINE int get_num_values() const; - INLINE string get_string_value(int n) const; + INLINE size_t get_num_values() const; + INLINE string get_string_value(size_t n) const; - INLINE int get_num_unique_values() const; - INLINE string get_unique_value(int n) const; + INLINE size_t get_num_unique_values() const; + INLINE string get_unique_value(size_t n) const; - INLINE int size() const; - INLINE string operator [] (int n) const; + INLINE size_t size() const; + INLINE string operator [] (size_t n) const; void output(ostream &out) const; void write(ostream &out) const; diff --git a/dtool/src/prc/configVariableManager.I b/dtool/src/prc/configVariableManager.I index c18e63d84a..11a6184c20 100644 --- a/dtool/src/prc/configVariableManager.I +++ b/dtool/src/prc/configVariableManager.I @@ -19,7 +19,7 @@ // Description: Returns the current number of active ConfigVariableCores in // the world. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableManager:: +INLINE size_t ConfigVariableManager:: get_num_variables() const { return _variables.size(); } @@ -30,8 +30,8 @@ get_num_variables() const { // Description: Returns the nth active ConfigVariableCore in the world. //////////////////////////////////////////////////////////////////// INLINE ConfigVariableCore *ConfigVariableManager:: -get_variable(int n) const { - nassertr(n >= 0 && n < (int)_variables.size(), (ConfigVariableCore *)NULL); +get_variable(size_t n) const { + nassertr(n < _variables.size(), (ConfigVariableCore *)NULL); return _variables[n]; } diff --git a/dtool/src/prc/configVariableManager.cxx b/dtool/src/prc/configVariableManager.cxx index ae41496eaf..e884f12b5c 100644 --- a/dtool/src/prc/configVariableManager.cxx +++ b/dtool/src/prc/configVariableManager.cxx @@ -178,8 +178,8 @@ make_variable_template(const string &pattern, // the list. //////////////////////////////////////////////////////////////////// string ConfigVariableManager:: -get_variable_name(int n) const { - if (n >= 0 && n < (int)_variables.size()) { +get_variable_name(size_t n) const { + if (n < _variables.size()) { return _variables[n]->get_name(); } return string(); @@ -192,8 +192,8 @@ get_variable_name(int n) const { // the list has been used by code, false otherwise. //////////////////////////////////////////////////////////////////// bool ConfigVariableManager:: -is_variable_used(int n) const { - if (n >= 0 && n < (int)_variables.size()) { +is_variable_used(size_t n) const { + if (n < _variables.size()) { return _variables[n]->is_used(); } return false; @@ -251,22 +251,22 @@ write_prc_variables(ostream &out) const { if (variable->get_value_type() == ConfigVariableCore::VT_list || variable->get_value_type() == ConfigVariableCore::VT_search_path) { // List all of the values for a "list" variable. - int num_references = variable->get_num_trusted_references(); - for (int i = 0; i < num_references; i++) { - out << variable->get_name() << " " + size_t num_references = variable->get_num_trusted_references(); + for (size_t i = 0; i < num_references; ++i) { + out << variable->get_name() << " " << variable->get_trusted_reference(i)->get_string_value() << "\n"; } } else { // List just the one value for a non-list variable. - out << variable->get_name() << " " + out << variable->get_name() << " " << variable->get_trusted_reference(0)->get_string_value() << "\n"; } } } } - + //////////////////////////////////////////////////////////////////// // Function: ConfigVariableManager::list_unused_variables // Access: Published @@ -283,8 +283,8 @@ list_unused_variables() const { ConfigVariableCore *variable = (*ni).second; if (!variable->is_used()) { nout << variable->get_name() << "\n"; - int num_references = variable->get_num_references(); - for (int i = 0; i < num_references; i++) { + size_t num_references = variable->get_num_references(); + for (size_t i = 0; i < num_references; i++) { nout << " " << variable->get_reference(i)->get_page()->get_name() << "\n"; } @@ -380,13 +380,13 @@ list_variable(const ConfigVariableCore *variable, // We treat a "list" variable as a special case: list all of // its values. nout << " current value:\n"; - int num_references = variable->get_num_trusted_references(); - for (int i = 0; i < num_references; i++) { + size_t num_references = variable->get_num_trusted_references(); + for (size_t i = 0; i < num_references; ++i) { decl = variable->get_trusted_reference(i); nout << " " << decl->get_string_value() << " (from " << decl->get_page()->get_name() << ")\n"; } - + } else { // An ordinary, non-list variable gets one line for its // current value (if it has one) and another line for its diff --git a/dtool/src/prc/configVariableManager.h b/dtool/src/prc/configVariableManager.h index 9ac9c18250..69e039d42e 100644 --- a/dtool/src/prc/configVariableManager.h +++ b/dtool/src/prc/configVariableManager.h @@ -45,11 +45,11 @@ PUBLISHED: int flags = 0); - INLINE int get_num_variables() const; - INLINE ConfigVariableCore *get_variable(int n) const; + INLINE size_t get_num_variables() const; + INLINE ConfigVariableCore *get_variable(size_t n) const; MAKE_SEQ(get_variables, get_num_variables, get_variable); - string get_variable_name(int n) const; - bool is_variable_used(int n) const; + string get_variable_name(size_t n) const; + bool is_variable_used(size_t n) const; void output(ostream &out) const; void write(ostream &out) const; diff --git a/dtool/src/prc/configVariableSearchPath.I b/dtool/src/prc/configVariableSearchPath.I index 395e23a9f9..75c9f5edf1 100644 --- a/dtool/src/prc/configVariableSearchPath.I +++ b/dtool/src/prc/configVariableSearchPath.I @@ -240,7 +240,7 @@ is_empty() const { // Access: Published // Description: Returns the number of directories on the search list. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableSearchPath:: +INLINE size_t ConfigVariableSearchPath:: get_num_directories() const { return get_value().get_num_directories(); } @@ -251,7 +251,7 @@ get_num_directories() const { // Description: Returns the nth directory on the search list. //////////////////////////////////////////////////////////////////// INLINE const Filename &ConfigVariableSearchPath:: -get_directory(int n) const { +get_directory(size_t n) const { return get_value().get_directory(n); } @@ -280,7 +280,7 @@ find_file(const Filename &filename) const { // the results list first; otherwise, the newly-found // files will be appended to the list. //////////////////////////////////////////////////////////////////// -INLINE int ConfigVariableSearchPath:: +INLINE size_t ConfigVariableSearchPath:: find_all_files(const Filename &filename, DSearchPath::Results &results) const { return get_value().find_all_files(filename, results); diff --git a/dtool/src/prc/configVariableSearchPath.cxx b/dtool/src/prc/configVariableSearchPath.cxx index 85d8a732a4..0b379ec1ea 100644 --- a/dtool/src/prc/configVariableSearchPath.cxx +++ b/dtool/src/prc/configVariableSearchPath.cxx @@ -28,8 +28,8 @@ reload_search_path() { _cache.clear(); _cache.append_path(_prefix); - int num_unique_references = _core->get_num_unique_references(); - for (int i = 0; i < num_unique_references; i++) { + size_t num_unique_references = _core->get_num_unique_references(); + for (size_t i = 0; i < num_unique_references; i++) { const ConfigDeclaration *decl = _core->get_unique_reference(i); const ConfigPage *page = decl->get_page(); diff --git a/dtool/src/prc/configVariableSearchPath.h b/dtool/src/prc/configVariableSearchPath.h index 8dca25ad7d..ee32dab573 100644 --- a/dtool/src/prc/configVariableSearchPath.h +++ b/dtool/src/prc/configVariableSearchPath.h @@ -69,13 +69,13 @@ PUBLISHED: INLINE void prepend_path(const DSearchPath &path); INLINE bool is_empty() const; - INLINE int get_num_directories() const; - INLINE const Filename &get_directory(int n) const; + INLINE size_t get_num_directories() const; + INLINE const Filename &get_directory(size_t n) const; MAKE_SEQ(get_directories, get_num_directories, get_directory); INLINE Filename find_file(const Filename &filename) const; - INLINE int find_all_files(const Filename &filename, - DSearchPath::Results &results) const; + INLINE size_t find_all_files(const Filename &filename, + DSearchPath::Results &results) const; INLINE DSearchPath::Results find_all_files(const Filename &filename) const; INLINE void output(ostream &out) const; diff --git a/dtool/src/prc/configVariableString.I b/dtool/src/prc/configVariableString.I index 580ad91fd3..65152bcc78 100644 --- a/dtool/src/prc/configVariableString.I +++ b/dtool/src/prc/configVariableString.I @@ -101,8 +101,8 @@ length() const { // Description: //////////////////////////////////////////////////////////////////// INLINE char ConfigVariableString:: -operator [] (int n) const { - assert(n >= 0 && n < (int)length()); +operator [] (size_t n) const { + assert(n < length()); return get_value()[n]; } @@ -181,7 +181,7 @@ get_default_value() const { // Description: Returns the variable's nth value. //////////////////////////////////////////////////////////////////// INLINE string ConfigVariableString:: -get_word(int n) const { +get_word(size_t n) const { return get_string_word(n); } @@ -192,6 +192,6 @@ get_word(int n) const { // local copy of the variable's overall value. //////////////////////////////////////////////////////////////////// INLINE void ConfigVariableString:: -set_word(int n, const string &value) { +set_word(size_t n, const string &value) { set_string_word(n, value); } diff --git a/dtool/src/prc/configVariableString.h b/dtool/src/prc/configVariableString.h index 0685af8a67..ae313f2933 100644 --- a/dtool/src/prc/configVariableString.h +++ b/dtool/src/prc/configVariableString.h @@ -37,7 +37,7 @@ PUBLISHED: INLINE const char *c_str() const; INLINE bool empty() const; INLINE size_t length() const; - INLINE char operator [] (int n) const; + INLINE char operator [] (size_t n) const; // Comparison operators are handy. INLINE bool operator == (const string &other) const; @@ -48,8 +48,8 @@ PUBLISHED: INLINE const string &get_value() const; INLINE string get_default_value() const; - INLINE string get_word(int n) const; - INLINE void set_word(int n, const string &value); + INLINE string get_word(size_t n) const; + INLINE void set_word(size_t n, const string &value); private: AtomicAdjust::Integer _local_modified; diff --git a/dtool/src/prc/encryptStreamBuf.cxx b/dtool/src/prc/encryptStreamBuf.cxx index 5af88e6c04..1dcac25349 100644 --- a/dtool/src/prc/encryptStreamBuf.cxx +++ b/dtool/src/prc/encryptStreamBuf.cxx @@ -289,11 +289,11 @@ open_write(ostream *dest, bool owns_dest, const string &password) { // Now write the header information to the stream. StreamWriter sw(_dest, false); nassertv((PN_uint16)nid == nid); - sw.add_uint16(nid); + sw.add_uint16((PN_uint16)nid); nassertv((PN_uint16)key_length == key_length); - sw.add_uint16(key_length); + sw.add_uint16((PN_uint16)key_length); nassertv((PN_uint16)count == count); - sw.add_uint16(count); + sw.add_uint16((PN_uint16)count); sw.append_data(iv, iv_length); _write_valid = true; @@ -347,7 +347,7 @@ overflow(int ch) { if (ch != EOF) { // Write one more character. - char c = ch; + char c = (char)ch; write_chars(&c, 1); } @@ -364,7 +364,7 @@ int EncryptStreamBuf:: sync() { if (_source != (istream *)NULL) { size_t n = egptr() - gptr(); - gbump(n); + gbump((int)n); } if (_dest != (ostream *)NULL) { @@ -396,7 +396,7 @@ underflow() { if (read_count != num_bytes) { // Oops, we didn't read what we thought we would. if (read_count == 0) { - gbump(num_bytes); + gbump((int)num_bytes); return EOF; } @@ -404,7 +404,7 @@ underflow() { nassertr(read_count < num_bytes, EOF); size_t delta = num_bytes - read_count; memmove(gptr() + delta, gptr(), read_count); - gbump(delta); + gbump((int)delta); } } diff --git a/dtool/src/prc/notify.cxx b/dtool/src/prc/notify.cxx index ebfd19ac42..9d100e5f54 100644 --- a/dtool/src/prc/notify.cxx +++ b/dtool/src/prc/notify.cxx @@ -447,7 +447,7 @@ string_severity(const string &str) { for (string::const_iterator si = str.begin(); si != str.end(); ++si) { - lstring += tolower(*si); + lstring += (char)tolower(*si); } if (lstring == "spam") { diff --git a/dtool/src/prc/notifyCategory.cxx b/dtool/src/prc/notifyCategory.cxx index 6998af4270..5d26421ec0 100644 --- a/dtool/src/prc/notifyCategory.cxx +++ b/dtool/src/prc/notifyCategory.cxx @@ -125,7 +125,7 @@ out(NotifySeverity severity, bool prefix) const { // Description: Returns the number of child Categories of this // particular Category. //////////////////////////////////////////////////////////////////// -int NotifyCategory:: +size_t NotifyCategory:: get_num_children() const { return _children.size(); } @@ -137,8 +137,8 @@ get_num_children() const { // Category. //////////////////////////////////////////////////////////////////// NotifyCategory *NotifyCategory:: -get_child(int i) const { - assert(i >= 0 && i < (int)_children.size()); +get_child(size_t i) const { + assert(i < _children.size()); return _children[i]; } diff --git a/dtool/src/prc/notifyCategory.h b/dtool/src/prc/notifyCategory.h index 30539ec3b8..ad1152546f 100644 --- a/dtool/src/prc/notifyCategory.h +++ b/dtool/src/prc/notifyCategory.h @@ -72,8 +72,9 @@ PUBLISHED: INLINE ostream &error(bool prefix = true) const; INLINE ostream &fatal(bool prefix = true) const; - int get_num_children() const; - NotifyCategory *get_child(int i) const; + size_t get_num_children() const; + NotifyCategory *get_child(size_t i) const; + MAKE_SEQ(get_children, get_num_children, get_child); static void set_server_delta(long delta); diff --git a/dtool/src/prc/prcKeyRegistry.cxx b/dtool/src/prc/prcKeyRegistry.cxx index 9e410a326c..70e18a5735 100644 --- a/dtool/src/prc/prcKeyRegistry.cxx +++ b/dtool/src/prc/prcKeyRegistry.cxx @@ -59,12 +59,12 @@ PrcKeyRegistry:: // code generated by the make-prc-key utility. //////////////////////////////////////////////////////////////////// void PrcKeyRegistry:: -record_keys(const KeyDef *key_def, int num_keys) { - for (int i = 0; i < num_keys; i++) { +record_keys(const KeyDef *key_def, size_t num_keys) { + for (size_t i = 0; i < num_keys; i++) { const KeyDef *def = &key_def[i]; if (def->_data != (char *)NULL) { // Clear the ith key. - while ((int)_keys.size() <= i) { + while (_keys.size() <= i) { Key key; key._def = NULL; key._pkey = NULL; @@ -93,9 +93,9 @@ record_keys(const KeyDef *key_def, int num_keys) { // be freed via EVP_PKEY_free(). //////////////////////////////////////////////////////////////////// void PrcKeyRegistry:: -set_key(int n, EVP_PKEY *pkey, time_t generated_time) { +set_key(size_t n, EVP_PKEY *pkey, time_t generated_time) { // Clear the nth key. - while ((int)_keys.size() <= n) { + while (_keys.size() <= n) { Key key; key._def = NULL; key._pkey = NULL; @@ -119,7 +119,7 @@ set_key(int n, EVP_PKEY *pkey, time_t generated_time) { // might not strictly be the number of keys, since there // may be holes in the list. //////////////////////////////////////////////////////////////////// -int PrcKeyRegistry:: +size_t PrcKeyRegistry:: get_num_keys() const { return _keys.size(); } @@ -131,8 +131,8 @@ get_num_keys() const { // not defined. //////////////////////////////////////////////////////////////////// EVP_PKEY *PrcKeyRegistry:: -get_key(int n) const { - nassertr(n >= 0 && n < (int)_keys.size(), (EVP_PKEY *)NULL); +get_key(size_t n) const { + nassertr(n < _keys.size(), (EVP_PKEY *)NULL); if (_keys[n]._def != (KeyDef *)NULL) { if (_keys[n]._pkey == (EVP_PKEY *)NULL) { @@ -160,8 +160,8 @@ get_key(int n) const { // generated, or 0 if the key is not defined. //////////////////////////////////////////////////////////////////// time_t PrcKeyRegistry:: -get_generated_time(int n) const { - nassertr(n >= 0 && n < (int)_keys.size(), 0); +get_generated_time(size_t n) const { + nassertr(n < _keys.size(), 0); return _keys[n]._generated_time; } @@ -169,7 +169,7 @@ get_generated_time(int n) const { //////////////////////////////////////////////////////////////////// // Function: PrcKeyRegistry::get_global_ptr // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// PrcKeyRegistry *PrcKeyRegistry:: get_global_ptr() { diff --git a/dtool/src/prc/prcKeyRegistry.h b/dtool/src/prc/prcKeyRegistry.h index 9a7fa2cde8..ebffc10171 100644 --- a/dtool/src/prc/prcKeyRegistry.h +++ b/dtool/src/prc/prcKeyRegistry.h @@ -52,12 +52,12 @@ public: time_t _generated_time; }; - void record_keys(const KeyDef *key_def, int num_keys); - void set_key(int n, EVP_PKEY *pkey, time_t generated_time); + void record_keys(const KeyDef *key_def, size_t num_keys); + void set_key(size_t n, EVP_PKEY *pkey, time_t generated_time); - int get_num_keys() const; - EVP_PKEY *get_key(int n) const; - time_t get_generated_time(int n) const; + size_t get_num_keys() const; + EVP_PKEY *get_key(size_t n) const; + time_t get_generated_time(size_t n) const; static PrcKeyRegistry *get_global_ptr(); @@ -81,8 +81,3 @@ private: #endif // HAVE_OPENSSL #endif - - - - - diff --git a/dtool/src/prc/streamReader.cxx b/dtool/src/prc/streamReader.cxx index c469309b53..77ac276dc1 100644 --- a/dtool/src/prc/streamReader.cxx +++ b/dtool/src/prc/streamReader.cxx @@ -68,7 +68,7 @@ get_z_string() { string result; int ch = _in->get(); while (!_in->eof() && !_in->fail() && ch != '\0') { - result += ch; + result += (char)ch; ch = _in->get(); } @@ -167,7 +167,7 @@ readline() { string line; int ch = _in->get(); while (!_in->eof() && !_in->fail()) { - line += ch; + line += (char)ch; if (ch == '\n') { // Here's the newline character. return line; diff --git a/dtool/src/prc/streamWriter.I b/dtool/src/prc/streamWriter.I index 4c388c387f..b297245c30 100644 --- a/dtool/src/prc/streamWriter.I +++ b/dtool/src/prc/streamWriter.I @@ -335,7 +335,7 @@ add_string(const string &str) { nassertv(str.length() <= (PN_uint16)0xffff); // Strings always are preceded by their length - add_uint16(str.length()); + add_uint16((PN_uint16)str.length()); // Add the string append_data(str); @@ -350,7 +350,7 @@ add_string(const string &str) { INLINE void StreamWriter:: add_string32(const string &str) { // Strings always are preceded by their length - add_uint32(str.length()); + add_uint32((PN_uint32)str.length()); // Add the string append_data(str); diff --git a/dtool/src/prckeys/makePrcKey.cxx b/dtool/src/prckeys/makePrcKey.cxx index 17a95286fb..f61fa7a830 100644 --- a/dtool/src/prckeys/makePrcKey.cxx +++ b/dtool/src/prckeys/makePrcKey.cxx @@ -74,7 +74,7 @@ output_ssl_errors() { //////////////////////////////////////////////////////////////////// void output_c_string(ostream &out, const string &string_name, - int index, BIO *mbio) { + size_t index, BIO *mbio) { char *data_ptr; size_t data_size = BIO_get_mem_data(mbio, &data_ptr); @@ -151,13 +151,13 @@ write_public_keys(Filename outfile) { "\n" "#include \"prcKeyRegistry.h\"\n" "\n"; - + PrcKeyRegistry *pkr = PrcKeyRegistry::get_global_ptr(); BIO *mbio = BIO_new(BIO_s_mem()); - int num_keys = pkr->get_num_keys(); - int i; + size_t num_keys = pkr->get_num_keys(); + size_t i; for (i = 0; i < num_keys; i++) { EVP_PKEY *pkey = pkr->get_key(i); @@ -403,7 +403,7 @@ main(int argc, char **argv) { for (int i = 1; i < argc; i++) { KeyNumber key; char *endptr; - key._number = strtol(argv[i], &endptr, 0); + key._number = (int)strtol(argv[i], &endptr, 0); key._got_pass_phrase = got_pass_phrase; key._pass_phrase = pass_phrase; diff --git a/panda/src/display/windowProperties.h b/panda/src/display/windowProperties.h index dc0fcac84f..28968e458e 100644 --- a/panda/src/display/windowProperties.h +++ b/panda/src/display/windowProperties.h @@ -197,7 +197,7 @@ private: Filename _cursor_filename; Filename _icon_filename; ZOrder _z_order; - unsigned int _flags; + int _flags; PT(WindowHandle) _parent_window; static WindowProperties *_default_properties; diff --git a/panda/src/express/datagram.cxx b/panda/src/express/datagram.cxx index 7a1d9dadb4..677d91fe75 100644 --- a/panda/src/express/datagram.cxx +++ b/panda/src/express/datagram.cxx @@ -91,13 +91,13 @@ dump_hex(ostream &out, unsigned int indent) const { void Datagram:: add_wstring(const wstring &str) { // By convention, wstrings are marked with 32-bit lengths. - add_uint32(str.length()); + add_uint32((PN_uint32)str.length()); // Now append each character in the string. We store each code // little-endian, for no real good reason. wstring::const_iterator ci; for (ci = str.begin(); ci != str.end(); ++ci) { - add_uint16(*ci); + add_uint16((PN_uint16)*ci); } } diff --git a/panda/src/express/datagramIterator.I b/panda/src/express/datagramIterator.I index b3bd9ca1f9..899ea2aaf0 100644 --- a/panda/src/express/datagramIterator.I +++ b/panda/src/express/datagramIterator.I @@ -513,7 +513,7 @@ get_remaining_bytes() const { nassertr(_current_index <= _datagram->get_length(), ""); const char *ptr = (const char *)_datagram->get_data(); - int remaining_size = _datagram->get_length() - _current_index; + size_t remaining_size = _datagram->get_length() - _current_index; return string(ptr + _current_index, remaining_size); } @@ -522,7 +522,7 @@ get_remaining_bytes() const { // Access: Public // Description: Return the bytes left in the datagram. //////////////////////////////////////////////////////////////////// -INLINE int DatagramIterator:: +INLINE size_t DatagramIterator:: get_remaining_size() const { return _datagram->get_length() - _current_index; } diff --git a/panda/src/express/datagramIterator.cxx b/panda/src/express/datagramIterator.cxx index c679536931..b02f2a19dd 100644 --- a/panda/src/express/datagramIterator.cxx +++ b/panda/src/express/datagramIterator.cxx @@ -31,7 +31,7 @@ get_string() { nassertr(_current_index + s_len <= _datagram->get_length(), ""); const char *ptr = (const char *)_datagram->get_data(); - int last_index = _current_index; + size_t last_index = _current_index; _current_index += s_len; @@ -53,7 +53,7 @@ get_string32() { nassertr(_current_index + s_len <= _datagram->get_length(), ""); const char *ptr = (const char *)_datagram->get_data(); - int last_index = _current_index; + size_t last_index = _current_index; _current_index += s_len; @@ -79,7 +79,7 @@ get_z_string() { } nassertr(p < length, ""); // no NULL character? - int last_index = _current_index; + size_t last_index = _current_index; _current_index = p + 1; return string(ptr + last_index, p - last_index); @@ -143,7 +143,7 @@ extract_bytes(size_t size) { nassertr(_current_index + size <= _datagram->get_length(), ""); const char *ptr = (const char *)_datagram->get_data(); - int last_index = _current_index; + size_t last_index = _current_index; _current_index += size; diff --git a/panda/src/express/datagramIterator.h b/panda/src/express/datagramIterator.h index c30a402453..cc6568eed9 100644 --- a/panda/src/express/datagramIterator.h +++ b/panda/src/express/datagramIterator.h @@ -72,7 +72,7 @@ PUBLISHED: size_t extract_bytes(unsigned char *into, size_t size); INLINE string get_remaining_bytes() const; - INLINE int get_remaining_size() const; + INLINE size_t get_remaining_size() const; INLINE const Datagram &get_datagram() const; INLINE size_t get_current_index() const; diff --git a/panda/src/express/hashVal.cxx b/panda/src/express/hashVal.cxx index 1560decd75..a1f886ad32 100644 --- a/panda/src/express/hashVal.cxx +++ b/panda/src/express/hashVal.cxx @@ -51,7 +51,7 @@ input_hex(istream &in) { while (!in.eof() && !in.fail() && isxdigit(ch)) { if (i < 32) { - buffer[i] = ch; + buffer[i] = (char)ch; } i++; ch = in.get(); @@ -63,7 +63,7 @@ input_hex(istream &in) { } if (!in.eof()) { - in.putback(ch); + in.putback((char)ch); } else { in.clear(); } diff --git a/panda/src/express/memoryUsagePointers.cxx b/panda/src/express/memoryUsagePointers.cxx index 4a590f3661..2eb78a1d50 100644 --- a/panda/src/express/memoryUsagePointers.cxx +++ b/panda/src/express/memoryUsagePointers.cxx @@ -43,7 +43,7 @@ MemoryUsagePointers:: // Access: Published // Description: Returns the number of pointers in the set. //////////////////////////////////////////////////////////////////// -int MemoryUsagePointers:: +size_t MemoryUsagePointers:: get_num_pointers() const { return _entries.size(); } @@ -54,8 +54,8 @@ get_num_pointers() const { // Description: Returns the nth pointer of the set. //////////////////////////////////////////////////////////////////// ReferenceCount *MemoryUsagePointers:: -get_pointer(int n) const { - nassertr(n >= 0 && n < get_num_pointers(), NULL); +get_pointer(size_t n) const { + nassertr(n < get_num_pointers(), NULL); return _entries[n]._ref_ptr; } @@ -68,8 +68,8 @@ get_pointer(int n) const { // NULL. //////////////////////////////////////////////////////////////////// TypedObject *MemoryUsagePointers:: -get_typed_pointer(int n) const { - nassertr(n >= 0 && n < get_num_pointers(), NULL); +get_typed_pointer(size_t n) const { + nassertr(n < get_num_pointers(), NULL); TypedObject *typed_ptr = _entries[n]._typed_ptr; if (typed_ptr != (TypedObject *)NULL) { @@ -106,8 +106,8 @@ get_typed_pointer(int n) const { // known. //////////////////////////////////////////////////////////////////// TypeHandle MemoryUsagePointers:: -get_type(int n) const { - nassertr(n >= 0 && n < get_num_pointers(), TypeHandle::none()); +get_type(size_t n) const { + nassertr(n < get_num_pointers(), TypeHandle::none()); return _entries[n]._type; } @@ -118,8 +118,8 @@ get_type(int n) const { // known. //////////////////////////////////////////////////////////////////// string MemoryUsagePointers:: -get_type_name(int n) const { - nassertr(n >= 0 && n < get_num_pointers(), ""); +get_type_name(size_t n) const { + nassertr(n < get_num_pointers(), ""); return get_type(n).get_name(); } @@ -132,8 +132,8 @@ get_type_name(int n) const { // MemoryUsage::get_pointers(). //////////////////////////////////////////////////////////////////// double MemoryUsagePointers:: -get_age(int n) const { - nassertr(n >= 0 && n < get_num_pointers(), 0.0); +get_age(size_t n) const { + nassertr(n < get_num_pointers(), 0.0); return _entries[n]._age; } diff --git a/panda/src/express/memoryUsagePointers.h b/panda/src/express/memoryUsagePointers.h index 2512ea9f00..532e59be6a 100644 --- a/panda/src/express/memoryUsagePointers.h +++ b/panda/src/express/memoryUsagePointers.h @@ -50,17 +50,17 @@ PUBLISHED: MemoryUsagePointers(); ~MemoryUsagePointers(); - int get_num_pointers() const; - ReferenceCount *get_pointer(int n) const; + size_t get_num_pointers() const; + ReferenceCount *get_pointer(size_t n) const; MAKE_SEQ(get_pointers, get_num_pointers, get_pointer); - TypedObject *get_typed_pointer(int n) const; + TypedObject *get_typed_pointer(size_t n) const; MAKE_SEQ(get_typed_pointers, get_num_pointers, get_typed_pointer); - TypeHandle get_type(int n) const; - string get_type_name(int n) const; - double get_age(int n) const; + TypeHandle get_type(size_t n) const; + string get_type_name(size_t n) const; + double get_age(size_t n) const; - EXTENSION(PyObject *get_python_pointer(int n) const); + EXTENSION(PyObject *get_python_pointer(size_t n) const); void clear(); diff --git a/panda/src/express/memoryUsagePointers_ext.cxx b/panda/src/express/memoryUsagePointers_ext.cxx index 63713cc907..73732e274b 100644 --- a/panda/src/express/memoryUsagePointers_ext.cxx +++ b/panda/src/express/memoryUsagePointers_ext.cxx @@ -36,7 +36,7 @@ extern Dtool_PyTypedObject Dtool_ReferenceCount; // type is known, which has a Python representation. //////////////////////////////////////////////////////////////////// PyObject *Extension:: -get_python_pointer(int n) const { +get_python_pointer(size_t n) const { TypedObject *typed_ptr = _this->get_typed_pointer(n); ReferenceCount *ref_ptr = _this->get_pointer(n); diff --git a/panda/src/express/memoryUsagePointers_ext.h b/panda/src/express/memoryUsagePointers_ext.h index 3b4e9c7478..edc0e1651b 100644 --- a/panda/src/express/memoryUsagePointers_ext.h +++ b/panda/src/express/memoryUsagePointers_ext.h @@ -32,7 +32,7 @@ template<> class Extension : public ExtensionBase { public: - PyObject *get_python_pointer(int n) const; + PyObject *get_python_pointer(size_t n) const; }; #endif // HAVE_PYTHON && DO_MEMORY_USAGE diff --git a/panda/src/express/multifile.cxx b/panda/src/express/multifile.cxx index b693e8e5c6..519ba336ee 100644 --- a/panda/src/express/multifile.cxx +++ b/panda/src/express/multifile.cxx @@ -969,7 +969,7 @@ add_signature(const Multifile::CertChain &cert_chain, EVP_PKEY *pkey) { // Now encode that list of certs to a stream in DER form. stringstream der_stream; StreamWriter der_writer(der_stream); - der_writer.add_uint32(cert_chain.size()); + der_writer.add_uint32((PN_uint32)cert_chain.size()); CertChain::const_iterator ci; for (ci = cert_chain.begin(); ci != cert_chain.end(); ++ci) { diff --git a/panda/src/express/nodeReferenceCount.I b/panda/src/express/nodeReferenceCount.I index 1cd5e6bb64..3b13f58eb6 100644 --- a/panda/src/express/nodeReferenceCount.I +++ b/panda/src/express/nodeReferenceCount.I @@ -137,7 +137,7 @@ get_node_ref_count() const { #ifdef _DEBUG test_ref_count_integrity(); #endif - return AtomicAdjust::get(_node_ref_count); + return (int)AtomicAdjust::get(_node_ref_count); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/referenceCount.I b/panda/src/express/referenceCount.I index 9f098b0384..d1dac553c7 100644 --- a/panda/src/express/referenceCount.I +++ b/panda/src/express/referenceCount.I @@ -156,7 +156,7 @@ get_ref_count() const { #ifdef _DEBUG test_ref_count_integrity(); #endif - return AtomicAdjust::get(_ref_count); + return (int)AtomicAdjust::get(_ref_count); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/virtualFileList.I b/panda/src/express/virtualFileList.I index f66e4fa01d..461cc9e433 100644 --- a/panda/src/express/virtualFileList.I +++ b/panda/src/express/virtualFileList.I @@ -46,7 +46,7 @@ add_file(VirtualFile *file) { // Access: Published // Description: Returns the number of files in the list. //////////////////////////////////////////////////////////////////// -INLINE int VirtualFileList:: +INLINE size_t VirtualFileList:: get_num_files() const { return _files.size(); } @@ -57,8 +57,8 @@ get_num_files() const { // Description: Returns the nth file in the list. //////////////////////////////////////////////////////////////////// INLINE VirtualFile *VirtualFileList:: -get_file(int n) const { - nassertr(n >= 0 && n < (int)_files.size(), NULL); +get_file(size_t n) const { + nassertr(n < _files.size(), NULL); return _files[n]; } @@ -68,8 +68,8 @@ get_file(int n) const { // Description: Returns the nth file in the list. //////////////////////////////////////////////////////////////////// INLINE VirtualFile *VirtualFileList:: -operator [](int n) const { - nassertr(n >= 0 && n < (int)_files.size(), NULL); +operator [](size_t n) const { + nassertr(n < _files.size(), NULL); return _files[n]; } @@ -78,7 +78,7 @@ operator [](int n) const { // Access: Published // Description: Returns the number of files in the list. //////////////////////////////////////////////////////////////////// -INLINE int VirtualFileList:: +INLINE size_t VirtualFileList:: size() const { return _files.size(); } diff --git a/panda/src/express/virtualFileList.h b/panda/src/express/virtualFileList.h index d81ee7838d..12481c60cc 100644 --- a/panda/src/express/virtualFileList.h +++ b/panda/src/express/virtualFileList.h @@ -36,12 +36,12 @@ public: INLINE void add_file(VirtualFile *file); PUBLISHED: - INLINE int get_num_files() const; - INLINE VirtualFile *get_file(int n) const; + INLINE size_t get_num_files() const; + INLINE VirtualFile *get_file(size_t n) const; MAKE_SEQ(get_files, get_num_files, get_file); - INLINE VirtualFile *operator [](int n) const; - INLINE int size() const; + INLINE VirtualFile *operator [](size_t n) const; + INLINE size_t size() const; INLINE void operator += (const VirtualFileList &other); INLINE VirtualFileList operator + (const VirtualFileList &other) const; diff --git a/panda/src/gobj/adaptiveLru.h b/panda/src/gobj/adaptiveLru.h index eab6df8a1a..c5a81f4a23 100644 --- a/panda/src/gobj/adaptiveLru.h +++ b/panda/src/gobj/adaptiveLru.h @@ -105,7 +105,7 @@ private: size_t _max_size; unsigned int _current_frame_identifier; - double _weight; + PN_stdfloat _weight; int _max_updates_per_frame; // This array of linked lists keeps all of the active pages, grouped diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 797ea9e1c8..02abb0c407 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -1304,7 +1304,7 @@ set_vertices(const GeomVertexArrayData *vertices, int num_vertices) { // Validate the format and make sure to copy its numeric type. const GeomVertexArrayFormat *format = vertices->get_array_format(); nassertv(format->get_num_columns() == 1); - cdata->_index_type = format->get_column(0)->get_numeric_type(); + cdata->_index_type = format->get_column((size_t)0)->get_numeric_type(); cdata->_modified = Geom::get_next_modified(); cdata->_got_minmax = false; diff --git a/panda/src/gobj/geomVertexArrayData.I b/panda/src/gobj/geomVertexArrayData.I index c8be2ffdb7..6091f465b7 100644 --- a/panda/src/gobj/geomVertexArrayData.I +++ b/panda/src/gobj/geomVertexArrayData.I @@ -137,7 +137,7 @@ clear_rows() { // Access: Published // Description: Returns the number of bytes stored in the array. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexArrayData:: +INLINE size_t GeomVertexArrayData:: get_data_size_bytes() const { CDReader cdata(_cycler); return cdata->_buffer.get_size(); @@ -464,7 +464,7 @@ clear_rows() { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexArrayDataHandle:: +INLINE size_t GeomVertexArrayDataHandle:: get_data_size_bytes() const { return _cdata->_buffer.get_size(); } diff --git a/panda/src/gobj/geomVertexArrayData.h b/panda/src/gobj/geomVertexArrayData.h index 58ffbb6b46..740b512044 100644 --- a/panda/src/gobj/geomVertexArrayData.h +++ b/panda/src/gobj/geomVertexArrayData.h @@ -90,7 +90,7 @@ PUBLISHED: INLINE bool reserve_num_rows(int n); INLINE void clear_rows(); - INLINE int get_data_size_bytes() const; + INLINE size_t get_data_size_bytes() const; INLINE UpdateSeq get_modified() const; void output(ostream &out) const; @@ -284,7 +284,7 @@ PUBLISHED: bool reserve_num_rows(int n); INLINE void clear_rows(); - INLINE int get_data_size_bytes() const; + INLINE size_t get_data_size_bytes() const; INLINE UpdateSeq get_modified() const; INLINE bool request_resident() const; diff --git a/panda/src/gobj/geomVertexArrayFormat.I b/panda/src/gobj/geomVertexArrayFormat.I index f813084c96..2ded24872c 100644 --- a/panda/src/gobj/geomVertexArrayFormat.I +++ b/panda/src/gobj/geomVertexArrayFormat.I @@ -151,9 +151,9 @@ get_total_bytes() const { // Description: Returns the number of different columns in the // array. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexArrayFormat:: +INLINE size_t GeomVertexArrayFormat:: get_num_columns() const { - return (int)_columns.size(); + return _columns.size(); } //////////////////////////////////////////////////////////////////// @@ -162,8 +162,8 @@ get_num_columns() const { // Description: Returns the ith column of the array. //////////////////////////////////////////////////////////////////// INLINE const GeomVertexColumn *GeomVertexArrayFormat:: -get_column(int i) const { - nassertr(i >= 0 && i < (int)_columns.size(), NULL); +get_column(size_t i) const { + nassertr(i < _columns.size(), NULL); consider_sort_columns(); return _columns[i]; } diff --git a/panda/src/gobj/geomVertexArrayFormat.h b/panda/src/gobj/geomVertexArrayFormat.h index 9e150d596b..f764b3c3c8 100644 --- a/panda/src/gobj/geomVertexArrayFormat.h +++ b/panda/src/gobj/geomVertexArrayFormat.h @@ -102,8 +102,8 @@ PUBLISHED: void pack_columns(); void align_columns_for_animation(); - INLINE int get_num_columns() const; - INLINE const GeomVertexColumn *get_column(int i) const; + INLINE size_t get_num_columns() const; + INLINE const GeomVertexColumn *get_column(size_t i) const; MAKE_SEQ(get_columns, get_num_columns, get_column); const GeomVertexColumn *get_column(const InternalName *name) const; diff --git a/panda/src/gobj/geomVertexData.cxx b/panda/src/gobj/geomVertexData.cxx index d2202e1831..80aa43dbf4 100644 --- a/panda/src/gobj/geomVertexData.cxx +++ b/panda/src/gobj/geomVertexData.cxx @@ -1675,7 +1675,7 @@ update_animated_vertices(GeomVertexData::CData *cdata, Thread *current_thread) { CPT(GeomVertexArrayFormat) blend_array_format = orig_format->get_array(blend_array_index); if (blend_array_format->get_stride() == 2 && - blend_array_format->get_column(0)->get_component_bytes() == 2) { + blend_array_format->get_column((size_t)0)->get_component_bytes() == 2) { // The blend indices are a table of ushorts. Optimize this // common case. CPT(GeomVertexArrayDataHandle) blend_array_handle = cdata->_arrays[blend_array_index].get_read_pointer()->get_handle(current_thread); diff --git a/panda/src/gobj/geomVertexFormat.I b/panda/src/gobj/geomVertexFormat.I index 0026fae224..974d83022c 100644 --- a/panda/src/gobj/geomVertexFormat.I +++ b/panda/src/gobj/geomVertexFormat.I @@ -100,7 +100,7 @@ set_animation(const GeomVertexAnimationSpec &animation) { // parallel, this will be the same as the number of data // types. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexFormat:: +INLINE size_t GeomVertexFormat:: get_num_arrays() const { return _arrays.size(); } @@ -112,8 +112,8 @@ get_num_arrays() const { // format. //////////////////////////////////////////////////////////////////// INLINE const GeomVertexArrayFormat *GeomVertexFormat:: -get_array(int array) const { - nassertr(array >= 0 && array < (int)_arrays.size(), NULL); +get_array(size_t array) const { + nassertr(array < _arrays.size(), NULL); return _arrays[array]; } @@ -137,7 +137,7 @@ has_column(const InternalName *name) const { // This may only be called after the format has been // registered. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexFormat:: +INLINE size_t GeomVertexFormat:: get_num_points() const { nassertr(_is_registered, 0); return _points.size(); @@ -154,9 +154,9 @@ get_num_points() const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_point(int n) const { +get_point(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_points.size(), NULL); + nassertr(n < _points.size(), NULL); return _points[n]; } @@ -169,7 +169,7 @@ get_point(int n) const { // This may only be called after the format has been // registered. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexFormat:: +INLINE size_t GeomVertexFormat:: get_num_vectors() const { nassertr(_is_registered, 0); return _vectors.size(); @@ -187,9 +187,9 @@ get_num_vectors() const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_vector(int n) const { +get_vector(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_vectors.size(), NULL); + nassertr(n < _vectors.size(), NULL); return _vectors[n]; } @@ -202,7 +202,7 @@ get_vector(int n) const { // This may only be called after the format has been // registered. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexFormat:: +INLINE size_t GeomVertexFormat:: get_num_texcoords() const { nassertr(_is_registered, 0); return _texcoords.size(); @@ -218,9 +218,9 @@ get_num_texcoords() const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_texcoord(int n) const { +get_texcoord(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_texcoords.size(), NULL); + nassertr(n < _texcoords.size(), NULL); return _texcoords[n]; } @@ -233,7 +233,7 @@ get_texcoord(int n) const { // This may only be called after the format has been // registered. //////////////////////////////////////////////////////////////////// -INLINE int GeomVertexFormat:: +INLINE size_t GeomVertexFormat:: get_num_morphs() const { nassertr(_is_registered, 0); @@ -252,9 +252,9 @@ get_num_morphs() const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_morph_slider(int n) const { +get_morph_slider(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_morphs.size(), NULL); + nassertr(n < _morphs.size(), NULL); return _morphs[n]._slider; } @@ -271,9 +271,9 @@ get_morph_slider(int n) const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_morph_base(int n) const { +get_morph_base(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_morphs.size(), NULL); + nassertr(n < _morphs.size(), NULL); return _morphs[n]._base; } @@ -292,9 +292,9 @@ get_morph_base(int n) const { // registered. //////////////////////////////////////////////////////////////////// INLINE const InternalName *GeomVertexFormat:: -get_morph_delta(int n) const { +get_morph_delta(size_t n) const { nassertr(_is_registered, NULL); - nassertr(n >= 0 && n < (int)_morphs.size(), NULL); + nassertr(n < _morphs.size(), NULL); return _morphs[n]._delta; } diff --git a/panda/src/gobj/geomVertexFormat.cxx b/panda/src/gobj/geomVertexFormat.cxx index ec5a29436e..35401efc1f 100644 --- a/panda/src/gobj/geomVertexFormat.cxx +++ b/panda/src/gobj/geomVertexFormat.cxx @@ -205,8 +205,8 @@ get_union_format(const GeomVertexFormat *other) const { // Add the columns from the first format. if (ai < _arrays.size()) { GeomVertexArrayFormat *array_format = _arrays[ai]; - int num_columns = array_format->get_num_columns(); - for (int i = 0; i < num_columns; ++i) { + size_t num_columns = array_format->get_num_columns(); + for (size_t i = 0; i < num_columns; ++i) { const GeomVertexColumn *column_a = array_format->get_column(i); bool inserted = column_names.insert(column_a->get_name()).second; if (inserted) { @@ -232,8 +232,8 @@ get_union_format(const GeomVertexFormat *other) const { // Add the columns from the second format. if (ai < other->_arrays.size()) { GeomVertexArrayFormat *array_format = other->_arrays[ai]; - int num_columns = array_format->get_num_columns(); - for (int i = 0; i < num_columns; ++i) { + size_t num_columns = array_format->get_num_columns(); + for (size_t i = 0; i < num_columns; ++i) { const GeomVertexColumn *column_a = array_format->get_column(i); bool inserted = column_names.insert(column_a->get_name()).second; if (inserted) { @@ -276,9 +276,9 @@ get_union_format(const GeomVertexFormat *other) const { // registered. //////////////////////////////////////////////////////////////////// GeomVertexArrayFormat *GeomVertexFormat:: -modify_array(int array) { +modify_array(size_t array) { nassertr(!is_registered(), NULL); - nassertr(array >= 0 && array < (int)_arrays.size(), NULL); + nassertr(array < _arrays.size(), NULL); if (_arrays[array]->is_registered() || _arrays[array]->get_ref_count() > 1) { @@ -297,9 +297,9 @@ modify_array(int array) { // registered. //////////////////////////////////////////////////////////////////// void GeomVertexFormat:: -set_array(int array, const GeomVertexArrayFormat *format) { +set_array(size_t array, const GeomVertexArrayFormat *format) { nassertv(!is_registered()); - nassertv(array >= 0 && array < (int)_arrays.size()); + nassertv(array < _arrays.size()); _arrays[array] = (GeomVertexArrayFormat *)format; } @@ -312,10 +312,10 @@ set_array(int array, const GeomVertexArrayFormat *format) { // registered. //////////////////////////////////////////////////////////////////// void GeomVertexFormat:: -remove_array(int array) { +remove_array(size_t array) { nassertv(!is_registered()); - nassertv(array >= 0 && array < (int)_arrays.size()); + nassertv(array < _arrays.size()); _arrays.erase(_arrays.begin() + array); } @@ -330,11 +330,11 @@ remove_array(int array) { // This may not be called once the format has been // registered. //////////////////////////////////////////////////////////////////// -int GeomVertexFormat:: +size_t GeomVertexFormat:: add_array(const GeomVertexArrayFormat *array_format) { - nassertr(!is_registered(), -1); + nassertr(!is_registered(), 0); - int new_array = (int)_arrays.size(); + size_t new_array = _arrays.size(); _arrays.push_back((GeomVertexArrayFormat *)array_format); return new_array; } @@ -351,9 +351,9 @@ add_array(const GeomVertexArrayFormat *array_format) { // registered. //////////////////////////////////////////////////////////////////// void GeomVertexFormat:: -insert_array(int array, const GeomVertexArrayFormat *array_format) { +insert_array(size_t array, const GeomVertexArrayFormat *array_format) { nassertv(!is_registered()); - nassertv(array >= 0 && array <= (int)_arrays.size()); + nassertv(array <= _arrays.size()); _arrays.insert(_arrays.begin() + array, (GeomVertexArrayFormat *)array_format); } @@ -403,9 +403,9 @@ remove_empty_arrays() { // Description: Returns the total number of different columns in // the specification, across all arrays. //////////////////////////////////////////////////////////////////// -int GeomVertexFormat:: +size_t GeomVertexFormat:: get_num_columns() const { - int num_columns = 0; + size_t num_columns = 0; Arrays::const_iterator ai; for (ai = _arrays.begin(); ai != _arrays.end(); ++ai) { num_columns += (*ai)->get_num_columns(); @@ -420,7 +420,7 @@ get_num_columns() const { // across all arrays. //////////////////////////////////////////////////////////////////// const GeomVertexColumn *GeomVertexFormat:: -get_column(int i) const { +get_column(size_t i) const { Arrays::const_iterator ai; for (ai = _arrays.begin(); ai != _arrays.end(); ++ai) { if (i < (*ai)->get_num_columns()) { @@ -445,7 +445,7 @@ get_column(int i) const { // array data. //////////////////////////////////////////////////////////////////// int GeomVertexFormat:: -get_array_with(int i) const { +get_array_with(size_t i) const { int array_index = 0; for (array_index = 0; array_index < (int)_arrays.size(); array_index++) { if (i < _arrays[array_index]->get_num_columns()) { diff --git a/panda/src/gobj/geomVertexFormat.h b/panda/src/gobj/geomVertexFormat.h index ba2faf2c36..d3401911d1 100644 --- a/panda/src/gobj/geomVertexFormat.h +++ b/panda/src/gobj/geomVertexFormat.h @@ -78,20 +78,20 @@ PUBLISHED: CPT(GeomVertexFormat) get_post_animated_format() const; CPT(GeomVertexFormat) get_union_format(const GeomVertexFormat *other) const; - INLINE int get_num_arrays() const; - INLINE const GeomVertexArrayFormat *get_array(int array) const; + INLINE size_t get_num_arrays() const; + INLINE const GeomVertexArrayFormat *get_array(size_t array) const; MAKE_SEQ(get_arrays, get_num_arrays, get_array); - GeomVertexArrayFormat *modify_array(int array); - void set_array(int array, const GeomVertexArrayFormat *format); - void remove_array(int array); - int add_array(const GeomVertexArrayFormat *array_format); - void insert_array(int array, const GeomVertexArrayFormat *array_format); + GeomVertexArrayFormat *modify_array(size_t array); + void set_array(size_t array, const GeomVertexArrayFormat *format); + void remove_array(size_t array); + size_t add_array(const GeomVertexArrayFormat *array_format); + void insert_array(size_t array, const GeomVertexArrayFormat *array_format); void clear_arrays(); void remove_empty_arrays(); - int get_num_columns() const; - int get_array_with(int i) const; - const GeomVertexColumn *get_column(int i) const; + size_t get_num_columns() const; + int get_array_with(size_t i) const; + const GeomVertexColumn *get_column(size_t i) const; int get_array_with(const InternalName *name) const; const GeomVertexColumn *get_column(const InternalName *name) const; @@ -104,22 +104,22 @@ PUBLISHED: void align_columns_for_animation(); void maybe_align_columns_for_animation(); - INLINE int get_num_points() const; - INLINE const InternalName *get_point(int n) const; + INLINE size_t get_num_points() const; + INLINE const InternalName *get_point(size_t n) const; MAKE_SEQ(get_points, get_num_points, get_point); - INLINE int get_num_vectors() const; - INLINE const InternalName *get_vector(int n) const; + INLINE size_t get_num_vectors() const; + INLINE const InternalName *get_vector(size_t n) const; MAKE_SEQ(get_vectors, get_num_vectors, get_vector); - INLINE int get_num_texcoords() const; - INLINE const InternalName *get_texcoord(int n) const; + INLINE size_t get_num_texcoords() const; + INLINE const InternalName *get_texcoord(size_t n) const; MAKE_SEQ(get_texcoords, get_num_texcoords, get_texcoord); - INLINE int get_num_morphs() const; - INLINE const InternalName *get_morph_slider(int n) const; - INLINE const InternalName *get_morph_base(int n) const; - INLINE const InternalName *get_morph_delta(int n) const; + INLINE size_t get_num_morphs() const; + INLINE const InternalName *get_morph_slider(size_t n) const; + INLINE const InternalName *get_morph_base(size_t n) const; + INLINE const InternalName *get_morph_delta(size_t n) const; MAKE_SEQ(get_morph_sliders, get_num_morphs, get_morph_slider); MAKE_SEQ(get_morph_bases, get_num_morphs, get_morph_base); MAKE_SEQ(get_morph_deltas, get_num_morphs, get_morph_delta); diff --git a/panda/src/gobj/lens.I b/panda/src/gobj/lens.I index efb1600bea..94fd617572 100644 --- a/panda/src/gobj/lens.I +++ b/panda/src/gobj/lens.I @@ -802,7 +802,7 @@ get_last_change() const { //////////////////////////////////////////////////////////////////// INLINE void Lens:: do_adjust_user_flags(CData *cdata, int clear_flags, int set_flags) { - cdata->_user_flags = (cdata->_user_flags & ~clear_flags) | set_flags; + cdata->_user_flags = (cdata->_user_flags & ~clear_flags) | (short)set_flags; } //////////////////////////////////////////////////////////////////// @@ -813,7 +813,7 @@ do_adjust_user_flags(CData *cdata, int clear_flags, int set_flags) { //////////////////////////////////////////////////////////////////// INLINE void Lens:: do_adjust_comp_flags(CData *cdata, int clear_flags, int set_flags) { - cdata->_comp_flags = (cdata->_comp_flags & ~clear_flags) | set_flags; + cdata->_comp_flags = (cdata->_comp_flags & ~clear_flags) | (short)set_flags; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/sliderTable.I b/panda/src/gobj/sliderTable.I index 7b5ed6dcb3..1d76df7b85 100644 --- a/panda/src/gobj/sliderTable.I +++ b/panda/src/gobj/sliderTable.I @@ -62,7 +62,7 @@ register_table(const SliderTable *table) { // Access: Published // Description: Returns the number of sliders in the table. //////////////////////////////////////////////////////////////////// -INLINE int SliderTable:: +INLINE size_t SliderTable:: get_num_sliders() const { return _sliders.size(); } @@ -73,8 +73,8 @@ get_num_sliders() const { // Description: Returns the nth slider in the table. //////////////////////////////////////////////////////////////////// INLINE const VertexSlider *SliderTable:: -get_slider(int n) const { - nassertr(n >= 0 && n < (int)_sliders.size(), NULL); +get_slider(size_t n) const { + nassertr(n < _sliders.size(), NULL); return _sliders[n]._slider; } @@ -85,8 +85,8 @@ get_slider(int n) const { // nth slider in the table. //////////////////////////////////////////////////////////////////// INLINE const SparseArray &SliderTable:: -get_slider_rows(int n) const { - nassertr(n >= 0 && n < (int)_sliders.size(), _empty_array); +get_slider_rows(size_t n) const { + nassertr(n < _sliders.size(), _empty_array); return _sliders[n]._rows; } diff --git a/panda/src/gobj/sliderTable.cxx b/panda/src/gobj/sliderTable.cxx index 9a6d569e5f..25ebeb6479 100644 --- a/panda/src/gobj/sliderTable.cxx +++ b/panda/src/gobj/sliderTable.cxx @@ -75,9 +75,9 @@ SliderTable:: // unregistered tables. //////////////////////////////////////////////////////////////////// void SliderTable:: -set_slider(int n, const VertexSlider *slider) { +set_slider(size_t n, const VertexSlider *slider) { nassertv(!_is_registered); - nassertv(n >= 0 && n < (int)_sliders.size()); + nassertv(n < _sliders.size()); if (_sliders[n]._slider->get_name() != slider->get_name()) { _sliders_by_name[_sliders[n]._slider->get_name()].clear_bit(n); @@ -94,12 +94,12 @@ set_slider(int n, const VertexSlider *slider) { // valid for unregistered tables. //////////////////////////////////////////////////////////////////// void SliderTable:: -set_slider_rows(int n, const SparseArray &rows) { +set_slider_rows(size_t n, const SparseArray &rows) { // We don't actually enforce the registration requirement, since // gee, it doesn't actually matter here; and the GeomVertexData // needs to be able to change the SparseArrays in the bam reader. // nassertv(!_is_registered); - nassertv(n >= 0 && n < (int)_sliders.size()); + nassertv(n < _sliders.size()); _sliders[n]._rows = rows; } @@ -111,9 +111,9 @@ set_slider_rows(int n, const SparseArray &rows) { // unregistered tables. //////////////////////////////////////////////////////////////////// void SliderTable:: -remove_slider(int n) { +remove_slider(size_t n) { nassertv(!_is_registered); - nassertv(n >= 0 && n < (int)_sliders.size()); + nassertv(n < _sliders.size()); _sliders_by_name[_sliders[n]._slider->get_name()].clear_bit(n); _sliders.erase(_sliders.begin() + n); @@ -126,11 +126,11 @@ remove_slider(int n) { // index number of the new slider. Only valid for // unregistered tables. //////////////////////////////////////////////////////////////////// -int SliderTable:: +size_t SliderTable:: add_slider(const VertexSlider *slider, const SparseArray &rows) { - nassertr(!_is_registered, -1); + nassertr(!_is_registered, 0); - int new_index = (int)_sliders.size(); + size_t new_index = _sliders.size(); SliderDef slider_def; slider_def._slider = slider; diff --git a/panda/src/gobj/sliderTable.h b/panda/src/gobj/sliderTable.h index 7df0e28ed2..cdb8548b80 100644 --- a/panda/src/gobj/sliderTable.h +++ b/panda/src/gobj/sliderTable.h @@ -49,20 +49,20 @@ PUBLISHED: INLINE bool is_registered() const; INLINE static CPT(SliderTable) register_table(const SliderTable *table); - INLINE int get_num_sliders() const; - INLINE const VertexSlider *get_slider(int n) const; + INLINE size_t get_num_sliders() const; + INLINE const VertexSlider *get_slider(size_t n) const; MAKE_SEQ(get_sliders, get_num_sliders, get_slider); - INLINE const SparseArray &get_slider_rows(int n) const; + INLINE const SparseArray &get_slider_rows(size_t n) const; INLINE const SparseArray &find_sliders(const InternalName *name) const; INLINE bool has_slider(const InternalName *name) const; INLINE bool is_empty() const; INLINE UpdateSeq get_modified(Thread *current_thread) const; - void set_slider(int n, const VertexSlider *slider); - void set_slider_rows(int n, const SparseArray &rows); - void remove_slider(int n); - int add_slider(const VertexSlider *slider, const SparseArray &rows); + void set_slider(size_t n, const VertexSlider *slider); + void set_slider_rows(size_t n, const SparseArray &rows); + void remove_slider(size_t n); + size_t add_slider(const VertexSlider *slider, const SparseArray &rows); void write(ostream &out) const; diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 24a21e06b4..83ebd1fe88 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -344,7 +344,7 @@ INLINE string Texture:: get_clear_data() const { CDReader cdata(_cycler); unsigned char data[16]; - int size = do_get_clear_data(cdata, data); + size_t size = do_get_clear_data(cdata, data); return string((char *)data, size); } diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 5ae858a926..5f54059fbb 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -4432,7 +4432,7 @@ do_set_ram_mipmap_image(CData *cdata, int n, CPTA_uchar image, size_t page_size) // be initialized with this string repeated for // every pixel. //////////////////////////////////////////////////////////////////// -int Texture:: +size_t Texture:: do_get_clear_data(const CData *cdata, unsigned char *into) const { nassertr(cdata->_has_clear_color, 0); nassertr(cdata->_num_components <= 4, 0); diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index adfc8258bd..fff5770693 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -597,7 +597,7 @@ protected: PTA_uchar do_modify_ram_mipmap_image(CData *cdata, int n); PTA_uchar do_make_ram_mipmap_image(CData *cdata, int n); void do_set_ram_mipmap_image(CData *cdata, int n, CPTA_uchar image, size_t page_size); - int do_get_clear_data(const CData *cdata, unsigned char *into) const; + size_t do_get_clear_data(const CData *cdata, unsigned char *into) const; bool consider_auto_process_ram_image(bool generate_mipmaps, bool allow_compression); bool do_consider_auto_process_ram_image(CData *cdata, bool generate_mipmaps, diff --git a/panda/src/gobj/transformBlend.I b/panda/src/gobj/transformBlend.I index a10ec14689..37e501ab35 100644 --- a/panda/src/gobj/transformBlend.I +++ b/panda/src/gobj/transformBlend.I @@ -145,7 +145,7 @@ operator != (const TransformBlend &other) const { // Description: Returns the number of transforms stored in the blend // object. //////////////////////////////////////////////////////////////////// -INLINE int TransformBlend:: +INLINE size_t TransformBlend:: get_num_transforms() const { return _entries.size(); } @@ -157,8 +157,8 @@ get_num_transforms() const { // object. //////////////////////////////////////////////////////////////////// INLINE const VertexTransform *TransformBlend:: -get_transform(int n) const { - nassertr(n >= 0 && n < (int)_entries.size(), NULL); +get_transform(size_t n) const { + nassertr(n < _entries.size(), NULL); return _entries[n]._transform; } @@ -169,8 +169,8 @@ get_transform(int n) const { // stored in the blend object. //////////////////////////////////////////////////////////////////// INLINE PN_stdfloat TransformBlend:: -get_weight(int n) const { - nassertr(n >= 0 && n < (int)_entries.size(), 0.0f); +get_weight(size_t n) const { + nassertr(n < _entries.size(), 0.0f); return _entries[n]._weight; } @@ -181,8 +181,8 @@ get_weight(int n) const { // object. //////////////////////////////////////////////////////////////////// INLINE void TransformBlend:: -set_transform(int n, const VertexTransform *transform) { - nassertv(n >= 0 && n < (int)_entries.size()); +set_transform(size_t n, const VertexTransform *transform) { + nassertv(n < _entries.size()); _entries[n]._transform = transform; } @@ -193,8 +193,8 @@ set_transform(int n, const VertexTransform *transform) { // stored in the blend object. //////////////////////////////////////////////////////////////////// INLINE void TransformBlend:: -set_weight(int n, PN_stdfloat weight) { - nassertv(n >= 0 && n < (int)_entries.size()); +set_weight(size_t n, PN_stdfloat weight) { + nassertv(n < _entries.size()); _entries[n]._weight = weight; } diff --git a/panda/src/gobj/transformBlend.h b/panda/src/gobj/transformBlend.h index eb0a6c4c49..d85908bfd4 100644 --- a/panda/src/gobj/transformBlend.h +++ b/panda/src/gobj/transformBlend.h @@ -62,12 +62,12 @@ PUBLISHED: bool has_transform(const VertexTransform *transform) const; PN_stdfloat get_weight(const VertexTransform *transform) const; - INLINE int get_num_transforms() const; - INLINE const VertexTransform *get_transform(int n) const; + INLINE size_t get_num_transforms() const; + INLINE const VertexTransform *get_transform(size_t n) const; MAKE_SEQ(get_transforms, get_num_transforms, get_transform); - INLINE PN_stdfloat get_weight(int n) const; - INLINE void set_transform(int n, const VertexTransform *transform); - INLINE void set_weight(int n, PN_stdfloat weight); + INLINE PN_stdfloat get_weight(size_t n) const; + INLINE void set_transform(size_t n, const VertexTransform *transform); + INLINE void set_weight(size_t n, PN_stdfloat weight); INLINE void update_blend(Thread *current_thread) const; diff --git a/panda/src/gobj/transformBlendTable.I b/panda/src/gobj/transformBlendTable.I index f60c8ab996..1c2eecb65c 100644 --- a/panda/src/gobj/transformBlendTable.I +++ b/panda/src/gobj/transformBlendTable.I @@ -19,7 +19,7 @@ // Description: Returns the total number of different blend // combinations in the table. //////////////////////////////////////////////////////////////////// -INLINE int TransformBlendTable:: +INLINE size_t TransformBlendTable:: get_num_blends() const { return _blends.size(); } @@ -30,8 +30,8 @@ get_num_blends() const { // Description: Returns the nth blend in the table. //////////////////////////////////////////////////////////////////// INLINE const TransformBlend &TransformBlendTable:: -get_blend(int n) const { - nassertr(n >= 0 && n < (int)_blends.size(), _blends[0]); +get_blend(size_t n) const { + nassertr(n < _blends.size(), _blends[0]); return _blends[n]; } diff --git a/panda/src/gobj/transformBlendTable.cxx b/panda/src/gobj/transformBlendTable.cxx index cb8e01986c..1efffb1fec 100644 --- a/panda/src/gobj/transformBlendTable.cxx +++ b/panda/src/gobj/transformBlendTable.cxx @@ -78,8 +78,8 @@ TransformBlendTable:: // indicated value. //////////////////////////////////////////////////////////////////// void TransformBlendTable:: -set_blend(int n, const TransformBlend &blend) { - nassertv(n >= 0 && n < (int)_blends.size()); +set_blend(size_t n, const TransformBlend &blend) { + nassertv(n < _blends.size()); _blends[n] = blend; } @@ -89,8 +89,8 @@ set_blend(int n, const TransformBlend &blend) { // Description: Removes the blend at the nth position. //////////////////////////////////////////////////////////////////// void TransformBlendTable:: -remove_blend(int n) { - nassertv(n >= 0 && n < (int)_blends.size()); +remove_blend(size_t n) { + nassertv(n < _blends.size()); _blends.erase(_blends.begin() + n); } @@ -101,7 +101,7 @@ remove_blend(int n) { // index number. If there is already an identical blend // in the table, simply returns that number instead. //////////////////////////////////////////////////////////////////// -int TransformBlendTable:: +size_t TransformBlendTable:: add_blend(const TransformBlend &blend) { consider_rebuild_index(); @@ -113,7 +113,7 @@ add_blend(const TransformBlend &blend) { } bool needs_realloc = (_blends.size() >= _blends.capacity()); - int new_position = (int)_blends.size(); + size_t new_position = _blends.size(); _blends.push_back(blend); if (needs_realloc) { @@ -127,7 +127,7 @@ add_blend(const TransformBlend &blend) { const TransformBlend &added_blend = _blends[new_position]; _blend_index[&added_blend] = new_position; _max_simultaneous_transforms = max(_max_simultaneous_transforms, - blend.get_num_transforms()); + (int)blend.get_num_transforms()); // We can't compute this one as we go, so set it to a special // value to indicate it needs to be recomputed. @@ -144,7 +144,7 @@ add_blend(const TransformBlend &blend) { //////////////////////////////////////////////////////////////////// void TransformBlendTable:: write(ostream &out, int indent_level) const { - for (int i = 0; i < (int)_blends.size(); i++) { + for (size_t i = 0; i < _blends.size(); ++i) { indent(out, indent_level) << i << ". " << _blends[i] << "\n"; } @@ -179,14 +179,14 @@ rebuild_index() { pset transforms; - for (int i = 0; i < (int)_blends.size(); ++i) { + for (size_t i = 0; i < _blends.size(); ++i) { const TransformBlend &blend = _blends[i]; _blend_index[&blend] = i; - for (int ti = 0; ti < blend.get_num_transforms(); ++ti) { + for (size_t ti = 0; ti < blend.get_num_transforms(); ++ti) { transforms.insert(blend.get_transform(ti)); } - _max_simultaneous_transforms = max(_max_simultaneous_transforms, + _max_simultaneous_transforms = max((size_t)_max_simultaneous_transforms, blend.get_num_transforms()); } diff --git a/panda/src/gobj/transformBlendTable.h b/panda/src/gobj/transformBlendTable.h index d169ea19f5..aa7ef3387d 100644 --- a/panda/src/gobj/transformBlendTable.h +++ b/panda/src/gobj/transformBlendTable.h @@ -57,14 +57,14 @@ PUBLISHED: void operator = (const TransformBlendTable ©); virtual ~TransformBlendTable(); - INLINE int get_num_blends() const; - INLINE const TransformBlend &get_blend(int n) const; + INLINE size_t get_num_blends() const; + INLINE const TransformBlend &get_blend(size_t n) const; MAKE_SEQ(get_blends, get_num_blends, get_blend); INLINE UpdateSeq get_modified(Thread *current_thread) const; - void set_blend(int n, const TransformBlend &blend); - void remove_blend(int n); - int add_blend(const TransformBlend &blend); + void set_blend(size_t n, const TransformBlend &blend); + void remove_blend(size_t n); + size_t add_blend(const TransformBlend &blend); INLINE int get_num_transforms() const; INLINE int get_max_simultaneous_transforms() const; diff --git a/panda/src/gobj/transformTable.I b/panda/src/gobj/transformTable.I index 8f7c2a4ffa..25423a7465 100644 --- a/panda/src/gobj/transformTable.I +++ b/panda/src/gobj/transformTable.I @@ -62,7 +62,7 @@ register_table(const TransformTable *table) { // Access: Published // Description: Returns the number of transforms in the table. //////////////////////////////////////////////////////////////////// -INLINE int TransformTable:: +INLINE size_t TransformTable:: get_num_transforms() const { return _transforms.size(); } @@ -73,8 +73,8 @@ get_num_transforms() const { // Description: Returns the nth transform in the table. //////////////////////////////////////////////////////////////////// INLINE const VertexTransform *TransformTable:: -get_transform(int n) const { - nassertr(n >= 0 && n < (int)_transforms.size(), NULL); +get_transform(size_t n) const { + nassertr(n < _transforms.size(), NULL); return _transforms[n]; } diff --git a/panda/src/gobj/transformTable.cxx b/panda/src/gobj/transformTable.cxx index ccbd44a00f..466f30f226 100644 --- a/panda/src/gobj/transformTable.cxx +++ b/panda/src/gobj/transformTable.cxx @@ -71,9 +71,9 @@ TransformTable:: // unregistered tables. //////////////////////////////////////////////////////////////////// void TransformTable:: -set_transform(int n, const VertexTransform *transform) { +set_transform(size_t n, const VertexTransform *transform) { nassertv(!_is_registered); - nassertv(n >= 0 && n < (int)_transforms.size()); + nassertv(n < _transforms.size()); _transforms[n] = transform; } @@ -84,9 +84,9 @@ set_transform(int n, const VertexTransform *transform) { // unregistered tables. //////////////////////////////////////////////////////////////////// void TransformTable:: -remove_transform(int n) { +remove_transform(size_t n) { nassertv(!_is_registered); - nassertv(n >= 0 && n < (int)_transforms.size()); + nassertv(n < _transforms.size()); _transforms.erase(_transforms.begin() + n); } @@ -101,10 +101,10 @@ remove_transform(int n) { // the transform is already present in the table, it // will be added twice. //////////////////////////////////////////////////////////////////// -int TransformTable:: +size_t TransformTable:: add_transform(const VertexTransform *transform) { nassertr(!_is_registered, -1); - int new_index = (int)_transforms.size(); + size_t new_index = _transforms.size(); _transforms.push_back(transform); return new_index; } diff --git a/panda/src/gobj/transformTable.h b/panda/src/gobj/transformTable.h index 2563594a08..0db7146af0 100644 --- a/panda/src/gobj/transformTable.h +++ b/panda/src/gobj/transformTable.h @@ -49,14 +49,14 @@ PUBLISHED: INLINE bool is_registered() const; INLINE static CPT(TransformTable) register_table(const TransformTable *table); - INLINE int get_num_transforms() const; - INLINE const VertexTransform *get_transform(int n) const; + INLINE size_t get_num_transforms() const; + INLINE const VertexTransform *get_transform(size_t n) const; MAKE_SEQ(get_transforms, get_num_transforms, get_transform); INLINE UpdateSeq get_modified(Thread *current_thread) const; - void set_transform(int n, const VertexTransform *transform); - void remove_transform(int n); - int add_transform(const VertexTransform *transform); + void set_transform(size_t n, const VertexTransform *transform); + void remove_transform(size_t n); + size_t add_transform(const VertexTransform *transform); void write(ostream &out) const; diff --git a/panda/src/gobj/vertexDataBook.I b/panda/src/gobj/vertexDataBook.I index 30e6f01ef4..0099c7c86e 100644 --- a/panda/src/gobj/vertexDataBook.I +++ b/panda/src/gobj/vertexDataBook.I @@ -30,7 +30,7 @@ alloc(size_t size) { // Access: Published // Description: Returns the number of pages created for the book. //////////////////////////////////////////////////////////////////// -INLINE int VertexDataBook:: +INLINE size_t VertexDataBook:: get_num_pages() const { return _pages.size(); } diff --git a/panda/src/gobj/vertexDataBook.h b/panda/src/gobj/vertexDataBook.h index 4f5754138b..953e0be0e9 100644 --- a/panda/src/gobj/vertexDataBook.h +++ b/panda/src/gobj/vertexDataBook.h @@ -36,7 +36,7 @@ PUBLISHED: INLINE VertexDataBlock *alloc(size_t size); - INLINE int get_num_pages() const; + INLINE size_t get_num_pages() const; size_t count_total_page_size() const; size_t count_total_page_size(VertexDataPage::RamClass ram_class) const; diff --git a/panda/src/linmath/lcast_to_src.I b/panda/src/linmath/lcast_to_src.I index dc154c9d75..e4c7b586d3 100644 --- a/panda/src/linmath/lcast_to_src.I +++ b/panda/src/linmath/lcast_to_src.I @@ -119,7 +119,7 @@ lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint4) &source) { INLINE_LINMATH FLOATNAME2(LQuaternion) lcast_to(FLOATTYPE2 *, const FLOATNAME(LQuaternion) &c) { - return FLOATNAME2(LQuaternion)(c.get_r(), c.get_i(), c.get_j(), c.get_k()); + return FLOATNAME2(LQuaternion)((FLOATTYPE2)c.get_r(), (FLOATTYPE2)c.get_i(), (FLOATTYPE2)c.get_j(), (FLOATTYPE2)c.get_k()); } INLINE_LINMATH FLOATNAME2(LMatrix3) @@ -141,45 +141,45 @@ lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix4) &source) { INLINE_LINMATH FLOATNAME2(LVecBase2) lcast_to(FLOATTYPE2 *, const LVecBase2i &source) { - return FLOATNAME2(LVecBase2)(source[0], source[1]); + return FLOATNAME2(LVecBase2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LVecBase3) lcast_to(FLOATTYPE2 *, const LVecBase3i &source) { - return FLOATNAME2(LVecBase3)(source[0], source[1], source[2]); + return FLOATNAME2(LVecBase3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LVecBase4) lcast_to(FLOATTYPE2 *, const LVecBase4i &source) { - return FLOATNAME2(LVecBase4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LVecBase4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } INLINE_LINMATH FLOATNAME2(LVector2) lcast_to(FLOATTYPE2 *, const LVector2i &source) { - return FLOATNAME2(LVector2)(source[0], source[1]); + return FLOATNAME2(LVector2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LVector3) lcast_to(FLOATTYPE2 *, const LVector3i &source) { - return FLOATNAME2(LVector3)(source[0], source[1], source[2]); + return FLOATNAME2(LVector3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LVector4) lcast_to(FLOATTYPE2 *, const LVector4i &source) { - return FLOATNAME2(LVector4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LVector4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } INLINE_LINMATH FLOATNAME2(LPoint2) lcast_to(FLOATTYPE2 *, const LPoint2i &source) { - return FLOATNAME2(LPoint2)(source[0], source[1]); + return FLOATNAME2(LPoint2)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1]); } INLINE_LINMATH FLOATNAME2(LPoint3) lcast_to(FLOATTYPE2 *, const LPoint3i &source) { - return FLOATNAME2(LPoint3)(source[0], source[1], source[2]); + return FLOATNAME2(LPoint3)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2]); } INLINE_LINMATH FLOATNAME2(LPoint4) lcast_to(FLOATTYPE2 *, const LPoint4i &source) { - return FLOATNAME2(LPoint4)(source[0], source[1], source[2], source[3]); + return FLOATNAME2(LPoint4)((FLOATTYPE2)source[0], (FLOATTYPE2)source[1], (FLOATTYPE2)source[2], (FLOATTYPE2)source[3]); } diff --git a/panda/src/linmath/lorientation_src.I b/panda/src/linmath/lorientation_src.I index 215575fe72..0c108a0e52 100644 --- a/panda/src/linmath/lorientation_src.I +++ b/panda/src/linmath/lorientation_src.I @@ -47,12 +47,12 @@ FLOATNAME(LOrientation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k) : // Description: vector + twist //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LOrientation):: -FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, float twist) { - float radians = deg_2_rad(twist); - float theta_over_2 = radians * FLOATCONST(0.5); - float sin_to2 = sinf(theta_over_2); +FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, FLOATTYPE twist) { + FLOATTYPE radians = deg_2_rad(twist); + FLOATTYPE theta_over_2 = radians * FLOATCONST(0.5); + FLOATTYPE sin_to2 = csin(theta_over_2); - set_r(cosf(theta_over_2)); + set_r(ccos(theta_over_2)); set_i(point_at[0] * sin_to2); set_j(point_at[1] * sin_to2); set_k(point_at[2] * sin_to2); diff --git a/panda/src/linmath/lorientation_src.h b/panda/src/linmath/lorientation_src.h index 7c4e33d0a7..9c92abbb1a 100644 --- a/panda/src/linmath/lorientation_src.h +++ b/panda/src/linmath/lorientation_src.h @@ -23,7 +23,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LOrientation)(); INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion) &c); INLINE_LINMATH FLOATNAME(LOrientation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k); - INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, float twist); + INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, FLOATTYPE twist); INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &m); INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &m); diff --git a/panda/src/linmath/lquaternion_src.I b/panda/src/linmath/lquaternion_src.I index 05ed166248..79ebf049f6 100644 --- a/panda/src/linmath/lquaternion_src.I +++ b/panda/src/linmath/lquaternion_src.I @@ -339,7 +339,7 @@ get_axis_normalized() const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LQuaternion):: get_angle_rad() const { - return acos(_v(0)) * 2.0; + return acos(_v(0)) * FLOATCONST(2.0); } //////////////////////////////////////////////////////////////////// @@ -368,8 +368,8 @@ get_angle() const { INLINE_LINMATH void FLOATNAME(LQuaternion):: set_from_axis_angle_rad(FLOATTYPE angle_rad, const FLOATNAME(LVector3) &axis) { nassertv(IS_THRESHOLD_EQUAL(axis.length(), 1.0f, 0.001f)); - FLOATTYPE sinHalfAngle = sin(angle_rad * 0.5); - _v(0) = cos(angle_rad * 0.5); + FLOATTYPE sinHalfAngle = sin(angle_rad * FLOATCONST(0.5)); + _v(0) = cos(angle_rad * FLOATCONST(0.5)); _v(1) = axis[0] * sinHalfAngle; _v(2) = axis[1] * sinHalfAngle; _v(3) = axis[2] * sinHalfAngle; diff --git a/panda/src/linmath/lvecBase2_ext_src.I b/panda/src/linmath/lvecBase2_ext_src.I index 00b8fdf616..ba5daf54bf 100644 --- a/panda/src/linmath/lvecBase2_ext_src.I +++ b/panda/src/linmath/lvecBase2_ext_src.I @@ -25,7 +25,7 @@ #else #define PYNUMBER_FLOATTYPE PyNumber_Float #define PY_FROM_FLOATTYPE PyFloat_FromDouble -#define PY_AS_FLOATTYPE PyFloat_AsDouble +#define PY_AS_FLOATTYPE (FLOATTYPE)PyFloat_AsDouble #endif //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/lvecBase3_ext_src.I b/panda/src/linmath/lvecBase3_ext_src.I index 56ac6cc176..d343b99303 100644 --- a/panda/src/linmath/lvecBase3_ext_src.I +++ b/panda/src/linmath/lvecBase3_ext_src.I @@ -25,7 +25,7 @@ #else #define PYNUMBER_FLOATTYPE PyNumber_Float #define PY_FROM_FLOATTYPE PyFloat_FromDouble -#define PY_AS_FLOATTYPE PyFloat_AsDouble +#define PY_AS_FLOATTYPE (FLOATTYPE)PyFloat_AsDouble #endif //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/lvecBase3_src.I b/panda/src/linmath/lvecBase3_src.I index 41a0d9ccce..35df48b008 100644 --- a/panda/src/linmath/lvecBase3_src.I +++ b/panda/src/linmath/lvecBase3_src.I @@ -581,6 +581,7 @@ operator != (const FLOATNAME(LVecBase3) &other) const { return !operator == (other); } +#ifndef FLOATTYPE_IS_INT //////////////////////////////////////////////////////////////////// // Function: get_standardized_rotation // Access: file @@ -628,6 +629,7 @@ get_standardized_hpr() const { get_standardized_rotation(_v(1)), get_standardized_rotation(_v(2))); } +#endif // !FLOATTYPE_IS_INT //////////////////////////////////////////////////////////////////// // Function: LVecBase3::compare_to diff --git a/panda/src/linmath/lvecBase3_src.h b/panda/src/linmath/lvecBase3_src.h index 1a4ec5ce97..f2820acd50 100644 --- a/panda/src/linmath/lvecBase3_src.h +++ b/panda/src/linmath/lvecBase3_src.h @@ -112,7 +112,9 @@ PUBLISHED: INLINE_LINMATH bool operator == (const FLOATNAME(LVecBase3) &other) const; INLINE_LINMATH bool operator != (const FLOATNAME(LVecBase3) &other) const; +#ifndef FLOATTYPE_IS_INT INLINE_LINMATH FLOATNAME(LVecBase3) get_standardized_hpr() const; +#endif INLINE_LINMATH int compare_to(const FLOATNAME(LVecBase3) &other) const; INLINE_LINMATH size_t get_hash() const; diff --git a/panda/src/linmath/lvecBase4_ext_src.I b/panda/src/linmath/lvecBase4_ext_src.I index dd06bdc0dc..6b8e4b38de 100644 --- a/panda/src/linmath/lvecBase4_ext_src.I +++ b/panda/src/linmath/lvecBase4_ext_src.I @@ -25,7 +25,7 @@ #else #define PYNUMBER_FLOATTYPE PyNumber_Float #define PY_FROM_FLOATTYPE PyFloat_FromDouble -#define PY_AS_FLOATTYPE PyFloat_AsDouble +#define PY_AS_FLOATTYPE (FLOATTYPE)PyFloat_AsDouble #endif //////////////////////////////////////////////////////////////////// diff --git a/panda/src/nativenet/socket_address.I b/panda/src/nativenet/socket_address.I index fa03c131aa..40d10b9150 100644 --- a/panda/src/nativenet/socket_address.I +++ b/panda/src/nativenet/socket_address.I @@ -98,7 +98,7 @@ operator != (const Socket_Address &in) const { // Description: Set to the broadcast address and a specified port //////////////////////////////////////////////////////////////////// INLINE bool Socket_Address:: -set_broadcast(int port) { +set_broadcast(unsigned short port) { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = 0xffffffff; _addr.sin_port = htons(port); @@ -111,7 +111,7 @@ set_broadcast(int port) { // Description: Set to any address and a specified port //////////////////////////////////////////////////////////////////// INLINE bool Socket_Address:: -set_any_IP(int port) { +set_any_IP(unsigned short port) { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = INADDR_ANY; _addr.sin_port = htons(port); @@ -124,7 +124,7 @@ set_any_IP(int port) { // Description: Set to a specified port //////////////////////////////////////////////////////////////////// INLINE bool Socket_Address:: -set_port(int port) { +set_port(unsigned short port) { _addr.sin_port = htons(port); return true; } @@ -182,7 +182,7 @@ get_ip_port() const { // it returns false and the address may be undefined. //////////////////////////////////////////////////////////////////// INLINE bool Socket_Address:: -set_host(const std::string &hostname, int port) { +set_host(const std::string &hostname, unsigned short port) { struct hostent *hp = NULL; // @@ -195,7 +195,7 @@ set_host(const std::string &hostname, int port) { // // - PN_uint32 addr = (long)inet_addr(hostname.c_str()); + PN_uint32 addr = (PN_uint32)inet_addr(hostname.c_str()); if (addr == INADDR_NONE) { hp = gethostbyname(hostname.c_str()); if (hp == NULL) { @@ -226,7 +226,7 @@ set_host(const std::string &hostname) { std::string host = hostname.substr(0, pos); std::string port = hostname.substr(pos + 1, 100);; - int port_dig = atoi(port.c_str()); + unsigned short port_dig = (unsigned short)atoi(port.c_str()); return set_host(host, port_dig); } @@ -236,7 +236,7 @@ set_host(const std::string &hostname) { // Description: ////////////////////////////////////////////////////////////// INLINE bool Socket_Address:: -set_host(PN_uint32 in_hostname, int port) { +set_host(PN_uint32 in_hostname, unsigned short port) { memcpy(&_addr.sin_addr, &in_hostname, sizeof(in_hostname)); _addr.sin_port = htons(port); _addr.sin_family = AF_INET; diff --git a/panda/src/nativenet/socket_address.h b/panda/src/nativenet/socket_address.h index a156e634d6..d177224cb5 100644 --- a/panda/src/nativenet/socket_address.h +++ b/panda/src/nativenet/socket_address.h @@ -25,13 +25,13 @@ PUBLISHED: INLINE virtual ~Socket_Address(); - INLINE bool set_any_IP(int port); - INLINE bool set_port(int port); - INLINE bool set_broadcast(int port); + INLINE bool set_any_IP(unsigned short port); + INLINE bool set_port(unsigned short port); + INLINE bool set_broadcast(unsigned short port); - INLINE bool set_host(const std::string &hostname, int port) ; + INLINE bool set_host(const std::string &hostname, unsigned short port) ; INLINE bool set_host(const std::string &hostname) ; - INLINE bool set_host(unsigned int ip4adr, int port); + INLINE bool set_host(unsigned int ip4adr, unsigned short port); INLINE void clear(); INLINE unsigned short get_port() const; diff --git a/panda/src/nativenet/socket_portable.h b/panda/src/nativenet/socket_portable.h index 4d76be5b24..fe8b6451c1 100644 --- a/panda/src/nativenet/socket_portable.h +++ b/panda/src/nativenet/socket_portable.h @@ -279,16 +279,16 @@ inline int DO_CONNECT(const SOCKET a, const sockaddr_in *b) } inline int DO_SOCKET_READ(const SOCKET a, char * buf, const int size) { - return recv(a, buf, size, 0); + return (int)recv(a, buf, (size_t)size, 0); } inline int DO_SOCKET_WRITE(const SOCKET a, const char * buff, const int len) { - return send(a, buff, len, 0); + return (int)send(a, buff, (size_t)len, 0); } /////////////////////////////////////////////// inline int DO_SOCKET_WRITE_TO(const SOCKET a, const char * buffer, const int buf_len, const sockaddr_in * addr) { - return sendto(a, buffer, buf_len, 0, reinterpret_cast(addr), sizeof(sockaddr)); + return (int)sendto(a, buffer, (size_t)buf_len, 0, reinterpret_cast(addr), sizeof(sockaddr)); } inline SOCKET DO_NEWUDP() { @@ -316,7 +316,7 @@ inline int DO_ACCEPT(SOCKET sck, sockaddr_in * adr) inline int DO_RECV_FROM(SOCKET sck, char * data, int len, sockaddr_in * addr) { socklen_t plen = sizeof(sockaddr); - return recvfrom(sck, data, len, 0, (sockaddr *)addr, &plen); + return (int)recvfrom(sck, data, (size_t)len, 0, (sockaddr *)addr, &plen); } @@ -338,7 +338,7 @@ inline int GETERROR() inline int SOCKIOCTL(const SOCKET s, const long flags, void * val) { - return ioctl(s, flags, val); + return ioctl(s, (unsigned long)flags, val); } inline bool do_shutdown_send(SOCKET s) diff --git a/panda/src/nativenet/time_clock.h b/panda/src/nativenet/time_clock.h index 37ca406df6..c41d8b489e 100644 --- a/panda/src/nativenet/time_clock.h +++ b/panda/src/nativenet/time_clock.h @@ -32,7 +32,7 @@ public: Time_Clock(); Time_Clock(time_t time); Time_Clock(long secs, long usecs); - Time_Clock(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds = 0, int nDST = -1); + Time_Clock(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds = 0, int nDST = -1); Time_Clock(const Time_Clock& timeSrc); inline const Time_Clock& operator=(const Time_Clock& timeSrc); @@ -51,7 +51,7 @@ public: int GetSecond() const; int GetDayOfWeek() const; // 1=Sun, 2=Mon, ..., 7=Sat - void Set(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds = 0, int nDST = -1); + void Set(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds = 0, int nDST = -1); // Operations @@ -70,7 +70,7 @@ public: { return _my_time.tv_sec; }; - unsigned long GetUsecPart() + long GetUsecPart() { return _my_time.tv_usec; }; @@ -103,7 +103,7 @@ public: // Argument : int nSec // Argument : int nDST ////////////////////////////////////////////////////////// -inline Time_Clock::Time_Clock(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds , int nDST) +inline Time_Clock::Time_Clock(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds , int nDST) { struct tm atm; atm.tm_sec = nSec; @@ -134,7 +134,7 @@ inline Time_Clock::Time_Clock(int nYear, int nMonth, int nDay, int nHour, int nM // Argument : unsigned long microseconds // Argument : int nDST ////////////////////////////////////////////////////////////// -inline void Time_Clock::Set(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds , int nDST) +inline void Time_Clock::Set(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds , int nDST) { struct tm atm; atm.tm_sec = nSec; diff --git a/panda/src/pgraph/renderAttribRegistry.I b/panda/src/pgraph/renderAttribRegistry.I index 6b3da8d567..ba41733000 100644 --- a/panda/src/pgraph/renderAttribRegistry.I +++ b/panda/src/pgraph/renderAttribRegistry.I @@ -25,7 +25,7 @@ get_slot(TypeHandle type_handle) const { if (type_index >= (int)_slots_by_type.size()) { return 0; } - return _slots_by_type[type_index]; + return _slots_by_type[(size_t)type_index]; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/renderState.I b/panda/src/pgraph/renderState.I index bc7bbad4fe..c15173cdf9 100644 --- a/panda/src/pgraph/renderState.I +++ b/panda/src/pgraph/renderState.I @@ -255,7 +255,7 @@ node_unref() const { // has been cached. This number is not useful for any // practical reason other than performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int RenderState:: +INLINE size_t RenderState:: get_composition_cache_num_entries() const { LightReMutexHolder holder(*_states_lock); return _composition_cache.get_num_entries(); @@ -270,7 +270,7 @@ get_composition_cache_num_entries() const { // records cache entries for the invert_compose() // operation. See get_composition_cache_num_entries(). //////////////////////////////////////////////////////////////////// -INLINE int RenderState:: +INLINE size_t RenderState:: get_invert_composition_cache_num_entries() const { LightReMutexHolder holder(*_states_lock); return _invert_composition_cache.get_num_entries(); @@ -288,7 +288,7 @@ get_invert_composition_cache_num_entries() const { // This has no practical value other than for examining // the cache for performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int RenderState:: +INLINE size_t RenderState:: get_composition_cache_size() const { LightReMutexHolder holder(*_states_lock); return _composition_cache.get_size(); @@ -306,7 +306,7 @@ get_composition_cache_size() const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const RenderState *RenderState:: -get_composition_cache_source(int n) const { +get_composition_cache_source(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_composition_cache.has_element(n)) { return NULL; @@ -329,7 +329,7 @@ get_composition_cache_source(int n) const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const RenderState *RenderState:: -get_composition_cache_result(int n) const { +get_composition_cache_result(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_composition_cache.has_element(n)) { return NULL; @@ -349,7 +349,7 @@ get_composition_cache_result(int n) const { // This has no practical value other than for examining // the cache for performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int RenderState:: +INLINE size_t RenderState:: get_invert_composition_cache_size() const { LightReMutexHolder holder(*_states_lock); return _invert_composition_cache.get_size(); @@ -367,7 +367,7 @@ get_invert_composition_cache_size() const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const RenderState *RenderState:: -get_invert_composition_cache_source(int n) const { +get_invert_composition_cache_source(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_invert_composition_cache.has_element(n)) { return NULL; @@ -391,7 +391,7 @@ get_invert_composition_cache_source(int n) const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const RenderState *RenderState:: -get_invert_composition_cache_result(int n) const { +get_invert_composition_cache_result(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_invert_composition_cache.has_element(n)) { return NULL; diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index a6c6896ee9..9947b68bf1 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -123,15 +123,15 @@ PUBLISHED: INLINE void node_ref() const; INLINE bool node_unref() const; - INLINE int get_composition_cache_num_entries() const; - INLINE int get_invert_composition_cache_num_entries() const; + INLINE size_t get_composition_cache_num_entries() const; + INLINE size_t get_invert_composition_cache_num_entries() const; - INLINE int get_composition_cache_size() const; - INLINE const RenderState *get_composition_cache_source(int n) const; - INLINE const RenderState *get_composition_cache_result(int n) const; - INLINE int get_invert_composition_cache_size() const; - INLINE const RenderState *get_invert_composition_cache_source(int n) const; - INLINE const RenderState *get_invert_composition_cache_result(int n) const; + INLINE size_t get_composition_cache_size() const; + INLINE const RenderState *get_composition_cache_source(size_t n) const; + INLINE const RenderState *get_composition_cache_result(size_t n) const; + INLINE size_t get_invert_composition_cache_size() const; + INLINE const RenderState *get_invert_composition_cache_source(size_t n) const; + INLINE const RenderState *get_invert_composition_cache_result(size_t n) const; EXTENSION(PyObject *get_composition_cache() const); EXTENSION(PyObject *get_invert_composition_cache() const); diff --git a/panda/src/pgraph/shaderAttrib.I b/panda/src/pgraph/shaderAttrib.I index 420e391d8e..f6eba60d83 100644 --- a/panda/src/pgraph/shaderAttrib.I +++ b/panda/src/pgraph/shaderAttrib.I @@ -272,7 +272,7 @@ set_shader_input(CPT_InternalName id, const NodePath &np, int priority) const { //////////////////////////////////////////////////////////////////// INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, double n1, double n2, double n3, double n4, int priority) const { - return set_shader_input(new ShaderInput(MOVE(id), LVecBase4(n1, n2, n3, n4), priority)); + return set_shader_input(new ShaderInput(MOVE(id), LVecBase4((PN_stdfloat)n1, (PN_stdfloat)n2, (PN_stdfloat)n3, (PN_stdfloat)n4), priority)); } //weifengh diff --git a/panda/src/pgraph/transformState.I b/panda/src/pgraph/transformState.I index 9f4ff96c90..7639e1ced8 100644 --- a/panda/src/pgraph/transformState.I +++ b/panda/src/pgraph/transformState.I @@ -804,7 +804,7 @@ node_unref() const { // has been cached. This number is not useful for any // practical reason other than performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int TransformState:: +INLINE size_t TransformState:: get_composition_cache_num_entries() const { LightReMutexHolder holder(*_states_lock); return _composition_cache.get_num_entries(); @@ -819,7 +819,7 @@ get_composition_cache_num_entries() const { // records cache entries for the invert_compose() // operation. See get_composition_cache_num_entries(). //////////////////////////////////////////////////////////////////// -INLINE int TransformState:: +INLINE size_t TransformState:: get_invert_composition_cache_num_entries() const { LightReMutexHolder holder(*_states_lock); return _invert_composition_cache.get_num_entries(); @@ -837,7 +837,7 @@ get_invert_composition_cache_num_entries() const { // This has no practical value other than for examining // the cache for performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int TransformState:: +INLINE size_t TransformState:: get_composition_cache_size() const { LightReMutexHolder holder(*_states_lock); return _composition_cache.get_size(); @@ -855,7 +855,7 @@ get_composition_cache_size() const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const TransformState *TransformState:: -get_composition_cache_source(int n) const { +get_composition_cache_source(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_composition_cache.has_element(n)) { return NULL; @@ -878,7 +878,7 @@ get_composition_cache_source(int n) const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const TransformState *TransformState:: -get_composition_cache_result(int n) const { +get_composition_cache_result(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_composition_cache.has_element(n)) { return NULL; @@ -898,7 +898,7 @@ get_composition_cache_result(int n) const { // This has no practical value other than for examining // the cache for performance analysis. //////////////////////////////////////////////////////////////////// -INLINE int TransformState:: +INLINE size_t TransformState:: get_invert_composition_cache_size() const { LightReMutexHolder holder(*_states_lock); return _invert_composition_cache.get_size(); @@ -916,7 +916,7 @@ get_invert_composition_cache_size() const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const TransformState *TransformState:: -get_invert_composition_cache_source(int n) const { +get_invert_composition_cache_source(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_invert_composition_cache.has_element(n)) { return NULL; @@ -940,7 +940,7 @@ get_invert_composition_cache_source(int n) const { // the cache for performance analysis. //////////////////////////////////////////////////////////////////// INLINE const TransformState *TransformState:: -get_invert_composition_cache_result(int n) const { +get_invert_composition_cache_result(size_t n) const { LightReMutexHolder holder(*_states_lock); if (!_invert_composition_cache.has_element(n)) { return NULL; diff --git a/panda/src/pgraph/transformState.h b/panda/src/pgraph/transformState.h index dac1f87da0..0de6f213fe 100644 --- a/panda/src/pgraph/transformState.h +++ b/panda/src/pgraph/transformState.h @@ -182,15 +182,15 @@ PUBLISHED: INLINE void node_ref() const; INLINE bool node_unref() const; - INLINE int get_composition_cache_num_entries() const; - INLINE int get_invert_composition_cache_num_entries() const; + INLINE size_t get_composition_cache_num_entries() const; + INLINE size_t get_invert_composition_cache_num_entries() const; - INLINE int get_composition_cache_size() const; - INLINE const TransformState *get_composition_cache_source(int n) const; - INLINE const TransformState *get_composition_cache_result(int n) const; - INLINE int get_invert_composition_cache_size() const; - INLINE const TransformState *get_invert_composition_cache_source(int n) const; - INLINE const TransformState *get_invert_composition_cache_result(int n) const; + INLINE size_t get_composition_cache_size() const; + INLINE const TransformState *get_composition_cache_source(size_t n) const; + INLINE const TransformState *get_composition_cache_result(size_t n) const; + INLINE size_t get_invert_composition_cache_size() const; + INLINE const TransformState *get_invert_composition_cache_source(size_t n) const; + INLINE const TransformState *get_invert_composition_cache_result(size_t n) const; bool validate_composition_cache() const; EXTENSION(PyObject *get_composition_cache() const); EXTENSION(PyObject *get_invert_composition_cache() const); diff --git a/panda/src/pgraphnodes/sceneGraphAnalyzer.I b/panda/src/pgraphnodes/sceneGraphAnalyzer.I index e7d0a43f59..72a638d9a4 100644 --- a/panda/src/pgraphnodes/sceneGraphAnalyzer.I +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.I @@ -128,12 +128,11 @@ get_num_geom_vertex_formats() const { // Access: Published // Description: //////////////////////////////////////////////////////////////////// -int SceneGraphAnalyzer:: +size_t SceneGraphAnalyzer:: get_vertex_data_size() const { return _vertex_data_size; } - //////////////////////////////////////////////////////////////////// // Function: SceneGraphAnalyzer::get_num_vertices // Access: Published diff --git a/panda/src/pgraphnodes/sceneGraphAnalyzer.h b/panda/src/pgraphnodes/sceneGraphAnalyzer.h index 4477423ac1..0b1545c7c6 100644 --- a/panda/src/pgraphnodes/sceneGraphAnalyzer.h +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.h @@ -65,7 +65,7 @@ PUBLISHED: INLINE int get_num_geoms() const; INLINE int get_num_geom_vertex_datas() const; INLINE int get_num_geom_vertex_formats() const; - INLINE int get_vertex_data_size() const; + INLINE size_t get_vertex_data_size() const; INLINE int get_num_vertices() const; INLINE int get_num_normals() const; diff --git a/panda/src/pnmimage/convert_srgb.I b/panda/src/pnmimage/convert_srgb.I index 28ac8aad23..2354138cb9 100644 --- a/panda/src/pnmimage/convert_srgb.I +++ b/panda/src/pnmimage/convert_srgb.I @@ -66,7 +66,7 @@ encode_sRGB_float(unsigned char val) { // This seems like a very unlikely use case, so I didn't bother // making a look-up table for this. return (val == 0) ? 0 - : (1.055f * cpow((float)val * (1.f / 255.f), 0.41666f) - 0.055); + : (1.055f * cpow((float)val * (1.f / 255.f), 0.41666f) - 0.055f); } //////////////////////////////////////////////////////////////////// @@ -80,7 +80,7 @@ INLINE float encode_sRGB_float(float val) { return (val < 0.0031308f) ? (val * 12.92f) - : (1.055f * cpow(val, 0.41666f) - 0.055); + : (1.055f * cpow(val, 0.41666f) - 0.055f); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pnmimage/pnmImage.I b/panda/src/pnmimage/pnmImage.I index 0213df23aa..ea54ba0ffb 100644 --- a/panda/src/pnmimage/pnmImage.I +++ b/panda/src/pnmimage/pnmImage.I @@ -1386,7 +1386,7 @@ take_alpha_array() { //////////////////////////////////////////////////////////////////// INLINE void PNMImage:: allocate_array() { - _array = (xel *)PANDA_MALLOC_ARRAY(_x_size * _y_size * sizeof(xel)); + _array = (xel *)PANDA_MALLOC_ARRAY((size_t)_x_size * (size_t)_y_size * sizeof(xel)); } //////////////////////////////////////////////////////////////////// @@ -1397,7 +1397,7 @@ allocate_array() { //////////////////////////////////////////////////////////////////// INLINE void PNMImage:: allocate_alpha() { - _alpha = (xelval *)PANDA_MALLOC_ARRAY(_x_size * _y_size * sizeof(xelval)); + _alpha = (xelval *)PANDA_MALLOC_ARRAY((size_t)_x_size * (size_t)_y_size * sizeof(xelval)); } //////////////////////////////////////////////////////////////////// @@ -1491,7 +1491,7 @@ compute_spot_pixel(LColorf &c, float d2, } else if (d > min_radius) { d = (d - min_radius) / (max_radius - min_radius); float d2 = d * d; - float t = (3.0 * d2) - (2.0 * d * d2); + float t = (3.0f * d2) - (2.0f * d * d2); c = fg + t * (bg - fg); } else { c = fg; diff --git a/panda/src/pstatclient/pStatClient.I b/panda/src/pstatclient/pStatClient.I index 8af56aac2d..1c26ac4d3c 100644 --- a/panda/src/pstatclient/pStatClient.I +++ b/panda/src/pstatclient/pStatClient.I @@ -76,7 +76,7 @@ get_max_rate() const { INLINE int PStatClient:: get_num_collectors() const { ReMutexHolder holder(_lock); - return _num_collectors; + return (int)_num_collectors; } //////////////////////////////////////////////////////////////////// @@ -100,7 +100,7 @@ get_collector_def(int index) const { INLINE int PStatClient:: get_num_threads() const { ReMutexHolder holder(_lock); - return _num_threads; + return (int)_num_threads; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pstatclient/pStatFrameData.I b/panda/src/pstatclient/pStatFrameData.I index 086ce84810..9e680c6ff0 100644 --- a/panda/src/pstatclient/pStatFrameData.I +++ b/panda/src/pstatclient/pStatFrameData.I @@ -169,7 +169,7 @@ get_net_time() const { // Description: Returns the number of individual events stored in the // FrameData. //////////////////////////////////////////////////////////////////// -INLINE int PStatFrameData:: +INLINE size_t PStatFrameData:: get_num_events() const { return _time_data.size(); } @@ -181,8 +181,8 @@ get_num_events() const { // the nth event. //////////////////////////////////////////////////////////////////// INLINE int PStatFrameData:: -get_time_collector(int n) const { - nassertr(n >= 0 && n < (int)_time_data.size(), 0); +get_time_collector(size_t n) const { + nassertr(n < _time_data.size(), 0); return _time_data[n]._index & 0x7fff; } @@ -193,8 +193,8 @@ get_time_collector(int n) const { // event, or false if it represents a stop event. //////////////////////////////////////////////////////////////////// INLINE bool PStatFrameData:: -is_start(int n) const { - nassertr(n >= 0 && n < (int)_time_data.size(), 0); +is_start(size_t n) const { + nassertr(n < _time_data.size(), 0); return (_time_data[n]._index & 0x8000) == 0; } @@ -207,8 +207,8 @@ is_start(int n) const { // from a given client). //////////////////////////////////////////////////////////////////// INLINE double PStatFrameData:: -get_time(int n) const { - nassertr(n >= 0 && n < (int)_time_data.size(), 0); +get_time(size_t n) const { + nassertr(n < _time_data.size(), 0); return _time_data[n]._value; } @@ -218,7 +218,7 @@ get_time(int n) const { // Description: Returns the number of individual level values stored // in the FrameData. //////////////////////////////////////////////////////////////////// -INLINE int PStatFrameData:: +INLINE size_t PStatFrameData:: get_num_levels() const { return _level_data.size(); } @@ -230,8 +230,8 @@ get_num_levels() const { // the nth level value. //////////////////////////////////////////////////////////////////// INLINE int PStatFrameData:: -get_level_collector(int n) const { - nassertr(n >= 0 && n < (int)_level_data.size(), 0); +get_level_collector(size_t n) const { + nassertr(n < _level_data.size(), 0); return _level_data[n]._index; } @@ -241,8 +241,8 @@ get_level_collector(int n) const { // Description: Returns the height of the nth level value. //////////////////////////////////////////////////////////////////// INLINE double PStatFrameData:: -get_level(int n) const { - nassertr(n >= 0 && n < (int)_level_data.size(), 0); +get_level(size_t n) const { + nassertr(n < _level_data.size(), 0); return _level_data[n]._value; } @@ -255,4 +255,3 @@ INLINE bool PStatFrameData::DataPoint:: operator < (const PStatFrameData::DataPoint &other) const { return _value < other._value; } - diff --git a/panda/src/pstatclient/pStatFrameData.h b/panda/src/pstatclient/pStatFrameData.h index 14f854ce15..12a698354b 100644 --- a/panda/src/pstatclient/pStatFrameData.h +++ b/panda/src/pstatclient/pStatFrameData.h @@ -51,14 +51,14 @@ public: INLINE double get_end() const; INLINE double get_net_time() const; - INLINE int get_num_events() const; - INLINE int get_time_collector(int n) const; - INLINE bool is_start(int n) const; - INLINE double get_time(int n) const; + INLINE size_t get_num_events() const; + INLINE int get_time_collector(size_t n) const; + INLINE bool is_start(size_t n) const; + INLINE double get_time(size_t n) const; - INLINE int get_num_levels() const; - INLINE int get_level_collector(int n) const; - INLINE double get_level(int n) const; + INLINE size_t get_num_levels() const; + INLINE int get_level_collector(size_t n) const; + INLINE double get_level(size_t n) const; bool write_datagram(Datagram &destination, PStatClient *client) const; void read_datagram(DatagramIterator &source, PStatClientVersion *version); diff --git a/panda/src/putil/bitArray.I b/panda/src/putil/bitArray.I index 151277e6cf..cdf3adfd92 100644 --- a/panda/src/putil/bitArray.I +++ b/panda/src/putil/bitArray.I @@ -190,9 +190,9 @@ get_num_bits_per_word() { // This number may grow and/or shrink automatically as // needed. //////////////////////////////////////////////////////////////////// -INLINE int BitArray:: +INLINE size_t BitArray:: get_num_bits() const { - return get_num_words() * num_bits_per_word; + return get_num_words() * (size_t)num_bits_per_word; } //////////////////////////////////////////////////////////////////// @@ -359,7 +359,7 @@ set_range_to(bool value, int low_bit, int size) { // Description: Returns the number of possibly-unique words stored in // the array. //////////////////////////////////////////////////////////////////// -INLINE int BitArray:: +INLINE size_t BitArray:: get_num_words() const { return _array.size(); } @@ -372,7 +372,7 @@ get_num_words() const { // value beyond get_num_words() will always be the same. //////////////////////////////////////////////////////////////////// INLINE BitArray::MaskType BitArray:: -get_word(int n) const { +get_word(size_t n) const { nassertr(n >= 0, MaskType::all_off()); if (n < get_num_words()) { return _array[n]; @@ -392,8 +392,7 @@ get_word(int n) const { // array. //////////////////////////////////////////////////////////////////// INLINE void BitArray:: -set_word(int n, WordType value) { - nassertv(n >= 0); +set_word(size_t n, WordType value) { ensure_has_word(n); _array[n] = value; normalize(); diff --git a/panda/src/putil/bitArray.cxx b/panda/src/putil/bitArray.cxx index 9ce4474d7b..d7a5aace02 100644 --- a/panda/src/putil/bitArray.cxx +++ b/panda/src/putil/bitArray.cxx @@ -575,8 +575,8 @@ output_binary(ostream &out, int spaces_every) const { if (_highest_bits) { out << "...1 "; } - int num_bits = max(get_num_bits(), spaces_every); - for (int i = num_bits - 1; i >= 0; i--) { + size_t num_bits = max(get_num_bits(), (size_t)spaces_every); + for (size_t i = num_bits - 1; i >= 0; i--) { if (spaces_every != 0 && ((i % spaces_every) == spaces_every - 1)) { out << ' '; } @@ -944,11 +944,11 @@ ensure_has_word(int n) { copy_on_write(); if (_highest_bits) { - while (n >= (int)_array.size()) { + while ((size_t)n >= _array.size()) { _array.push_back(MaskType::all_on()); } } else { - while (n >= (int)_array.size()) { + while ((size_t)n >= _array.size()) { _array.push_back(MaskType::all_off()); } } diff --git a/panda/src/putil/bitArray.h b/panda/src/putil/bitArray.h index 9019f2a6f5..8bab5c0876 100644 --- a/panda/src/putil/bitArray.h +++ b/panda/src/putil/bitArray.h @@ -65,7 +65,7 @@ PUBLISHED: CONSTEXPR static int get_max_num_bits(); CONSTEXPR static int get_num_bits_per_word(); - INLINE int get_num_bits() const; + INLINE size_t get_num_bits() const; INLINE bool get_bit(int index) const; INLINE void set_bit(int index); INLINE void clear_bit(int index); @@ -90,9 +90,9 @@ PUBLISHED: int get_highest_off_bit() const; int get_next_higher_different_bit(int low_bit) const; - INLINE int get_num_words() const; - INLINE MaskType get_word(int n) const; - INLINE void set_word(int n, WordType value); + INLINE size_t get_num_words() const; + INLINE MaskType get_word(size_t n) const; + INLINE void set_word(size_t n, WordType value); void invert_in_place(); bool has_bits_in_common(const BitArray &other) const; diff --git a/panda/src/putil/buttonMap.I b/panda/src/putil/buttonMap.I index 9fd7f1af46..39b3a20dfb 100644 --- a/panda/src/putil/buttonMap.I +++ b/panda/src/putil/buttonMap.I @@ -19,7 +19,7 @@ // Description: Returns the number of buttons that this button // mapping specifies. //////////////////////////////////////////////////////////////////// -INLINE int ButtonMap:: +INLINE size_t ButtonMap:: get_num_buttons() const { return _buttons.size(); } @@ -31,7 +31,7 @@ get_num_buttons() const { // the nth button. //////////////////////////////////////////////////////////////////// INLINE ButtonHandle ButtonMap:: -get_raw_button(int i) const { +get_raw_button(size_t i) const { return _buttons[i]->_raw; } @@ -42,7 +42,7 @@ get_raw_button(int i) const { // that the nth raw button is mapped to. //////////////////////////////////////////////////////////////////// INLINE ButtonHandle ButtonMap:: -get_mapped_button(int i) const { +get_mapped_button(size_t i) const { return _buttons[i]->_mapped; } @@ -54,7 +54,7 @@ get_mapped_button(int i) const { // button is mapped to. //////////////////////////////////////////////////////////////////// INLINE const string &ButtonMap:: -get_mapped_button_label(int i) const { +get_mapped_button_label(size_t i) const { return _buttons[i]->_label; } diff --git a/panda/src/putil/buttonMap.h b/panda/src/putil/buttonMap.h index 4959a45265..8a2162a34e 100644 --- a/panda/src/putil/buttonMap.h +++ b/panda/src/putil/buttonMap.h @@ -32,10 +32,10 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDA_PUTIL ButtonMap : public TypedReferenceCount { PUBLISHED: - INLINE int get_num_buttons() const; - INLINE ButtonHandle get_raw_button(int i) const; - INLINE ButtonHandle get_mapped_button(int i) const; - INLINE const string &get_mapped_button_label(int i) const; + INLINE size_t get_num_buttons() const; + INLINE ButtonHandle get_raw_button(size_t i) const; + INLINE ButtonHandle get_mapped_button(size_t i) const; + INLINE const string &get_mapped_button_label(size_t i) const; INLINE ButtonHandle get_mapped_button(ButtonHandle raw) const; INLINE ButtonHandle get_mapped_button(const string &raw_name) const; diff --git a/panda/src/putil/cachedTypedWritableReferenceCount.I b/panda/src/putil/cachedTypedWritableReferenceCount.I index 4077046c6e..74db9efc9f 100644 --- a/panda/src/putil/cachedTypedWritableReferenceCount.I +++ b/panda/src/putil/cachedTypedWritableReferenceCount.I @@ -134,7 +134,7 @@ get_cache_ref_count() const { #ifdef _DEBUG test_ref_count_integrity(); #endif - return AtomicAdjust::get(_cache_ref_count); + return (int)AtomicAdjust::get(_cache_ref_count); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/nodeCachedReferenceCount.I b/panda/src/putil/nodeCachedReferenceCount.I index 4861ff6c71..b4a373fca7 100644 --- a/panda/src/putil/nodeCachedReferenceCount.I +++ b/panda/src/putil/nodeCachedReferenceCount.I @@ -134,7 +134,7 @@ get_node_ref_count() const { #ifdef _DEBUG test_ref_count_integrity(); #endif - return AtomicAdjust::get(_node_ref_count); + return (int)AtomicAdjust::get(_node_ref_count); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/pbitops.I b/panda/src/putil/pbitops.I index 5273eb8b13..3e3024df42 100644 --- a/panda/src/putil/pbitops.I +++ b/panda/src/putil/pbitops.I @@ -149,7 +149,7 @@ get_lowest_on_bit(PN_uint16 x) { unsigned long result; return (_BitScanForward(&result, (unsigned long) x) == 0) ? -1 : result; #elif defined(__GNUC__) - return __builtin_ffs((unsigned int) x) - 1; + return __builtin_ffs((int) x) - 1; #else if (x == 0) { return -1; @@ -171,7 +171,7 @@ get_lowest_on_bit(PN_uint32 x) { unsigned long result; return (_BitScanForward(&result, (unsigned long) x) == 0) ? -1 : result; #elif defined(__GNUC__) - return __builtin_ffs((unsigned int) x) - 1; + return __builtin_ffs((int) x) - 1; #else if (x == 0) { return -1; @@ -193,7 +193,7 @@ get_lowest_on_bit(PN_uint64 x) { unsigned long result; return (_BitScanForward64(&result, (unsigned __int64) x) == 0) ? -1 : result; #elif defined(__GNUC__) - return __builtin_ffsll((unsigned long long) x) - 1; + return __builtin_ffsll((long long) x) - 1; #else if (x == 0) { return -1; diff --git a/panda/src/putil/simpleHashMap.I b/panda/src/putil/simpleHashMap.I index d605d22235..2dac620091 100644 --- a/panda/src/putil/simpleHashMap.I +++ b/panda/src/putil/simpleHashMap.I @@ -248,7 +248,7 @@ operator [] (const Key &key) { // Description: Returns the total number of slots in the table. //////////////////////////////////////////////////////////////////// template -INLINE int SimpleHashMap:: +INLINE size_t SimpleHashMap:: get_size() const { return _table_size; } @@ -359,7 +359,7 @@ remove_element(int n) { // Now we have put a hole in the table. If there was a hash // conflict in the slot following this one, we have to move it down // to close the hole. - size_t i = n; + size_t i = (size_t)n; i = (i + 1) & (_table_size - 1); while (has_element(i)) { size_t wants_index = get_hash(_table[i]._key); @@ -397,7 +397,7 @@ remove_element(int n) { // get_num_entries(). //////////////////////////////////////////////////////////////////// template -INLINE int SimpleHashMap:: +INLINE size_t SimpleHashMap:: get_num_entries() const { return _num_entries; } diff --git a/panda/src/putil/simpleHashMap.h b/panda/src/putil/simpleHashMap.h index b9b690ffc7..816218251d 100644 --- a/panda/src/putil/simpleHashMap.h +++ b/panda/src/putil/simpleHashMap.h @@ -45,7 +45,7 @@ public: INLINE Value &operator [] (const Key &key); - INLINE int get_size() const; + INLINE size_t get_size() const; INLINE bool has_element(int n) const; INLINE const Key &get_key(int n) const; INLINE const Value &get_data(int n) const; @@ -53,7 +53,7 @@ public: INLINE void set_data(int n, const Value &data); void remove_element(int n); - INLINE int get_num_entries() const; + INLINE size_t get_num_entries() const; INLINE bool is_empty() const; void output(ostream &out) const; diff --git a/panda/src/putil/sparseArray.I b/panda/src/putil/sparseArray.I index ed72375e8c..e9fed81d17 100644 --- a/panda/src/putil/sparseArray.I +++ b/panda/src/putil/sparseArray.I @@ -514,7 +514,7 @@ is_inverse() const { // // Also see is_inverse(). //////////////////////////////////////////////////////////////////// -INLINE int SparseArray:: +INLINE size_t SparseArray:: get_num_subranges() const { return _subranges.size(); } @@ -528,8 +528,8 @@ get_num_subranges() const { // Also see is_inverse(). //////////////////////////////////////////////////////////////////// INLINE int SparseArray:: -get_subrange_begin(int n) const { - nassertr(n >= 0 && n < (int)_subranges.size(), 0); +get_subrange_begin(size_t n) const { + nassertr(n < _subranges.size(), 0); return _subranges[n]._begin; } @@ -542,8 +542,8 @@ get_subrange_begin(int n) const { // Also see is_inverse(). //////////////////////////////////////////////////////////////////// INLINE int SparseArray:: -get_subrange_end(int n) const { - nassertr(n >= 0 && n < (int)_subranges.size(), 0); +get_subrange_end(size_t n) const { + nassertr(n < _subranges.size(), 0); return _subranges[n]._end; } diff --git a/panda/src/putil/sparseArray.h b/panda/src/putil/sparseArray.h index b2d4bda0e9..60657904bc 100644 --- a/panda/src/putil/sparseArray.h +++ b/panda/src/putil/sparseArray.h @@ -123,9 +123,9 @@ PUBLISHED: INLINE void operator >>= (int shift); INLINE bool is_inverse() const; - INLINE int get_num_subranges() const; - INLINE int get_subrange_begin(int n) const; - INLINE int get_subrange_end(int n) const; + INLINE size_t get_num_subranges() const; + INLINE int get_subrange_begin(size_t n) const; + INLINE int get_subrange_end(size_t n) const; private: void do_add_range(int begin, int end); diff --git a/panda/src/putil/weakKeyHashMap.I b/panda/src/putil/weakKeyHashMap.I index 05f9f4266d..03987ef866 100644 --- a/panda/src/putil/weakKeyHashMap.I +++ b/panda/src/putil/weakKeyHashMap.I @@ -247,7 +247,7 @@ operator [] (const Key *key) { // Description: Returns the total number of slots in the table. //////////////////////////////////////////////////////////////////// template -INLINE int WeakKeyHashMap:: +INLINE size_t WeakKeyHashMap:: get_size() const { return _table_size; } @@ -377,7 +377,7 @@ remove_element(int n) { // Now we have put a hole in the table. If there was a hash // conflict in the slot following this one, we have to move it down // to close the hole. - size_t i = n; + size_t i = (size_t)n; i = (i + 1) & (_table_size - 1); while (get_exists_array()[i] != 0) { if (_table[i]._key.was_deleted()) { @@ -426,7 +426,7 @@ remove_element(int n) { // pointers that were recently deleted. //////////////////////////////////////////////////////////////////// template -INLINE int WeakKeyHashMap:: +INLINE size_t WeakKeyHashMap:: get_num_entries() const { return _num_entries; } diff --git a/panda/src/putil/weakKeyHashMap.h b/panda/src/putil/weakKeyHashMap.h index b84213567c..fec1400a56 100644 --- a/panda/src/putil/weakKeyHashMap.h +++ b/panda/src/putil/weakKeyHashMap.h @@ -48,7 +48,7 @@ public: INLINE Value &operator [] (const Key *key); - INLINE int get_size() const; + INLINE size_t get_size() const; INLINE bool has_element(int n) const; INLINE const Key *get_key(int n) const; INLINE const Value &get_data(int n) const; @@ -59,7 +59,7 @@ public: #endif void remove_element(int n); - INLINE int get_num_entries() const; + INLINE size_t get_num_entries() const; INLINE bool is_empty() const; void output(ostream &out) const; From 7738294657d41b9661dd5bf556eb94785748ff85 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 19:10:52 +0200 Subject: [PATCH 149/200] Fix a few more type size issues --- .../interfaceMakerPythonNative.cxx | 22 +++++++++---------- dtool/src/prc/configDeclaration.cxx | 10 ++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 7f5859a233..3c74c066bb 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -3460,23 +3460,23 @@ write_function_for_name(ostream &out, Object *obj, if (map_sets.size() > 1) { switch (args_type) { case AT_keyword_args: - indent(out, 2) << "Py_ssize_t parameter_count = PyTuple_Size(args);\n"; + indent(out, 2) << "int parameter_count = (int)PyTuple_Size(args);\n"; indent(out, 2) << "if (kwds != NULL) {\n"; - indent(out, 2) << " parameter_count += PyDict_Size(kwds);\n"; + indent(out, 2) << " parameter_count += (int)PyDict_Size(kwds);\n"; indent(out, 2) << "}\n"; break; case AT_varargs: - indent(out, 2) << "Py_ssize_t parameter_count = PyTuple_Size(args);\n"; + indent(out, 2) << "int parameter_count = (int)PyTuple_Size(args);\n"; break; case AT_single_arg: // It shouldn't get here, but we'll handle these cases nonetheless. - indent(out, 2) << "const Py_ssize_t parameter_count = 1;\n"; + indent(out, 2) << "const int parameter_count = 1;\n"; break; default: - indent(out, 2) << "const Py_ssize_t parameter_count = 0;\n"; + indent(out, 2) << "const int parameter_count = 0;\n"; break; } @@ -3571,19 +3571,19 @@ write_function_for_name(ostream &out, Object *obj, switch (args_type) { case AT_keyword_args: out << " if (PyTuple_Size(args) > 0 || (kwds != NULL && PyDict_Size(kwds) > 0)) {\n"; - out << " Py_ssize_t parameter_count = PyTuple_Size(args);\n"; + out << " int parameter_count = (int)PyTuple_Size(args);\n"; out << " if (kwds != NULL) {\n"; - out << " parameter_count += PyDict_Size(kwds);\n"; + out << " parameter_count += (int)PyDict_Size(kwds);\n"; out << " }\n"; break; case AT_varargs: out << " if (PyTuple_Size(args) > 0) {\n"; - out << " const Py_ssize_t parameter_count = PyTuple_GET_SIZE(args);\n"; + out << " const int parameter_count = (int)PyTuple_GET_SIZE(args);\n"; break; case AT_single_arg: // Shouldn't happen, but let's handle this case nonetheless. out << " {\n"; - out << " const Py_ssize_t parameter_count = 1;\n"; + out << " const int parameter_count = 1;\n"; break; case AT_no_args: break; @@ -3603,9 +3603,9 @@ write_function_for_name(ostream &out, Object *obj, } else if (args_type == AT_keyword_args && max_required_args == 1 && mii->first == 1) { // Check this to be sure, as we handle the case of only 1 keyword arg // in write_function_forset (not using ParseTupleAndKeywords). - out << " Py_ssize_t parameter_count = PyTuple_Size(args);\n" + out << " int parameter_count = (int)PyTuple_Size(args);\n" " if (kwds != NULL) {\n" - " parameter_count += PyDict_Size(kwds);\n" + " parameter_count += (int)PyDict_Size(kwds);\n" " }\n" " if (parameter_count != 1) {\n" "#ifdef NDEBUG\n"; diff --git a/dtool/src/prc/configDeclaration.cxx b/dtool/src/prc/configDeclaration.cxx index c2661e0035..f299e63d54 100644 --- a/dtool/src/prc/configDeclaration.cxx +++ b/dtool/src/prc/configDeclaration.cxx @@ -63,7 +63,7 @@ set_string_word(size_t n, const string &value) { get_words(); } - while (n >= (int)_words.size()) { + while (n >= _words.size()) { Word w; w._flags = 0; _words.push_back(w); @@ -207,7 +207,7 @@ check_bool_word(size_t n) { get_words(); } - if (n >= 0 && n < (int)_words.size()) { + if (n < _words.size()) { Word &word = _words[n]; if ((word._flags & F_checked_bool) == 0) { word._flags |= F_checked_bool; @@ -254,7 +254,7 @@ check_int_word(size_t n) { get_words(); } - if (n >= 0 && n < (int)_words.size()) { + if (n < _words.size()) { Word &word = _words[n]; if ((word._flags & F_checked_int) == 0) { word._flags |= F_checked_int; @@ -314,7 +314,7 @@ check_int64_word(size_t n) { get_words(); } - if (n >= 0 && n < (int)_words.size()) { + if (n < _words.size()) { Word &word = _words[n]; if ((word._flags & F_checked_int64) == 0) { word._flags |= F_checked_int64; @@ -372,7 +372,7 @@ check_double_word(size_t n) { get_words(); } - if (n >= 0 && n < (int)_words.size()) { + if (n < _words.size()) { Word &word = _words[n]; if ((word._flags & F_checked_double) == 0) { word._flags |= F_checked_double; From a5f340c5870bd6126c44214760c9e95c274a705d Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 19:29:39 +0200 Subject: [PATCH 150/200] Fix errors in OpenGL renderer due to type size mismatches --- panda/src/glstuff/glShaderContext_src.cxx | 8 ++++---- panda/src/gobj/geomPrimitive.cxx | 2 +- panda/src/gobj/geomVertexArrayFormat.I | 10 +++++----- panda/src/gobj/geomVertexArrayFormat.h | 4 ++-- panda/src/gobj/geomVertexData.cxx | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 8cfd20119f..6cac37cf82 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1852,9 +1852,9 @@ void CLP(ShaderContext):: update_transform_table(const TransformTable *table) { LMatrix4f *matrices = (LMatrix4f *)alloca(_transform_table_size * 64); - int i = 0; + size_t i = 0; if (table != NULL) { - int num_transforms = min(_transform_table_size, table->get_num_transforms()); + size_t num_transforms = min((size_t)_transform_table_size, table->get_num_transforms()); for (; i < num_transforms; ++i) { #ifdef STDFLOAT_DOUBLE LMatrix4 matrix; @@ -1885,8 +1885,8 @@ update_slider_table(const SliderTable *table) { memset(sliders, 0, _slider_table_size * 4); if (table != NULL) { - int num_sliders = min(_slider_table_size, table->get_num_sliders()); - for (int i = 0; i < num_sliders; ++i) { + size_t num_sliders = min((size_t)_slider_table_size, table->get_num_sliders()); + for (size_t i = 0; i < num_sliders; ++i) { sliders[i] = table->get_slider(i)->get_slider(); } } diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 02abb0c407..797ea9e1c8 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -1304,7 +1304,7 @@ set_vertices(const GeomVertexArrayData *vertices, int num_vertices) { // Validate the format and make sure to copy its numeric type. const GeomVertexArrayFormat *format = vertices->get_array_format(); nassertv(format->get_num_columns() == 1); - cdata->_index_type = format->get_column((size_t)0)->get_numeric_type(); + cdata->_index_type = format->get_column(0)->get_numeric_type(); cdata->_modified = Geom::get_next_modified(); cdata->_got_minmax = false; diff --git a/panda/src/gobj/geomVertexArrayFormat.I b/panda/src/gobj/geomVertexArrayFormat.I index 2ded24872c..10a5adf674 100644 --- a/panda/src/gobj/geomVertexArrayFormat.I +++ b/panda/src/gobj/geomVertexArrayFormat.I @@ -151,9 +151,9 @@ get_total_bytes() const { // Description: Returns the number of different columns in the // array. //////////////////////////////////////////////////////////////////// -INLINE size_t GeomVertexArrayFormat:: +INLINE int GeomVertexArrayFormat:: get_num_columns() const { - return _columns.size(); + return (int)_columns.size(); } //////////////////////////////////////////////////////////////////// @@ -162,10 +162,10 @@ get_num_columns() const { // Description: Returns the ith column of the array. //////////////////////////////////////////////////////////////////// INLINE const GeomVertexColumn *GeomVertexArrayFormat:: -get_column(size_t i) const { - nassertr(i < _columns.size(), NULL); +get_column(int i) const { + nassertr(i >= 0 && i < (int)_columns.size(), NULL); consider_sort_columns(); - return _columns[i]; + return _columns[(size_t)i]; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/geomVertexArrayFormat.h b/panda/src/gobj/geomVertexArrayFormat.h index f764b3c3c8..9e150d596b 100644 --- a/panda/src/gobj/geomVertexArrayFormat.h +++ b/panda/src/gobj/geomVertexArrayFormat.h @@ -102,8 +102,8 @@ PUBLISHED: void pack_columns(); void align_columns_for_animation(); - INLINE size_t get_num_columns() const; - INLINE const GeomVertexColumn *get_column(size_t i) const; + INLINE int get_num_columns() const; + INLINE const GeomVertexColumn *get_column(int i) const; MAKE_SEQ(get_columns, get_num_columns, get_column); const GeomVertexColumn *get_column(const InternalName *name) const; diff --git a/panda/src/gobj/geomVertexData.cxx b/panda/src/gobj/geomVertexData.cxx index 80aa43dbf4..d2202e1831 100644 --- a/panda/src/gobj/geomVertexData.cxx +++ b/panda/src/gobj/geomVertexData.cxx @@ -1675,7 +1675,7 @@ update_animated_vertices(GeomVertexData::CData *cdata, Thread *current_thread) { CPT(GeomVertexArrayFormat) blend_array_format = orig_format->get_array(blend_array_index); if (blend_array_format->get_stride() == 2 && - blend_array_format->get_column((size_t)0)->get_component_bytes() == 2) { + blend_array_format->get_column(0)->get_component_bytes() == 2) { // The blend indices are a table of ushorts. Optimize this // common case. CPT(GeomVertexArrayDataHandle) blend_array_handle = cdata->_arrays[blend_array_index].get_read_pointer()->get_handle(current_thread); From 7f7f85794dbd94398ebdeace92187d0db881ee6a Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Oct 2015 21:09:35 +0200 Subject: [PATCH 151/200] Fix various compilation and linker issues across several platforms --- direct/src/dcparser/dcPython.h | 4 +++- makepanda/makepanda.py | 2 ++ panda/src/pgraph/renderState.cxx | 8 ++++---- panda/src/pgraph/transformState.cxx | 6 +++--- panda/src/putil/bitArray.cxx | 4 ++-- panda/src/putil/paramValue.h | 4 ++-- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/direct/src/dcparser/dcPython.h b/direct/src/dcparser/dcPython.h index d5a50baa2f..f04aa11e6b 100644 --- a/direct/src/dcparser/dcPython.h +++ b/direct/src/dcparser/dcPython.h @@ -20,8 +20,10 @@ #ifdef HAVE_PYTHON -#undef HAVE_LONG_LONG // NSPR and Python both define this. +#define PY_SSIZE_T_CLEAN 1 + #undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE #include // Python 2.5 adds Py_ssize_t; earlier versions don't have it. diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index ad9f40792c..07bdd7e538 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1653,6 +1653,8 @@ def CompileLink(dll, obj, opts): else: cmd += " -pthread" + cmd += " -Wl,-allow-multiple-definition" + if LDFLAGS != "": cmd += " " + LDFLAGS diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index a3f4c6c9a7..fd385668df 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -985,7 +985,7 @@ clear_cache() { RenderState *state = (RenderState *)(*ti).p(); int i; - int cache_size = state->_composition_cache.get_size(); + int cache_size = (int)state->_composition_cache.get_size(); for (i = 0; i < cache_size; ++i) { if (state->_composition_cache.has_element(i)) { const RenderState *result = state->_composition_cache.get_data(i)._result; @@ -995,10 +995,10 @@ clear_cache() { } } } - _cache_stats.add_total_size(-state->_composition_cache.get_num_entries()); + _cache_stats.add_total_size(-(int)state->_composition_cache.get_num_entries()); state->_composition_cache.clear(); - cache_size = state->_invert_composition_cache.get_size(); + cache_size = (int)state->_invert_composition_cache.get_size(); for (i = 0; i < cache_size; ++i) { if (state->_invert_composition_cache.has_element(i)) { const RenderState *result = state->_invert_composition_cache.get_data(i)._result; @@ -1008,7 +1008,7 @@ clear_cache() { } } } - _cache_stats.add_total_size(-state->_invert_composition_cache.get_num_entries()); + _cache_stats.add_total_size(-(int)state->_invert_composition_cache.get_num_entries()); state->_invert_composition_cache.clear(); } diff --git a/panda/src/pgraph/transformState.cxx b/panda/src/pgraph/transformState.cxx index bffa840479..7daf7c0a40 100644 --- a/panda/src/pgraph/transformState.cxx +++ b/panda/src/pgraph/transformState.cxx @@ -1174,7 +1174,7 @@ clear_cache() { TransformState *state = (TransformState *)(*ti).p(); int i; - int cache_size = state->_composition_cache.get_size(); + int cache_size = (int)state->_composition_cache.get_size(); for (i = 0; i < cache_size; ++i) { if (state->_composition_cache.has_element(i)) { const TransformState *result = state->_composition_cache.get_data(i)._result; @@ -1184,7 +1184,7 @@ clear_cache() { } } } - _cache_stats.add_total_size(-state->_composition_cache.get_num_entries()); + _cache_stats.add_total_size(-(int)state->_composition_cache.get_num_entries()); state->_composition_cache.clear(); cache_size = state->_invert_composition_cache.get_size(); @@ -1197,7 +1197,7 @@ clear_cache() { } } } - _cache_stats.add_total_size(-state->_invert_composition_cache.get_num_entries()); + _cache_stats.add_total_size(-(int)state->_invert_composition_cache.get_num_entries()); state->_invert_composition_cache.clear(); } diff --git a/panda/src/putil/bitArray.cxx b/panda/src/putil/bitArray.cxx index d7a5aace02..99e7d7d653 100644 --- a/panda/src/putil/bitArray.cxx +++ b/panda/src/putil/bitArray.cxx @@ -575,8 +575,8 @@ output_binary(ostream &out, int spaces_every) const { if (_highest_bits) { out << "...1 "; } - size_t num_bits = max(get_num_bits(), (size_t)spaces_every); - for (size_t i = num_bits - 1; i >= 0; i--) { + int num_bits = max((int)get_num_bits(), spaces_every); + for (int i = num_bits - 1; i >= 0; i--) { if (spaces_every != 0 && ((i % spaces_every) == spaces_every - 1)) { out << ' '; } diff --git a/panda/src/putil/paramValue.h b/panda/src/putil/paramValue.h index 694c34529d..e1a4ca9cf0 100644 --- a/panda/src/putil/paramValue.h +++ b/panda/src/putil/paramValue.h @@ -153,6 +153,8 @@ private: static TypeHandle _type_handle; }; +#include "paramValue.I" + EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue); EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue); @@ -211,8 +213,6 @@ typedef ParamMatrix3f ParamMatrix3; typedef ParamMatrix4f ParamMatrix4; #endif -#include "paramValue.I" - // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma interface From caf3a9f24c8ebb83fa42b71991c9860a8294b503 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 7 Oct 2015 16:52:11 -0700 Subject: [PATCH 152/200] PfmFile::apply_1d_lut() --- panda/src/pnmimage/pfmFile.cxx | 26 ++++++++++++++++++++++++++ panda/src/pnmimage/pfmFile.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/panda/src/pnmimage/pfmFile.cxx b/panda/src/pnmimage/pfmFile.cxx index 3cad7c7e99..287a569ebf 100644 --- a/panda/src/pnmimage/pfmFile.cxx +++ b/panda/src/pnmimage/pfmFile.cxx @@ -1439,6 +1439,32 @@ reverse_distort(const PfmFile &dist, PN_float32 scale_factor) { _table.swap(result._table); } +//////////////////////////////////////////////////////////////////// +// Function: PfmFile::apply_1d_lut +// Access: Published +// Description: Assumes that lut is an X by 1, 1-component PfmFile +// whose X axis maps points to target points. For each +// point in this pfm file, computes: p(u, v)[channel] = +// lut(p(u, v)[channel] * x_scale, 0)[0] +//////////////////////////////////////////////////////////////////// +void PfmFile:: +apply_1d_lut(int channel, const PfmFile &lut, PN_float32 x_scale) { + for (int yi = 0; yi < _y_size; ++yi) { + for (int xi = 0; xi < _x_size; ++xi) { + if (!has_point(xi, yi)) { + continue; + } + + PN_float32 v = get_channel(xi, yi, channel); + LPoint3f p; + if (!lut.calc_bilinear_point(p, v * x_scale, 0.5)) { + continue; + } + set_channel(xi, yi, channel, p[0]); + } + } +} + //////////////////////////////////////////////////////////////////// // Function: PfmFile::merge // Access: Published diff --git a/panda/src/pnmimage/pfmFile.h b/panda/src/pnmimage/pfmFile.h index ab0347f739..1b82f91d65 100644 --- a/panda/src/pnmimage/pfmFile.h +++ b/panda/src/pnmimage/pfmFile.h @@ -122,6 +122,8 @@ PUBLISHED: INLINE BLOCKING void xform(const LMatrix4d &transform); BLOCKING void forward_distort(const PfmFile &dist, PN_float32 scale_factor = 1.0); BLOCKING void reverse_distort(const PfmFile &dist, PN_float32 scale_factor = 1.0); + BLOCKING void apply_1d_lut(int channel, const PfmFile &lut, PN_float32 x_scale = 1.0); + BLOCKING void merge(const PfmFile &other); BLOCKING void apply_mask(const PfmFile &other); BLOCKING void copy_channel(int to_channel, const PfmFile &other, int from_channel); From f1fd64534b33a17f14f4fe9a2f6744183bad582c Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 7 Oct 2015 16:54:48 -0700 Subject: [PATCH 153/200] egg-precision --- panda/src/egg/config_egg.cxx | 454 ++-- panda/src/egg/config_egg.h | 95 +- panda/src/egg/eggData.cxx | 818 +++---- pandatool/src/objegg/eggToObjConverter.cxx | 920 ++++---- pandatool/src/objegg/objToEggConverter.cxx | 2357 ++++++++++---------- pandatool/src/objegg/objToEggConverter.h | 303 +-- 6 files changed, 2494 insertions(+), 2453 deletions(-) diff --git a/panda/src/egg/config_egg.cxx b/panda/src/egg/config_egg.cxx index e90b732aec..0aa50cbcb7 100644 --- a/panda/src/egg/config_egg.cxx +++ b/panda/src/egg/config_egg.cxx @@ -1,224 +1,230 @@ -// Filename: config_egg.cxx -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "config_egg.h" -#include "eggRenderMode.h" -#include "eggAnimData.h" -#include "eggAnimPreload.h" -#include "eggAttributes.h" -#include "eggBin.h" -#include "eggBinMaker.h" -#include "eggComment.h" -#include "eggCompositePrimitive.h" -#include "eggCoordinateSystem.h" -#include "eggCurve.h" -#include "eggExternalReference.h" -#include "eggFilenameNode.h" -#include "eggGroup.h" -#include "eggGroupNode.h" -#include "eggGroupUniquifier.h" -#include "eggLine.h" -#include "eggMaterial.h" -#include "eggNameUniquifier.h" -#include "eggNamedObject.h" -#include "eggNode.h" -#include "eggNurbsCurve.h" -#include "eggNurbsSurface.h" -#include "eggObject.h" -#include "eggPatch.h" -#include "eggPoint.h" -#include "eggPolygon.h" -#include "eggPolysetMaker.h" -#include "eggPoolUniquifier.h" -#include "eggPrimitive.h" -#include "eggSAnimData.h" -#include "eggSurface.h" -#include "eggSwitchCondition.h" -#include "eggTable.h" -#include "eggTexture.h" -#include "eggTriangleFan.h" -#include "eggTriangleStrip.h" -#include "eggUserData.h" -#include "eggVertex.h" -#include "eggVertexPool.h" -#include "eggVertexUV.h" -#include "eggVertexAux.h" -#include "eggXfmAnimData.h" -#include "eggXfmSAnim.h" - -#include "dconfig.h" - -Configure(config_egg); -NotifyCategoryDef(egg, ""); - -ConfigureFn(config_egg) { - init_libegg(); -} - -ConfigVariableBool egg_support_old_anims -("egg-support-old-anims", true, - PRC_DESC("Set this true to support loading of old character animation files, which " - "had the convention that the order \"phr\" implied a reversed roll.")); - -ConfigVariableBool egg_mesh -("egg-mesh", true, - PRC_DESC("Set this true to convert triangles and higher-order polygons " - "into triangle strips and triangle fans when an egg file is " - "loaded or converted to bam. Set this false just to triangulate " - "everything into independent triangles.")); - -ConfigVariableBool egg_retesselate_coplanar -("egg-retesselate-coplanar", false, - PRC_DESC("If this is true, the egg loader may reverse the " - "tesselation direction of a single pair of planar triangles that " - "share the same properties, if that will help get a better " - "triangle strip. In some rare cases, doing so can distort the " - "UV's on a face; turning this off should eliminate that artifact " - "(at the cost of less-effective triangle stripping).")); - -ConfigVariableBool egg_unroll_fans -("egg-unroll-fans", true, - PRC_DESC("Set this true to allow the egg loader to convert weak triangle " - "fans--triangles that share the same vertex but aren't " - "connected enough to justify making a triangle fan primitive " - "from them--into a series of zig-zag triangles that can make " - "a triangle strip that might connect better with its neighbors.")); - -ConfigVariableBool egg_show_tstrips -("egg-show-tstrips", false, - PRC_DESC("Set this true to color each triangle strip a random color, with " - "the leading triangle a little bit darker, so you can visually " - "observe the quality of the triangle stripping algorithm.")); - -ConfigVariableBool egg_show_qsheets -("egg-show-qsheets", false, - PRC_DESC("Set this true to color each quadsheet a random color, so you " - "can visually observe the quadsheet algorithm.")); - -ConfigVariableBool egg_show_quads -("egg-show-quads", false, - PRC_DESC("Set this true to color each detected quad a random color, so " - "you can visually observe the algorithm that unifies pairs of " - "triangles into quads (prior to generating triangle strips).")); - -ConfigVariableBool egg_subdivide_polys -("egg-subdivide-polys", true, - PRC_DESC("This is obsolete. In the old Geom implementation, it used to " - "be true to force higher-order polygons that were not otherwise " - "meshed to be subdivided into triangles. In the new " - "Geom implementation, this happens anyway.")); - -ConfigVariableBool egg_consider_fans -("egg-consider-fans", false, - PRC_DESC("Set this true to enable the egg mesher to consider making " - "triangle fans out of triangles that are connected at a common " - "vertex. This may help if your scene involves lots of such " - "connected triangles, but it can also make the overall stripping " - "less effective (by interfering with triangle strips).")); - -ConfigVariableDouble egg_max_tfan_angle -("egg-max-tfan-angle", 40.0, - PRC_DESC("The maximum average angle per triangle to allow in a triangle " - "fan. If triangles are larger than this--that is, more loosely " - "packed--then we figure a triangle strip is likely to do a " - "more effective job than a triangle fan, and the fan maker leaves " - "it alone.")); - -ConfigVariableInt egg_min_tfan_tris -("egg-min-tfan-tris", 4, - PRC_DESC("The minimum number of triangles that must be involved in order " - "to generate a triangle fan. Fewer than this is just interrupting " - "a triangle strip.")); - -ConfigVariableDouble egg_coplanar_threshold -("egg-coplanar-threshold", 0.01, - PRC_DESC("The numerical threshold below which polygons are considered " - "to be coplanar. Determined empirically.")); - -ConfigVariableInt egg_test_vref_integrity -("egg-test-vref-integrity", 20, - PRC_DESC("The maximum number of vertices a primitive may have before " - "its vertices will no longer be checked for internal integrity. " - "This is meaningful in non-production builds only.")); - -ConfigVariableInt egg_recursion_limit -("egg-recursion-limit", 1000, - PRC_DESC("The maximum number of levels that recursive algorithms within " - "the egg library are allowed to traverse. This is a simple hack " - "to prevent deeply-recursive algorithms from triggering a stack " - "overflow. Set it larger to run more efficiently if your stack " - "allows it; set it lower if you experience stack overflows.")); - -//////////////////////////////////////////////////////////////////// -// Function: init_libegg -// Description: Initializes the library. This must be called at -// least once before any of the functions or classes in -// this library can be used. Normally it will be -// called by the static initializers and need not be -// called explicitly, but special cases exist. -//////////////////////////////////////////////////////////////////// -void -init_libegg() { - static bool initialized = false; - if (initialized) { - return; - } - initialized = true; - - EggRenderMode::init_type(); - EggAnimData::init_type(); - EggAnimPreload::init_type(); - EggAttributes::init_type(); - EggBin::init_type(); - EggBinMaker::init_type(); - EggComment::init_type(); - EggCompositePrimitive::init_type(); - EggCoordinateSystem::init_type(); - EggCurve::init_type(); - EggData::init_type(); - EggExternalReference::init_type(); - EggFilenameNode::init_type(); - EggGroup::init_type(); - EggGroupNode::init_type(); - EggGroupUniquifier::init_type(); - EggLine::init_type(); - EggMaterial::init_type(); - EggNameUniquifier::init_type(); - EggNamedObject::init_type(); - EggNode::init_type(); - EggNurbsCurve::init_type(); - EggNurbsSurface::init_type(); - EggObject::init_type(); - EggPatch::init_type(); - EggPoint::init_type(); - EggPolygon::init_type(); - EggPolysetMaker::init_type(); - EggPoolUniquifier::init_type(); - EggPrimitive::init_type(); - EggSAnimData::init_type(); - EggSurface::init_type(); - EggSwitchCondition::init_type(); - EggSwitchConditionDistance::init_type(); - EggTable::init_type(); - EggTexture::init_type(); - EggTriangleFan::init_type(); - EggTriangleStrip::init_type(); - EggUserData::init_type(); - EggVertex::init_type(); - EggVertexPool::init_type(); - EggVertexUV::init_type(); - EggVertexAux::init_type(); - EggXfmAnimData::init_type(); - EggXfmSAnim::init_type(); -} +// Filename: config_egg.cxx +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "config_egg.h" +#include "eggRenderMode.h" +#include "eggAnimData.h" +#include "eggAnimPreload.h" +#include "eggAttributes.h" +#include "eggBin.h" +#include "eggBinMaker.h" +#include "eggComment.h" +#include "eggCompositePrimitive.h" +#include "eggCoordinateSystem.h" +#include "eggCurve.h" +#include "eggExternalReference.h" +#include "eggFilenameNode.h" +#include "eggGroup.h" +#include "eggGroupNode.h" +#include "eggGroupUniquifier.h" +#include "eggLine.h" +#include "eggMaterial.h" +#include "eggNameUniquifier.h" +#include "eggNamedObject.h" +#include "eggNode.h" +#include "eggNurbsCurve.h" +#include "eggNurbsSurface.h" +#include "eggObject.h" +#include "eggPatch.h" +#include "eggPoint.h" +#include "eggPolygon.h" +#include "eggPolysetMaker.h" +#include "eggPoolUniquifier.h" +#include "eggPrimitive.h" +#include "eggSAnimData.h" +#include "eggSurface.h" +#include "eggSwitchCondition.h" +#include "eggTable.h" +#include "eggTexture.h" +#include "eggTriangleFan.h" +#include "eggTriangleStrip.h" +#include "eggUserData.h" +#include "eggVertex.h" +#include "eggVertexPool.h" +#include "eggVertexUV.h" +#include "eggVertexAux.h" +#include "eggXfmAnimData.h" +#include "eggXfmSAnim.h" + +#include "dconfig.h" + +Configure(config_egg); +NotifyCategoryDef(egg, ""); + +ConfigureFn(config_egg) { + init_libegg(); +} + +ConfigVariableBool egg_support_old_anims +("egg-support-old-anims", true, + PRC_DESC("Set this true to support loading of old character animation files, which " + "had the convention that the order \"phr\" implied a reversed roll.")); + +ConfigVariableBool egg_mesh +("egg-mesh", true, + PRC_DESC("Set this true to convert triangles and higher-order polygons " + "into triangle strips and triangle fans when an egg file is " + "loaded or converted to bam. Set this false just to triangulate " + "everything into independent triangles.")); + +ConfigVariableBool egg_retesselate_coplanar +("egg-retesselate-coplanar", false, + PRC_DESC("If this is true, the egg loader may reverse the " + "tesselation direction of a single pair of planar triangles that " + "share the same properties, if that will help get a better " + "triangle strip. In some rare cases, doing so can distort the " + "UV's on a face; turning this off should eliminate that artifact " + "(at the cost of less-effective triangle stripping).")); + +ConfigVariableBool egg_unroll_fans +("egg-unroll-fans", true, + PRC_DESC("Set this true to allow the egg loader to convert weak triangle " + "fans--triangles that share the same vertex but aren't " + "connected enough to justify making a triangle fan primitive " + "from them--into a series of zig-zag triangles that can make " + "a triangle strip that might connect better with its neighbors.")); + +ConfigVariableBool egg_show_tstrips +("egg-show-tstrips", false, + PRC_DESC("Set this true to color each triangle strip a random color, with " + "the leading triangle a little bit darker, so you can visually " + "observe the quality of the triangle stripping algorithm.")); + +ConfigVariableBool egg_show_qsheets +("egg-show-qsheets", false, + PRC_DESC("Set this true to color each quadsheet a random color, so you " + "can visually observe the quadsheet algorithm.")); + +ConfigVariableBool egg_show_quads +("egg-show-quads", false, + PRC_DESC("Set this true to color each detected quad a random color, so " + "you can visually observe the algorithm that unifies pairs of " + "triangles into quads (prior to generating triangle strips).")); + +ConfigVariableBool egg_subdivide_polys +("egg-subdivide-polys", true, + PRC_DESC("This is obsolete. In the old Geom implementation, it used to " + "be true to force higher-order polygons that were not otherwise " + "meshed to be subdivided into triangles. In the new " + "Geom implementation, this happens anyway.")); + +ConfigVariableBool egg_consider_fans +("egg-consider-fans", false, + PRC_DESC("Set this true to enable the egg mesher to consider making " + "triangle fans out of triangles that are connected at a common " + "vertex. This may help if your scene involves lots of such " + "connected triangles, but it can also make the overall stripping " + "less effective (by interfering with triangle strips).")); + +ConfigVariableDouble egg_max_tfan_angle +("egg-max-tfan-angle", 40.0, + PRC_DESC("The maximum average angle per triangle to allow in a triangle " + "fan. If triangles are larger than this--that is, more loosely " + "packed--then we figure a triangle strip is likely to do a " + "more effective job than a triangle fan, and the fan maker leaves " + "it alone.")); + +ConfigVariableInt egg_min_tfan_tris +("egg-min-tfan-tris", 4, + PRC_DESC("The minimum number of triangles that must be involved in order " + "to generate a triangle fan. Fewer than this is just interrupting " + "a triangle strip.")); + +ConfigVariableDouble egg_coplanar_threshold +("egg-coplanar-threshold", 0.01, + PRC_DESC("The numerical threshold below which polygons are considered " + "to be coplanar. Determined empirically.")); + +ConfigVariableInt egg_test_vref_integrity +("egg-test-vref-integrity", 20, + PRC_DESC("The maximum number of vertices a primitive may have before " + "its vertices will no longer be checked for internal integrity. " + "This is meaningful in non-production builds only.")); + +ConfigVariableInt egg_recursion_limit +("egg-recursion-limit", 1000, + PRC_DESC("The maximum number of levels that recursive algorithms within " + "the egg library are allowed to traverse. This is a simple hack " + "to prevent deeply-recursive algorithms from triggering a stack " + "overflow. Set it larger to run more efficiently if your stack " + "allows it; set it lower if you experience stack overflows.")); + +ConfigVariableInt egg_precision +("egg-precision", 15, + PRC_DESC("The number of digits of precision to write out for values in " + "an egg file. Leave this at 0 to use the default setting for the " + "stream.")); + +//////////////////////////////////////////////////////////////////// +// Function: init_libegg +// Description: Initializes the library. This must be called at +// least once before any of the functions or classes in +// this library can be used. Normally it will be +// called by the static initializers and need not be +// called explicitly, but special cases exist. +//////////////////////////////////////////////////////////////////// +void +init_libegg() { + static bool initialized = false; + if (initialized) { + return; + } + initialized = true; + + EggRenderMode::init_type(); + EggAnimData::init_type(); + EggAnimPreload::init_type(); + EggAttributes::init_type(); + EggBin::init_type(); + EggBinMaker::init_type(); + EggComment::init_type(); + EggCompositePrimitive::init_type(); + EggCoordinateSystem::init_type(); + EggCurve::init_type(); + EggData::init_type(); + EggExternalReference::init_type(); + EggFilenameNode::init_type(); + EggGroup::init_type(); + EggGroupNode::init_type(); + EggGroupUniquifier::init_type(); + EggLine::init_type(); + EggMaterial::init_type(); + EggNameUniquifier::init_type(); + EggNamedObject::init_type(); + EggNode::init_type(); + EggNurbsCurve::init_type(); + EggNurbsSurface::init_type(); + EggObject::init_type(); + EggPatch::init_type(); + EggPoint::init_type(); + EggPolygon::init_type(); + EggPolysetMaker::init_type(); + EggPoolUniquifier::init_type(); + EggPrimitive::init_type(); + EggSAnimData::init_type(); + EggSurface::init_type(); + EggSwitchCondition::init_type(); + EggSwitchConditionDistance::init_type(); + EggTable::init_type(); + EggTexture::init_type(); + EggTriangleFan::init_type(); + EggTriangleStrip::init_type(); + EggUserData::init_type(); + EggVertex::init_type(); + EggVertexPool::init_type(); + EggVertexUV::init_type(); + EggVertexAux::init_type(); + EggXfmAnimData::init_type(); + EggXfmSAnim::init_type(); +} diff --git a/panda/src/egg/config_egg.h b/panda/src/egg/config_egg.h index 45a4afa9f4..dbd47ab3b8 100644 --- a/panda/src/egg/config_egg.h +++ b/panda/src/egg/config_egg.h @@ -1,47 +1,48 @@ -// Filename: config_egg.h -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#ifndef CONFIG_EGG_H -#define CONFIG_EGG_H - -#include "pandabase.h" -#include "notifyCategoryProxy.h" -#include "configVariableSearchPath.h" -#include "configVariableBool.h" -#include "configVariableEnum.h" -#include "configVariableDouble.h" -#include "configVariableInt.h" - -NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); - -extern ConfigVariableBool egg_support_old_anims; - -extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; -extern EXPCL_PANDAEGG ConfigVariableBool egg_retesselate_coplanar; -extern EXPCL_PANDAEGG ConfigVariableBool egg_unroll_fans; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_tstrips; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_qsheets; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_quads; -#define egg_false_color (egg_show_tstrips | egg_show_qsheets | egg_show_quads) -extern EXPCL_PANDAEGG ConfigVariableBool egg_subdivide_polys; -extern EXPCL_PANDAEGG ConfigVariableBool egg_consider_fans; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_max_tfan_angle; -extern EXPCL_PANDAEGG ConfigVariableInt egg_min_tfan_tris; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_coplanar_threshold; -extern EXPCL_PANDAEGG ConfigVariableInt egg_test_vref_integrity; -extern EXPCL_PANDAEGG ConfigVariableInt egg_recursion_limit; - -extern EXPCL_PANDAEGG void init_libegg(); - -#endif +// Filename: config_egg.h +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef CONFIG_EGG_H +#define CONFIG_EGG_H + +#include "pandabase.h" +#include "notifyCategoryProxy.h" +#include "configVariableSearchPath.h" +#include "configVariableBool.h" +#include "configVariableEnum.h" +#include "configVariableDouble.h" +#include "configVariableInt.h" + +NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); + +extern ConfigVariableBool egg_support_old_anims; + +extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; +extern EXPCL_PANDAEGG ConfigVariableBool egg_retesselate_coplanar; +extern EXPCL_PANDAEGG ConfigVariableBool egg_unroll_fans; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_tstrips; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_qsheets; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_quads; +#define egg_false_color (egg_show_tstrips | egg_show_qsheets | egg_show_quads) +extern EXPCL_PANDAEGG ConfigVariableBool egg_subdivide_polys; +extern EXPCL_PANDAEGG ConfigVariableBool egg_consider_fans; +extern EXPCL_PANDAEGG ConfigVariableDouble egg_max_tfan_angle; +extern EXPCL_PANDAEGG ConfigVariableInt egg_min_tfan_tris; +extern EXPCL_PANDAEGG ConfigVariableDouble egg_coplanar_threshold; +extern EXPCL_PANDAEGG ConfigVariableInt egg_test_vref_integrity; +extern EXPCL_PANDAEGG ConfigVariableInt egg_recursion_limit; +extern EXPCL_PANDAEGG ConfigVariableInt egg_precision; + +extern EXPCL_PANDAEGG void init_libegg(); + +#endif diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index e472bb2c39..71e6fd1424 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -1,404 +1,414 @@ -// Filename: eggData.cxx -// Created by: drose (20Jan99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "eggData.h" -#include "eggCoordinateSystem.h" -#include "eggTextureCollection.h" -#include "eggMaterialCollection.h" -#include "eggComment.h" -#include "eggPoolUniquifier.h" -#include "config_egg.h" -#include "config_util.h" -#include "config_express.h" -#include "string_utils.h" -#include "dSearchPath.h" -#include "virtualFileSystem.h" -#include "lightMutexHolder.h" -#include "zStream.h" - -extern int eggyyparse(); -#include "parserDefs.h" -#include "lexerDefs.h" - -TypeHandle EggData::_type_handle; - -//////////////////////////////////////////////////////////////////// -// Function: EggData::resolve_egg_filename -// Access: Public, Static -// Description: Looks for the indicated filename, first along the -// indicated searchpath, and then along the model_path. -// If found, updates the filename to the full path and -// returns true; otherwise, returns false. -//////////////////////////////////////////////////////////////////// -bool EggData:: -resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - - if (egg_filename.is_fully_qualified() && vfs->exists(egg_filename)) { - return true; - } - - vfs->resolve_filename(egg_filename, searchpath, "egg") || - vfs->resolve_filename(egg_filename, get_model_path(), "egg"); - - return vfs->exists(egg_filename); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::read -// Access: Public -// Description: Opens the indicated filename and reads the egg data -// contents from it. Returns true if the file was -// successfully opened and read, false if there were -// some errors, in which case the data may be partially -// read. -// -// error is the output stream to which to write error -// messages. -//////////////////////////////////////////////////////////////////// -bool EggData:: -read(Filename filename, string display_name) { - filename.set_text(); - set_egg_filename(filename); - - if (display_name.empty()) { - display_name = filename; - } - - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - - PT(VirtualFile) vfile = vfs->get_file(filename); - if (vfile == NULL) { - egg_cat.error() << "Could not find " << display_name << "\n"; - return false; - } - set_egg_timestamp(vfile->get_timestamp()); - - istream *file = vfile->open_read_file(true); - if (file == (istream *)NULL) { - egg_cat.error() << "Unable to open " << display_name << "\n"; - return false; - } - - egg_cat.info() - << "Reading " << display_name << "\n"; - - bool read_ok = read(*file); - vfile->close_read_file(file); - return read_ok; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::read -// Access: Public -// Description: Parses the egg syntax contained in the indicated -// input stream. Returns true if the stream was a -// completely valid egg file, false if there were some -// errors, in which case the data may be partially read. -// -// Before you call this routine, you should probably -// call set_egg_filename() to set the name of the egg -// file we're processing, if at all possible. If there -// is no such filename, you may set it to the empty -// string. -//////////////////////////////////////////////////////////////////// -bool EggData:: -read(istream &in) { - // First, dispense with any children we had previously. We will - // replace them with the new data. - clear(); - - // Create a temporary EggData structure to read into. We initialize - // it with a copy of ourselves, so that it will get our _coordsys - // value, if the user set it. - PT(EggData) data = new EggData(*this); - - int error_count; - { - LightMutexHolder holder(egg_lock); - egg_init_parser(in, get_egg_filename(), data, data); - eggyyparse(); - egg_cleanup_parser(); - error_count = egg_error_count(); - } - - data->post_read(); - - steal_children(*data); - (*this) = *data; - - return (error_count == 0); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::merge -// Access: Public -// Description: Appends the other egg structure to the end of this -// one. The other egg structure is invalidated. -//////////////////////////////////////////////////////////////////// -void EggData:: -merge(EggData &other) { - if (get_coordinate_system() == CS_default) { - // If we haven't specified a coordinate system yet, we inherit the - // other one's. - set_coordinate_system(other.get_coordinate_system()); - - } else { - // Otherwise, the other one is forced into our coordinate system - // before we merge. - other.set_coordinate_system(get_coordinate_system()); - } - steal_children(other); -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::load_externals -// Access: Public -// Description: Loads up all the egg files referenced by -// entries within the egg structure, and inserts their -// contents in place of the entries. Searches -// for files in the searchpath, if not found directly, -// and writes error messages to the indicated output -// stream. Returns true if all externals were loaded -// successfully, false otherwise. -//////////////////////////////////////////////////////////////////// -bool EggData:: -load_externals(const DSearchPath &searchpath) { - return - r_load_externals(searchpath, get_coordinate_system(), NULL); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::load_externals -// Access: Public -// Description: Loads up all the egg files referenced by -// entries within the egg structure, and inserts their -// contents in place of the entries. Searches -// for files in the searchpath, if not found directly, -// and writes error messages to the indicated output -// stream. Returns true if all externals were loaded -// successfully, false otherwise. -//////////////////////////////////////////////////////////////////// -bool EggData:: -load_externals(const DSearchPath &searchpath, BamCacheRecord *record) { - return - r_load_externals(searchpath, get_coordinate_system(), record); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::collapse_equivalent_textures -// Access: Public -// Description: Removes duplicate references to the same texture -// image with the same properties. Considers two -// texture references with identical properties, but -// different tref names, to be equivalent, and collapses -// them, choosing one tref name to keep arbitrarily. -// Returns the number of textures removed. -//////////////////////////////////////////////////////////////////// -int EggData:: -collapse_equivalent_textures() { - EggTextureCollection textures; - textures.find_used_textures(this); - return - textures.collapse_equivalent_textures(~EggTexture::E_tref_name, this); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::collapse_equivalent_materials -// Access: Public -// Description: Removes duplicate references to the same material -// with the same properties. Considers two material -// references with identical properties, but different -// mref names, to be equivalent, and collapses them, -// choosing one mref name to keep arbitrarily. Returns -// the number of materials removed. -//////////////////////////////////////////////////////////////////// -int EggData:: -collapse_equivalent_materials() { - EggMaterialCollection materials; - materials.find_used_materials(this); - return - materials.collapse_equivalent_materials(~EggMaterial::E_mref_name, this); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write_egg -// Access: Public -// Description: The main interface for writing complete egg files. -//////////////////////////////////////////////////////////////////// -bool EggData:: -write_egg(Filename filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - filename.set_text(); - vfs->delete_file(filename); - ostream *file = vfs->open_write_file(filename, true, true); - if (file == (ostream *)NULL) { - egg_cat.error() << "Unable to open " << filename << " for writing.\n"; - return false; - } - - bool wrote_ok = write_egg(*file); - vfs->close_write_file(file); - return wrote_ok; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write_egg -// Access: Public -// Description: The main interface for writing complete egg files. -//////////////////////////////////////////////////////////////////// -bool EggData:: -write_egg(ostream &out) { - pre_write(); - write(out, 0); - return true; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::set_coordinate_system -// Access: Public -// Description: Changes the coordinate system of the EggData. If the -// coordinate system was previously different, this may -// result in a conversion of the data. -//////////////////////////////////////////////////////////////////// -void EggData:: -set_coordinate_system(CoordinateSystem new_coordsys) { - if (new_coordsys == CS_default) { - new_coordsys = get_default_coordinate_system(); - } - if (new_coordsys != _coordsys && - (_coordsys != CS_default && _coordsys != CS_invalid)) { - // Time to convert the data. - LMatrix4d mat = LMatrix4d::convert_mat(_coordsys, new_coordsys); - LMatrix4d inv = LMatrix4d::convert_mat(new_coordsys, _coordsys); - - r_transform(mat, inv, new_coordsys); - r_transform_vertices(mat); - - // Now we have to update the under_flags to ensure that all the - // cached relative matrices are correct. - update_under(0); - } - - _coordsys = new_coordsys; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write -// Access: Protected, Virtual -// Description: Writes the egg data out to the indicated output -// stream. -//////////////////////////////////////////////////////////////////// -void EggData:: -write(ostream &out, int indent_level) const { - PT(EggCoordinateSystem) ecs = new EggCoordinateSystem(_coordsys); - ecs->write(out, indent_level); - EggGroupNode::write(out, indent_level); - out << flush; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::post_read -// Access: Private -// Description: Does whatever processing is appropriate after reading -// the data in from an egg file. -//////////////////////////////////////////////////////////////////// -void EggData:: -post_read() { - CoordinateSystem old_coordsys = _coordsys; - _coordsys = find_coordsys_entry(); - - if (_coordsys == CS_default) { - // If the egg file didn't contain a entry, - // assume it's Y-up, by convention. - _coordsys = CS_yup_right; - - } else if (_coordsys == CS_invalid) { - egg_cat.warning() - << "Contradictory entries encountered.\n"; - _coordsys = CS_yup_right; - } - - r_mark_coordsys(_coordsys); - - if (old_coordsys != CS_default) { - // Now if we had a previous definition, enforce it. This might - // convert the data to the given coordinate system. - set_coordinate_system(old_coordsys); - } - - // Fill this in before we automatically resolve pathnames. - _had_absolute_pathnames = has_absolute_pathnames(); - - if (get_auto_resolve_externals()) { - // Resolve filenames that are relative to the egg file. - DSearchPath dir; - dir.append_directory(get_egg_filename().get_dirname()); - resolve_filenames(dir); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::pre_write -// Access: Private -// Description: Does whatever processing is appropriate just before -// writing the data out to an egg file. This includes -// verifying that vertex pool names are unique, etc. -//////////////////////////////////////////////////////////////////// -void EggData:: -pre_write() { - // Pull out all of the texture definitions in the file and massage - // them a bit. - EggTextureCollection textures; - textures.extract_textures(this); - - // Remove any textures that aren't being used. - textures.remove_unused_textures(this); - - // Collapse out any textures that are completely equivalent. For - // this purpose, we consider two textures with identical properties - // but different tref names to be different. - textures.collapse_equivalent_textures(~0, this); - - // Make sure all of the textures have unique TRef names. - textures.uniquify_trefs(); - textures.sort_by_tref(); - - // Do the same thing with the materials. - EggMaterialCollection materials; - materials.extract_materials(this); - materials.remove_unused_materials(this); - materials.collapse_equivalent_materials(~0, this); - materials.uniquify_mrefs(); - materials.sort_by_mref(); - - // Now put them all back at the head of the file, after any initial - // comment records. - iterator ci = begin(); - while (ci != end() && (*ci)->is_of_type(EggComment::get_class_type())) { - ++ci; - } - textures.insert_textures(this, ci); - materials.insert_materials(this, ci); - - // Also make sure that the vertex pools are uniquely named. This - // also checks textures and materials, which is kind of redundant - // since we just did that, but we don't mind. - EggPoolUniquifier pu; - pu.uniquify(this); -} +// Filename: eggData.cxx +// Created by: drose (20Jan99) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "eggData.h" +#include "eggCoordinateSystem.h" +#include "eggTextureCollection.h" +#include "eggMaterialCollection.h" +#include "eggComment.h" +#include "eggPoolUniquifier.h" +#include "config_egg.h" +#include "config_util.h" +#include "config_express.h" +#include "string_utils.h" +#include "dSearchPath.h" +#include "virtualFileSystem.h" +#include "lightMutexHolder.h" +#include "zStream.h" + +extern int eggyyparse(); +#include "parserDefs.h" +#include "lexerDefs.h" + +TypeHandle EggData::_type_handle; + +//////////////////////////////////////////////////////////////////// +// Function: EggData::resolve_egg_filename +// Access: Public, Static +// Description: Looks for the indicated filename, first along the +// indicated searchpath, and then along the model_path. +// If found, updates the filename to the full path and +// returns true; otherwise, returns false. +//////////////////////////////////////////////////////////////////// +bool EggData:: +resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + + if (egg_filename.is_fully_qualified() && vfs->exists(egg_filename)) { + return true; + } + + vfs->resolve_filename(egg_filename, searchpath, "egg") || + vfs->resolve_filename(egg_filename, get_model_path(), "egg"); + + return vfs->exists(egg_filename); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::read +// Access: Public +// Description: Opens the indicated filename and reads the egg data +// contents from it. Returns true if the file was +// successfully opened and read, false if there were +// some errors, in which case the data may be partially +// read. +// +// error is the output stream to which to write error +// messages. +//////////////////////////////////////////////////////////////////// +bool EggData:: +read(Filename filename, string display_name) { + filename.set_text(); + set_egg_filename(filename); + + if (display_name.empty()) { + display_name = filename; + } + + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + + PT(VirtualFile) vfile = vfs->get_file(filename); + if (vfile == NULL) { + egg_cat.error() << "Could not find " << display_name << "\n"; + return false; + } + set_egg_timestamp(vfile->get_timestamp()); + + istream *file = vfile->open_read_file(true); + if (file == (istream *)NULL) { + egg_cat.error() << "Unable to open " << display_name << "\n"; + return false; + } + + egg_cat.info() + << "Reading " << display_name << "\n"; + + bool read_ok = read(*file); + vfile->close_read_file(file); + return read_ok; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::read +// Access: Public +// Description: Parses the egg syntax contained in the indicated +// input stream. Returns true if the stream was a +// completely valid egg file, false if there were some +// errors, in which case the data may be partially read. +// +// Before you call this routine, you should probably +// call set_egg_filename() to set the name of the egg +// file we're processing, if at all possible. If there +// is no such filename, you may set it to the empty +// string. +//////////////////////////////////////////////////////////////////// +bool EggData:: +read(istream &in) { + // First, dispense with any children we had previously. We will + // replace them with the new data. + clear(); + + // Create a temporary EggData structure to read into. We initialize + // it with a copy of ourselves, so that it will get our _coordsys + // value, if the user set it. + PT(EggData) data = new EggData(*this); + + int error_count; + { + LightMutexHolder holder(egg_lock); + egg_init_parser(in, get_egg_filename(), data, data); + eggyyparse(); + egg_cleanup_parser(); + error_count = egg_error_count(); + } + + data->post_read(); + + steal_children(*data); + (*this) = *data; + + return (error_count == 0); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::merge +// Access: Public +// Description: Appends the other egg structure to the end of this +// one. The other egg structure is invalidated. +//////////////////////////////////////////////////////////////////// +void EggData:: +merge(EggData &other) { + if (get_coordinate_system() == CS_default) { + // If we haven't specified a coordinate system yet, we inherit the + // other one's. + set_coordinate_system(other.get_coordinate_system()); + + } else { + // Otherwise, the other one is forced into our coordinate system + // before we merge. + other.set_coordinate_system(get_coordinate_system()); + } + steal_children(other); +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::load_externals +// Access: Public +// Description: Loads up all the egg files referenced by +// entries within the egg structure, and inserts their +// contents in place of the entries. Searches +// for files in the searchpath, if not found directly, +// and writes error messages to the indicated output +// stream. Returns true if all externals were loaded +// successfully, false otherwise. +//////////////////////////////////////////////////////////////////// +bool EggData:: +load_externals(const DSearchPath &searchpath) { + return + r_load_externals(searchpath, get_coordinate_system(), NULL); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::load_externals +// Access: Public +// Description: Loads up all the egg files referenced by +// entries within the egg structure, and inserts their +// contents in place of the entries. Searches +// for files in the searchpath, if not found directly, +// and writes error messages to the indicated output +// stream. Returns true if all externals were loaded +// successfully, false otherwise. +//////////////////////////////////////////////////////////////////// +bool EggData:: +load_externals(const DSearchPath &searchpath, BamCacheRecord *record) { + return + r_load_externals(searchpath, get_coordinate_system(), record); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::collapse_equivalent_textures +// Access: Public +// Description: Removes duplicate references to the same texture +// image with the same properties. Considers two +// texture references with identical properties, but +// different tref names, to be equivalent, and collapses +// them, choosing one tref name to keep arbitrarily. +// Returns the number of textures removed. +//////////////////////////////////////////////////////////////////// +int EggData:: +collapse_equivalent_textures() { + EggTextureCollection textures; + textures.find_used_textures(this); + return + textures.collapse_equivalent_textures(~EggTexture::E_tref_name, this); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::collapse_equivalent_materials +// Access: Public +// Description: Removes duplicate references to the same material +// with the same properties. Considers two material +// references with identical properties, but different +// mref names, to be equivalent, and collapses them, +// choosing one mref name to keep arbitrarily. Returns +// the number of materials removed. +//////////////////////////////////////////////////////////////////// +int EggData:: +collapse_equivalent_materials() { + EggMaterialCollection materials; + materials.find_used_materials(this); + return + materials.collapse_equivalent_materials(~EggMaterial::E_mref_name, this); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write_egg +// Access: Public +// Description: The main interface for writing complete egg files. +//////////////////////////////////////////////////////////////////// +bool EggData:: +write_egg(Filename filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + filename.set_text(); + vfs->delete_file(filename); + ostream *file = vfs->open_write_file(filename, true, true); + if (file == (ostream *)NULL) { + egg_cat.error() << "Unable to open " << filename << " for writing.\n"; + return false; + } + + bool wrote_ok = write_egg(*file); + vfs->close_write_file(file); + return wrote_ok; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write_egg +// Access: Public +// Description: The main interface for writing complete egg files. +//////////////////////////////////////////////////////////////////// +bool EggData:: +write_egg(ostream &out) { + pre_write(); + + if (egg_precision > 0) { + // Change the egg precision as requested. + streamsize orig_precision = out.precision(); + out.precision((streamsize)egg_precision); + write(out, 0); + out.precision(orig_precision); + } else { + // Use the stream default precision. + write(out, 0); + } + return true; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::set_coordinate_system +// Access: Public +// Description: Changes the coordinate system of the EggData. If the +// coordinate system was previously different, this may +// result in a conversion of the data. +//////////////////////////////////////////////////////////////////// +void EggData:: +set_coordinate_system(CoordinateSystem new_coordsys) { + if (new_coordsys == CS_default) { + new_coordsys = get_default_coordinate_system(); + } + if (new_coordsys != _coordsys && + (_coordsys != CS_default && _coordsys != CS_invalid)) { + // Time to convert the data. + LMatrix4d mat = LMatrix4d::convert_mat(_coordsys, new_coordsys); + LMatrix4d inv = LMatrix4d::convert_mat(new_coordsys, _coordsys); + + r_transform(mat, inv, new_coordsys); + r_transform_vertices(mat); + + // Now we have to update the under_flags to ensure that all the + // cached relative matrices are correct. + update_under(0); + } + + _coordsys = new_coordsys; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write +// Access: Protected, Virtual +// Description: Writes the egg data out to the indicated output +// stream. +//////////////////////////////////////////////////////////////////// +void EggData:: +write(ostream &out, int indent_level) const { + PT(EggCoordinateSystem) ecs = new EggCoordinateSystem(_coordsys); + ecs->write(out, indent_level); + EggGroupNode::write(out, indent_level); + out << flush; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::post_read +// Access: Private +// Description: Does whatever processing is appropriate after reading +// the data in from an egg file. +//////////////////////////////////////////////////////////////////// +void EggData:: +post_read() { + CoordinateSystem old_coordsys = _coordsys; + _coordsys = find_coordsys_entry(); + + if (_coordsys == CS_default) { + // If the egg file didn't contain a entry, + // assume it's Y-up, by convention. + _coordsys = CS_yup_right; + + } else if (_coordsys == CS_invalid) { + egg_cat.warning() + << "Contradictory entries encountered.\n"; + _coordsys = CS_yup_right; + } + + r_mark_coordsys(_coordsys); + + if (old_coordsys != CS_default) { + // Now if we had a previous definition, enforce it. This might + // convert the data to the given coordinate system. + set_coordinate_system(old_coordsys); + } + + // Fill this in before we automatically resolve pathnames. + _had_absolute_pathnames = has_absolute_pathnames(); + + if (get_auto_resolve_externals()) { + // Resolve filenames that are relative to the egg file. + DSearchPath dir; + dir.append_directory(get_egg_filename().get_dirname()); + resolve_filenames(dir); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::pre_write +// Access: Private +// Description: Does whatever processing is appropriate just before +// writing the data out to an egg file. This includes +// verifying that vertex pool names are unique, etc. +//////////////////////////////////////////////////////////////////// +void EggData:: +pre_write() { + // Pull out all of the texture definitions in the file and massage + // them a bit. + EggTextureCollection textures; + textures.extract_textures(this); + + // Remove any textures that aren't being used. + textures.remove_unused_textures(this); + + // Collapse out any textures that are completely equivalent. For + // this purpose, we consider two textures with identical properties + // but different tref names to be different. + textures.collapse_equivalent_textures(~0, this); + + // Make sure all of the textures have unique TRef names. + textures.uniquify_trefs(); + textures.sort_by_tref(); + + // Do the same thing with the materials. + EggMaterialCollection materials; + materials.extract_materials(this); + materials.remove_unused_materials(this); + materials.collapse_equivalent_materials(~0, this); + materials.uniquify_mrefs(); + materials.sort_by_mref(); + + // Now put them all back at the head of the file, after any initial + // comment records. + iterator ci = begin(); + while (ci != end() && (*ci)->is_of_type(EggComment::get_class_type())) { + ++ci; + } + textures.insert_textures(this, ci); + materials.insert_materials(this, ci); + + // Also make sure that the vertex pools are uniquely named. This + // also checks textures and materials, which is kind of redundant + // since we just did that, but we don't mind. + EggPoolUniquifier pu; + pu.uniquify(this); +} diff --git a/pandatool/src/objegg/eggToObjConverter.cxx b/pandatool/src/objegg/eggToObjConverter.cxx index 160d0bf47c..193782ff00 100644 --- a/pandatool/src/objegg/eggToObjConverter.cxx +++ b/pandatool/src/objegg/eggToObjConverter.cxx @@ -1,458 +1,462 @@ -// Filename: eggToObjConverter.cxx -// Created by: drose (19Dec12) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "eggToObjConverter.h" -#include "config_objegg.h" -#include "eggData.h" -#include "string_utils.h" -#include "streamReader.h" -#include "virtualFileSystem.h" -#include "eggPolygon.h" -#include "eggPoint.h" -#include "eggLine.h" -#include "dcast.h" - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -EggToObjConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Copy Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -EggToObjConverter(const EggToObjConverter ©) : - EggToSomethingConverter(copy) -{ -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Destructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -~EggToObjConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::make_copy -// Access: Public, Virtual -// Description: Allocates and returns a new copy of the converter. -//////////////////////////////////////////////////////////////////// -EggToSomethingConverter *EggToObjConverter:: -make_copy() { - return new EggToObjConverter(*this); -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_name -// Access: Public, Virtual -// Description: Returns the English name of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string EggToObjConverter:: -get_name() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_extension -// Access: Public, Virtual -// Description: Returns the common extension of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string EggToObjConverter:: -get_extension() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::supports_compressed -// Access: Published, Virtual -// Description: Returns true if this file type can transparently save -// compressed files (with a .pz extension), false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -supports_compressed() const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_file -// Access: Public, Virtual -// Description: Handles the conversion of the internal EggData to the -// target file format, written to the specified -// filename. -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -write_file(const Filename &filename) { - clear_error(); - - if (_egg_data->get_coordinate_system() == CS_default) { - _egg_data->set_coordinate_system(CS_zup_right); - } - - if (!process(filename)) { - _error = true; - } - return !had_error(); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::process -// Access: Private -// Description: -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -process(const Filename &filename) { - _egg_data->flatten_transforms(); - collect_vertices(_egg_data); - - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - Filename obj_filename = Filename::text_filename(filename); - vfs->delete_file(obj_filename); - ostream *file = vfs->open_write_file(obj_filename, true, true); - if (file == (ostream *)NULL) { - return false; - } - - _current_group = NULL; - - /* - (*file) << "\n#\n" - << "# obj file generated by the following command:\n" - << "# " << get_exec_command() << "\n" - << "#\n\n"; - */ - - write_vertices(*file, "v", 3, _unique_vert3); - write_vertices(*file, "v", 4, _unique_vert4); - write_vertices(*file, "vt", 2, _unique_uv2); - write_vertices(*file, "vt", 3, _unique_uv3); - write_vertices(*file, "vn", 3, _unique_norm); - - write_faces(*file, _egg_data); - - bool success = (file != (ostream *)NULL); - vfs->close_write_file(file); - - return success; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::collect_vertices -// Access: Private -// Description: Recursively walks the egg structure, looking for -// vertices referenced by polygons or points. Any such -// vertices are added to the vertex tables for writing -// to the obj file. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -collect_vertices(EggNode *egg_node) { - if (egg_node->is_of_type(EggPrimitive::get_class_type())) { - EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); - EggPrimitive::iterator pi; - for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { - record_vertex(*pi); - } - - } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { - EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); - - EggGroupNode::iterator ci; - for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { - collect_vertices(*ci); - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_faces -// Access: Private -// Description: Recursively walks the egg structure again, this time -// writing out the face records for any polygons, -// points, or lines encountered. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_faces(ostream &out, EggNode *egg_node) { - if (egg_node->is_of_type(EggPrimitive::get_class_type())) { - const char *prim_type = NULL; - if (egg_node->is_of_type(EggPolygon::get_class_type())) { - prim_type = "f"; - } else if (egg_node->is_of_type(EggPoint::get_class_type())) { - prim_type = "p"; - } else if (egg_node->is_of_type(EggLine::get_class_type())) { - prim_type = "l"; - } - - if (prim_type != NULL) { - write_group_reference(out, egg_node); - - EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); - - out << prim_type; - EggPrimitive::iterator pi; - for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { - VertexDef &vdef = _vmap[(*pi)]; - int vert_index = -1; - int uv_index = -1; - int norm_index = -1; - - if (vdef._vert3_index != -1) { - vert_index = vdef._vert3_index + 1; - } else if (vdef._vert4_index != -1) { - vert_index = vdef._vert4_index + 1 + (int)_unique_vert3.size(); - } - - if (vdef._uv2_index != -1) { - uv_index = vdef._uv2_index + 1; - } else if (vdef._uv3_index != -1) { - uv_index = vdef._uv3_index + 1 + (int)_unique_uv2.size(); - } - - if (vdef._norm_index != -1) { - norm_index = vdef._norm_index + 1; - } - - if (vert_index == -1) { - continue; - } - - if (norm_index != -1) { - if (uv_index != -1) { - out << " " << vert_index << "/" << uv_index << "/" << norm_index; - } else { - out << " " << vert_index << "//" << norm_index; - } - } else if (uv_index != -1) { - out << " " << vert_index << "/" << uv_index; - } else { - out << " " << vert_index; - } - } - out << "\n"; - } - } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { - EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); - - EggGroupNode::iterator ci; - for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { - write_faces(out, *ci); - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_group_reference -// Access: Private -// Description: Writes the "g" tag to describe this polygon's group, -// if needed. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_group_reference(ostream &out, EggNode *egg_node) { - EggGroupNode *egg_group = egg_node->get_parent(); - if (egg_group == _current_group) { - // Same group we wrote last time. - return; - } - - string group_name; - get_group_name(group_name, egg_group); - if (group_name.empty()) { - out << "g default\n"; - } else { - out << "g" << group_name << "\n"; - } - _current_group = egg_group; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_group_name -// Access: Private -// Description: Recursively determines the appropriate string to -// write for the "g" tag to describe a particular -// EggGroupNode. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -get_group_name(string &group_name, EggGroupNode *egg_group) { - string name = trim(egg_group->get_name()); - if (!name.empty()) { - group_name += ' '; - - // Remove nonstandard characters. - for (string::const_iterator ni = name.begin(); ni != name.end(); ++ni) { - char c = (*ni); - if (!isalnum(c)) { - c = '_'; - } - group_name += c; - } - } - - // Now recurse. - EggGroupNode *egg_parent = egg_group->get_parent(); - if (egg_parent != NULL) { - get_group_name(group_name, egg_parent); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_vertex -// Access: Private -// Description: Adds the indicated EggVertex to the unique vertex -// tables, for writing later by write_vertices(). -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -record_vertex(EggVertex *vertex) { - VertexDef &vdef = _vmap[vertex]; - - switch (vertex->get_num_dimensions()) { - case 1: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos1()); - break; - case 2: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos2()); - break; - case 3: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos3()); - break; - case 4: - vdef._vert4_index = record_unique(_unique_vert4, vertex->get_pos4()); - break; - } - - if (vertex->has_uv("")) { - vdef._uv2_index = record_unique(_unique_uv2, vertex->get_uv("")); - } else if (vertex->has_uvw("")) { - vdef._uv3_index = record_unique(_unique_uv3, vertex->get_uvw("")); - } - - if (vertex->has_normal()) { - vdef._norm_index = record_unique(_unique_norm, vertex->get_normal()); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase4d &vec) { - // We record a zero-based index. Note that we will actually write - // out a one-based index to the obj file, as required by the - // standard. - int index = unique.size(); - UniqueVertices::iterator ui = unique.insert(UniqueVertices::value_type(vec, index)).first; - return (*ui).second; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase3d &vec) { - return record_unique(unique, LVecBase4d(vec[0], vec[1], vec[2], 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase2d &vec) { - return record_unique(unique, LVecBase4d(vec[0], vec[1], 0.0, 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, double pos) { - return record_unique(unique, LVecBase4d(pos, 0.0, 0.0, 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_vertices -// Access: Private -// Description: Actually writes the vertex values recorded in the -// indicated table to the obj output stream. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_vertices(ostream &out, const string &prefix, int num_components, - const UniqueVertices &unique) { - // First, sort the list into numeric order. - int num_vertices = (int)unique.size(); - const LVecBase4d **vertices = (const LVecBase4d **)PANDA_MALLOC_ARRAY(num_vertices * sizeof(LVecBase4d *)); - memset(vertices, 0, num_vertices * sizeof(LVecBase4d *)); - UniqueVertices::const_iterator ui; - for (ui = unique.begin(); ui != unique.end(); ++ui) { - int index = (*ui).second; - const LVecBase4d &vec = (*ui).first; - nassertv(index >= 0 && index < num_vertices); - nassertv(vertices[index] == NULL); - vertices[index] = &vec; - } - - for (int i = 0; i < num_vertices; ++i) { - out << prefix; - const LVecBase4d &vec = *(vertices[i]); - for (int ci = 0; ci < num_components; ++ci) { - out << " " << vec[ci]; - } - out << "\n"; - } - PANDA_FREE_ARRAY(vertices); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::VertexDef::Constructor -// Access: Private -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter::VertexDef:: -VertexDef() : - _vert3_index(-1), - _vert4_index(-1), - _uv2_index(-1), - _uv3_index(-1), - _norm_index(-1) -{ -} +// Filename: eggToObjConverter.cxx +// Created by: drose (19Dec12) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "eggToObjConverter.h" +#include "config_objegg.h" +#include "config_egg.h" +#include "eggData.h" +#include "string_utils.h" +#include "streamReader.h" +#include "virtualFileSystem.h" +#include "eggPolygon.h" +#include "eggPoint.h" +#include "eggLine.h" +#include "dcast.h" + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +EggToObjConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +EggToObjConverter(const EggToObjConverter ©) : + EggToSomethingConverter(copy) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Destructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +~EggToObjConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::make_copy +// Access: Public, Virtual +// Description: Allocates and returns a new copy of the converter. +//////////////////////////////////////////////////////////////////// +EggToSomethingConverter *EggToObjConverter:: +make_copy() { + return new EggToObjConverter(*this); +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_name +// Access: Public, Virtual +// Description: Returns the English name of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string EggToObjConverter:: +get_name() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_extension +// Access: Public, Virtual +// Description: Returns the common extension of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string EggToObjConverter:: +get_extension() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::supports_compressed +// Access: Published, Virtual +// Description: Returns true if this file type can transparently save +// compressed files (with a .pz extension), false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +supports_compressed() const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_file +// Access: Public, Virtual +// Description: Handles the conversion of the internal EggData to the +// target file format, written to the specified +// filename. +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +write_file(const Filename &filename) { + clear_error(); + + if (_egg_data->get_coordinate_system() == CS_default) { + _egg_data->set_coordinate_system(CS_zup_right); + } + + if (!process(filename)) { + _error = true; + } + return !had_error(); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::process +// Access: Private +// Description: +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +process(const Filename &filename) { + _egg_data->flatten_transforms(); + collect_vertices(_egg_data); + + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + Filename obj_filename = Filename::text_filename(filename); + vfs->delete_file(obj_filename); + ostream *file = vfs->open_write_file(obj_filename, true, true); + if (file == (ostream *)NULL) { + return false; + } + if (egg_precision != 0) { + file->precision(egg_precision); + } + + _current_group = NULL; + + /* + (*file) << "\n#\n" + << "# obj file generated by the following command:\n" + << "# " << get_exec_command() << "\n" + << "#\n\n"; + */ + + write_vertices(*file, "v", 3, _unique_vert3); + write_vertices(*file, "v", 4, _unique_vert4); + write_vertices(*file, "vt", 2, _unique_uv2); + write_vertices(*file, "vt", 3, _unique_uv3); + write_vertices(*file, "vn", 3, _unique_norm); + + write_faces(*file, _egg_data); + + bool success = (file != (ostream *)NULL); + vfs->close_write_file(file); + + return success; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::collect_vertices +// Access: Private +// Description: Recursively walks the egg structure, looking for +// vertices referenced by polygons or points. Any such +// vertices are added to the vertex tables for writing +// to the obj file. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +collect_vertices(EggNode *egg_node) { + if (egg_node->is_of_type(EggPrimitive::get_class_type())) { + EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); + EggPrimitive::iterator pi; + for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { + record_vertex(*pi); + } + + } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { + EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); + + EggGroupNode::iterator ci; + for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { + collect_vertices(*ci); + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_faces +// Access: Private +// Description: Recursively walks the egg structure again, this time +// writing out the face records for any polygons, +// points, or lines encountered. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_faces(ostream &out, EggNode *egg_node) { + if (egg_node->is_of_type(EggPrimitive::get_class_type())) { + const char *prim_type = NULL; + if (egg_node->is_of_type(EggPolygon::get_class_type())) { + prim_type = "f"; + } else if (egg_node->is_of_type(EggPoint::get_class_type())) { + prim_type = "p"; + } else if (egg_node->is_of_type(EggLine::get_class_type())) { + prim_type = "l"; + } + + if (prim_type != NULL) { + write_group_reference(out, egg_node); + + EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); + + out << prim_type; + EggPrimitive::iterator pi; + for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { + VertexDef &vdef = _vmap[(*pi)]; + int vert_index = -1; + int uv_index = -1; + int norm_index = -1; + + if (vdef._vert3_index != -1) { + vert_index = vdef._vert3_index + 1; + } else if (vdef._vert4_index != -1) { + vert_index = vdef._vert4_index + 1 + (int)_unique_vert3.size(); + } + + if (vdef._uv2_index != -1) { + uv_index = vdef._uv2_index + 1; + } else if (vdef._uv3_index != -1) { + uv_index = vdef._uv3_index + 1 + (int)_unique_uv2.size(); + } + + if (vdef._norm_index != -1) { + norm_index = vdef._norm_index + 1; + } + + if (vert_index == -1) { + continue; + } + + if (norm_index != -1) { + if (uv_index != -1) { + out << " " << vert_index << "/" << uv_index << "/" << norm_index; + } else { + out << " " << vert_index << "//" << norm_index; + } + } else if (uv_index != -1) { + out << " " << vert_index << "/" << uv_index; + } else { + out << " " << vert_index; + } + } + out << "\n"; + } + } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { + EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); + + EggGroupNode::iterator ci; + for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { + write_faces(out, *ci); + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_group_reference +// Access: Private +// Description: Writes the "g" tag to describe this polygon's group, +// if needed. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_group_reference(ostream &out, EggNode *egg_node) { + EggGroupNode *egg_group = egg_node->get_parent(); + if (egg_group == _current_group) { + // Same group we wrote last time. + return; + } + + string group_name; + get_group_name(group_name, egg_group); + if (group_name.empty()) { + out << "g default\n"; + } else { + out << "g" << group_name << "\n"; + } + _current_group = egg_group; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_group_name +// Access: Private +// Description: Recursively determines the appropriate string to +// write for the "g" tag to describe a particular +// EggGroupNode. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +get_group_name(string &group_name, EggGroupNode *egg_group) { + string name = trim(egg_group->get_name()); + if (!name.empty()) { + group_name += ' '; + + // Remove nonstandard characters. + for (string::const_iterator ni = name.begin(); ni != name.end(); ++ni) { + char c = (*ni); + if (!isalnum(c)) { + c = '_'; + } + group_name += c; + } + } + + // Now recurse. + EggGroupNode *egg_parent = egg_group->get_parent(); + if (egg_parent != NULL) { + get_group_name(group_name, egg_parent); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_vertex +// Access: Private +// Description: Adds the indicated EggVertex to the unique vertex +// tables, for writing later by write_vertices(). +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +record_vertex(EggVertex *vertex) { + VertexDef &vdef = _vmap[vertex]; + + switch (vertex->get_num_dimensions()) { + case 1: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos1()); + break; + case 2: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos2()); + break; + case 3: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos3()); + break; + case 4: + vdef._vert4_index = record_unique(_unique_vert4, vertex->get_pos4()); + break; + } + + if (vertex->has_uv("")) { + vdef._uv2_index = record_unique(_unique_uv2, vertex->get_uv("")); + } else if (vertex->has_uvw("")) { + vdef._uv3_index = record_unique(_unique_uv3, vertex->get_uvw("")); + } + + if (vertex->has_normal()) { + vdef._norm_index = record_unique(_unique_norm, vertex->get_normal()); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase4d &vec) { + // We record a zero-based index. Note that we will actually write + // out a one-based index to the obj file, as required by the + // standard. + int index = unique.size(); + UniqueVertices::iterator ui = unique.insert(UniqueVertices::value_type(vec, index)).first; + return (*ui).second; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase3d &vec) { + return record_unique(unique, LVecBase4d(vec[0], vec[1], vec[2], 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase2d &vec) { + return record_unique(unique, LVecBase4d(vec[0], vec[1], 0.0, 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, double pos) { + return record_unique(unique, LVecBase4d(pos, 0.0, 0.0, 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_vertices +// Access: Private +// Description: Actually writes the vertex values recorded in the +// indicated table to the obj output stream. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_vertices(ostream &out, const string &prefix, int num_components, + const UniqueVertices &unique) { + // First, sort the list into numeric order. + int num_vertices = (int)unique.size(); + const LVecBase4d **vertices = (const LVecBase4d **)PANDA_MALLOC_ARRAY(num_vertices * sizeof(LVecBase4d *)); + memset(vertices, 0, num_vertices * sizeof(LVecBase4d *)); + UniqueVertices::const_iterator ui; + for (ui = unique.begin(); ui != unique.end(); ++ui) { + int index = (*ui).second; + const LVecBase4d &vec = (*ui).first; + nassertv(index >= 0 && index < num_vertices); + nassertv(vertices[index] == NULL); + vertices[index] = &vec; + } + + for (int i = 0; i < num_vertices; ++i) { + out << prefix; + const LVecBase4d &vec = *(vertices[i]); + for (int ci = 0; ci < num_components; ++ci) { + out << " " << vec[ci]; + } + out << "\n"; + } + PANDA_FREE_ARRAY(vertices); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::VertexDef::Constructor +// Access: Private +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter::VertexDef:: +VertexDef() : + _vert3_index(-1), + _vert4_index(-1), + _uv2_index(-1), + _uv3_index(-1), + _norm_index(-1) +{ +} diff --git a/pandatool/src/objegg/objToEggConverter.cxx b/pandatool/src/objegg/objToEggConverter.cxx index 61d1a1401a..0db9464e5a 100644 --- a/pandatool/src/objegg/objToEggConverter.cxx +++ b/pandatool/src/objegg/objToEggConverter.cxx @@ -1,1169 +1,1188 @@ -// Filename: objToEggConverter.cxx -// Created by: drose (07Dec10) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "objToEggConverter.h" -#include "config_objegg.h" -#include "eggData.h" -#include "string_utils.h" -#include "streamReader.h" -#include "virtualFileSystem.h" -#include "eggPolygon.h" -#include "nodePath.h" -#include "geomTriangles.h" -#include "geomPoints.h" -#include "colorAttrib.h" -#include "shadeModelAttrib.h" -#include "dcast.h" -#include "triangulator3.h" -#include "config_egg2pg.h" - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -ObjToEggConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Copy Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -ObjToEggConverter(const ObjToEggConverter ©) : - SomethingToEggConverter(copy) -{ -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Destructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -~ObjToEggConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::make_copy -// Access: Public, Virtual -// Description: Allocates and returns a new copy of the converter. -//////////////////////////////////////////////////////////////////// -SomethingToEggConverter *ObjToEggConverter:: -make_copy() { - return new ObjToEggConverter(*this); -} - - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_name -// Access: Public, Virtual -// Description: Returns the English name of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string ObjToEggConverter:: -get_name() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_extension -// Access: Public, Virtual -// Description: Returns the common extension of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string ObjToEggConverter:: -get_extension() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::supports_compressed -// Access: Published, Virtual -// Description: Returns true if this file type can transparently load -// compressed files (with a .pz extension), false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -supports_compressed() const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::supports_convert_to_node -// Access: Published, Virtual -// Description: Returns true if this converter can directly convert -// the model type to internal Panda memory structures, -// given the indicated options, or false otherwise. If -// this returns true, then convert_to_node() may be -// called to perform the conversion, which may be faster -// than calling convert_file() if the ultimate goal is a -// PandaNode anyway. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -supports_convert_to_node(const LoaderOptions &options) const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::convert_file -// Access: Public, Virtual -// Description: Handles the reading of the input file and converting -// it to egg. Returns true if successful, false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -convert_file(const Filename &filename) { - clear_error(); - - if (_egg_data->get_coordinate_system() == CS_default) { - _egg_data->set_coordinate_system(CS_zup_right); - } - - if (!process(filename)) { - _error = true; - } - return !had_error(); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::convert_to_node -// Access: Public, Virtual -// Description: Reads the input file and directly produces a -// ready-to-render model file as a PandaNode. Returns -// NULL on failure, or if it is not supported. (This -// functionality is not supported by all converter -// types; see supports_convert_to_node()). -//////////////////////////////////////////////////////////////////// -PT(PandaNode) ObjToEggConverter:: -convert_to_node(const LoaderOptions &options, const Filename &filename) { - clear_error(); - - _root_node = new PandaNode(""); - _current_vertex_data = new VertexData(_root_node, "root"); - - if (!process_node(filename)) { - _error = true; - } - - _current_vertex_data->close_geom(this); - delete _current_vertex_data; - - if (had_error()) { - return NULL; - } - - return _root_node; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process -// Access: Protected -// Description: Reads the file and converts it to egg structures. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process(const Filename &filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *strm = vfs->open_read_file(filename, true); - if (strm == NULL) { - objegg_cat.error() - << "Couldn't read " << filename << "\n"; - return false; - } - - _v_table.clear(); - _vn_table.clear(); - _rgb_table.clear(); - _vt_table.clear(); - _xvt_table.clear(); - _ref_plane_res.set(1.0, 1.0); - _v4_given = false; - _vt3_given = false; - _f_given = false; - - _vpool = new EggVertexPool("vpool"); - _egg_data->add_child(_vpool); - _root_group = new EggGroup("root"); - _egg_data->add_child(_root_group); - _current_group = _root_group; - - StreamReader sr(strm, true); - string line = sr.readline(); - _line_number = 1; - while (!line.empty()) { - line = trim(line); - if (line.empty()) { - line = sr.readline(); - continue; - } - - while (line[line.length() - 1] == '\\') { - // If it ends on a backslash, it's a continuation character. - string line2 = sr.readline(); - ++_line_number; - if (line2.empty()) { - break; - } - line = line.substr(0, line.length() - 1) + trim(line2); - } - - if (line.substr(0, 15) == "#_ref_plane_res") { - process_ref_plane_res(line); - line = sr.readline(); - continue; - } - - if (line[0] == '#') { - line = sr.readline(); - continue; - } - - if (!process_line(line)) { - return false; - } - line = sr.readline(); - ++_line_number; - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_line(const string &line) { - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - string tag = words[0]; - if (tag == "v") { - return process_v(words); - } else if (tag == "vt") { - return process_vt(words); - } else if (tag == "xvt") { - return process_xvt(words); - } else if (tag == "xvc") { - return process_xvc(words); - } else if (tag == "vn") { - return process_vn(words); - } else if (tag == "f") { - return process_f(words); - } else if (tag == "g") { - return process_g(words); - } else { - bool inserted = _ignored_tags.insert(tag).second; - if (inserted) { - objegg_cat.info() - << "Ignoring tag " << tag << "\n"; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_ref_plane_res(const string &line) { - // the #_ref_plane_res line is a DRZ extension that defines the - // pixel resolution of the projector device. It's needed to - // properly scale the xvt lines. - - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - if (words.size() != 3) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LPoint3 pos; - okflag &= string_to_stdfloat(words[1], _ref_plane_res[0]); - okflag &= string_to_stdfloat(words[2], _ref_plane_res[1]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << ":\n"; - return false; - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_v -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_v(vector_string &words) { - if (words.size() != 4 && words.size() != 5 && - words.size() != 7 && words.size() != 8) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LPoint4 pos; - okflag &= string_to_stdfloat(words[1], pos[0]); - okflag &= string_to_stdfloat(words[2], pos[1]); - okflag &= string_to_stdfloat(words[3], pos[2]); - if (words.size() == 5 || words.size() == 8) { - okflag &= string_to_stdfloat(words[4], pos[3]); - _v4_given = true; - } else { - pos[3] = 1.0; - } - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - _v_table.push_back(pos); - - // Meshlab format might include an RGB color following the vertex - // position. - if (words.size() == 7 && words.size() == 8) { - size_t si = words.size(); - LVecBase3 rgb; - okflag &= string_to_stdfloat(words[si - 3], rgb[0]); - okflag &= string_to_stdfloat(words[si - 2], rgb[1]); - okflag &= string_to_stdfloat(words[si - 1], rgb[2]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - while (_rgb_table.size() + 1 < _v_table.size()) { - _rgb_table.push_back(LVecBase3(1.0, 1.0, 1.0)); - } - _rgb_table.push_back(rgb); - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_vt -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_vt(vector_string &words) { - if (words.size() != 3 && words.size() != 4) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LTexCoord3 uvw; - okflag &= string_to_stdfloat(words[1], uvw[0]); - okflag &= string_to_stdfloat(words[2], uvw[1]); - if (words.size() == 4) { - okflag &= string_to_stdfloat(words[3], uvw[2]); - _vt3_given = true; - } else { - uvw[2] = 0.0; - } - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - _vt_table.push_back(uvw); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_xvt -// Access: Protected -// Description: "xvt" is an extended column invented by DRZ. It -// includes texture coordinates in pixel space of the -// projector device, as well as for each camera. We map -// it to the nominal texture coordinates here. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_xvt(vector_string &words) { - if (words.size() < 3) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LTexCoord uv; - okflag &= string_to_stdfloat(words[1], uv[0]); - okflag &= string_to_stdfloat(words[2], uv[1]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - uv[0] /= _ref_plane_res[0]; - uv[1] = 1.0 - uv[1] / _ref_plane_res[1]; - - _xvt_table.push_back(uv); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_xvc -// Access: Protected -// Description: "xvc" is another extended column invented by DRZ. We -// quietly ignore it. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_xvc(vector_string &words) { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_vn -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_vn(vector_string &words) { - if (words.size() != 4) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LVector3 normal; - okflag &= string_to_stdfloat(words[1], normal[0]); - okflag &= string_to_stdfloat(words[2], normal[1]); - okflag &= string_to_stdfloat(words[3], normal[2]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - normal.normalize(); - - _vn_table.push_back(normal); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_f -// Access: Protected -// Description: Defines a face in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_f(vector_string &words) { - _f_given = true; - - PT(EggPolygon) poly = new EggPolygon; - for (size_t i = 1; i < words.size(); ++i) { - EggVertex *vertex = get_face_vertex(words[i]); - if (vertex == NULL) { - return false; - } - poly->add_vertex(vertex); - } - _current_group->add_child(poly); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_g -// Access: Protected -// Description: Defines a group in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_g(vector_string &words) { - EggGroup *group = _root_group; - - // We assume the group names define a hierarchy of more-specific to - // less-specific group names, so that the first group name is the - // bottommost node, and the last group name is the topmost node. - - // Thus, iterate from the back to the front. - size_t i = words.size(); - while (i > 1) { - --i; - EggNode *child = group->find_child(words[i]); - if (child == NULL || !child->is_of_type(EggGroup::get_class_type())) { - child = new EggGroup(words[i]); - group->add_child(child); - } - group = DCAST(EggGroup, child); - } - - _current_group = group; - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_face_vertex -// Access: Protected -// Description: Returns or creates a vertex in the vpool according to -// the indicated face reference. -//////////////////////////////////////////////////////////////////// -EggVertex *ObjToEggConverter:: -get_face_vertex(const string &reference) { - VertexEntry entry(this, reference); - - // Synthesize a vertex. - EggVertex synth; - - if (entry._vi != 0) { - if (_v4_given) { - synth.set_pos(LCAST(double, _v_table[entry._vi - 1])); - } else { - LPoint4 pos = _v_table[entry._vi - 1]; - synth.set_pos(LPoint3d(pos[0], pos[1], pos[2])); - } - - if (entry._vi - 1 < (int)_rgb_table.size()) { - // We have a per-vertex color too. - LRGBColor rgb = _rgb_table[entry._vi - 1]; - LColor rgba(rgb[0], rgb[1], rgb[2], 1.0); - synth.set_color(rgba); - } - } - - if (entry._vti != 0) { - // We have a texture coordinate; apply it. - if (_vt3_given) { - synth.set_uvw("", LCAST(double, _vt_table[entry._vti - 1])); - } else { - LTexCoord3 uvw = _vt_table[entry._vti - 1]; - synth.set_uv("", LTexCoordd(uvw[0], uvw[1])); - } - } else if (entry._vi - 1 < (int)_xvt_table.size()) { - // We have an xvt texture coordinate. - synth.set_uv("", LCAST(double, _xvt_table[entry._vi - 1])); - } - - if (entry._vni != 0) { - // We have a normal; apply it. - synth.set_normal(LCAST(double, _vn_table[entry._vni - 1])); - } - - return _vpool->create_unique_vertex(synth); -} - - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_node -// Access: Protected -// Description: Reads the file and converts it to PandaNode structures. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_node(const Filename &filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *strm = vfs->open_read_file(filename, true); - if (strm == NULL) { - objegg_cat.error() - << "Couldn't read " << filename << "\n"; - return false; - } - - _v_table.clear(); - _vn_table.clear(); - _rgb_table.clear(); - _vt_table.clear(); - _xvt_table.clear(); - _ref_plane_res.set(1.0, 1.0); - _v4_given = false; - _vt3_given = false; - _f_given = false; - - StreamReader sr(strm, true); - string line = sr.readline(); - _line_number = 1; - while (!line.empty()) { - line = trim(line); - if (line.empty()) { - line = sr.readline(); - continue; - } - - if (line.substr(0, 15) == "#_ref_plane_res") { - process_ref_plane_res(line); - line = sr.readline(); - continue; - } - - if (line[0] == '#') { - line = sr.readline(); - continue; - } - - if (!process_line_node(line)) { - return false; - } - line = sr.readline(); - ++_line_number; - } - - if (!_f_given) { - generate_points(); - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line_node -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_line_node(const string &line) { - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - string tag = words[0]; - if (tag == "v") { - return process_v(words); - } else if (tag == "vt") { - return process_vt(words); - } else if (tag == "xvt") { - return process_xvt(words); - } else if (tag == "xvc") { - return process_xvc(words); - } else if (tag == "vn") { - return process_vn(words); - } else if (tag == "f") { - return process_f_node(words); - } else if (tag == "g") { - return process_g_node(words); - } else { - bool inserted = _ignored_tags.insert(tag).second; - if (inserted) { - objegg_cat.info() - << "Ignoring tag " << tag << "\n"; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_f_node -// Access: Protected -// Description: Defines a face in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_f_node(vector_string &words) { - _f_given = true; - - bool all_vn = true; - int non_vn_index = -1; - - pvector verts; - verts.reserve(words.size() - 1); - for (size_t i = 1; i < words.size(); ++i) { - VertexEntry entry(this, words[i]); - verts.push_back(entry); - if (entry._vni == 0) { - all_vn = false; - non_vn_index = i; - } - } - - if (verts.size() < 3) { - // Not enough vertices. - objegg_cat.error() - << "Degenerate face at " << _line_number << "\n"; - return false; - } - - int synth_vni = 0; - if (!all_vn) { - // Synthesize a normal if we need it. - LNormal normal = LNormal::zero(); - for (size_t i = 0; i < verts.size(); ++i) { - int vi0 = verts[i]._vi; - int vi1 = verts[(i + 1) % verts.size()]._vi; - if (vi0 == 0 || vi1 == 0) { - continue; - } - const LVecBase4 &p0 = _v_table[vi0 - 1]; - const LVecBase4 &p1 = _v_table[vi1 - 1]; - - normal[0] += p0[1] * p1[2] - p0[2] * p1[1]; - normal[1] += p0[2] * p1[0] - p0[0] * p1[2]; - normal[2] += p0[0] * p1[1] - p0[1] * p1[0]; - } - normal.normalize(); - synth_vni = add_synth_normal(normal); - } - - Triangulator3 tri; - int num_tris = 1; - - if (verts.size() != 3) { - // We have to triangulate a higher-order polygon. - for (size_t i = 0; i < verts.size(); ++i) { - const LVecBase4 &p = _v_table[verts[i]._vi - 1]; - tri.add_vertex(p[0], p[1], p[2]); - tri.add_polygon_vertex(i); - } - - tri.triangulate(); - num_tris = tri.get_num_triangles(); - } - - if (_current_vertex_data->_prim->get_num_vertices() + 3 * num_tris > egg_max_indices || - _current_vertex_data->_entries.size() + verts.size() > egg_max_vertices) { - // We'll exceed our specified limit with these triangles; start a new Geom. - _current_vertex_data->close_geom(this); - } - - if (verts.size() == 3) { - // It's already a triangle; add it directly. - _current_vertex_data->add_triangle(this, verts[0], verts[1], verts[2], synth_vni); - - } else { - // Get the triangulated results. - for (int ti = 0; ti < num_tris; ++ti) { - int i0 = tri.get_triangle_v0(ti); - int i1 = tri.get_triangle_v1(ti); - int i2 = tri.get_triangle_v2(ti); - _current_vertex_data->add_triangle(this, verts[i0], verts[i1], verts[i2], synth_vni); - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_g_node -// Access: Protected -// Description: Defines a group in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_g_node(vector_string &words) { - _current_vertex_data->close_geom(this); - delete _current_vertex_data; - _current_vertex_data = NULL; - - NodePath np(_root_node); - - // We assume the group names define a hierarchy of more-specific to - // less-specific group names, so that the first group name is the - // bottommost node, and the last group name is the topmost node. - - // Thus, iterate from the back to the front. - size_t i = words.size(); - string name; - while (i > 2) { - --i; - name = words[i]; - NodePath child = np.find(name); - if (!child) { - child = np.attach_new_node(name); - } - np = child; - } - - if (i > 1) { - --i; - name = words[i]; - } - - _current_vertex_data = new VertexData(np.node(), name); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::generate_points -// Access: Protected -// Description: If an obj file defines no faces, create a bunch of -// GeomPoints to illustrate the vertex positions at -// least. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter:: -generate_points() { - CPT(GeomVertexFormat) format = GeomVertexFormat::get_v3(); - PT(GeomVertexData) vdata = new GeomVertexData("points", format, GeomEnums::UH_static); - vdata->set_num_rows(_v_table.size()); - GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); - - for (size_t vi = 0; vi < _v_table.size(); ++vi) { - const LVecBase4 &p = _v_table[vi]; - vertex_writer.add_data3(p[0], p[1], p[2]); - } - - PT(GeomPrimitive) prim = new GeomPoints(GeomEnums::UH_static); - prim->add_next_vertices(_v_table.size()); - prim->close_primitive(); - - PT(Geom) geom = new Geom(vdata); - geom->add_primitive(prim); - - PT(GeomNode) geom_node = new GeomNode("points"); - geom_node->add_geom(geom); - _root_node->add_child(geom_node); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::add_synth_normal -// Access: Private -// Description: Adds a new normal to the synth_vn table, or returns -// an existing normal. In either case returns the -// 1-based index number to the normal. -//////////////////////////////////////////////////////////////////// -int ObjToEggConverter:: -add_synth_normal(const LVecBase3 &normal) { - pair result = _unique_synth_vn_table.insert(UniqueVec3Table::value_type(normal, _unique_synth_vn_table.size())); - UniqueVec3Table::iterator ni = result.first; - int index = (*ni).second; - - if (result.second) { - // If the normal was added to the table, it's a unique normal, and - // now we have to add it to the table too. - _synth_vn_table.push_back(normal); - } - - return index + 1; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexEntry::Constructor -// Access: Public -// Description: Creates a VertexEntry from the n/n/n string format in -// the obj file face reference. -//////////////////////////////////////////////////////////////////// -ObjToEggConverter::VertexEntry:: -VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex) { - _vi = 0; - _vti = 0; - _vni = 0; - _synth_vni = 0; - - vector_string words; - tokenize(obj_vertex, words, "/", false); - nassertv(!words.empty()); - - for (size_t i = 0; i < words.size(); ++i) { - int index; - if (trim(words[i]).empty()) { - index = 0; - } else { - if (!string_to_int(words[i], index)) { - index = 0; - } - } - - switch (i) { - case 0: - _vi = index; - if (_vi < 0) { - _vi = (int)converter->_v_table.size() + _vi; - } - if (_vi < 0 || _vi - 1 >= (int)converter->_v_table.size()) { - _vi = 0; - } - break; - - case 1: - _vti = index; - if (_vti < 0) { - _vti = (int)converter->_vt_table.size() + _vti; - } - if (_vti < 0 || _vti - 1 >= (int)converter->_vt_table.size()) { - _vti = 0; - } - break; - - case 2: - _vni = index; - if (_vni < 0) { - _vni = (int)converter->_vn_table.size() + _vni; - } - if (_vni < 0 || _vni - 1 >= (int)converter->_vn_table.size()) { - _vni = 0; - } - break; - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter::VertexData:: -VertexData(PandaNode *parent, const string &name) : - _parent(parent), _name(name) -{ - _geom_node = NULL; - - _v4_given = false; - _vt3_given = false; - _vt_given = false; - _rgb_given = false; - _vn_given = false; - - _prim = new GeomTriangles(GeomEnums::UH_static); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::add_vertex -// Access: Public -// Description: Adds a new entry to the vertex data for the indicated -// VertexEntry, or returns an equivalent vertex already -// present. -//////////////////////////////////////////////////////////////////// -int ObjToEggConverter::VertexData:: -add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry) { - pair result; - UniqueVertexEntries::iterator ni; - int index; - - if (entry._vni != 0 || entry._synth_vni != 0) { - // If we are storing a vertex with a normal, see if we - // have already stored a vertex without a normal first. - VertexEntry no_normal(entry); - no_normal._vni = 0; - no_normal._synth_vni = 0; - ni = _unique_entries.find(no_normal); - if (ni != _unique_entries.end()) { - // We did have such a vertex! In this case, repurpose this - // vertex, resetting it to contain this normal. - index = (*ni).second; - _unique_entries.erase(ni); - result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, index)); - nassertr(result.second, index); - nassertr(_entries[index] == no_normal, index); - _entries[index]._vni = entry._vni; - _entries[index]._synth_vni = entry._synth_vni; - return index; - } - } else if (entry._vni == 0 && entry._synth_vni == 0) { - // If we are storing a vertex *without* any normal, see if we have - // already stored a vertex with a normal first. - ni = _unique_entries.lower_bound(entry); - if (ni != _unique_entries.end() && (*ni).first.matches_except_normal(entry)) { - // We had such a vertex, so use it. - index = (*ni).second; - return index; - } - } - - // We didn't already have a vertex we could repurpose, so try to add - // exactly the desired vertex. - result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, _entries.size())); - ni = result.first; - index = (*ni).second; - - if (result.second) { - // If the vertex was added to the table, it's a unique vertex, and - // now we have to add it to the vertex data too. - _entries.push_back(entry); - - if (converter->_v4_given) { - _v4_given = true; - } - if (converter->_vt3_given) { - _vt3_given = true; - } - if (entry._vti != 0) { - _vt_given = true; - } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { - // We have an xvt texture coordinate. - _vt_given = true; - } - if (entry._vi - 1 < (int)converter->_rgb_table.size()) { - // We have a per-vertex color too. - _rgb_given = true; - } - if (entry._vni != 0) { - _vn_given = true; - } - } - - return index; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::add_triangle -// Access: Public -// Description: Adds a triangle to the primitive, as a triple of -// three VertexEntry objects, which are each added to -// the vertex pool. If synth_vni is not 0, it is -// assigned to the last vertex. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter::VertexData:: -add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, - const VertexEntry &v1, const VertexEntry &v2, - int synth_vni) { - int v0i, v1i, v2i; - - v0i = add_vertex(converter, v0); - v1i = add_vertex(converter, v1); - - if (synth_vni != 0) { - VertexEntry v2n(v2); - v2n._synth_vni = synth_vni; - v2i = add_vertex(converter, v2n); - } else { - v2i = add_vertex(converter, v2); - } - - _prim->add_vertices(v0i, v1i, v2i); - _prim->close_primitive(); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::close_geom -// Access: Public -// Description: Finishes the current geom and stores it as a child -// in the root. Prepares for new geoms. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter::VertexData:: -close_geom(const ObjToEggConverter *converter) { - if (_prim->get_num_vertices() != 0) { - // Create a new format that includes only the columns we actually - // used. - PT(GeomVertexArrayFormat) aformat = new GeomVertexArrayFormat; - if (_v4_given) { - aformat->add_column(InternalName::get_vertex(), 4, - GeomEnums::NT_stdfloat, GeomEnums::C_point); - } else { - aformat->add_column(InternalName::get_vertex(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_point); - } - - // We always add normals--if no normals appeared in the file, we - // synthesize them. - aformat->add_column(InternalName::get_normal(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_vector); - - if (_vt_given) { - if (_vt3_given) { - aformat->add_column(InternalName::get_texcoord(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); - } else { - aformat->add_column(InternalName::get_texcoord(), 2, - GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); - } - } - - if (_rgb_given) { - aformat->add_column(InternalName::get_color(), 4, - GeomEnums::NT_uint8, GeomEnums::C_color); - } - - CPT(GeomVertexFormat) format = GeomVertexFormat::register_format(aformat); - - // Create and populate the vertex data. - PT(GeomVertexData) vdata = new GeomVertexData(_name, format, GeomEnums::UH_static); - GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); - GeomVertexWriter normal_writer(vdata, InternalName::get_normal()); - GeomVertexWriter texcoord_writer(vdata, InternalName::get_texcoord()); - GeomVertexWriter color_writer(vdata, InternalName::get_color()); - - for (size_t i = 0; i < _entries.size(); ++i) { - const VertexEntry &entry = _entries[i]; - - if (entry._vi != 0) { - vertex_writer.set_row(i); - vertex_writer.add_data4(converter->_v_table[entry._vi - 1]); - } - if (entry._vti != 0) { - texcoord_writer.set_row(i); - texcoord_writer.add_data3(converter->_vt_table[entry._vti - 1]); - } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { - // We have an xvt texture coordinate. - texcoord_writer.set_row(i); - texcoord_writer.add_data2(converter->_xvt_table[entry._vi - 1]); - } - if (entry._vni != 0) { - normal_writer.set_row(i); - normal_writer.add_data3(converter->_vn_table[entry._vni - 1]); - } else if (entry._synth_vni != 0) { - normal_writer.set_row(i); - normal_writer.add_data3(converter->_synth_vn_table[entry._synth_vni - 1]); - } else { - // In this case, the normal isn't used and doesn't matter; we - // fill it in a unit vector just for neatness. - normal_writer.set_row(i); - normal_writer.add_data3(0, 0, 1); - } - if (_rgb_given) { - if (entry._vi - 1 < (int)converter->_rgb_table.size()) { - color_writer.set_row(i); - color_writer.add_data3(converter->_rgb_table[entry._vi - 1]); - } - } - } - - // Transform to zup-right. - vdata->transform_vertices(LMatrix4::convert_mat(CS_zup_right, CS_default)); - - // Now create a Geom with this data. - CPT(RenderState) state = RenderState::make_empty(); - if (_rgb_given) { - state = state->add_attrib(ColorAttrib::make_vertex()); - } else { - state = state->add_attrib(ColorAttrib::make_flat(LColor(1, 1, 1, 1))); - } - if (!_vn_given) { - // We have synthesized these normals; specify the flat-shading - // attrib. - state = state->add_attrib(ShadeModelAttrib::make(ShadeModelAttrib::M_flat)); - _prim->set_shade_model(GeomEnums::SM_flat_last_vertex); - } - - PT(Geom) geom = new Geom(vdata); - geom->add_primitive(_prim); - - if (_geom_node == NULL) { - _geom_node = new GeomNode(_name); - _parent->add_child(_geom_node); - } - - _geom_node->add_geom(geom, state); - } - - _prim = new GeomTriangles(GeomEnums::UH_static); - _entries.clear(); - _unique_entries.clear(); -} +// Filename: objToEggConverter.cxx +// Created by: drose (07Dec10) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "objToEggConverter.h" +#include "config_objegg.h" +#include "eggData.h" +#include "string_utils.h" +#include "streamReader.h" +#include "virtualFileSystem.h" +#include "eggPolygon.h" +#include "nodePath.h" +#include "geomTriangles.h" +#include "geomPoints.h" +#include "colorAttrib.h" +#include "shadeModelAttrib.h" +#include "dcast.h" +#include "triangulator3.h" +#include "config_egg2pg.h" + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +ObjToEggConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +ObjToEggConverter(const ObjToEggConverter ©) : + SomethingToEggConverter(copy) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Destructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +~ObjToEggConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::make_copy +// Access: Public, Virtual +// Description: Allocates and returns a new copy of the converter. +//////////////////////////////////////////////////////////////////// +SomethingToEggConverter *ObjToEggConverter:: +make_copy() { + return new ObjToEggConverter(*this); +} + + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_name +// Access: Public, Virtual +// Description: Returns the English name of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string ObjToEggConverter:: +get_name() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_extension +// Access: Public, Virtual +// Description: Returns the common extension of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string ObjToEggConverter:: +get_extension() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::supports_compressed +// Access: Published, Virtual +// Description: Returns true if this file type can transparently load +// compressed files (with a .pz extension), false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +supports_compressed() const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::supports_convert_to_node +// Access: Published, Virtual +// Description: Returns true if this converter can directly convert +// the model type to internal Panda memory structures, +// given the indicated options, or false otherwise. If +// this returns true, then convert_to_node() may be +// called to perform the conversion, which may be faster +// than calling convert_file() if the ultimate goal is a +// PandaNode anyway. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +supports_convert_to_node(const LoaderOptions &options) const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::convert_file +// Access: Public, Virtual +// Description: Handles the reading of the input file and converting +// it to egg. Returns true if successful, false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +convert_file(const Filename &filename) { + clear_error(); + + if (_egg_data->get_coordinate_system() == CS_default) { + _egg_data->set_coordinate_system(CS_zup_right); + } + + if (!process(filename)) { + _error = true; + } + return !had_error(); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::convert_to_node +// Access: Public, Virtual +// Description: Reads the input file and directly produces a +// ready-to-render model file as a PandaNode. Returns +// NULL on failure, or if it is not supported. (This +// functionality is not supported by all converter +// types; see supports_convert_to_node()). +//////////////////////////////////////////////////////////////////// +PT(PandaNode) ObjToEggConverter:: +convert_to_node(const LoaderOptions &options, const Filename &filename) { + clear_error(); + + _root_node = new PandaNode(""); + _current_vertex_data = new VertexData(_root_node, "root"); + + if (!process_node(filename)) { + _error = true; + } + + _current_vertex_data->close_geom(this); + delete _current_vertex_data; + + if (had_error()) { + return NULL; + } + + return _root_node; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process +// Access: Protected +// Description: Reads the file and converts it to egg structures. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process(const Filename &filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + istream *strm = vfs->open_read_file(filename, true); + if (strm == NULL) { + objegg_cat.error() + << "Couldn't read " << filename << "\n"; + return false; + } + + _v_table.clear(); + _vn_table.clear(); + _rgb_table.clear(); + _vt_table.clear(); + _xvt_table.clear(); + _ref_plane_res.set(1.0, 1.0); + _v4_given = false; + _vt3_given = false; + _f_given = false; + + _vpool = new EggVertexPool("vpool"); + _egg_data->add_child(_vpool); + _root_group = new EggGroup("root"); + _egg_data->add_child(_root_group); + _current_group = _root_group; + + StreamReader sr(strm, true); + string line = sr.readline(); + _line_number = 1; + while (!line.empty()) { + line = trim(line); + if (line.empty()) { + line = sr.readline(); + continue; + } + + while (line[line.length() - 1] == '\\') { + // If it ends on a backslash, it's a continuation character. + string line2 = sr.readline(); + ++_line_number; + if (line2.empty()) { + break; + } + line = line.substr(0, line.length() - 1) + trim(line2); + } + + if (line.substr(0, 15) == "#_ref_plane_res") { + process_ref_plane_res(line); + line = sr.readline(); + continue; + } + + if (line[0] == '#') { + line = sr.readline(); + continue; + } + + if (!process_line(line)) { + return false; + } + line = sr.readline(); + ++_line_number; + } + + if (!_f_given) { + generate_egg_points(); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_line(const string &line) { + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + string tag = words[0]; + if (tag == "v") { + return process_v(words); + } else if (tag == "vt") { + return process_vt(words); + } else if (tag == "xvt") { + return process_xvt(words); + } else if (tag == "xvc") { + return process_xvc(words); + } else if (tag == "vn") { + return process_vn(words); + } else if (tag == "f") { + return process_f(words); + } else if (tag == "g") { + return process_g(words); + } else { + bool inserted = _ignored_tags.insert(tag).second; + if (inserted) { + objegg_cat.info() + << "Ignoring tag " << tag << "\n"; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_ref_plane_res(const string &line) { + // the #_ref_plane_res line is a DRZ extension that defines the + // pixel resolution of the projector device. It's needed to + // properly scale the xvt lines. + + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + if (words.size() != 3) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LPoint3d pos; + okflag &= string_to_double(words[1], _ref_plane_res[0]); + okflag &= string_to_double(words[2], _ref_plane_res[1]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << ":\n"; + return false; + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_v +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_v(vector_string &words) { + if (words.size() != 4 && words.size() != 5 && + words.size() != 7 && words.size() != 8) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LPoint4d pos; + okflag &= string_to_double(words[1], pos[0]); + okflag &= string_to_double(words[2], pos[1]); + okflag &= string_to_double(words[3], pos[2]); + if (words.size() == 5 || words.size() == 8) { + okflag &= string_to_double(words[4], pos[3]); + _v4_given = true; + } else { + pos[3] = 1.0; + } + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + _v_table.push_back(pos); + + // Meshlab format might include an RGB color following the vertex + // position. + if (words.size() == 7 && words.size() == 8) { + size_t si = words.size(); + LVecBase3d rgb; + okflag &= string_to_double(words[si - 3], rgb[0]); + okflag &= string_to_double(words[si - 2], rgb[1]); + okflag &= string_to_double(words[si - 1], rgb[2]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + while (_rgb_table.size() + 1 < _v_table.size()) { + _rgb_table.push_back(LVecBase3d(1.0, 1.0, 1.0)); + } + _rgb_table.push_back(rgb); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_vt +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_vt(vector_string &words) { + if (words.size() != 3 && words.size() != 4) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LTexCoord3d uvw; + okflag &= string_to_double(words[1], uvw[0]); + okflag &= string_to_double(words[2], uvw[1]); + if (words.size() == 4) { + okflag &= string_to_double(words[3], uvw[2]); + _vt3_given = true; + } else { + uvw[2] = 0.0; + } + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + _vt_table.push_back(uvw); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_xvt +// Access: Protected +// Description: "xvt" is an extended column invented by DRZ. It +// includes texture coordinates in pixel space of the +// projector device, as well as for each camera. We map +// it to the nominal texture coordinates here. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_xvt(vector_string &words) { + if (words.size() < 3) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LTexCoordd uv; + okflag &= string_to_double(words[1], uv[0]); + okflag &= string_to_double(words[2], uv[1]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + uv[0] /= _ref_plane_res[0]; + uv[1] = 1.0 - uv[1] / _ref_plane_res[1]; + + _xvt_table.push_back(uv); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_xvc +// Access: Protected +// Description: "xvc" is another extended column invented by DRZ. We +// quietly ignore it. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_xvc(vector_string &words) { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_vn +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_vn(vector_string &words) { + if (words.size() != 4) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LVector3d normal; + okflag &= string_to_double(words[1], normal[0]); + okflag &= string_to_double(words[2], normal[1]); + okflag &= string_to_double(words[3], normal[2]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + normal.normalize(); + + _vn_table.push_back(normal); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_f +// Access: Protected +// Description: Defines a face in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_f(vector_string &words) { + _f_given = true; + + PT(EggPolygon) poly = new EggPolygon; + for (size_t i = 1; i < words.size(); ++i) { + EggVertex *vertex = get_face_vertex(words[i]); + if (vertex == NULL) { + return false; + } + poly->add_vertex(vertex); + } + _current_group->add_child(poly); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_g +// Access: Protected +// Description: Defines a group in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_g(vector_string &words) { + EggGroup *group = _root_group; + + // We assume the group names define a hierarchy of more-specific to + // less-specific group names, so that the first group name is the + // bottommost node, and the last group name is the topmost node. + + // Thus, iterate from the back to the front. + size_t i = words.size(); + while (i > 1) { + --i; + EggNode *child = group->find_child(words[i]); + if (child == NULL || !child->is_of_type(EggGroup::get_class_type())) { + child = new EggGroup(words[i]); + group->add_child(child); + } + group = DCAST(EggGroup, child); + } + + _current_group = group; + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_face_vertex +// Access: Protected +// Description: Returns or creates a vertex in the vpool according to +// the indicated face reference. +//////////////////////////////////////////////////////////////////// +EggVertex *ObjToEggConverter:: +get_face_vertex(const string &reference) { + VertexEntry entry(this, reference); + + // Synthesize a vertex. + EggVertex synth; + + if (entry._vi != 0) { + if (_v4_given) { + synth.set_pos(LCAST(double, _v_table[entry._vi - 1])); + } else { + LPoint4d pos = _v_table[entry._vi - 1]; + synth.set_pos(LPoint3d(pos[0], pos[1], pos[2])); + } + + if (entry._vi - 1 < (int)_rgb_table.size()) { + // We have a per-vertex color too. + LRGBColord rgb = _rgb_table[entry._vi - 1]; + LColor rgba(rgb[0], rgb[1], rgb[2], 1.0); + synth.set_color(rgba); + } + } + + if (entry._vti != 0) { + // We have a texture coordinate; apply it. + if (_vt3_given) { + synth.set_uvw("", _vt_table[entry._vti - 1]); + } else { + LTexCoord3d uvw = _vt_table[entry._vti - 1]; + synth.set_uv("", LTexCoordd(uvw[0], uvw[1])); + } + } else if (entry._vi - 1 < (int)_xvt_table.size()) { + // We have an xvt texture coordinate. + synth.set_uv("", _xvt_table[entry._vi - 1]); + } + + if (entry._vni != 0) { + // We have a normal; apply it. + synth.set_normal(_vn_table[entry._vni - 1]); + } + + return _vpool->create_unique_vertex(synth); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::generate_egg_points +// Access: Protected +// Description: If an obj file defines no faces, create a bunch of +// EggVertex objects to illustrate the vertex positions +// at least. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter:: +generate_egg_points() { + for (size_t vi = 0; vi < _v_table.size(); ++vi) { + const LVecBase4d &p = _v_table[vi]; + _vpool->make_new_vertex(LVecBase3d(p[0], p[1], p[2])); + } +} + + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_node +// Access: Protected +// Description: Reads the file and converts it to PandaNode structures. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_node(const Filename &filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + istream *strm = vfs->open_read_file(filename, true); + if (strm == NULL) { + objegg_cat.error() + << "Couldn't read " << filename << "\n"; + return false; + } + + _v_table.clear(); + _vn_table.clear(); + _rgb_table.clear(); + _vt_table.clear(); + _xvt_table.clear(); + _ref_plane_res.set(1.0, 1.0); + _v4_given = false; + _vt3_given = false; + _f_given = false; + + StreamReader sr(strm, true); + string line = sr.readline(); + _line_number = 1; + while (!line.empty()) { + line = trim(line); + if (line.empty()) { + line = sr.readline(); + continue; + } + + if (line.substr(0, 15) == "#_ref_plane_res") { + process_ref_plane_res(line); + line = sr.readline(); + continue; + } + + if (line[0] == '#') { + line = sr.readline(); + continue; + } + + if (!process_line_node(line)) { + return false; + } + line = sr.readline(); + ++_line_number; + } + + if (!_f_given) { + generate_points(); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line_node +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_line_node(const string &line) { + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + string tag = words[0]; + if (tag == "v") { + return process_v(words); + } else if (tag == "vt") { + return process_vt(words); + } else if (tag == "xvt") { + return process_xvt(words); + } else if (tag == "xvc") { + return process_xvc(words); + } else if (tag == "vn") { + return process_vn(words); + } else if (tag == "f") { + return process_f_node(words); + } else if (tag == "g") { + return process_g_node(words); + } else { + bool inserted = _ignored_tags.insert(tag).second; + if (inserted) { + objegg_cat.info() + << "Ignoring tag " << tag << "\n"; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_f_node +// Access: Protected +// Description: Defines a face in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_f_node(vector_string &words) { + _f_given = true; + + bool all_vn = true; + int non_vn_index = -1; + + pvector verts; + verts.reserve(words.size() - 1); + for (size_t i = 1; i < words.size(); ++i) { + VertexEntry entry(this, words[i]); + verts.push_back(entry); + if (entry._vni == 0) { + all_vn = false; + non_vn_index = i; + } + } + + if (verts.size() < 3) { + // Not enough vertices. + objegg_cat.error() + << "Degenerate face at " << _line_number << "\n"; + return false; + } + + int synth_vni = 0; + if (!all_vn) { + // Synthesize a normal if we need it. + LNormald normal = LNormald::zero(); + for (size_t i = 0; i < verts.size(); ++i) { + int vi0 = verts[i]._vi; + int vi1 = verts[(i + 1) % verts.size()]._vi; + if (vi0 == 0 || vi1 == 0) { + continue; + } + const LVecBase4d &p0 = _v_table[vi0 - 1]; + const LVecBase4d &p1 = _v_table[vi1 - 1]; + + normal[0] += p0[1] * p1[2] - p0[2] * p1[1]; + normal[1] += p0[2] * p1[0] - p0[0] * p1[2]; + normal[2] += p0[0] * p1[1] - p0[1] * p1[0]; + } + normal.normalize(); + synth_vni = add_synth_normal(normal); + } + + Triangulator3 tri; + int num_tris = 1; + + if (verts.size() != 3) { + // We have to triangulate a higher-order polygon. + for (size_t i = 0; i < verts.size(); ++i) { + const LVecBase4d &p = _v_table[verts[i]._vi - 1]; + tri.add_vertex(p[0], p[1], p[2]); + tri.add_polygon_vertex(i); + } + + tri.triangulate(); + num_tris = tri.get_num_triangles(); + } + + if (_current_vertex_data->_prim->get_num_vertices() + 3 * num_tris > egg_max_indices || + _current_vertex_data->_entries.size() + verts.size() > egg_max_vertices) { + // We'll exceed our specified limit with these triangles; start a new Geom. + _current_vertex_data->close_geom(this); + } + + if (verts.size() == 3) { + // It's already a triangle; add it directly. + _current_vertex_data->add_triangle(this, verts[0], verts[1], verts[2], synth_vni); + + } else { + // Get the triangulated results. + for (int ti = 0; ti < num_tris; ++ti) { + int i0 = tri.get_triangle_v0(ti); + int i1 = tri.get_triangle_v1(ti); + int i2 = tri.get_triangle_v2(ti); + _current_vertex_data->add_triangle(this, verts[i0], verts[i1], verts[i2], synth_vni); + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_g_node +// Access: Protected +// Description: Defines a group in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_g_node(vector_string &words) { + _current_vertex_data->close_geom(this); + delete _current_vertex_data; + _current_vertex_data = NULL; + + NodePath np(_root_node); + + // We assume the group names define a hierarchy of more-specific to + // less-specific group names, so that the first group name is the + // bottommost node, and the last group name is the topmost node. + + // Thus, iterate from the back to the front. + size_t i = words.size(); + string name; + while (i > 2) { + --i; + name = words[i]; + NodePath child = np.find(name); + if (!child) { + child = np.attach_new_node(name); + } + np = child; + } + + if (i > 1) { + --i; + name = words[i]; + } + + _current_vertex_data = new VertexData(np.node(), name); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::generate_points +// Access: Protected +// Description: If an obj file defines no faces, create a bunch of +// GeomPoints to illustrate the vertex positions at +// least. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter:: +generate_points() { + CPT(GeomVertexFormat) format = GeomVertexFormat::get_v3(); + PT(GeomVertexData) vdata = new GeomVertexData("points", format, GeomEnums::UH_static); + vdata->set_num_rows(_v_table.size()); + GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); + + for (size_t vi = 0; vi < _v_table.size(); ++vi) { + const LVecBase4d &p = _v_table[vi]; + vertex_writer.add_data3d(p[0], p[1], p[2]); + } + + PT(GeomPrimitive) prim = new GeomPoints(GeomEnums::UH_static); + prim->add_next_vertices(_v_table.size()); + prim->close_primitive(); + + PT(Geom) geom = new Geom(vdata); + geom->add_primitive(prim); + + PT(GeomNode) geom_node = new GeomNode("points"); + geom_node->add_geom(geom); + _root_node->add_child(geom_node); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::add_synth_normal +// Access: Private +// Description: Adds a new normal to the synth_vn table, or returns +// an existing normal. In either case returns the +// 1-based index number to the normal. +//////////////////////////////////////////////////////////////////// +int ObjToEggConverter:: +add_synth_normal(const LVecBase3d &normal) { + pair result = _unique_synth_vn_table.insert(UniqueVec3Table::value_type(normal, _unique_synth_vn_table.size())); + UniqueVec3Table::iterator ni = result.first; + int index = (*ni).second; + + if (result.second) { + // If the normal was added to the table, it's a unique normal, and + // now we have to add it to the table too. + _synth_vn_table.push_back(normal); + } + + return index + 1; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexEntry::Constructor +// Access: Public +// Description: Creates a VertexEntry from the n/n/n string format in +// the obj file face reference. +//////////////////////////////////////////////////////////////////// +ObjToEggConverter::VertexEntry:: +VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex) { + _vi = 0; + _vti = 0; + _vni = 0; + _synth_vni = 0; + + vector_string words; + tokenize(obj_vertex, words, "/", false); + nassertv(!words.empty()); + + for (size_t i = 0; i < words.size(); ++i) { + int index; + if (trim(words[i]).empty()) { + index = 0; + } else { + if (!string_to_int(words[i], index)) { + index = 0; + } + } + + switch (i) { + case 0: + _vi = index; + if (_vi < 0) { + _vi = (int)converter->_v_table.size() + _vi; + } + if (_vi < 0 || _vi - 1 >= (int)converter->_v_table.size()) { + _vi = 0; + } + break; + + case 1: + _vti = index; + if (_vti < 0) { + _vti = (int)converter->_vt_table.size() + _vti; + } + if (_vti < 0 || _vti - 1 >= (int)converter->_vt_table.size()) { + _vti = 0; + } + break; + + case 2: + _vni = index; + if (_vni < 0) { + _vni = (int)converter->_vn_table.size() + _vni; + } + if (_vni < 0 || _vni - 1 >= (int)converter->_vn_table.size()) { + _vni = 0; + } + break; + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter::VertexData:: +VertexData(PandaNode *parent, const string &name) : + _parent(parent), _name(name) +{ + _geom_node = NULL; + + _v4_given = false; + _vt3_given = false; + _vt_given = false; + _rgb_given = false; + _vn_given = false; + + _prim = new GeomTriangles(GeomEnums::UH_static); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::add_vertex +// Access: Public +// Description: Adds a new entry to the vertex data for the indicated +// VertexEntry, or returns an equivalent vertex already +// present. +//////////////////////////////////////////////////////////////////// +int ObjToEggConverter::VertexData:: +add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry) { + pair result; + UniqueVertexEntries::iterator ni; + int index; + + if (entry._vni != 0 || entry._synth_vni != 0) { + // If we are storing a vertex with a normal, see if we + // have already stored a vertex without a normal first. + VertexEntry no_normal(entry); + no_normal._vni = 0; + no_normal._synth_vni = 0; + ni = _unique_entries.find(no_normal); + if (ni != _unique_entries.end()) { + // We did have such a vertex! In this case, repurpose this + // vertex, resetting it to contain this normal. + index = (*ni).second; + _unique_entries.erase(ni); + result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, index)); + nassertr(result.second, index); + nassertr(_entries[index] == no_normal, index); + _entries[index]._vni = entry._vni; + _entries[index]._synth_vni = entry._synth_vni; + return index; + } + } else if (entry._vni == 0 && entry._synth_vni == 0) { + // If we are storing a vertex *without* any normal, see if we have + // already stored a vertex with a normal first. + ni = _unique_entries.lower_bound(entry); + if (ni != _unique_entries.end() && (*ni).first.matches_except_normal(entry)) { + // We had such a vertex, so use it. + index = (*ni).second; + return index; + } + } + + // We didn't already have a vertex we could repurpose, so try to add + // exactly the desired vertex. + result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, _entries.size())); + ni = result.first; + index = (*ni).second; + + if (result.second) { + // If the vertex was added to the table, it's a unique vertex, and + // now we have to add it to the vertex data too. + _entries.push_back(entry); + + if (converter->_v4_given) { + _v4_given = true; + } + if (converter->_vt3_given) { + _vt3_given = true; + } + if (entry._vti != 0) { + _vt_given = true; + } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { + // We have an xvt texture coordinate. + _vt_given = true; + } + if (entry._vi - 1 < (int)converter->_rgb_table.size()) { + // We have a per-vertex color too. + _rgb_given = true; + } + if (entry._vni != 0) { + _vn_given = true; + } + } + + return index; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::add_triangle +// Access: Public +// Description: Adds a triangle to the primitive, as a triple of +// three VertexEntry objects, which are each added to +// the vertex pool. If synth_vni is not 0, it is +// assigned to the last vertex. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter::VertexData:: +add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, + const VertexEntry &v1, const VertexEntry &v2, + int synth_vni) { + int v0i, v1i, v2i; + + v0i = add_vertex(converter, v0); + v1i = add_vertex(converter, v1); + + if (synth_vni != 0) { + VertexEntry v2n(v2); + v2n._synth_vni = synth_vni; + v2i = add_vertex(converter, v2n); + } else { + v2i = add_vertex(converter, v2); + } + + _prim->add_vertices(v0i, v1i, v2i); + _prim->close_primitive(); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::close_geom +// Access: Public +// Description: Finishes the current geom and stores it as a child +// in the root. Prepares for new geoms. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter::VertexData:: +close_geom(const ObjToEggConverter *converter) { + if (_prim->get_num_vertices() != 0) { + // Create a new format that includes only the columns we actually + // used. + PT(GeomVertexArrayFormat) aformat = new GeomVertexArrayFormat; + if (_v4_given) { + aformat->add_column(InternalName::get_vertex(), 4, + GeomEnums::NT_stdfloat, GeomEnums::C_point); + } else { + aformat->add_column(InternalName::get_vertex(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_point); + } + + // We always add normals--if no normals appeared in the file, we + // synthesize them. + aformat->add_column(InternalName::get_normal(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_vector); + + if (_vt_given) { + if (_vt3_given) { + aformat->add_column(InternalName::get_texcoord(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); + } else { + aformat->add_column(InternalName::get_texcoord(), 2, + GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); + } + } + + if (_rgb_given) { + aformat->add_column(InternalName::get_color(), 4, + GeomEnums::NT_uint8, GeomEnums::C_color); + } + + CPT(GeomVertexFormat) format = GeomVertexFormat::register_format(aformat); + + // Create and populate the vertex data. + PT(GeomVertexData) vdata = new GeomVertexData(_name, format, GeomEnums::UH_static); + GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); + GeomVertexWriter normal_writer(vdata, InternalName::get_normal()); + GeomVertexWriter texcoord_writer(vdata, InternalName::get_texcoord()); + GeomVertexWriter color_writer(vdata, InternalName::get_color()); + + for (size_t i = 0; i < _entries.size(); ++i) { + const VertexEntry &entry = _entries[i]; + + if (entry._vi != 0) { + vertex_writer.set_row(i); + vertex_writer.add_data4d(converter->_v_table[entry._vi - 1]); + } + if (entry._vti != 0) { + texcoord_writer.set_row(i); + texcoord_writer.add_data3d(converter->_vt_table[entry._vti - 1]); + } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { + // We have an xvt texture coordinate. + texcoord_writer.set_row(i); + texcoord_writer.add_data2d(converter->_xvt_table[entry._vi - 1]); + } + if (entry._vni != 0) { + normal_writer.set_row(i); + normal_writer.add_data3d(converter->_vn_table[entry._vni - 1]); + } else if (entry._synth_vni != 0) { + normal_writer.set_row(i); + normal_writer.add_data3d(converter->_synth_vn_table[entry._synth_vni - 1]); + } else { + // In this case, the normal isn't used and doesn't matter; we + // fill it in a unit vector just for neatness. + normal_writer.set_row(i); + normal_writer.add_data3d(0, 0, 1); + } + if (_rgb_given) { + if (entry._vi - 1 < (int)converter->_rgb_table.size()) { + color_writer.set_row(i); + color_writer.add_data3d(converter->_rgb_table[entry._vi - 1]); + } + } + } + + // Transform to zup-right. + vdata->transform_vertices(LMatrix4::convert_mat(CS_zup_right, CS_default)); + + // Now create a Geom with this data. + CPT(RenderState) state = RenderState::make_empty(); + if (_rgb_given) { + state = state->add_attrib(ColorAttrib::make_vertex()); + } else { + state = state->add_attrib(ColorAttrib::make_flat(LColor(1, 1, 1, 1))); + } + if (!_vn_given) { + // We have synthesized these normals; specify the flat-shading + // attrib. + state = state->add_attrib(ShadeModelAttrib::make(ShadeModelAttrib::M_flat)); + _prim->set_shade_model(GeomEnums::SM_flat_last_vertex); + } + + PT(Geom) geom = new Geom(vdata); + geom->add_primitive(_prim); + + if (_geom_node == NULL) { + _geom_node = new GeomNode(_name); + _parent->add_child(_geom_node); + } + + _geom_node->add_geom(geom, state); + } + + _prim = new GeomTriangles(GeomEnums::UH_static); + _entries.clear(); + _unique_entries.clear(); +} diff --git a/pandatool/src/objegg/objToEggConverter.h b/pandatool/src/objegg/objToEggConverter.h index fd081c6516..ba537dbe2a 100644 --- a/pandatool/src/objegg/objToEggConverter.h +++ b/pandatool/src/objegg/objToEggConverter.h @@ -1,151 +1,152 @@ -// Filename: ObjToEggConverter.h -// Created by: drose (07Dec10) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#ifndef OBJTOEGGCONVERTER_H -#define OBJTOEGGCONVERTER_H - -#include "pandatoolbase.h" - -#include "somethingToEggConverter.h" -#include "eggVertexPool.h" -#include "eggGroup.h" -#include "geomVertexData.h" -#include "geomVertexWriter.h" -#include "geomPrimitive.h" -#include "geomNode.h" -#include "pandaNode.h" -#include "pvector.h" -#include "epvector.h" - -//////////////////////////////////////////////////////////////////// -// Class : ObjToEggConverter -// Description : Convert an Obj file to egg data. -//////////////////////////////////////////////////////////////////// -class ObjToEggConverter : public SomethingToEggConverter { -public: - ObjToEggConverter(); - ObjToEggConverter(const ObjToEggConverter ©); - ~ObjToEggConverter(); - - virtual SomethingToEggConverter *make_copy(); - - virtual string get_name() const; - virtual string get_extension() const; - virtual bool supports_compressed() const; - virtual bool supports_convert_to_node(const LoaderOptions &options) const; - - virtual bool convert_file(const Filename &filename); - virtual PT(PandaNode) convert_to_node(const LoaderOptions &options, const Filename &filename); - -protected: - bool process(const Filename &filename); - bool process_line(const string &line); - bool process_ref_plane_res(const string &line); - - bool process_v(vector_string &words); - bool process_vt(vector_string &words); - bool process_xvt(vector_string &words); - bool process_xvc(vector_string &words); - bool process_vn(vector_string &words); - bool process_f(vector_string &words); - bool process_g(vector_string &words); - - EggVertex *get_face_vertex(const string &face_reference); - - bool process_node(const Filename &filename); - bool process_line_node(const string &line); - - bool process_f_node(vector_string &words); - bool process_g_node(vector_string &words); - - void generate_points(); - int add_synth_normal(const LVecBase3 &normal); - - // Read from the obj file. - int _line_number; - typedef epvector Vec4Table; - typedef epvector Vec3Table; - typedef epvector Vec2Table; - typedef pmap UniqueVec3Table; - - Vec4Table _v_table; - Vec3Table _vn_table, _rgb_table; - Vec3Table _vt_table; - Vec2Table _xvt_table; - Vec3Table _synth_vn_table; - UniqueVec3Table _unique_synth_vn_table; - LVecBase2 _ref_plane_res; - bool _v4_given, _vt3_given; - bool _f_given; - - pset _ignored_tags; - - // Structures filled when creating an egg file. - PT(EggVertexPool) _vpool; - PT(EggGroup) _root_group; - EggGroup *_current_group; - - // Structures filled when creating a PandaNode directly. - PT(PandaNode) _root_node; - - class VertexEntry { - public: - VertexEntry(); - VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex); - - INLINE bool operator < (const VertexEntry &other) const; - INLINE bool operator == (const VertexEntry &other) const; - INLINE bool matches_except_normal(const VertexEntry &other) const; - - // The 1-based vertex, texcoord, and normal index numbers - // appearing in the obj file for this vertex. 0 if the index - // number is not given. - int _vi, _vti, _vni; - - // The 1-based index number to the synthesized normal, if needed. - int _synth_vni; - }; - typedef pmap UniqueVertexEntries; - typedef pvector VertexEntries; - - class VertexData { - public: - VertexData(PandaNode *parent, const string &name); - - int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); - void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, - const VertexEntry &v1, const VertexEntry &v2, - int synth_vni); - void close_geom(const ObjToEggConverter *converter); - - PT(PandaNode) _parent; - string _name; - PT(GeomNode) _geom_node; - - PT(GeomPrimitive) _prim; - VertexEntries _entries; - UniqueVertexEntries _unique_entries; - - bool _v4_given, _vt3_given; - bool _vt_given, _rgb_given, _vn_given; - }; - - VertexData *_current_vertex_data; - - friend class VertexData; -}; - -#include "objToEggConverter.I" - -#endif +// Filename: ObjToEggConverter.h +// Created by: drose (07Dec10) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef OBJTOEGGCONVERTER_H +#define OBJTOEGGCONVERTER_H + +#include "pandatoolbase.h" + +#include "somethingToEggConverter.h" +#include "eggVertexPool.h" +#include "eggGroup.h" +#include "geomVertexData.h" +#include "geomVertexWriter.h" +#include "geomPrimitive.h" +#include "geomNode.h" +#include "pandaNode.h" +#include "pvector.h" +#include "epvector.h" + +//////////////////////////////////////////////////////////////////// +// Class : ObjToEggConverter +// Description : Convert an Obj file to egg data. +//////////////////////////////////////////////////////////////////// +class ObjToEggConverter : public SomethingToEggConverter { +public: + ObjToEggConverter(); + ObjToEggConverter(const ObjToEggConverter ©); + ~ObjToEggConverter(); + + virtual SomethingToEggConverter *make_copy(); + + virtual string get_name() const; + virtual string get_extension() const; + virtual bool supports_compressed() const; + virtual bool supports_convert_to_node(const LoaderOptions &options) const; + + virtual bool convert_file(const Filename &filename); + virtual PT(PandaNode) convert_to_node(const LoaderOptions &options, const Filename &filename); + +protected: + bool process(const Filename &filename); + bool process_line(const string &line); + bool process_ref_plane_res(const string &line); + + bool process_v(vector_string &words); + bool process_vt(vector_string &words); + bool process_xvt(vector_string &words); + bool process_xvc(vector_string &words); + bool process_vn(vector_string &words); + bool process_f(vector_string &words); + bool process_g(vector_string &words); + + EggVertex *get_face_vertex(const string &face_reference); + void generate_egg_points(); + + bool process_node(const Filename &filename); + bool process_line_node(const string &line); + + bool process_f_node(vector_string &words); + bool process_g_node(vector_string &words); + + void generate_points(); + int add_synth_normal(const LVecBase3d &normal); + + // Read from the obj file. + int _line_number; + typedef epvector Vec4Table; + typedef epvector Vec3Table; + typedef epvector Vec2Table; + typedef pmap UniqueVec3Table; + + Vec4Table _v_table; + Vec3Table _vn_table, _rgb_table; + Vec3Table _vt_table; + Vec2Table _xvt_table; + Vec3Table _synth_vn_table; + UniqueVec3Table _unique_synth_vn_table; + LVecBase2d _ref_plane_res; + bool _v4_given, _vt3_given; + bool _f_given; + + pset _ignored_tags; + + // Structures filled when creating an egg file. + PT(EggVertexPool) _vpool; + PT(EggGroup) _root_group; + EggGroup *_current_group; + + // Structures filled when creating a PandaNode directly. + PT(PandaNode) _root_node; + + class VertexEntry { + public: + VertexEntry(); + VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex); + + INLINE bool operator < (const VertexEntry &other) const; + INLINE bool operator == (const VertexEntry &other) const; + INLINE bool matches_except_normal(const VertexEntry &other) const; + + // The 1-based vertex, texcoord, and normal index numbers + // appearing in the obj file for this vertex. 0 if the index + // number is not given. + int _vi, _vti, _vni; + + // The 1-based index number to the synthesized normal, if needed. + int _synth_vni; + }; + typedef pmap UniqueVertexEntries; + typedef pvector VertexEntries; + + class VertexData { + public: + VertexData(PandaNode *parent, const string &name); + + int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); + void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, + const VertexEntry &v1, const VertexEntry &v2, + int synth_vni); + void close_geom(const ObjToEggConverter *converter); + + PT(PandaNode) _parent; + string _name; + PT(GeomNode) _geom_node; + + PT(GeomPrimitive) _prim; + VertexEntries _entries; + UniqueVertexEntries _unique_entries; + + bool _v4_given, _vt3_given; + bool _vt_given, _rgb_given, _vn_given; + }; + + VertexData *_current_vertex_data; + + friend class VertexData; +}; + +#include "objToEggConverter.I" + +#endif From a080135f0c83d111fc327c429a07eedc0b81c677 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 9 Oct 2015 12:24:03 +0200 Subject: [PATCH 154/200] remove extensions folder --- direct/src/extensions/CInterval-extensions.py | 97 -- .../extensions/ConfigVariable-extensions.py | 50 - .../ConfigVariableBool-extensions.py | 5 - .../ConfigVariableDouble-extensions.py | 5 - .../ConfigVariableInt-extensions.py | 5 - .../ConfigVariableList-extensions.py | 18 - .../ConfigVariableString-extensions.py | 6 - .../src/extensions/HTTPChannel-extensions.py | 31 - direct/src/extensions/Mat3-extensions.py | 16 - .../MouseWatcherRegion-extensions.py | 27 - direct/src/extensions/Node-extensions.py | 20 - direct/src/extensions/NodePath-extensions.py | 1093 ----------------- .../NurbsCurveEvaluator-extensions.py | 26 - .../NurbsSurfaceEvaluator-extensions.py | 36 - .../src/extensions/PandaSystem-extensions.py | 6 - direct/src/extensions/Sources.pp | 3 - .../SpriteParticleRenderer-extensions.py | 83 -- direct/src/extensions/VBase3-extensions.py | 15 - direct/src/extensions/VBase4-extensions.py | 15 - direct/src/extensions/__init__.py | 1 - 20 files changed, 1558 deletions(-) delete mode 100644 direct/src/extensions/CInterval-extensions.py delete mode 100644 direct/src/extensions/ConfigVariable-extensions.py delete mode 100644 direct/src/extensions/ConfigVariableBool-extensions.py delete mode 100644 direct/src/extensions/ConfigVariableDouble-extensions.py delete mode 100644 direct/src/extensions/ConfigVariableInt-extensions.py delete mode 100755 direct/src/extensions/ConfigVariableList-extensions.py delete mode 100644 direct/src/extensions/ConfigVariableString-extensions.py delete mode 100644 direct/src/extensions/HTTPChannel-extensions.py delete mode 100755 direct/src/extensions/Mat3-extensions.py delete mode 100644 direct/src/extensions/MouseWatcherRegion-extensions.py delete mode 100644 direct/src/extensions/Node-extensions.py delete mode 100644 direct/src/extensions/NodePath-extensions.py delete mode 100644 direct/src/extensions/NurbsCurveEvaluator-extensions.py delete mode 100644 direct/src/extensions/NurbsSurfaceEvaluator-extensions.py delete mode 100644 direct/src/extensions/PandaSystem-extensions.py delete mode 100644 direct/src/extensions/Sources.pp delete mode 100644 direct/src/extensions/SpriteParticleRenderer-extensions.py delete mode 100755 direct/src/extensions/VBase3-extensions.py delete mode 100755 direct/src/extensions/VBase4-extensions.py delete mode 100644 direct/src/extensions/__init__.py diff --git a/direct/src/extensions/CInterval-extensions.py b/direct/src/extensions/CInterval-extensions.py deleted file mode 100644 index f7b160fc2e..0000000000 --- a/direct/src/extensions/CInterval-extensions.py +++ /dev/null @@ -1,97 +0,0 @@ - - """ - CInterval-extensions module: contains methods to extend functionality - of the CInterval class - """ - - from direct.directnotify.DirectNotifyGlobal import directNotify - notify = directNotify.newCategory("Interval") - - def setT(self, t): - # Overridden from the C++ function to call privPostEvent - # afterward. We do this by renaming the C++ function in - # FFIRename. - self._priv__cSetT(t) - self.privPostEvent() - - def play(self, t0 = 0.0, duration = None, scale = 1.0): - self.notify.error("using deprecated CInterval.play() interface") - if duration: # None or 0 implies full length - self.start(t0, t0 + duration, scale) - else: - self.start(t0, -1, scale) - - def stop(self): - self.notify.error("using deprecated CInterval.stop() interface") - self.finish() - - def setFinalT(self): - self.notify.error("using deprecated CInterval.setFinalT() interface") - self.finish() - - def privPostEvent(self): - # Call after calling any of the priv* methods to do any required - # Python finishing steps. - t = self.getT() - if hasattr(self, "setTHooks"): - for func in self.setTHooks: - func(t) - - def popupControls(self, tl = None): - """ - Popup control panel for interval. - """ - from direct.showbase.TkGlobal import Toplevel, Frame, Button, LEFT, X, Pmw - import math - from direct.tkwidgets import EntryScale - if tl == None: - tl = Toplevel() - tl.title('Interval Controls') - outerFrame = Frame(tl) - def entryScaleCommand(t, s=self): - s.setT(t) - s.pause() - self.es = es = EntryScale.EntryScale( - outerFrame, text = self.getName(), - min = 0, max = math.floor(self.getDuration() * 100) / 100, - command = entryScaleCommand) - es.set(self.getT(), fCommand = 0) - es.pack(expand = 1, fill = X) - bf = Frame(outerFrame) - # Jump to start and end - def toStart(s=self, es=es): - s.clearToInitial() - s.setT(0) - es.set(0, fCommand = 0) - def toEnd(s=self): - s.setT(s.getDuration()) - s.pause() - jumpToStart = Button(bf, text = '<<', command = toStart) - # Stop/play buttons - def doPlay(s=self, es=es): - s.resume(es.get()) - - stop = Button(bf, text = 'Stop', - command = lambda s=self: s.pause()) - play = Button( - bf, text = 'Play', - command = doPlay) - jumpToEnd = Button(bf, text = '>>', command = toEnd) - jumpToStart.pack(side = LEFT, expand = 1, fill = X) - play.pack(side = LEFT, expand = 1, fill = X) - stop.pack(side = LEFT, expand = 1, fill = X) - jumpToEnd.pack(side = LEFT, expand = 1, fill = X) - bf.pack(expand = 1, fill = X) - outerFrame.pack(expand = 1, fill = X) - # Add function to update slider during setT calls - def update(t, es=es): - es.set(t, fCommand = 0) - if not hasattr(self, "setTHooks"): - self.setTHooks = [] - self.setTHooks.append(update) - self.setWantsTCallback(1) - # Clear out function on destroy - def onDestroy(e, s=self, u=update): - if u in s.setTHooks: - s.setTHooks.remove(u) - tl.bind('', onDestroy) diff --git a/direct/src/extensions/ConfigVariable-extensions.py b/direct/src/extensions/ConfigVariable-extensions.py deleted file mode 100644 index 62b5473212..0000000000 --- a/direct/src/extensions/ConfigVariable-extensions.py +++ /dev/null @@ -1,50 +0,0 @@ - - def __str__(self): - return self.getStringValue() - - def __hash__(self): - raise AttributeError, "ConfigVariables are not immutable." - - def ls(self): - from pandac.Notify import Notify - self.write(Notify.out()) - - def __int__(self): - return int(self.getValue()) - - def __long__(self): - return long(self.getValue()) - - def __float__(self): - return float(self.getValue()) - - def __nonzero__(self): - return bool(self.getValue()) - - def __oct__(self): - return oct(self.getValue()) - - def __hex__(self): - return hex(self.getValue()) - - def __cmp__(self, other): - return self.getValue().__cmp__(other) - - def __neg__(self): - return -self.getValue() - - def __coerce__(self, other): - return (self.getValue(), other) - - def __len__(self): - return self.getNumWords() - - def __getitem__(self, n): - if n < 0 or n >= self.getNumWords(): - raise IndexError - return self.getWord(n) - - def __setitem__(self, n, value): - if n < 0 or n > self.getNumWords(): - raise IndexError - self.setWord(n, value) diff --git a/direct/src/extensions/ConfigVariableBool-extensions.py b/direct/src/extensions/ConfigVariableBool-extensions.py deleted file mode 100644 index 7a5e492f32..0000000000 --- a/direct/src/extensions/ConfigVariableBool-extensions.py +++ /dev/null @@ -1,5 +0,0 @@ - - def __getitem__(self, n): - if n < 0 or n >= self.getNumWords(): - raise IndexError - return self.getWord(n) diff --git a/direct/src/extensions/ConfigVariableDouble-extensions.py b/direct/src/extensions/ConfigVariableDouble-extensions.py deleted file mode 100644 index 7a5e492f32..0000000000 --- a/direct/src/extensions/ConfigVariableDouble-extensions.py +++ /dev/null @@ -1,5 +0,0 @@ - - def __getitem__(self, n): - if n < 0 or n >= self.getNumWords(): - raise IndexError - return self.getWord(n) diff --git a/direct/src/extensions/ConfigVariableInt-extensions.py b/direct/src/extensions/ConfigVariableInt-extensions.py deleted file mode 100644 index 7a5e492f32..0000000000 --- a/direct/src/extensions/ConfigVariableInt-extensions.py +++ /dev/null @@ -1,5 +0,0 @@ - - def __getitem__(self, n): - if n < 0 or n >= self.getNumWords(): - raise IndexError - return self.getWord(n) diff --git a/direct/src/extensions/ConfigVariableList-extensions.py b/direct/src/extensions/ConfigVariableList-extensions.py deleted file mode 100755 index c9f70bf6e9..0000000000 --- a/direct/src/extensions/ConfigVariableList-extensions.py +++ /dev/null @@ -1,18 +0,0 @@ - - def __hash__(self): - raise AttributeError, "ConfigVariables are not immutable." - - def ls(self): - from pandac.Notify import Notify - self.write(Notify.out()) - - def __cmp__(self, other): - return list(self).__cmp__(list(other)) - - def __len__(self): - return self.getNumValues() - - def __getitem__(self, n): - if n < 0 or n >= self.getNumUniqueValues(): - raise IndexError - return self.getUniqueValue(n) diff --git a/direct/src/extensions/ConfigVariableString-extensions.py b/direct/src/extensions/ConfigVariableString-extensions.py deleted file mode 100644 index 48467ddfb5..0000000000 --- a/direct/src/extensions/ConfigVariableString-extensions.py +++ /dev/null @@ -1,6 +0,0 @@ - - def __len__(self): - return self.getValue().__len__() - - def __getitem__(self, n): - return self.getValue().__getitem__(n) diff --git a/direct/src/extensions/HTTPChannel-extensions.py b/direct/src/extensions/HTTPChannel-extensions.py deleted file mode 100644 index d3fc500cfb..0000000000 --- a/direct/src/extensions/HTTPChannel-extensions.py +++ /dev/null @@ -1,31 +0,0 @@ - - """ - HTTPChannel-extensions module: contains methods to extend functionality - of the HTTPChannel class - """ - - def spawnTask(self, name = None, callback = None, extraArgs = []): - """Spawns a task to service the download recently requested - via beginGetDocument(), etc., and/or downloadToFile() or - downloadToRam(). If a callback is specified, that function is - called when the download is complete, passing in the extraArgs - given. - - Returns the newly-spawned task. - """ - if not name: - name = str(self.getUrl()) - from direct.task import Task - task = Task.Task(self.doTask) - task.callback = callback - task.callbackArgs = extraArgs - return taskMgr.add(task, name) - - def doTask(self, task): - from direct.task import Task - if self.run(): - return Task.cont - if task.callback: - task.callback(*task.callbackArgs) - return Task.done - diff --git a/direct/src/extensions/Mat3-extensions.py b/direct/src/extensions/Mat3-extensions.py deleted file mode 100755 index a2b0a41f05..0000000000 --- a/direct/src/extensions/Mat3-extensions.py +++ /dev/null @@ -1,16 +0,0 @@ - - """ - Mat3-extensions module: contains methods to extend functionality - of the LMatrix3f class. - """ - - def __repr__(self): - return '%s(\n%s,\n%s,\n%s)' % ( - self.__class__.__name__, self.getRow(0).pPrintValues(), self.getRow(1).pPrintValues(), self.getRow(2).pPrintValues()) - - def pPrintValues(self): - """ - Pretty print - """ - return "\n%s\n%s\n%s" % ( - self.getRow(0).pPrintValues(), self.getRow(1).pPrintValues(), self.getRow(2).pPrintValues()) diff --git a/direct/src/extensions/MouseWatcherRegion-extensions.py b/direct/src/extensions/MouseWatcherRegion-extensions.py deleted file mode 100644 index 000d305c43..0000000000 --- a/direct/src/extensions/MouseWatcherRegion-extensions.py +++ /dev/null @@ -1,27 +0,0 @@ - - """ - MouseWatcherRegion-extensions module: contains methods to extend - functionality of the MouseWatcherRegion class - """ - - def setRelative(self, np, left, right, bottom, top): - """setRelation(NodePath np, float left, float right, - float bottom, float top) - - Sets the region to represnt the indicated rectangle, relative - to the given NodePath. It is assumed that np represents some - node parented within the render2d hierarchy. - - """ - from pandac import Point3 - - # Get the relative transform to the node. - mat = np.getMat(render2d) - - # Use this matrix to transform the corners of the region. - ll = mat.xformPoint(Point3.Point3(left, 0, bottom)) - ur = mat.xformPoint(Point3.Point3(right, 0, top)) - - # Set the frame to the transformed coordinates. - self.setFrame(ll[0], ur[0], ll[2], ur[2]) - diff --git a/direct/src/extensions/Node-extensions.py b/direct/src/extensions/Node-extensions.py deleted file mode 100644 index 1ae1f809ec..0000000000 --- a/direct/src/extensions/Node-extensions.py +++ /dev/null @@ -1,20 +0,0 @@ - - """ - Node-extensions module: contains methods to extend functionality - of the Node class - """ - - def isHidden(self): - """Determine if a node is hidden. Just pick the first parent, - since this is an ambiguous question for instanced nodes""" - import RenderRelation - import PruneTransition - rrClass = RenderRelation.RenderRelation.getClassType() - if self.getNumParents(rrClass) > 0: - arc = self.getParent(rrClass, 0) - if arc.hasTransition(PruneTransition.PruneTransition.getClassType()): - return 1 - else: - return arc.getParent().isHidden() - else: - return 0 diff --git a/direct/src/extensions/NodePath-extensions.py b/direct/src/extensions/NodePath-extensions.py deleted file mode 100644 index 63860d98a4..0000000000 --- a/direct/src/extensions/NodePath-extensions.py +++ /dev/null @@ -1,1093 +0,0 @@ - - """ - NodePath-extensions module: contains methods to extend functionality - of the NodePath class - """ - - def id(self): - """Returns a unique id identifying the NodePath instance""" - return self.getKey() - - def __hash__(self): - return self.getKey() - - # For iterating over children - def getChildrenAsList(self): - """Converts a node path's child NodePathCollection into a list""" - return self.getChildren() - - def printChildren(self): - """Prints out the children of the bottom node of a node path""" - for child in self.getChildren(): - print child.getName() - - def removeChildren(self): - """Deletes the children of the bottom node of a node path""" - for child in self.getChildren(): - child.removeNode() - - def toggleVis(self): - """Toggles visibility of a nodePath""" - if self.isHidden(): - self.show() - return 1 - else: - self.hide() - return 0 - - def showSiblings(self): - """Show all the siblings of a node path""" - for sib in self.getParent().getChildren(): - if sib.node() != self.node(): - sib.show() - - def hideSiblings(self): - """Hide all the siblings of a node path""" - for sib in self.getParent().getChildren(): - if sib.node() != self.node(): - sib.hide() - - def showAllDescendants(self): - """Show the node path and all its children""" - self.show() - for child in self.getChildren(): - child.showAllDescendants() - - def isolate(self): - """Show the node path and hide its siblings""" - self.showAllDescendants() - self.hideSiblings() - - def remove(self): - """Remove a node path from the scene graph""" - # Send message in case anyone needs to do something - # before node is deleted - messenger.send('preRemoveNodePath', [self]) - # Remove nodePath - self.removeNode() - - def lsNames(self): - """Walk down a tree and print out the path""" - if self.isEmpty(): - print "(empty)" - else: - type = self.node().getType().getName() - name = self.getName() - print type + " " + name - self.lsNamesRecurse() - - def lsNamesRecurse(self, indentString=' '): - """Walk down a tree and print out the path""" - for nodePath in self.getChildren(): - type = nodePath.node().getType().getName() - name = nodePath.getName() - print indentString + type + " " + name - nodePath.lsNamesRecurse(indentString + " ") - - def reverseLsNames(self): - """Walk up a tree and print out the path to the root""" - ancestry = self.getAncestry() - indentString = "" - for nodePath in ancestry: - type = nodePath.node().getType().getName() - name = nodePath.getName() - print indentString + type + " " + name - indentString = indentString + " " - - def getAncestry(self): - """Get a list of a node path's ancestors""" - node = self.node() - if (self.hasParent()): - ancestry = self.getParent().getAncestry() - ancestry.append(self) - return ancestry - else: - return [self] - - def getTightBounds(self): - from pandac import Point3 - v1 = Point3.Point3(0) - v2 = Point3.Point3(0) - self.calcTightBounds(v1, v2) - return v1, v2 - - def pPrintString(self, other = None): - """ - pretty print - """ - if __debug__: - # Normally I would have put the if __debug__ around - # the entire funciton, the that doesn't seem to work - # with -extensions. Maybe someone will look into - # this further. - if other: - pos = self.getPos(other) - hpr = self.getHpr(other) - scale = self.getScale(other) - shear = self.getShear(other) - otherString = " 'other': %s,\n" % (other.getName(),) - else: - pos = self.getPos() - hpr = self.getHpr() - scale = self.getScale() - shear = self.getShear() - otherString = '\n' - return ( - "%s = {"%(self.getName()) + - otherString + - " 'Pos': (%s),\n" % pos.pPrintValues() + - " 'Hpr': (%s),\n" % hpr.pPrintValues() + - " 'Scale': (%s),\n" % scale.pPrintValues() + - " 'Shear': (%s),\n" % shear.pPrintValues() + - "}") - - def printPos(self, other = None, sd = 2): - """ Pretty print a node path's pos """ - formatString = '%0.' + '%d' % sd + 'f' - if other: - pos = self.getPos(other) - otherString = other.getName() + ', ' - else: - pos = self.getPos() - otherString = '' - print (self.getName() + '.setPos(' + otherString + - formatString % pos[0] + ', ' + - formatString % pos[1] + ', ' + - formatString % pos[2] + - ')\n') - - def printHpr(self, other = None, sd = 2): - """ Pretty print a node path's hpr """ - formatString = '%0.' + '%d' % sd + 'f' - if other: - hpr = self.getHpr(other) - otherString = other.getName() + ', ' - else: - hpr = self.getHpr() - otherString = '' - print (self.getName() + '.setHpr(' + otherString + - formatString % hpr[0] + ', ' + - formatString % hpr[1] + ', ' + - formatString % hpr[2] + - ')\n') - - def printScale(self, other = None, sd = 2): - """ Pretty print a node path's scale """ - formatString = '%0.' + '%d' % sd + 'f' - if other: - scale = self.getScale(other) - otherString = other.getName() + ', ' - else: - scale = self.getScale() - otherString = '' - print (self.getName() + '.setScale(' + otherString + - formatString % scale[0] + ', ' + - formatString % scale[1] + ', ' + - formatString % scale[2] + - ')\n') - - def printPosHpr(self, other = None, sd = 2): - """ Pretty print a node path's pos and, hpr """ - formatString = '%0.' + '%d' % sd + 'f' - if other: - pos = self.getPos(other) - hpr = self.getHpr(other) - otherString = other.getName() + ', ' - else: - pos = self.getPos() - hpr = self.getHpr() - otherString = '' - print (self.getName() + '.setPosHpr(' + otherString + - formatString % pos[0] + ', ' + - formatString % pos[1] + ', ' + - formatString % pos[2] + ', ' + - formatString % hpr[0] + ', ' + - formatString % hpr[1] + ', ' + - formatString % hpr[2] + - ')\n') - - def printPosHprScale(self, other = None, sd = 2): - """ Pretty print a node path's pos, hpr, and scale """ - formatString = '%0.' + '%d' % sd + 'f' - if other: - pos = self.getPos(other) - hpr = self.getHpr(other) - scale = self.getScale(other) - otherString = other.getName() + ', ' - else: - pos = self.getPos() - hpr = self.getHpr() - scale = self.getScale() - otherString = '' - print (self.getName() + '.setPosHprScale(' + otherString + - formatString % pos[0] + ', ' + - formatString % pos[1] + ', ' + - formatString % pos[2] + ', ' + - formatString % hpr[0] + ', ' + - formatString % hpr[1] + ', ' + - formatString % hpr[2] + ', ' + - formatString % scale[0] + ', ' + - formatString % scale[1] + ', ' + - formatString % scale[2] + - ')\n') - - def printTransform(self, other = None, sd = 2, fRecursive = 0): - from pandac.PandaModules import Vec3 - fmtStr = '%%0.%df' % sd - name = self.getName() - if other == None: - transform = self.getTransform() - else: - transform = self.getTransform(other) - if transform.hasPos(): - pos = transform.getPos() - if not pos.almostEqual(Vec3(0)): - outputString = '%s.setPos(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr) - print outputString % (pos[0], pos[1], pos[2]) - if transform.hasHpr(): - hpr = transform.getHpr() - if not hpr.almostEqual(Vec3(0)): - outputString = '%s.setHpr(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr) - print outputString % (hpr[0], hpr[1], hpr[2]) - if transform.hasScale(): - if transform.hasUniformScale(): - scale = transform.getUniformScale() - if scale != 1.0: - outputString = '%s.setScale(%s)' % (name, fmtStr) - print outputString % scale - else: - scale = transform.getScale() - if not scale.almostEqual(Vec3(1)): - outputString = '%s.setScale(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr) - print outputString % (scale[0], scale[1], scale[2]) - if fRecursive: - for child in self.getChildren(): - child.printTransform(other, sd, fRecursive) - - def iPos(self, other = None): - """ Set node path's pos to 0, 0, 0 """ - if other: - self.setPos(other, 0, 0, 0) - else: - self.setPos(0, 0, 0) - - def iHpr(self, other = None): - """ Set node path's hpr to 0, 0, 0 """ - if other: - self.setHpr(other, 0, 0, 0) - else: - self.setHpr(0, 0, 0) - - def iScale(self, other = None): - """ SEt node path's scale to 1, 1, 1 """ - if other: - self.setScale(other, 1, 1, 1) - else: - self.setScale(1, 1, 1) - - def iPosHpr(self, other = None): - """ Set node path's pos and hpr to 0, 0, 0 """ - if other: - self.setPosHpr(other, 0, 0, 0, 0, 0, 0) - else: - self.setPosHpr(0, 0, 0, 0, 0, 0) - - def iPosHprScale(self, other = None): - """ Set node path's pos and hpr to 0, 0, 0 and scale to 1, 1, 1 """ - if other: - self.setPosHprScale(other, 0, 0, 0, 0, 0, 0, 1, 1, 1) - else: - self.setPosHprScale(0, 0, 0, 0, 0, 0, 1, 1, 1) - - # private methods - - def __lerp(self, functorFunc, duration, blendType, taskName=None): - """ - __lerp(self, functorFunc, float, string, string) - Basic lerp functionality used by other lerps. - Fire off a lerp. Make it a task if taskName given. - """ - # functorFunc is a function which can be called to create a functor. - # functor creation is defered so initial state (sampled in functorFunc) - # will be appropriate for the time the lerp is spawned - from direct.task import Task - from direct.interval import LerpBlendHelpers - from direct.task.TaskManagerGlobal import taskMgr - - # upon death remove the functorFunc - def lerpUponDeath(task): - # Try to break circular references - try: - del task.functorFunc - except: - pass - try: - del task.lerp - except: - pass - - # make the task function - def lerpTaskFunc(task): - from pandac.Lerp import Lerp - from pandac.ClockObject import ClockObject - from direct.task.Task import Task, cont, done - if task.init == 1: - # make the lerp - functor = task.functorFunc() - task.lerp = Lerp(functor, task.duration, task.blendType) - task.init = 0 - dt = globalClock.getDt() - task.lerp.setStepSize(dt) - task.lerp.step() - if (task.lerp.isDone()): - # Reset the init flag, in case the task gets re-used - task.init = 1 - return(done) - else: - return(cont) - - # make the lerp task - lerpTask = Task.Task(lerpTaskFunc) - lerpTask.init = 1 - lerpTask.functorFunc = functorFunc - lerpTask.duration = duration - lerpTask.blendType = LerpBlendHelpers.getBlend(blendType) - lerpTask.setUponDeath(lerpUponDeath) - - if (taskName == None): - # don't spawn a task, return one instead - return lerpTask - else: - # spawn the lerp task - taskMgr.add(lerpTask, taskName) - return lerpTask - - def __autoLerp(self, functorFunc, time, blendType, taskName): - """_autoLerp(self, functor, float, string, string) - This lerp uses C++ to handle the stepping. Bonus is - its more efficient, trade-off is there is less control""" - from pandac import AutonomousLerp - from direct.interval import LerpBlendHelpers - # make a lerp that lives in C++ land - functor = functorFunc() - lerp = AutonomousLerp.AutonomousLerp(functor, time, - LerpBlendHelpers.getBlend(blendType), - base.eventHandler) - lerp.start() - return lerp - - - # user callable lerp methods - def lerpColor(self, *posArgs, **keyArgs): - """ - determine which lerpColor* to call based on arguments - """ - if (len(posArgs) == 2): - return apply(self.lerpColorVBase4, posArgs, keyArgs) - elif (len(posArgs) == 3): - return apply(self.lerpColorVBase4VBase4, posArgs, keyArgs) - elif (len(posArgs) == 5): - return apply(self.lerpColorRGBA, posArgs, keyArgs) - elif (len(posArgs) == 9): - return apply(self.lerpColorRGBARGBA, posArgs, keyArgs) - else: - # bad args - raise Exception("Error: NodePath.lerpColor: bad number of args") - - - def lerpColorRGBA(self, r, g, b, a, time, - blendType="noBlend", auto=None, task=None): - """lerpColorRGBA(self, float, float, float, float, float, - string="noBlend", string=none, string=none) - """ - def functorFunc(self = self, r = r, g = g, b = b, a = a): - from pandac import ColorLerpFunctor - # just end rgba values, use current color rgba values for start - startColor = self.getColor() - functor = ColorLerpFunctor.ColorLerpFunctor( - self, - startColor[0], startColor[1], - startColor[2], startColor[3], - r, g, b, a) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorRGBARGBA(self, sr, sg, sb, sa, er, eg, eb, ea, time, - blendType="noBlend", auto=None, task=None): - """lerpColorRGBARGBA(self, float, float, float, float, float, - float, float, float, float, string="noBlend", string=none, string=none) - """ - def functorFunc(self = self, sr = sr, sg = sg, sb = sb, sa = sa, - er = er, eg = eg, eb = eb, ea = ea): - from pandac import ColorLerpFunctor - # start and end rgba values - functor = ColorLerpFunctor.ColorLerpFunctor(self, sr, sg, sb, sa, - er, eg, eb, ea) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorVBase4(self, endColor, time, - blendType="noBlend", auto=None, task=None): - """lerpColorVBase4(self, VBase4, float, string="noBlend", string=none, - string=none) - """ - def functorFunc(self = self, endColor = endColor): - from pandac import ColorLerpFunctor - # just end vec4, use current color for start - startColor = self.getColor() - functor = ColorLerpFunctor.ColorLerpFunctor( - self, startColor, endColor) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorVBase4VBase4(self, startColor, endColor, time, - blendType="noBlend", auto=None, task=None): - """lerpColorVBase4VBase4(self, VBase4, VBase4, float, string="noBlend", - string=none, string=none) - """ - def functorFunc(self = self, startColor = startColor, - endColor = endColor): - from pandac import ColorLerpFunctor - # start color and end vec - functor = ColorLerpFunctor.ColorLerpFunctor( - self, startColor, endColor) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - - # user callable lerp methods - def lerpColorScale(self, *posArgs, **keyArgs): - """lerpColorScale(self, *positionArgs, **keywordArgs) - determine which lerpColorScale* to call based on arguments - """ - if (len(posArgs) == 2): - return apply(self.lerpColorScaleVBase4, posArgs, keyArgs) - elif (len(posArgs) == 3): - return apply(self.lerpColorScaleVBase4VBase4, posArgs, keyArgs) - elif (len(posArgs) == 5): - return apply(self.lerpColorScaleRGBA, posArgs, keyArgs) - elif (len(posArgs) == 9): - return apply(self.lerpColorScaleRGBARGBA, posArgs, keyArgs) - else: - # bad args - raise Exception("Error: NodePath.lerpColorScale: bad number of args") - - - def lerpColorScaleRGBA(self, r, g, b, a, time, - blendType="noBlend", auto=None, task=None): - """lerpColorScaleRGBA(self, float, float, float, float, float, - string="noBlend", string=none, string=none) - """ - def functorFunc(self = self, r = r, g = g, b = b, a = a): - from pandac import ColorScaleLerpFunctor - # just end rgba values, use current color rgba values for start - startColor = self.getColor() - functor = ColorScaleLerpFunctor.ColorScaleLerpFunctor( - self, - startColor[0], startColor[1], - startColor[2], startColor[3], - r, g, b, a) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorScaleRGBARGBA(self, sr, sg, sb, sa, er, eg, eb, ea, time, - blendType="noBlend", auto=None, task=None): - """lerpColorScaleRGBARGBA(self, float, float, float, float, float, - float, float, float, float, string="noBlend", string=none, string=none) - """ - def functorFunc(self = self, sr = sr, sg = sg, sb = sb, sa = sa, - er = er, eg = eg, eb = eb, ea = ea): - from pandac import ColorScaleLerpFunctor - # start and end rgba values - functor = ColorScaleLerpFunctor.ColorScaleLerpFunctor(self, sr, sg, sb, sa, - er, eg, eb, ea) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorScaleVBase4(self, endColor, time, - blendType="noBlend", auto=None, task=None): - """lerpColorScaleVBase4(self, VBase4, float, string="noBlend", string=none, - string=none) - """ - def functorFunc(self = self, endColor = endColor): - from pandac import ColorScaleLerpFunctor - # just end vec4, use current color for start - startColor = self.getColor() - functor = ColorScaleLerpFunctor.ColorScaleLerpFunctor( - self, startColor, endColor) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpColorScaleVBase4VBase4(self, startColor, endColor, time, - blendType="noBlend", auto=None, task=None): - """lerpColorScaleVBase4VBase4(self, VBase4, VBase4, float, string="noBlend", - string=none, string=none) - """ - def functorFunc(self = self, startColor = startColor, - endColor = endColor): - from pandac import ColorScaleLerpFunctor - # start color and end vec - functor = ColorScaleLerpFunctor.ColorScaleLerpFunctor( - self, startColor, endColor) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - - def lerpHpr(self, *posArgs, **keyArgs): - """lerpHpr(self, *positionArgs, **keywordArgs) - Determine whether to call lerpHprHPR or lerpHprVBase3 - based on first argument - """ - # check to see if lerping with - # three floats or a VBase3 - if (len(posArgs) == 4): - return apply(self.lerpHprHPR, posArgs, keyArgs) - elif(len(posArgs) == 2): - return apply(self.lerpHprVBase3, posArgs, keyArgs) - else: - # bad args - raise Exception("Error: NodePath.lerpHpr: bad number of args") - - def lerpHprHPR(self, h, p, r, time, other=None, - blendType="noBlend", auto=None, task=None, shortest=1): - """lerpHprHPR(self, float, float, float, float, string="noBlend", - string=none, string=none, NodePath=none) - Perform a hpr lerp with three floats as the end point - """ - def functorFunc(self = self, h = h, p = p, r = r, - other = other, shortest=shortest): - from pandac import HprLerpFunctor - # it's individual hpr components - if (other != None): - # lerp wrt other - startHpr = self.getHpr(other) - functor = HprLerpFunctor.HprLerpFunctor( - self, - startHpr[0], startHpr[1], startHpr[2], - h, p, r, other) - if shortest: - functor.takeShortest() - else: - startHpr = self.getHpr() - functor = HprLerpFunctor.HprLerpFunctor( - self, - startHpr[0], startHpr[1], startHpr[2], - h, p, r) - if shortest: - functor.takeShortest() - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpHprVBase3(self, hpr, time, other=None, - blendType="noBlend", auto=None, task=None, shortest=1): - """lerpHprVBase3(self, VBase3, float, string="noBlend", string=none, - string=none, NodePath=None) - Perform a hpr lerp with a VBase3 as the end point - """ - def functorFunc(self = self, hpr = hpr, - other = other, shortest=shortest): - from pandac import HprLerpFunctor - # it's a vbase3 hpr - if (other != None): - # lerp wrt other - functor = HprLerpFunctor.HprLerpFunctor( - self, (self.getHpr(other)), hpr, other) - if shortest: - functor.takeShortest() - else: - functor = HprLerpFunctor.HprLerpFunctor( - self, (self.getHpr()), hpr) - if shortest: - functor.takeShortest() - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - def lerpPos(self, *posArgs, **keyArgs): - """lerpPos(self, *positionArgs, **keywordArgs) - Determine whether to call lerpPosXYZ or lerpPosPoint3 - based on the first argument - """ - # check to see if lerping with three - # floats or a Point3 - if (len(posArgs) == 4): - return apply(self.lerpPosXYZ, posArgs, keyArgs) - elif(len(posArgs) == 2): - return apply(self.lerpPosPoint3, posArgs, keyArgs) - else: - # bad number off args - raise Exception("Error: NodePath.lerpPos: bad number of args") - - def lerpPosXYZ(self, x, y, z, time, other=None, - blendType="noBlend", auto=None, task=None): - """lerpPosXYZ(self, float, float, float, float, string="noBlend", - string=None, NodePath=None) - Perform a pos lerp with three floats as the end point - """ - def functorFunc(self = self, x = x, y = y, z = z, other = other): - from pandac import PosLerpFunctor - if (other != None): - # lerp wrt other - startPos = self.getPos(other) - functor = PosLerpFunctor.PosLerpFunctor(self, - startPos[0], startPos[1], startPos[2], - x, y, z, other) - else: - startPos = self.getPos() - functor = PosLerpFunctor.PosLerpFunctor(self, startPos[0], - startPos[1], startPos[2], x, y, z) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpPosPoint3(self, pos, time, other=None, - blendType="noBlend", auto=None, task=None): - """lerpPosPoint3(self, Point3, float, string="noBlend", string=None, - string=None, NodePath=None) - Perform a pos lerp with a Point3 as the end point - """ - def functorFunc(self = self, pos = pos, other = other): - from pandac import PosLerpFunctor - if (other != None): - #lerp wrt other - functor = PosLerpFunctor.PosLerpFunctor( - self, (self.getPos(other)), pos, other) - else: - functor = PosLerpFunctor.PosLerpFunctor( - self, (self.getPos()), pos) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - def lerpPosHpr(self, *posArgs, **keyArgs): - """lerpPosHpr(self, *positionArgs, **keywordArgs) - Determine whether to call lerpPosHprXYZHPR or lerpHprPoint3VBase3 - based on first argument - """ - # check to see if lerping with - # six floats or a Point3 and a VBase3 - if (len(posArgs) == 7): - return apply(self.lerpPosHprXYZHPR, posArgs, keyArgs) - elif(len(posArgs) == 3): - return apply(self.lerpPosHprPoint3VBase3, posArgs, keyArgs) - else: - # bad number off args - raise Exception("Error: NodePath.lerpPosHpr: bad number of args") - - def lerpPosHprPoint3VBase3(self, pos, hpr, time, other=None, - blendType="noBlend", auto=None, task=None, shortest=1): - """lerpPosHprPoint3VBase3(self, Point3, VBase3, string="noBlend", - string=none, string=none, NodePath=None) - """ - def functorFunc(self = self, pos = pos, hpr = hpr, - other = other, shortest=shortest): - from pandac import PosHprLerpFunctor - if (other != None): - # lerp wrt other - startPos = self.getPos(other) - startHpr = self.getHpr(other) - functor = PosHprLerpFunctor.PosHprLerpFunctor( - self, startPos, pos, - startHpr, hpr, other) - if shortest: - functor.takeShortest() - else: - startPos = self.getPos() - startHpr = self.getHpr() - functor = PosHprLerpFunctor.PosHprLerpFunctor( - self, startPos, pos, - startHpr, hpr) - if shortest: - functor.takeShortest() - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpPosHprXYZHPR(self, x, y, z, h, p, r, time, other=None, - blendType="noBlend", auto=None, task=None, shortest=1): - """lerpPosHpr(self, float, string="noBlend", string=none, - string=none, NodePath=None) - """ - def functorFunc(self = self, x = x, y = y, z = z, - h = h, p = p, r = r, other = other, shortest=shortest): - from pandac import PosHprLerpFunctor - if (other != None): - # lerp wrt other - startPos = self.getPos(other) - startHpr = self.getHpr(other) - functor = PosHprLerpFunctor.PosHprLerpFunctor(self, - startPos[0], startPos[1], - startPos[2], x, y, z, - startHpr[0], startHpr[1], - startHpr[2], h, p, r, - other) - if shortest: - functor.takeShortest() - else: - startPos = self.getPos() - startHpr = self.getHpr() - functor = PosHprLerpFunctor.PosHprLerpFunctor(self, - startPos[0], startPos[1], - startPos[2], x, y, z, - startHpr[0], startHpr[1], - startHpr[2], h, p, r) - if shortest: - functor.takeShortest() - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - def lerpPosHprScale(self, pos, hpr, scale, time, other=None, - blendType="noBlend", auto=None, task=None, shortest=1): - """lerpPosHpr(self, Point3, VBase3, float, float, string="noBlend", - string=none, string=none, NodePath=None) - Only one case, no need for extra args. Call the appropriate lerp - (auto, spawned, or blocking) based on how(if) a task name is given - """ - def functorFunc(self = self, pos = pos, hpr = hpr, - scale = scale, other = other, shortest=shortest): - from pandac import PosHprScaleLerpFunctor - if (other != None): - # lerp wrt other - startPos = self.getPos(other) - startHpr = self.getHpr(other) - startScale = self.getScale(other) - functor = PosHprScaleLerpFunctor.PosHprScaleLerpFunctor(self, - startPos, pos, - startHpr, hpr, - startScale, scale, other) - if shortest: - functor.takeShortest() - else: - startPos = self.getPos() - startHpr = self.getHpr() - startScale = self.getScale() - functor = PosHprScaleLerpFunctor.PosHprScaleLerpFunctor(self, - startPos, pos, - startHpr, hpr, - startScale, scale) - if shortest: - functor.takeShortest() - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - def lerpScale(self, *posArgs, **keyArgs): - """lerpSclae(self, *positionArgs, **keywordArgs) - Determine whether to call lerpScaleXYZ or lerpScaleaseV3 - based on the first argument - """ - # check to see if lerping with three - # floats or a Point3 - if (len(posArgs) == 4): - return apply(self.lerpScaleXYZ, posArgs, keyArgs) - elif(len(posArgs) == 2): - return apply(self.lerpScaleVBase3, posArgs, keyArgs) - else: - # bad number off args - raise Exception("Error: NodePath.lerpScale: bad number of args") - - def lerpScaleVBase3(self, scale, time, other=None, - blendType="noBlend", auto=None, task=None): - """lerpPos(self, VBase3, float, string="noBlend", string=none, - string=none, NodePath=None) - """ - def functorFunc(self = self, scale = scale, other = other): - from pandac import ScaleLerpFunctor - if (other != None): - # lerp wrt other - functor = ScaleLerpFunctor.ScaleLerpFunctor(self, - (self.getScale(other)), - scale, other) - else: - functor = ScaleLerpFunctor.ScaleLerpFunctor(self, - (self.getScale()), scale) - - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - def lerpScaleXYZ(self, sx, sy, sz, time, other=None, - blendType="noBlend", auto=None, task=None): - """lerpPos(self, float, float, float, float, string="noBlend", - string=none, string=none, NodePath=None) - """ - def functorFunc(self = self, sx = sx, sy = sy, sz = sz, other = other): - from pandac import ScaleLerpFunctor - if (other != None): - # lerp wrt other - startScale = self.getScale(other) - functor = ScaleLerpFunctor.ScaleLerpFunctor(self, - startScale[0], startScale[1], - startScale[2], sx, sy, sz, other) - else: - startScale = self.getScale() - functor = ScaleLerpFunctor.ScaleLerpFunctor(self, - startScale[0], startScale[1], - startScale[2], sx, sy, sz) - return functor - #determine whether to use auto, spawned, or blocking lerp - if (auto != None): - return self.__autoLerp(functorFunc, time, blendType, auto) - elif (task != None): - return self.__lerp(functorFunc, time, blendType, task) - else: - return self.__lerp(functorFunc, time, blendType) - - - - - def place(self): - base.startDirect(fWantTk = 1) - from direct.tkpanels import Placer - return Placer.place(self) - - def explore(self): - base.startDirect(fWantTk = 1) - from direct.tkwidgets import SceneGraphExplorer - return SceneGraphExplorer.explore(self) - - def rgbPanel(self, cb = None): - base.startTk() - from direct.tkwidgets import Slider - return Slider.rgbPanel(self, cb) - - def select(self): - base.startDirect(fWantTk = 0) - base.direct.select(self) - - def deselect(self): - base.startDirect(fWantTk = 0) - base.direct.deselect(self) - - def showCS(self, mask = None): - """ - Shows the collision solids at or below this node. If mask is - not None, it is a BitMask32 object (e.g. WallBitmask, - CameraBitmask) that indicates which particular collision - solids should be made visible; otherwise, all of them will be. - """ - npc = self.findAllMatches('**/+CollisionNode') - for p in range(0, npc.getNumPaths()): - np = npc[p] - if (mask == None or (np.node().getIntoCollideMask() & mask).getWord()): - np.show() - - def hideCS(self, mask = None): - """ - Hides the collision solids at or below this node. If mask is - not None, it is a BitMask32 object (e.g. WallBitmask, - CameraBitmask) that indicates which particular collision - solids should be hidden; otherwise, all of them will be. - """ - npc = self.findAllMatches('**/+CollisionNode') - for p in range(0, npc.getNumPaths()): - np = npc[p] - if (mask == None or (np.node().getIntoCollideMask() & mask).getWord()): - np.hide() - - def posInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosInterval(self, *args, **kw) - - def hprInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpHprInterval(self, *args, **kw) - - def quatInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpQuatInterval(self, *args, **kw) - - def scaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpScaleInterval(self, *args, **kw) - - def shearInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpShearInterval(self, *args, **kw) - - def posHprInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosHprInterval(self, *args, **kw) - - def posQuatInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosQuatInterval(self, *args, **kw) - - def hprScaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpHprScaleInterval(self, *args, **kw) - - def quatScaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpQuatScaleInterval(self, *args, **kw) - - def posHprScaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosHprScaleInterval(self, *args, **kw) - - def posQuatScaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosQuatScaleInterval(self, *args, **kw) - - def posHprScaleShearInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosHprScaleShearInterval(self, *args, **kw) - - def posQuatScaleShearInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpPosQuatScaleShearInterval(self, *args, **kw) - - def colorInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpColorInterval(self, *args, **kw) - - def colorScaleInterval(self, *args, **kw): - from direct.interval import LerpInterval - return LerpInterval.LerpColorScaleInterval(self, *args, **kw) - - def attachCollisionSphere(self, name, cx, cy, cz, r, fromCollide, intoCollide): - from pandac import CollisionSphere - from pandac import CollisionNode - coll = CollisionSphere.CollisionSphere(cx, cy, cz, r) - collNode = CollisionNode.CollisionNode(name) - collNode.addSolid(coll) - collNode.setFromCollideMask(fromCollide) - collNode.setIntoCollideMask(intoCollide) - collNodePath = self.attachNewNode(collNode) - return collNodePath - - def attachCollisionSegment(self, name, ax, ay, az, bx, by, bz, fromCollide, intoCollide): - from pandac import CollisionSegment - from pandac import CollisionNode - coll = CollisionSegment.CollisionSegment(ax, ay, az, bx, by, bz) - collNode = CollisionNode.CollisionNode(name) - collNode.addSolid(coll) - collNode.setFromCollideMask(fromCollide) - collNode.setIntoCollideMask(intoCollide) - collNodePath = self.attachNewNode(collNode) - return collNodePath - - def attachCollisionRay(self, name, ox, oy, oz, dx, dy, dz, fromCollide, intoCollide): - from pandac import CollisionRay - from pandac import CollisionNode - coll = CollisionRay.CollisionRay(ox, oy, oz, dx, dy, dz) - collNode = CollisionNode.CollisionNode(name) - collNode.addSolid(coll) - collNode.setFromCollideMask(fromCollide) - collNode.setIntoCollideMask(intoCollide) - collNodePath = self.attachNewNode(collNode) - return collNodePath - - def flattenMultitex(self, stateFrom = None, target = None, - useGeom = 0, allowTexMat = 0, win = None): - from pandac import MultitexReducer - mr = MultitexReducer.MultitexReducer() - if target != None: - mr.setTarget(target) - mr.setUseGeom(useGeom) - mr.setAllowTexMat(allowTexMat) - - if win == None: - win = base.win - - if stateFrom == None: - mr.scan(self) - else: - mr.scan(self, stateFrom) - mr.flatten(win) diff --git a/direct/src/extensions/NurbsCurveEvaluator-extensions.py b/direct/src/extensions/NurbsCurveEvaluator-extensions.py deleted file mode 100644 index 7441770a9b..0000000000 --- a/direct/src/extensions/NurbsCurveEvaluator-extensions.py +++ /dev/null @@ -1,26 +0,0 @@ - - """ - NurbsCurveEvaluator-extensions module: contains methods to extend - functionality of the NurbsCurveEvaluator class - """ - - def getKnots(self): - """Returns the knot vector as a Python list of floats""" - knots = [] - for i in range(self.getNumKnots()): - knots.append(self.getKnot(i)) - return knots - - def getVertices(self, relTo = None): - """Returns the vertices as a Python list of Vec4's, relative - to the indicated space if given.""" - - verts = [] - if relTo: - for i in range(self.getNumVertices()): - verts.append(self.getVertex(i, relTo)) - else: - for i in range(self.getNumVertices()): - verts.append(self.getVertex(i)) - return verts - diff --git a/direct/src/extensions/NurbsSurfaceEvaluator-extensions.py b/direct/src/extensions/NurbsSurfaceEvaluator-extensions.py deleted file mode 100644 index 6399fe6e39..0000000000 --- a/direct/src/extensions/NurbsSurfaceEvaluator-extensions.py +++ /dev/null @@ -1,36 +0,0 @@ - - """ - NurbsSurfaceEvaluator-extensions module: contains methods to extend - functionality of the NurbsSurfaceEvaluator class - """ - - def getUKnots(self): - """Returns the U knot vector as a Python list of floats""" - knots = [] - for i in range(self.getNumUKnots()): - knots.append(self.getUKnot(i)) - return knots - - def getVKnots(self): - """Returns the V knot vector as a Python list of floats""" - knots = [] - for i in range(self.getNumVKnots()): - knots.append(self.getVKnot(i)) - return knots - - def getVertices(self, relTo = None): - """Returns the vertices as a 2-d Python list of Vec4's, relative - to the indicated space if given.""" - - verts = [] - for ui in range(self.getNumUVertices()): - v = [] - if relTo: - for vi in range(self.getNumVVertices()): - v.append(self.getVertex(ui, vi, relTo)) - else: - for vi in range(self.getNumVVertices()): - v.append(self.getVertex(ui, vi)) - verts.append(v) - - return verts diff --git a/direct/src/extensions/PandaSystem-extensions.py b/direct/src/extensions/PandaSystem-extensions.py deleted file mode 100644 index ea55f63946..0000000000 --- a/direct/src/extensions/PandaSystem-extensions.py +++ /dev/null @@ -1,6 +0,0 @@ - - def getSystems(self): - l = [] - for i in range(self.getNumSystems()): - l.append(self.getSystem(l)) - return l diff --git a/direct/src/extensions/Sources.pp b/direct/src/extensions/Sources.pp deleted file mode 100644 index a03ea8c336..0000000000 --- a/direct/src/extensions/Sources.pp +++ /dev/null @@ -1,3 +0,0 @@ -// For now, since we are not installing Python files, this file can -// remain empty. - diff --git a/direct/src/extensions/SpriteParticleRenderer-extensions.py b/direct/src/extensions/SpriteParticleRenderer-extensions.py deleted file mode 100644 index 6ec3986bb7..0000000000 --- a/direct/src/extensions/SpriteParticleRenderer-extensions.py +++ /dev/null @@ -1,83 +0,0 @@ - - """ - Contains methods to extend functionality - of the SpriteParticleRenderer class - """ - - # Initialize class variables for texture, source file and node for texture and - # node path textures to None. These will be initialized to a hardcoded default - # or whatever the user specifies in his/her Configrc variable the first time they - # are accessed - # Will use instance copy of this in functions below - sourceTextureName = None - sourceFileName = None - sourceNodeName = None - - def getSourceTextureName(self): - if self.sourceTextureName == None: - SpriteParticleRenderer.sourceTextureName = base.config.GetString( - 'particle-sprite-texture', 'phase_3/maps/feyes.jpg') - # Return instance copy of class variable - return self.sourceTextureName - - def setSourceTextureName(self, name): - # Set instance copy of class variable - self.sourceTextureName = name - - def setTextureFromFile(self, fileName = None): - if fileName == None: - fileName = self.getSourceTextureName() - else: - self.setSourceTextureName(fileName) - t = loader.loadTexture(fileName) - if (t != None): - self.setTexture(t) - else: - print "Couldn't find rendererSpriteTexture file: %s" % fileName - - def getSourceFileName(self): - if self.sourceFileName == None: - SpriteParticleRenderer.sourceFileName = base.config.GetString( - 'particle-sprite-model', 'phase_3.5/models/props/suit-particles') - # Return instance copy of class variable - return self.sourceFileName - - def setSourceFileName(self, name): - # Set instance copy of class variable - self.sourceFileName = name - - def getSourceNodeName(self): - if self.sourceNodeName == None: - SpriteParticleRenderer.sourceNodeName = base.config.GetString( - 'particle-sprite-node', '**/fire') - # Return instance copy of class variable - return self.sourceNodeName - - def setSourceNodeName(self, name): - # Set instance copy of class variable - self.sourceNodeName = name - - def setTextureFromNode(self, modelName = None, nodeName = None): - if modelName == None: - modelName = self.getSourceFileName() - else: - self.setSourceFileName(modelName) - if nodeName == None: - nodeName = self.getSourceNodeName() - else: - self.setSourceNodeName(nodeName) - # Load model and get texture - m = loader.loadModel(modelName) - if (m == None): - print "SpriteParticleRenderer: Couldn't find model: %s!" % modelName - return None - nodeName = self.getSourceNodeName() - np = m.find(nodeName) - if np.isEmpty(): - print "SpriteParticleRenderer: Couldn't find node: %s!" % nodeName - m.removeNode() - return None - self.setFromNode(np) - m.removeNode() - - diff --git a/direct/src/extensions/VBase3-extensions.py b/direct/src/extensions/VBase3-extensions.py deleted file mode 100755 index 750a59e6ba..0000000000 --- a/direct/src/extensions/VBase3-extensions.py +++ /dev/null @@ -1,15 +0,0 @@ - - """ - VBase3-extensions module: contains methods to extend functionality - of the VBase3 class - """ - - def __repr__(self): - return '%s(%s, %s, %s)' % ( - self.__class__.__name__, self[0], self[1], self[2]) - - def pPrintValues(self): - """ - Pretty print - """ - return "% 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2]) diff --git a/direct/src/extensions/VBase4-extensions.py b/direct/src/extensions/VBase4-extensions.py deleted file mode 100755 index e70504c3ea..0000000000 --- a/direct/src/extensions/VBase4-extensions.py +++ /dev/null @@ -1,15 +0,0 @@ - - """ - VBase4-extensions module: contains methods to extend functionality - of the VBase4 class - """ - - def __repr__(self): - return '%s(%s, %s, %s, %s)' % ( - self.__class__.__name__, self[0], self[1], self[2], self[3]) - - def pPrintValues(self): - """ - Pretty print - """ - return '% 10.4f, % 10.4f, % 10.4f, % 10.4f' % (self[0], self[1], self[2], self[3]) diff --git a/direct/src/extensions/__init__.py b/direct/src/extensions/__init__.py deleted file mode 100644 index b63f52ffd3..0000000000 --- a/direct/src/extensions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from PandaModules import * From 6feef4e2305051688c677b90f13548832f6547dc Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 9 Oct 2015 13:33:05 +0200 Subject: [PATCH 155/200] Interrogate now parses (and ignores) explicit template instantiations --- dtool/src/cppparser/cppBison.cxx.prebuilt | 4907 +++++++++++---------- dtool/src/cppparser/cppBison.yxx | 1 + 2 files changed, 2483 insertions(+), 2425 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index 058d1dc791..714d121a40 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -772,16 +772,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3636 +#define YYLAST 3698 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 131 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 93 /* YYNRULES -- Number of rules. */ -#define YYNRULES 548 +#define YYNRULES 553 /* YYNRULES -- Number of states. */ -#define YYNSTATES 993 +#define YYNSTATES 1002 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -849,49 +849,50 @@ static const yytype_uint16 yyprhs[] = 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 374, - 377, 379, 381, 383, 385, 386, 393, 395, 397, 399, - 403, 406, 411, 414, 419, 423, 428, 430, 432, 434, - 436, 439, 442, 445, 448, 451, 455, 460, 464, 468, - 469, 476, 478, 480, 482, 486, 489, 491, 495, 497, - 500, 502, 505, 507, 511, 517, 521, 526, 528, 530, - 533, 535, 539, 543, 549, 553, 557, 562, 564, 566, - 568, 570, 573, 576, 579, 582, 586, 591, 593, 595, - 597, 600, 603, 606, 609, 613, 618, 626, 630, 632, - 635, 638, 641, 644, 648, 653, 661, 663, 665, 668, - 670, 672, 674, 677, 682, 684, 686, 689, 691, 693, - 695, 698, 703, 706, 708, 710, 713, 716, 719, 722, - 726, 727, 733, 734, 742, 744, 746, 749, 753, 756, - 759, 762, 766, 770, 774, 778, 782, 786, 791, 796, - 799, 803, 805, 807, 809, 811, 815, 821, 823, 826, - 831, 833, 835, 837, 839, 840, 847, 852, 855, 859, - 861, 863, 865, 867, 869, 871, 873, 875, 877, 879, - 881, 883, 885, 887, 890, 893, 896, 899, 901, 904, - 906, 910, 913, 915, 916, 919, 921, 924, 926, 928, - 930, 932, 934, 936, 938, 940, 942, 944, 946, 948, - 950, 952, 954, 956, 958, 960, 962, 964, 966, 968, - 970, 972, 974, 976, 978, 980, 982, 984, 986, 988, - 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, 1008, - 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, - 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, 1048, - 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, - 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, - 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1108, - 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, - 1130, 1132, 1134, 1138, 1140, 1142, 1144, 1146, 1148, 1152, - 1154, 1159, 1167, 1175, 1180, 1183, 1186, 1189, 1192, 1195, - 1199, 1203, 1207, 1211, 1215, 1219, 1223, 1227, 1231, 1235, - 1239, 1243, 1247, 1251, 1255, 1259, 1265, 1270, 1275, 1279, - 1283, 1287, 1291, 1293, 1298, 1306, 1314, 1319, 1324, 1329, - 1334, 1339, 1344, 1349, 1354, 1359, 1364, 1369, 1374, 1379, - 1384, 1387, 1393, 1396, 1399, 1402, 1405, 1408, 1412, 1416, - 1420, 1424, 1428, 1432, 1436, 1440, 1444, 1448, 1452, 1456, - 1460, 1464, 1468, 1472, 1476, 1480, 1486, 1491, 1496, 1500, - 1504, 1508, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, - 1528, 1533, 1541, 1549, 1554, 1557, 1563, 1566, 1569, 1572, - 1575, 1579, 1583, 1587, 1591, 1595, 1599, 1603, 1607, 1611, - 1615, 1619, 1623, 1627, 1631, 1635, 1639, 1643, 1647, 1653, - 1658, 1663, 1667, 1671, 1675, 1679, 1681, 1683, 1685, 1687, - 1689, 1691, 1693, 1696, 1699, 1701, 1703, 1705, 1708 + 377, 379, 381, 383, 385, 386, 393, 396, 398, 400, + 402, 406, 409, 414, 417, 422, 426, 431, 433, 435, + 437, 439, 442, 445, 448, 451, 454, 457, 461, 466, + 470, 474, 475, 482, 484, 486, 488, 492, 495, 497, + 501, 503, 506, 508, 511, 513, 517, 523, 527, 532, + 534, 536, 539, 541, 545, 549, 555, 559, 563, 568, + 570, 572, 574, 576, 579, 582, 585, 588, 591, 595, + 600, 602, 604, 606, 609, 612, 615, 618, 621, 625, + 630, 638, 642, 644, 647, 650, 653, 656, 659, 663, + 668, 676, 678, 680, 683, 685, 687, 689, 692, 697, + 699, 701, 704, 706, 708, 710, 713, 718, 721, 723, + 725, 728, 731, 734, 737, 741, 742, 748, 749, 757, + 759, 761, 764, 768, 771, 774, 777, 781, 785, 789, + 793, 797, 801, 806, 811, 814, 818, 820, 822, 824, + 826, 830, 836, 838, 841, 846, 848, 850, 852, 854, + 855, 862, 867, 870, 874, 876, 878, 880, 882, 884, + 886, 888, 890, 892, 894, 896, 898, 900, 902, 905, + 908, 911, 914, 916, 919, 921, 925, 928, 930, 931, + 934, 936, 939, 941, 943, 945, 947, 949, 951, 953, + 955, 957, 959, 961, 963, 965, 967, 969, 971, 973, + 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, + 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, + 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, + 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, + 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, + 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, + 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, + 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, + 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, 1153, 1155, + 1157, 1159, 1161, 1163, 1167, 1169, 1174, 1182, 1190, 1195, + 1198, 1201, 1204, 1207, 1210, 1214, 1218, 1222, 1226, 1230, + 1234, 1238, 1242, 1246, 1250, 1254, 1258, 1262, 1266, 1270, + 1274, 1280, 1285, 1290, 1294, 1298, 1302, 1306, 1308, 1313, + 1321, 1329, 1334, 1339, 1344, 1349, 1354, 1359, 1364, 1369, + 1374, 1379, 1384, 1389, 1394, 1399, 1402, 1408, 1411, 1414, + 1417, 1420, 1423, 1427, 1431, 1435, 1439, 1443, 1447, 1451, + 1455, 1459, 1463, 1467, 1471, 1475, 1479, 1483, 1487, 1491, + 1495, 1501, 1506, 1511, 1515, 1519, 1523, 1527, 1529, 1531, + 1533, 1535, 1537, 1539, 1541, 1543, 1548, 1556, 1564, 1569, + 1572, 1578, 1581, 1584, 1587, 1590, 1594, 1598, 1602, 1606, + 1610, 1614, 1618, 1622, 1626, 1630, 1634, 1638, 1642, 1646, + 1650, 1654, 1658, 1662, 1668, 1673, 1678, 1682, 1686, 1690, + 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1711, 1714, + 1716, 1718, 1720, 1723 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -936,138 +937,140 @@ static const yytype_int16 yyrhs[] = -1, 39, -1, 40, -1, 41, -1, 42, -1, 29, -1, 126, 130, -1, 125, 127, -1, 76, -1, 52, -1, 142, -1, 164, -1, -1, 90, 165, 116, 166, - 117, 163, -1, 223, -1, 167, -1, 168, -1, 167, - 108, 168, -1, 50, 221, -1, 50, 221, 111, 186, - -1, 95, 221, -1, 95, 221, 111, 186, -1, 169, - 181, 174, -1, 51, 169, 181, 174, -1, 204, -1, - 8, -1, 9, -1, 221, -1, 78, 162, -1, 51, - 170, -1, 120, 170, -1, 115, 170, -1, 14, 170, - -1, 10, 120, 170, -1, 170, 126, 212, 130, -1, - 170, 110, 4, -1, 125, 170, 127, -1, -1, 170, - 125, 171, 172, 127, 161, -1, 223, -1, 12, -1, - 173, -1, 173, 108, 12, -1, 173, 12, -1, 179, - -1, 173, 108, 179, -1, 223, -1, 111, 215, -1, - 223, -1, 111, 216, -1, 109, -1, 107, 208, 128, - -1, 110, 134, 107, 208, 128, -1, 111, 216, 109, - -1, 111, 107, 177, 128, -1, 223, -1, 178, -1, - 178, 108, -1, 216, -1, 107, 177, 128, -1, 178, - 108, 216, -1, 178, 108, 107, 177, 128, -1, 183, - 181, 175, -1, 8, 181, 175, -1, 51, 183, 181, - 175, -1, 218, -1, 223, -1, 8, -1, 9, -1, - 51, 180, -1, 120, 180, -1, 115, 180, -1, 14, - 180, -1, 10, 120, 180, -1, 180, 126, 212, 130, - -1, 223, -1, 8, -1, 9, -1, 51, 181, -1, - 120, 181, -1, 115, 181, -1, 14, 181, -1, 10, - 120, 181, -1, 181, 126, 212, 130, -1, 125, 181, - 127, 125, 172, 127, 161, -1, 125, 181, 127, -1, - 223, -1, 51, 182, -1, 120, 182, -1, 115, 182, - -1, 14, 182, -1, 10, 120, 182, -1, 182, 126, - 212, 130, -1, 125, 182, 127, 125, 172, 127, 161, - -1, 204, -1, 9, -1, 95, 221, -1, 187, -1, - 189, -1, 194, -1, 200, 221, -1, 199, 221, 110, - 196, -1, 204, -1, 9, -1, 95, 221, -1, 187, - -1, 189, -1, 194, -1, 200, 221, -1, 199, 221, - 110, 196, -1, 199, 221, -1, 204, -1, 9, -1, - 95, 221, -1, 200, 221, -1, 199, 221, -1, 183, - 182, -1, 51, 183, 182, -1, -1, 200, 107, 188, - 133, 128, -1, -1, 200, 221, 190, 191, 107, 133, - 128, -1, 223, -1, 192, -1, 110, 193, -1, 192, - 108, 193, -1, 81, 220, -1, 80, 220, -1, 79, - 220, -1, 99, 81, 220, -1, 99, 80, 220, -1, - 99, 79, 220, -1, 81, 99, 220, -1, 80, 99, - 220, -1, 79, 99, 220, -1, 195, 107, 198, 128, - -1, 199, 221, 110, 196, -1, 199, 221, -1, 199, - 110, 196, -1, 199, -1, 205, -1, 9, -1, 223, - -1, 197, 221, 108, -1, 197, 221, 111, 216, 108, - -1, 197, -1, 197, 221, -1, 197, 221, 111, 216, - -1, 57, -1, 50, -1, 89, -1, 96, -1, -1, - 75, 221, 107, 202, 133, 128, -1, 75, 107, 133, - 128, -1, 98, 221, -1, 98, 75, 221, -1, 205, - -1, 206, -1, 207, -1, 45, -1, 47, -1, 102, - -1, 48, -1, 49, -1, 84, -1, 70, -1, 71, - -1, 97, -1, 85, -1, 69, -1, 84, 205, -1, - 70, 205, -1, 97, 205, -1, 85, 205, -1, 63, - -1, 70, 63, -1, 53, -1, 70, 70, 63, -1, - 70, 53, -1, 100, -1, -1, 209, 210, -1, 223, - -1, 210, 211, -1, 3, -1, 4, -1, 6, -1, - 5, -1, 8, -1, 9, -1, 10, -1, 7, -1, - 12, -1, 13, -1, 14, -1, 15, -1, 16, -1, - 17, -1, 18, -1, 19, -1, 20, -1, 21, -1, - 22, -1, 29, -1, 30, -1, 31, -1, 32, -1, - 33, -1, 34, -1, 35, -1, 36, -1, 37, -1, - 38, -1, 39, -1, 40, -1, 41, -1, 42, -1, - 45, -1, 46, -1, 47, -1, 48, -1, 49, -1, - 102, -1, 50, -1, 51, -1, 52, -1, 53, -1, - 54, -1, 55, -1, 57, -1, 59, -1, 60, -1, - 62, -1, 63, -1, 64, -1, 65, -1, 66, -1, - 67, -1, 68, -1, 69, -1, 70, -1, 74, -1, - 76, -1, 79, -1, 80, -1, 81, -1, 61, -1, - 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, - 87, -1, 88, -1, 89, -1, 91, -1, 92, -1, - 93, -1, 94, -1, 95, -1, 96, -1, 97, -1, - 99, -1, 100, -1, 101, -1, 103, -1, 78, -1, - 118, -1, 119, -1, 120, -1, 121, -1, 115, -1, - 113, -1, 114, -1, 129, -1, 123, -1, 111, -1, - 122, -1, 116, -1, 117, -1, 125, -1, 127, -1, - 124, -1, 108, -1, 109, -1, 110, -1, 126, -1, - 130, -1, 112, -1, 107, 210, 128, -1, 223, -1, - 216, -1, 223, -1, 214, -1, 216, -1, 214, 108, - 216, -1, 217, -1, 125, 186, 127, 215, -1, 88, - 116, 186, 117, 125, 214, 127, -1, 54, 116, 186, - 117, 125, 214, 127, -1, 86, 125, 186, 127, -1, - 129, 215, -1, 123, 215, -1, 119, 215, -1, 120, - 215, -1, 115, 215, -1, 215, 120, 215, -1, 215, - 121, 215, -1, 215, 122, 215, -1, 215, 118, 215, - -1, 215, 119, 215, -1, 215, 113, 215, -1, 215, - 114, 215, -1, 215, 115, 215, -1, 215, 13, 215, - -1, 215, 14, 215, -1, 215, 15, 215, -1, 215, - 16, 215, -1, 215, 17, 215, -1, 215, 18, 215, - -1, 215, 19, 215, -1, 215, 20, 215, -1, 215, - 112, 215, 110, 215, -1, 215, 126, 216, 130, -1, - 215, 125, 214, 127, -1, 215, 125, 127, -1, 215, - 124, 215, -1, 215, 29, 215, -1, 125, 214, 127, - -1, 217, -1, 125, 186, 127, 216, -1, 88, 116, - 186, 117, 125, 214, 127, -1, 54, 116, 186, 117, - 125, 214, 127, -1, 9, 125, 213, 127, -1, 69, - 125, 213, 127, -1, 47, 125, 213, 127, -1, 102, - 125, 213, 127, -1, 48, 125, 213, 127, -1, 49, - 125, 213, 127, -1, 45, 125, 213, 127, -1, 84, - 125, 213, 127, -1, 70, 125, 213, 127, -1, 97, - 125, 213, 127, -1, 85, 125, 213, 127, -1, 63, - 125, 213, 127, -1, 53, 125, 213, 127, -1, 86, - 125, 186, 127, -1, 76, 185, -1, 76, 185, 125, - 213, 127, -1, 129, 216, -1, 123, 216, -1, 119, - 216, -1, 120, 216, -1, 115, 216, -1, 216, 120, - 216, -1, 216, 121, 216, -1, 216, 122, 216, -1, - 216, 118, 216, -1, 216, 119, 216, -1, 216, 113, - 216, -1, 216, 114, 216, -1, 216, 115, 216, -1, - 216, 13, 216, -1, 216, 14, 216, -1, 216, 15, - 216, -1, 216, 16, 216, -1, 216, 17, 216, -1, - 216, 18, 216, -1, 216, 116, 216, -1, 216, 117, - 216, -1, 216, 19, 216, -1, 216, 20, 216, -1, - 216, 112, 216, 110, 216, -1, 216, 126, 216, 130, - -1, 216, 125, 214, 127, -1, 216, 125, 127, -1, - 216, 124, 216, -1, 216, 29, 216, -1, 125, 214, - 127, -1, 4, -1, 92, -1, 62, -1, 5, -1, - 3, -1, 222, -1, 8, -1, 219, -1, 125, 186, + 117, 163, -1, 90, 142, -1, 223, -1, 167, -1, + 168, -1, 167, 108, 168, -1, 50, 221, -1, 50, + 221, 111, 186, -1, 95, 221, -1, 95, 221, 111, + 186, -1, 169, 181, 174, -1, 51, 169, 181, 174, + -1, 204, -1, 8, -1, 9, -1, 221, -1, 78, + 162, -1, 51, 170, -1, 101, 170, -1, 120, 170, + -1, 115, 170, -1, 14, 170, -1, 10, 120, 170, + -1, 170, 126, 212, 130, -1, 170, 110, 4, -1, + 125, 170, 127, -1, -1, 170, 125, 171, 172, 127, + 161, -1, 223, -1, 12, -1, 173, -1, 173, 108, + 12, -1, 173, 12, -1, 179, -1, 173, 108, 179, + -1, 223, -1, 111, 215, -1, 223, -1, 111, 216, + -1, 109, -1, 107, 208, 128, -1, 110, 134, 107, + 208, 128, -1, 111, 216, 109, -1, 111, 107, 177, + 128, -1, 223, -1, 178, -1, 178, 108, -1, 216, + -1, 107, 177, 128, -1, 178, 108, 216, -1, 178, + 108, 107, 177, 128, -1, 183, 181, 175, -1, 8, + 181, 175, -1, 51, 183, 181, 175, -1, 218, -1, + 223, -1, 8, -1, 9, -1, 51, 180, -1, 101, + 180, -1, 120, 180, -1, 115, 180, -1, 14, 180, + -1, 10, 120, 180, -1, 180, 126, 212, 130, -1, + 223, -1, 8, -1, 9, -1, 51, 181, -1, 101, + 181, -1, 120, 181, -1, 115, 181, -1, 14, 181, + -1, 10, 120, 181, -1, 181, 126, 212, 130, -1, + 125, 181, 127, 125, 172, 127, 161, -1, 125, 181, + 127, -1, 223, -1, 51, 182, -1, 101, 182, -1, + 120, 182, -1, 115, 182, -1, 14, 182, -1, 10, + 120, 182, -1, 182, 126, 212, 130, -1, 125, 182, + 127, 125, 172, 127, 161, -1, 204, -1, 9, -1, + 95, 221, -1, 187, -1, 189, -1, 194, -1, 200, + 221, -1, 199, 221, 110, 196, -1, 204, -1, 9, + -1, 95, 221, -1, 187, -1, 189, -1, 194, -1, + 200, 221, -1, 199, 221, 110, 196, -1, 199, 221, + -1, 204, -1, 9, -1, 95, 221, -1, 200, 221, + -1, 199, 221, -1, 183, 182, -1, 51, 183, 182, + -1, -1, 200, 107, 188, 133, 128, -1, -1, 200, + 221, 190, 191, 107, 133, 128, -1, 223, -1, 192, + -1, 110, 193, -1, 192, 108, 193, -1, 81, 220, + -1, 80, 220, -1, 79, 220, -1, 99, 81, 220, + -1, 99, 80, 220, -1, 99, 79, 220, -1, 81, + 99, 220, -1, 80, 99, 220, -1, 79, 99, 220, + -1, 195, 107, 198, 128, -1, 199, 221, 110, 196, + -1, 199, 221, -1, 199, 110, 196, -1, 199, -1, + 205, -1, 9, -1, 223, -1, 197, 221, 108, -1, + 197, 221, 111, 216, 108, -1, 197, -1, 197, 221, + -1, 197, 221, 111, 216, -1, 57, -1, 50, -1, + 89, -1, 96, -1, -1, 75, 221, 107, 202, 133, + 128, -1, 75, 107, 133, 128, -1, 98, 221, -1, + 98, 75, 221, -1, 205, -1, 206, -1, 207, -1, + 45, -1, 47, -1, 102, -1, 48, -1, 49, -1, + 84, -1, 70, -1, 71, -1, 97, -1, 85, -1, + 69, -1, 84, 205, -1, 70, 205, -1, 97, 205, + -1, 85, 205, -1, 63, -1, 70, 63, -1, 53, + -1, 70, 70, 63, -1, 70, 53, -1, 100, -1, + -1, 209, 210, -1, 223, -1, 210, 211, -1, 3, + -1, 4, -1, 6, -1, 5, -1, 8, -1, 9, + -1, 10, -1, 7, -1, 12, -1, 13, -1, 14, + -1, 15, -1, 16, -1, 17, -1, 18, -1, 19, + -1, 20, -1, 21, -1, 22, -1, 29, -1, 30, + -1, 31, -1, 32, -1, 33, -1, 34, -1, 35, + -1, 36, -1, 37, -1, 38, -1, 39, -1, 40, + -1, 41, -1, 42, -1, 45, -1, 46, -1, 47, + -1, 48, -1, 49, -1, 102, -1, 50, -1, 51, + -1, 52, -1, 53, -1, 54, -1, 55, -1, 57, + -1, 59, -1, 60, -1, 62, -1, 63, -1, 64, + -1, 65, -1, 66, -1, 67, -1, 68, -1, 69, + -1, 70, -1, 74, -1, 76, -1, 79, -1, 80, + -1, 81, -1, 61, -1, 82, -1, 83, -1, 84, + -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, + -1, 91, -1, 92, -1, 93, -1, 94, -1, 95, + -1, 96, -1, 97, -1, 99, -1, 100, -1, 101, + -1, 103, -1, 78, -1, 118, -1, 119, -1, 120, + -1, 121, -1, 115, -1, 113, -1, 114, -1, 129, + -1, 123, -1, 111, -1, 122, -1, 116, -1, 117, + -1, 125, -1, 127, -1, 124, -1, 108, -1, 109, + -1, 110, -1, 126, -1, 130, -1, 112, -1, 107, + 210, 128, -1, 223, -1, 216, -1, 223, -1, 214, + -1, 216, -1, 214, 108, 216, -1, 217, -1, 125, + 186, 127, 215, -1, 88, 116, 186, 117, 125, 214, + 127, -1, 54, 116, 186, 117, 125, 214, 127, -1, + 86, 125, 186, 127, -1, 129, 215, -1, 123, 215, + -1, 119, 215, -1, 120, 215, -1, 115, 215, -1, + 215, 120, 215, -1, 215, 121, 215, -1, 215, 122, + 215, -1, 215, 118, 215, -1, 215, 119, 215, -1, + 215, 113, 215, -1, 215, 114, 215, -1, 215, 115, + 215, -1, 215, 13, 215, -1, 215, 14, 215, -1, + 215, 15, 215, -1, 215, 16, 215, -1, 215, 17, + 215, -1, 215, 18, 215, -1, 215, 19, 215, -1, + 215, 20, 215, -1, 215, 112, 215, 110, 215, -1, + 215, 126, 216, 130, -1, 215, 125, 214, 127, -1, + 215, 125, 127, -1, 215, 124, 215, -1, 215, 29, + 215, -1, 125, 214, 127, -1, 217, -1, 125, 186, 127, 216, -1, 88, 116, 186, 117, 125, 214, 127, - -1, 54, 116, 186, 117, 125, 214, 127, -1, 86, - 125, 186, 127, -1, 76, 185, -1, 76, 185, 125, - 213, 127, -1, 129, 216, -1, 123, 216, -1, 119, - 216, -1, 115, 216, -1, 218, 120, 216, -1, 218, - 121, 216, -1, 218, 122, 216, -1, 218, 118, 216, - -1, 218, 119, 216, -1, 218, 113, 216, -1, 218, - 114, 216, -1, 218, 115, 216, -1, 218, 13, 216, - -1, 218, 14, 216, -1, 218, 15, 216, -1, 218, - 16, 216, -1, 218, 17, 216, -1, 218, 18, 216, - -1, 218, 116, 216, -1, 218, 117, 216, -1, 218, - 19, 216, -1, 218, 20, 216, -1, 218, 112, 216, - 110, 216, -1, 218, 126, 216, 130, -1, 218, 125, - 214, 127, -1, 218, 125, 127, -1, 218, 124, 216, - -1, 218, 29, 216, -1, 125, 214, 127, -1, 4, - -1, 92, -1, 62, -1, 5, -1, 3, -1, 222, - -1, 221, -1, 200, 221, -1, 95, 221, -1, 8, - -1, 9, -1, 6, -1, 222, 6, -1, -1 + -1, 54, 116, 186, 117, 125, 214, 127, -1, 9, + 125, 213, 127, -1, 69, 125, 213, 127, -1, 47, + 125, 213, 127, -1, 102, 125, 213, 127, -1, 48, + 125, 213, 127, -1, 49, 125, 213, 127, -1, 45, + 125, 213, 127, -1, 84, 125, 213, 127, -1, 70, + 125, 213, 127, -1, 97, 125, 213, 127, -1, 85, + 125, 213, 127, -1, 63, 125, 213, 127, -1, 53, + 125, 213, 127, -1, 86, 125, 186, 127, -1, 76, + 185, -1, 76, 185, 125, 213, 127, -1, 129, 216, + -1, 123, 216, -1, 119, 216, -1, 120, 216, -1, + 115, 216, -1, 216, 120, 216, -1, 216, 121, 216, + -1, 216, 122, 216, -1, 216, 118, 216, -1, 216, + 119, 216, -1, 216, 113, 216, -1, 216, 114, 216, + -1, 216, 115, 216, -1, 216, 13, 216, -1, 216, + 14, 216, -1, 216, 15, 216, -1, 216, 16, 216, + -1, 216, 17, 216, -1, 216, 18, 216, -1, 216, + 116, 216, -1, 216, 117, 216, -1, 216, 19, 216, + -1, 216, 20, 216, -1, 216, 112, 216, 110, 216, + -1, 216, 126, 216, 130, -1, 216, 125, 214, 127, + -1, 216, 125, 127, -1, 216, 124, 216, -1, 216, + 29, 216, -1, 125, 214, 127, -1, 4, -1, 92, + -1, 62, -1, 5, -1, 3, -1, 222, -1, 8, + -1, 219, -1, 125, 186, 127, 216, -1, 88, 116, + 186, 117, 125, 214, 127, -1, 54, 116, 186, 117, + 125, 214, 127, -1, 86, 125, 186, 127, -1, 76, + 185, -1, 76, 185, 125, 213, 127, -1, 129, 216, + -1, 123, 216, -1, 119, 216, -1, 115, 216, -1, + 218, 120, 216, -1, 218, 121, 216, -1, 218, 122, + 216, -1, 218, 118, 216, -1, 218, 119, 216, -1, + 218, 113, 216, -1, 218, 114, 216, -1, 218, 115, + 216, -1, 218, 13, 216, -1, 218, 14, 216, -1, + 218, 15, 216, -1, 218, 16, 216, -1, 218, 17, + 216, -1, 218, 18, 216, -1, 218, 116, 216, -1, + 218, 117, 216, -1, 218, 19, 216, -1, 218, 20, + 216, -1, 218, 112, 216, 110, 216, -1, 218, 126, + 216, 130, -1, 218, 125, 214, 127, -1, 218, 125, + 127, -1, 218, 124, 216, -1, 218, 29, 216, -1, + 125, 214, 127, -1, 4, -1, 92, -1, 62, -1, + 5, -1, 3, -1, 222, -1, 221, -1, 200, 221, + -1, 95, 221, -1, 8, -1, 9, -1, 6, -1, + 222, 6, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1085,49 +1088,50 @@ static const yytype_uint16 yyrline[] = 997, 1001, 1005, 1009, 1013, 1017, 1021, 1025, 1029, 1033, 1037, 1041, 1045, 1049, 1053, 1057, 1061, 1065, 1069, 1073, 1077, 1081, 1085, 1089, 1093, 1097, 1101, 1105, 1109, 1113, - 1117, 1121, 1128, 1129, 1134, 1133, 1144, 1145, 1149, 1155, - 1164, 1168, 1172, 1176, 1180, 1186, 1196, 1200, 1205, 1214, - 1218, 1232, 1237, 1242, 1247, 1252, 1257, 1262, 1267, 1273, - 1272, 1294, 1298, 1303, 1307, 1312, 1320, 1325, 1333, 1337, - 1344, 1348, 1355, 1359, 1363, 1367, 1371, 1378, 1379, 1380, - 1384, 1387, 1388, 1389, 1393, 1398, 1406, 1412, 1422, 1426, - 1430, 1434, 1439, 1444, 1449, 1454, 1459, 1467, 1471, 1475, - 1479, 1484, 1489, 1494, 1499, 1504, 1509, 1515, 1523, 1527, - 1532, 1537, 1542, 1547, 1552, 1557, 1566, 1570, 1575, 1579, - 1583, 1587, 1591, 1607, 1626, 1630, 1635, 1639, 1643, 1647, - 1651, 1667, 1683, 1704, 1708, 1713, 1717, 1733, 1752, 1758, - 1769, 1768, 1793, 1792, 1822, 1823, 1827, 1828, 1832, 1836, - 1840, 1844, 1848, 1852, 1856, 1860, 1864, 1871, 1879, 1883, - 1887, 1891, 1898, 1902, 1909, 1910, 1916, 1924, 1925, 1931, - 1940, 1947, 1951, 1955, 1963, 1962, 1984, 1988, 1994, 2003, - 2004, 2005, 2009, 2013, 2017, 2021, 2025, 2029, 2034, 2039, - 2044, 2049, 2054, 2058, 2063, 2072, 2077, 2085, 2089, 2094, - 2098, 2103, 2111, 2121, 2121, 2131, 2132, 2136, 2139, 2142, - 2145, 2148, 2151, 2154, 2157, 2160, 2160, 2160, 2161, 2161, - 2161, 2161, 2162, 2162, 2162, 2162, 2162, 2163, 2163, 2163, - 2164, 2164, 2164, 2164, 2164, 2165, 2165, 2165, 2165, 2165, - 2166, 2166, 2166, 2166, 2166, 2167, 2167, 2167, 2168, 2168, - 2168, 2168, 2168, 2169, 2169, 2169, 2170, 2170, 2170, 2170, - 2171, 2171, 2171, 2172, 2172, 2172, 2172, 2172, 2173, 2173, - 2173, 2173, 2174, 2174, 2174, 2174, 2174, 2175, 2175, 2175, - 2175, 2175, 2175, 2176, 2176, 2176, 2176, 2176, 2177, 2178, - 2181, 2181, 2181, 2181, 2181, 2181, 2181, 2181, 2181, 2181, - 2181, 2182, 2182, 2182, 2182, 2182, 2182, 2182, 2182, 2182, - 2182, 2183, 2183, 2187, 2191, 2198, 2202, 2209, 2213, 2220, - 2224, 2228, 2232, 2236, 2240, 2244, 2248, 2260, 2264, 2268, - 2272, 2276, 2280, 2284, 2288, 2292, 2296, 2300, 2304, 2308, - 2312, 2316, 2320, 2324, 2328, 2332, 2336, 2340, 2344, 2348, - 2352, 2356, 2364, 2368, 2372, 2376, 2380, 2387, 2393, 2399, - 2405, 2411, 2417, 2423, 2430, 2437, 2444, 2451, 2457, 2463, - 2467, 2471, 2475, 2479, 2483, 2495, 2499, 2503, 2507, 2511, - 2515, 2519, 2523, 2527, 2531, 2535, 2539, 2543, 2547, 2551, - 2555, 2559, 2563, 2567, 2571, 2575, 2579, 2583, 2587, 2591, - 2595, 2599, 2606, 2610, 2614, 2618, 2622, 2626, 2630, 2644, - 2648, 2652, 2656, 2660, 2664, 2668, 2672, 2676, 2680, 2692, - 2696, 2700, 2704, 2708, 2712, 2716, 2720, 2724, 2728, 2732, - 2736, 2740, 2744, 2748, 2752, 2756, 2760, 2764, 2768, 2772, - 2776, 2780, 2784, 2788, 2792, 2799, 2803, 2807, 2811, 2815, - 2819, 2826, 2834, 2842, 2865, 2869, 2876, 2880, 2886 + 1117, 1121, 1128, 1129, 1134, 1133, 1141, 1145, 1146, 1150, + 1156, 1165, 1169, 1173, 1177, 1181, 1187, 1197, 1201, 1206, + 1215, 1219, 1233, 1238, 1243, 1248, 1253, 1258, 1263, 1268, + 1273, 1279, 1278, 1300, 1304, 1309, 1313, 1318, 1326, 1331, + 1339, 1343, 1350, 1354, 1361, 1365, 1369, 1373, 1377, 1384, + 1385, 1386, 1390, 1393, 1394, 1395, 1399, 1404, 1412, 1418, + 1428, 1432, 1436, 1440, 1445, 1450, 1455, 1460, 1465, 1470, + 1478, 1482, 1486, 1490, 1495, 1500, 1505, 1510, 1515, 1520, + 1525, 1531, 1539, 1543, 1548, 1553, 1558, 1563, 1568, 1573, + 1578, 1587, 1591, 1596, 1600, 1604, 1608, 1612, 1628, 1647, + 1651, 1656, 1660, 1664, 1668, 1672, 1688, 1704, 1725, 1729, + 1734, 1738, 1754, 1773, 1779, 1790, 1789, 1814, 1813, 1843, + 1844, 1848, 1849, 1853, 1857, 1861, 1865, 1869, 1873, 1877, + 1881, 1885, 1892, 1900, 1904, 1908, 1912, 1919, 1923, 1930, + 1931, 1937, 1945, 1946, 1952, 1961, 1968, 1972, 1976, 1984, + 1983, 2005, 2009, 2015, 2024, 2025, 2026, 2030, 2034, 2038, + 2042, 2046, 2050, 2055, 2060, 2065, 2070, 2075, 2079, 2084, + 2093, 2098, 2106, 2110, 2115, 2119, 2124, 2132, 2142, 2142, + 2152, 2153, 2157, 2160, 2163, 2166, 2169, 2172, 2175, 2178, + 2181, 2181, 2181, 2182, 2182, 2182, 2182, 2183, 2183, 2183, + 2183, 2183, 2184, 2184, 2184, 2185, 2185, 2185, 2185, 2185, + 2186, 2186, 2186, 2186, 2186, 2187, 2187, 2187, 2187, 2187, + 2188, 2188, 2188, 2189, 2189, 2189, 2189, 2189, 2190, 2190, + 2190, 2191, 2191, 2191, 2191, 2192, 2192, 2192, 2193, 2193, + 2193, 2193, 2193, 2194, 2194, 2194, 2194, 2195, 2195, 2195, + 2195, 2195, 2196, 2196, 2196, 2196, 2196, 2196, 2197, 2197, + 2197, 2197, 2197, 2198, 2199, 2202, 2202, 2202, 2202, 2202, + 2202, 2202, 2202, 2202, 2202, 2202, 2203, 2203, 2203, 2203, + 2203, 2203, 2203, 2203, 2203, 2203, 2204, 2204, 2208, 2212, + 2219, 2223, 2230, 2234, 2241, 2245, 2249, 2253, 2257, 2261, + 2265, 2269, 2281, 2285, 2289, 2293, 2297, 2301, 2305, 2309, + 2313, 2317, 2321, 2325, 2329, 2333, 2337, 2341, 2345, 2349, + 2353, 2357, 2361, 2365, 2369, 2373, 2377, 2385, 2389, 2393, + 2397, 2401, 2408, 2414, 2420, 2426, 2432, 2438, 2444, 2451, + 2458, 2465, 2472, 2478, 2484, 2488, 2492, 2496, 2500, 2504, + 2516, 2520, 2524, 2528, 2532, 2536, 2540, 2544, 2548, 2552, + 2556, 2560, 2564, 2568, 2572, 2576, 2580, 2584, 2588, 2592, + 2596, 2600, 2604, 2608, 2612, 2616, 2620, 2627, 2631, 2635, + 2639, 2643, 2647, 2651, 2665, 2669, 2673, 2677, 2681, 2685, + 2689, 2693, 2697, 2701, 2713, 2717, 2721, 2725, 2729, 2733, + 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2765, 2769, 2773, + 2777, 2781, 2785, 2789, 2793, 2797, 2801, 2805, 2809, 2813, + 2820, 2824, 2828, 2832, 2836, 2840, 2847, 2855, 2863, 2886, + 2890, 2897, 2901, 2907 }; #endif @@ -1227,24 +1231,25 @@ static const yytype_uint8 yyr1[] = 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 163, 165, 164, 166, 166, 167, 167, - 168, 168, 168, 168, 168, 168, 169, 169, 169, 170, - 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, - 170, 172, 172, 172, 172, 172, 173, 173, 174, 174, - 175, 175, 176, 176, 176, 176, 176, 177, 177, 177, - 178, 178, 178, 178, 179, 179, 179, 179, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 181, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, - 182, 182, 182, 182, 182, 182, 183, 183, 183, 183, - 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, - 184, 184, 184, 185, 185, 185, 185, 185, 186, 186, - 188, 187, 190, 189, 191, 191, 192, 192, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 194, 195, 195, - 195, 195, 196, 196, 197, 197, 197, 198, 198, 198, - 199, 200, 200, 200, 202, 201, 201, 203, 203, 204, - 204, 204, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 206, 206, 206, - 206, 206, 207, 209, 208, 210, 210, 211, 211, 211, + 162, 162, 163, 163, 165, 164, 164, 166, 166, 167, + 167, 168, 168, 168, 168, 168, 168, 169, 169, 169, + 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 170, 171, 170, 172, 172, 172, 172, 172, 173, 173, + 174, 174, 175, 175, 176, 176, 176, 176, 176, 177, + 177, 177, 178, 178, 178, 178, 179, 179, 179, 179, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 183, 183, 183, 183, 183, 183, 183, 183, 184, + 184, 184, 184, 184, 184, 184, 184, 184, 185, 185, + 185, 185, 185, 186, 186, 188, 187, 190, 189, 191, + 191, 192, 192, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 194, 195, 195, 195, 195, 196, 196, 197, + 197, 197, 198, 198, 198, 199, 200, 200, 200, 202, + 201, 201, 203, 203, 204, 204, 204, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 206, 206, 206, 206, 206, 207, 209, 208, + 210, 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, @@ -1254,22 +1259,22 @@ static const yytype_uint8 yyr1[] = 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 212, 212, 213, 213, 214, 214, 215, + 211, 211, 211, 211, 211, 211, 211, 211, 212, 212, + 213, 213, 214, 214, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, + 215, 215, 215, 215, 215, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 217, 217, 217, 217, 217, 217, 217, 218, + 216, 216, 216, 216, 216, 216, 216, 217, 217, 217, + 217, 217, 217, 217, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 219, 219, 219, 219, 219, - 219, 220, 220, 220, 221, 221, 222, 222, 223 + 219, 219, 219, 219, 219, 219, 220, 220, 220, 221, + 221, 222, 222, 223 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1287,24 +1292,25 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 1, 1, 1, 1, 0, 6, 1, 1, 1, 3, - 2, 4, 2, 4, 3, 4, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 3, 4, 3, 3, 0, - 6, 1, 1, 1, 3, 2, 1, 3, 1, 2, - 1, 2, 1, 3, 5, 3, 4, 1, 1, 2, - 1, 3, 3, 5, 3, 3, 4, 1, 1, 1, - 1, 2, 2, 2, 2, 3, 4, 1, 1, 1, - 2, 2, 2, 2, 3, 4, 7, 3, 1, 2, - 2, 2, 2, 3, 4, 7, 1, 1, 2, 1, - 1, 1, 2, 4, 1, 1, 2, 1, 1, 1, - 2, 4, 2, 1, 1, 2, 2, 2, 2, 3, - 0, 5, 0, 7, 1, 1, 2, 3, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 4, 4, 2, - 3, 1, 1, 1, 1, 3, 5, 1, 2, 4, - 1, 1, 1, 1, 0, 6, 4, 2, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, - 3, 2, 1, 0, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 0, 6, 2, 1, 1, 1, + 3, 2, 4, 2, 4, 3, 4, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 3, 4, 3, + 3, 0, 6, 1, 1, 1, 3, 2, 1, 3, + 1, 2, 1, 2, 1, 3, 5, 3, 4, 1, + 1, 2, 1, 3, 3, 5, 3, 3, 4, 1, + 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, + 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, + 7, 3, 1, 2, 2, 2, 2, 2, 3, 4, + 7, 1, 1, 2, 1, 1, 1, 2, 4, 1, + 1, 2, 1, 1, 1, 2, 4, 2, 1, 1, + 2, 2, 2, 2, 3, 0, 5, 0, 7, 1, + 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 4, 4, 2, 3, 1, 1, 1, 1, + 3, 5, 1, 2, 4, 1, 1, 1, 1, 0, + 6, 4, 2, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 1, 2, 1, 3, 2, 1, 0, 2, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1314,22 +1320,22 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, - 4, 7, 7, 4, 2, 2, 2, 2, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 1, 4, 7, 7, 4, 2, + 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, - 3, 3, 1, 4, 7, 7, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 5, 2, 2, 2, 2, 2, 3, 3, 3, + 5, 4, 4, 3, 3, 3, 3, 1, 4, 7, + 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 2, 5, 2, 2, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 4, 7, 7, 4, 2, 5, 2, 2, 2, 2, + 5, 4, 4, 3, 3, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 7, 7, 4, 2, + 5, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, - 4, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 1, 1, 1, 2, 0 + 3, 3, 3, 5, 4, 4, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, + 1, 1, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1337,989 +1343,1003 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 548, 0, 0, 0, 548, 5, 496, 492, 495, - 546, 498, 0, 0, 0, 0, 0, 0, 0, 494, - 0, 0, 0, 0, 0, 0, 0, 0, 493, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 442, 497, - 207, 272, 273, 275, 276, 261, 0, 289, 260, 287, - 282, 278, 279, 277, 281, 262, 0, 263, 280, 292, - 274, 548, 4, 209, 210, 211, 0, 251, 0, 206, - 269, 270, 271, 1, 20, 21, 0, 29, 0, 0, - 0, 0, 0, 0, 124, 548, 0, 6, 15, 7, - 18, 0, 13, 43, 14, 16, 17, 31, 548, 548, - 548, 548, 548, 548, 0, 548, 548, 548, 224, 0, - 460, 0, 0, 223, 548, 548, 0, 0, 548, 548, - 466, 464, 465, 463, 207, 272, 273, 275, 276, 289, - 287, 282, 278, 277, 281, 280, 274, 0, 0, 407, - 462, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 553, 0, 0, 0, 553, 5, 501, 497, 500, + 551, 503, 0, 0, 0, 0, 0, 0, 0, 499, + 0, 0, 0, 0, 0, 0, 0, 0, 498, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 447, 502, + 212, 277, 278, 280, 281, 266, 0, 294, 265, 292, + 287, 283, 284, 282, 286, 267, 0, 268, 285, 297, + 279, 553, 4, 214, 215, 216, 0, 256, 0, 211, + 274, 275, 276, 1, 20, 21, 0, 29, 0, 0, + 0, 0, 0, 0, 553, 553, 0, 6, 15, 7, + 18, 0, 13, 43, 14, 16, 17, 31, 553, 553, + 553, 553, 553, 553, 0, 553, 553, 553, 229, 0, + 465, 0, 0, 228, 553, 553, 0, 0, 553, 553, + 471, 469, 470, 468, 212, 277, 278, 280, 281, 294, + 292, 287, 283, 282, 286, 285, 279, 0, 0, 412, + 467, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 547, 548, 291, 288, 278, 284, - 278, 283, 286, 544, 545, 208, 285, 0, 548, 548, - 548, 548, 548, 228, 198, 548, 0, 249, 230, 212, - 22, 548, 0, 0, 548, 0, 25, 24, 23, 0, - 0, 19, 0, 267, 77, 215, 41, 0, 42, 32, - 37, 35, 39, 0, 40, 34, 0, 36, 38, 11, - 0, 0, 46, 217, 218, 219, 251, 0, 214, 0, - 406, 405, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 225, 548, 227, 226, 0, 0, 0, 0, 0, - 0, 0, 0, 491, 475, 476, 477, 478, 479, 480, - 483, 484, 490, 0, 472, 473, 474, 481, 482, 470, - 471, 467, 468, 469, 489, 488, 0, 0, 229, 290, - 548, 202, 199, 201, 200, 0, 548, 257, 0, 254, - 253, 250, 252, 0, 548, 548, 30, 0, 0, 548, - 264, 548, 0, 0, 54, 268, 63, 65, 48, 33, - 0, 548, 216, 548, 0, 293, 162, 0, 0, 45, - 44, 0, 222, 220, 446, 452, 448, 450, 451, 458, - 0, 457, 447, 454, 0, 453, 456, 459, 0, 455, - 449, 443, 408, 0, 487, 486, 203, 0, 0, 404, - 403, 258, 247, 213, 548, 0, 0, 235, 234, 0, - 0, 266, 548, 137, 138, 0, 0, 0, 0, 127, - 128, 548, 136, 126, 56, 58, 0, 548, 0, 0, - 548, 0, 548, 179, 180, 0, 548, 548, 548, 548, - 0, 178, 548, 67, 0, 548, 0, 8, 0, 548, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 548, - 139, 0, 0, 461, 0, 485, 548, 204, 255, 0, - 231, 0, 0, 0, 0, 236, 548, 0, 0, 0, - 548, 130, 548, 132, 548, 0, 188, 189, 0, 548, - 548, 548, 548, 548, 548, 187, 0, 55, 548, 539, - 535, 538, 548, 152, 0, 0, 537, 0, 0, 0, - 536, 0, 0, 0, 0, 0, 0, 153, 156, 548, - 177, 499, 540, 151, 0, 0, 0, 49, 548, 0, - 548, 184, 181, 183, 182, 73, 548, 12, 548, 163, - 294, 295, 293, 0, 548, 548, 0, 168, 170, 167, - 165, 0, 144, 141, 93, 94, 95, 96, 97, 98, - 101, 102, 117, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 121, 120, 104, 103, 90, - 92, 91, 99, 100, 88, 89, 85, 86, 87, 84, - 0, 0, 83, 140, 143, 142, 0, 0, 0, 149, - 548, 0, 50, 160, 221, 0, 0, 0, 259, 0, - 0, 0, 240, 541, 0, 239, 0, 238, 0, 0, - 0, 548, 237, 0, 0, 0, 265, 0, 548, 0, - 0, 122, 125, 123, 129, 548, 193, 190, 192, 191, - 0, 0, 548, 134, 158, 57, 548, 0, 59, 548, - 548, 0, 504, 0, 0, 509, 508, 507, 0, 0, - 506, 548, 155, 0, 548, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 552, 553, 296, 293, 283, 289, + 283, 288, 291, 549, 550, 213, 290, 0, 553, 553, + 553, 553, 553, 553, 233, 202, 553, 0, 254, 235, + 217, 22, 553, 0, 0, 553, 0, 25, 24, 23, + 0, 126, 0, 0, 19, 0, 272, 77, 220, 41, + 0, 42, 32, 37, 35, 39, 0, 40, 34, 0, + 36, 38, 11, 0, 0, 46, 222, 223, 224, 256, + 0, 219, 0, 411, 410, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 230, 553, 232, 231, 0, 0, + 0, 0, 0, 0, 0, 0, 496, 480, 481, 482, + 483, 484, 485, 488, 489, 495, 0, 477, 478, 479, + 486, 487, 475, 476, 472, 473, 474, 494, 493, 0, + 0, 234, 295, 553, 207, 203, 204, 206, 205, 0, + 553, 262, 0, 259, 258, 255, 257, 0, 553, 553, + 30, 0, 0, 553, 269, 553, 0, 0, 54, 273, + 63, 65, 48, 33, 0, 553, 221, 553, 0, 298, + 164, 0, 0, 45, 44, 0, 227, 225, 451, 457, + 453, 455, 456, 463, 0, 462, 452, 459, 0, 458, + 461, 464, 0, 460, 454, 448, 413, 0, 492, 491, + 208, 0, 0, 409, 408, 263, 252, 218, 553, 0, + 0, 240, 239, 0, 0, 271, 553, 138, 139, 0, + 0, 0, 0, 128, 129, 553, 137, 127, 56, 58, + 0, 553, 0, 0, 553, 0, 553, 181, 182, 0, + 553, 553, 553, 553, 553, 0, 180, 553, 67, 0, + 553, 0, 8, 0, 553, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 47, 553, 140, 0, 0, 466, + 0, 490, 553, 209, 260, 0, 236, 0, 0, 0, + 0, 241, 553, 0, 0, 0, 553, 131, 553, 133, + 553, 0, 191, 192, 0, 553, 553, 553, 553, 553, + 553, 553, 190, 0, 55, 553, 544, 540, 543, 553, + 154, 0, 0, 542, 0, 0, 0, 541, 0, 0, + 0, 0, 0, 0, 155, 158, 553, 179, 504, 545, + 153, 0, 0, 0, 49, 553, 0, 553, 187, 183, + 184, 186, 185, 73, 553, 12, 553, 165, 299, 300, + 298, 0, 553, 553, 0, 170, 172, 169, 167, 0, + 146, 142, 93, 94, 95, 96, 97, 98, 101, 102, + 117, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 121, 120, 104, 103, 90, 92, 91, + 99, 100, 88, 89, 85, 86, 87, 84, 0, 0, + 83, 141, 143, 145, 144, 0, 0, 0, 151, 553, + 0, 50, 162, 226, 0, 0, 0, 264, 0, 0, + 0, 245, 546, 0, 244, 0, 243, 0, 0, 0, + 553, 242, 0, 0, 0, 270, 0, 553, 0, 122, + 125, 123, 130, 553, 197, 193, 194, 196, 195, 0, + 0, 553, 135, 160, 57, 553, 0, 59, 553, 553, + 0, 509, 0, 0, 514, 513, 512, 0, 0, 511, + 553, 157, 0, 553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 548, 0, 52, 75, 185, 548, 0, 0, 297, - 298, 300, 299, 304, 301, 302, 303, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 336, 337, 338, - 339, 340, 341, 342, 343, 344, 359, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 379, 356, - 357, 358, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 335, 378, 548, 396, 397, 398, 389, 401, 385, 386, - 384, 391, 392, 380, 381, 382, 383, 390, 388, 395, - 393, 399, 394, 387, 400, 296, 0, 9, 0, 0, - 166, 169, 145, 119, 118, 148, 147, 161, 548, 0, - 0, 445, 444, 548, 256, 543, 246, 542, 245, 244, - 243, 242, 241, 233, 0, 26, 0, 131, 135, 133, - 194, 197, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 159, 409, 0, 0, 61, 0, 0, 175, 548, - 0, 548, 0, 0, 0, 534, 79, 64, 78, 154, - 157, 174, 518, 519, 520, 521, 522, 523, 526, 527, - 533, 0, 515, 516, 517, 524, 525, 513, 514, 510, - 511, 512, 532, 531, 0, 0, 0, 69, 66, 0, - 548, 0, 186, 548, 0, 164, 10, 171, 548, 172, - 0, 146, 51, 205, 0, 0, 548, 0, 0, 0, - 418, 416, 417, 415, 0, 0, 414, 0, 0, 0, + 553, 0, 52, 75, 188, 553, 0, 0, 302, 303, + 305, 304, 309, 306, 307, 308, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 364, 350, 351, 352, 353, + 354, 355, 356, 357, 358, 359, 360, 384, 361, 362, + 363, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 340, + 383, 553, 401, 402, 403, 394, 406, 390, 391, 389, + 396, 397, 385, 386, 387, 388, 395, 393, 400, 398, + 404, 399, 392, 405, 301, 0, 9, 0, 0, 168, + 171, 147, 119, 118, 150, 149, 163, 553, 0, 0, + 450, 449, 553, 261, 548, 251, 547, 250, 249, 248, + 247, 246, 238, 0, 26, 0, 132, 136, 134, 198, + 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 161, 414, 0, 0, 61, 0, 0, 177, 553, 0, + 553, 0, 0, 0, 539, 79, 64, 78, 156, 159, + 176, 523, 524, 525, 526, 527, 528, 531, 532, 538, + 0, 520, 521, 522, 529, 530, 518, 519, 515, 516, + 517, 537, 536, 0, 0, 0, 69, 66, 0, 553, + 0, 189, 553, 0, 166, 10, 173, 553, 174, 0, + 148, 51, 210, 0, 0, 553, 0, 0, 0, 423, + 421, 422, 420, 0, 0, 419, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, - 60, 161, 176, 0, 0, 503, 0, 500, 80, 0, - 0, 530, 529, 71, 548, 53, 0, 548, 68, 402, - 0, 548, 27, 28, 0, 0, 0, 0, 0, 441, - 427, 428, 429, 430, 431, 432, 433, 434, 440, 0, - 424, 425, 426, 422, 423, 419, 420, 421, 439, 438, - 0, 0, 62, 0, 505, 0, 0, 528, 548, 0, - 548, 74, 173, 150, 548, 0, 413, 0, 410, 0, - 437, 436, 0, 0, 81, 0, 0, 548, 76, 196, - 0, 0, 435, 502, 501, 82, 548, 70, 0, 0, - 72, 412, 411 + 0, 0, 0, 0, 0, 0, 0, 199, 0, 60, + 163, 178, 0, 0, 508, 0, 505, 80, 0, 0, + 535, 534, 71, 553, 53, 0, 553, 68, 407, 0, + 553, 27, 28, 0, 0, 0, 0, 0, 446, 432, + 433, 434, 435, 436, 437, 438, 439, 445, 0, 429, + 430, 431, 427, 428, 424, 425, 426, 444, 443, 0, + 0, 62, 0, 510, 0, 0, 533, 553, 0, 553, + 74, 175, 152, 553, 0, 418, 0, 415, 0, 442, + 441, 0, 0, 81, 0, 0, 553, 76, 200, 0, + 0, 440, 507, 506, 82, 553, 70, 0, 0, 72, + 417, 416 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 396, 397, 88, 313, 89, 90, 191, - 91, 92, 93, 321, 381, 408, 477, 201, 376, 446, - 447, 595, 221, 377, 380, 488, 914, 958, 646, 850, - 817, 543, 582, 94, 199, 368, 369, 370, 371, 409, - 768, 466, 467, 593, 551, 319, 496, 497, 468, 390, - 444, 183, 61, 222, 110, 62, 63, 294, 64, 295, - 356, 357, 425, 65, 66, 291, 287, 288, 67, 68, - 95, 362, 96, 69, 70, 71, 72, 394, 395, 490, - 755, 348, 229, 230, 801, 139, 38, 470, 471, 562, - 410, 39, 231 + -1, 4, 5, 401, 402, 88, 317, 89, 90, 192, + 91, 92, 93, 325, 385, 414, 484, 204, 380, 453, + 454, 604, 224, 381, 384, 496, 923, 967, 655, 859, + 826, 551, 590, 94, 202, 372, 373, 374, 375, 415, + 777, 473, 474, 602, 560, 323, 504, 505, 475, 395, + 451, 184, 61, 225, 110, 62, 63, 298, 64, 299, + 360, 361, 431, 65, 66, 295, 291, 292, 67, 68, + 95, 366, 96, 69, 70, 71, 72, 399, 400, 498, + 764, 352, 232, 233, 810, 139, 38, 477, 478, 571, + 416, 39, 234 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -491 +#define YYPACT_NINF -570 static const yytype_int16 yypact[] = { - 252, -491, 2070, 3145, 17, 3049, -491, -491, -491, -491, - -491, -491, -99, -95, -74, -54, -48, 12, -23, -491, - 14, 46, 57, 3257, 62, 75, 82, 94, -491, 105, - 115, 2070, 2070, 2070, 2070, 1230, 2070, 2712, -491, 208, - -491, -491, -491, -491, -491, -491, 3313, -491, -491, -491, - -491, 1681, -491, 1861, 1861, -491, 96, -491, 1861, -491, - -491, 184, -491, -491, -491, -491, 137, 11, 29, -491, - -491, -491, -491, -491, -491, -491, -47, -491, 131, 156, - 31, 173, 193, 198, -491, -491, 60, -491, -491, -491, - -491, 2407, -491, -491, -491, -491, -491, -491, 2070, 2070, - 2070, 2070, 2070, 2070, 3145, 2070, 2070, 2070, -491, 96, - 191, 96, 96, -491, 2070, 2070, 3145, 3145, 2070, 2070, - -6, -6, -6, -6, -99, -95, -74, -54, -48, 12, - 14, 46, 2041, 2334, 3302, 3506, 115, 192, -61, 2712, - -6, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, - 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, - 2070, 2070, 1530, 2070, -491, 184, -491, -491, 1771, -491, - 1861, -491, -491, -491, -491, -491, -491, 201, 184, 184, - 184, 184, 184, 197, -491, -491, 3246, 236, -491, -85, - -491, 3538, 320, 96, -491, 241, -491, -491, -491, 244, - 2474, -491, 96, -491, 246, 249, -491, 3313, -491, 363, - -491, -491, -491, 3201, -491, -491, 96, -491, -491, -491, - 96, 167, 273, -491, -491, -491, 11, 29, -491, 268, - 292, -491, 274, 276, 277, 280, 283, 300, 291, 297, - 299, -491, 2070, -491, -491, 301, 305, 307, 310, 309, - 325, 2070, 2070, -491, 1247, 819, 556, 556, 1483, 1483, - 216, 216, -491, 2564, 2132, 2874, 2904, 1483, 1483, 406, - 406, -6, -6, -6, -491, -491, -55, 2162, 197, -491, - 184, 197, 197, 197, 197, -13, 2070, 96, 281, -491, - -491, -491, -491, 3246, -491, 345, -491, 350, 351, 3350, - -491, 3136, 3313, 167, -491, -491, -491, 3, -491, 208, - 3313, 282, -491, -491, 328, -491, -491, 96, 1620, -491, - -491, 224, -51, -85, -491, -491, -491, -491, -491, -491, - 335, -491, -491, -491, 337, -491, -491, -491, 341, -491, - -491, -6, 2712, 2070, -491, -491, 197, 342, 346, 2712, - -491, 54, -491, 365, 3377, 168, 366, 367, -491, 470, - 96, -491, -491, -491, -491, 96, 2325, 96, 364, 372, - -491, 207, -491, -491, -491, -491, 224, 1330, 370, 224, - 1330, 224, 282, -491, -491, 371, 282, 282, 282, 282, - 237, -491, 3404, -491, 356, -491, 89, -491, 368, 1710, - 2631, 378, 224, 224, 2324, 224, 224, 224, -491, 204, - -491, 3246, 2070, -491, 2070, 2712, 1330, -491, -491, 2070, - -491, 1199, 1348, 1448, 286, -491, -491, 168, -53, 393, - 3431, 391, 207, 392, 420, 3136, -491, -491, 398, 207, - 207, 207, 207, 207, 139, -491, 224, -491, 204, -491, - -491, -491, 207, -491, 3313, 403, -491, 3257, 395, 405, - -491, 2070, 2070, 2070, 1230, 2070, 396, -2, -491, 207, - 2745, -491, 208, -491, 224, 295, 407, -491, 204, 264, - 282, 399, 399, 399, 399, -491, 2070, -491, 1330, -491, - 1102, -491, -491, 96, 2070, 1710, 408, 425, 2712, -491, - -491, 224, 267, 267, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - 411, 409, -491, -491, 267, 267, 344, 343, 1620, -491, - 2070, 427, -491, -491, 365, -44, -32, 413, 2678, 96, - 123, 96, -491, -491, 123, -491, 123, -491, 123, 123, - 123, 3458, -491, 533, 433, 96, -491, 3145, 139, 3145, - 2541, -491, -491, -491, -491, 207, 418, 418, 418, 418, - 144, 651, 2070, -491, -491, -491, 204, 437, -491, 169, - 207, 3145, 421, 3145, 3145, -6, -6, -6, 426, 128, - -6, 496, -491, 1430, 169, 2070, 2070, 2070, 2070, 2070, - 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, 2070, - 2070, 2070, 2070, 2070, 2070, 2070, 1800, 2070, 389, 550, - 431, 496, 450, -491, -491, 399, 1330, 432, 439, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, -491, -491, 436, -491, 440, 453, - -491, 1890, 267, -491, -491, -491, -491, 2631, 1330, 452, - 224, -491, -491, 496, -491, -491, -491, -491, -491, -491, - -491, -491, -491, -491, 456, -491, 459, -491, -491, -491, - 418, 463, 478, 472, 484, 651, 651, 651, 651, 1230, - 651, 2859, -491, 473, 498, -491, 224, 2070, -491, 169, - 487, 2070, 480, 492, 2070, -491, -491, -10, -491, -491, - -491, -491, 1247, 819, 556, 556, 1483, 1483, 216, 216, - -491, 2695, 2132, 2874, 2904, 1483, 1483, 406, 406, -6, - -6, -6, -491, -491, 134, 2187, 489, -491, -10, 224, - 1330, 485, -491, 496, 974, -491, -491, -491, 1710, 2712, - 509, -491, -491, -10, 529, 530, 1330, 3145, 3145, 3145, - 138, 138, 138, 138, 515, 145, 138, 651, 651, 651, - 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, - 651, 651, 651, 651, 651, 651, 1980, 2070, -491, 224, - -491, 2712, -491, 518, 519, -491, 522, -6, -491, 524, - 2070, -491, -491, -491, 1330, -491, 525, 496, -10, -491, - 523, 496, -491, -491, 526, 541, 535, 549, 651, -491, - 1447, 2889, 780, 780, 1522, 1522, 387, 387, -491, 2826, - 2938, 3016, 3050, 543, 543, 138, 138, 138, -491, -491, - 146, 2206, -491, 2070, -491, 2070, 7, 2712, 1330, 544, - 496, -10, -491, -10, 496, 554, -491, 558, 138, 651, - -491, -491, 174, 179, -491, 557, 559, 496, -10, -10, - 2070, 2070, 2859, -491, -491, -491, 496, -10, 180, 218, - -10, -491, -491 + 367, -570, 2114, 3257, 18, 3147, -570, -570, -570, -570, + -570, -570, -95, -89, -84, -68, -55, -17, -4, -570, + -2, 8, 40, 3369, 59, 105, 109, 41, -570, 135, + 138, 2114, 2114, 2114, 2114, 1274, 2114, 2756, -570, 182, + -570, -570, -570, -570, -570, -570, 3425, -570, -570, -570, + -570, 1725, -570, 1245, 1245, -570, 159, -570, 1245, -570, + -570, 449, -570, -570, -570, -570, 166, 24, 42, -570, + -570, -570, -570, -570, -570, -570, 171, -570, 168, 178, + 47, 181, 200, 203, 199, -570, 45, -570, -570, -570, + -570, 2451, -570, -570, -570, -570, -570, -570, 2114, 2114, + 2114, 2114, 2114, 2114, 3257, 2114, 2114, 2114, -570, 159, + 211, 159, 159, -570, 2114, 2114, 3257, 3257, 2114, 2114, + 6, 6, 6, 6, -95, -89, -84, -68, -55, -17, + -2, 8, 2085, 2378, 3067, 3246, 138, 157, -64, 2756, + 6, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, + 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, + 2114, 2114, 1574, 2114, -570, 449, -570, -570, 1815, -570, + 1245, -570, -570, -570, -570, -570, -570, 221, 449, 449, + 449, 449, 449, 449, 216, -570, -570, 3075, 234, -570, + -12, -570, 3597, 341, 159, -570, 243, -570, -570, -570, + 2518, -570, 247, 2585, -570, 159, -570, 239, 244, -570, + 3425, -570, 364, -570, -570, -570, 3313, -570, -570, 159, + -570, -570, -570, 159, 346, 264, -570, -570, -570, 24, + 42, -570, 248, 269, -570, 254, 267, 270, 274, 275, + 288, 279, 286, 291, -570, 2114, -570, -570, 293, 295, + 296, 311, 302, 306, 2114, 2114, -570, 1291, 2176, 792, + 792, 1527, 1527, 644, 644, -570, 2608, 2918, 2933, 2982, + 1527, 1527, 154, 154, 6, 6, 6, -570, -570, -50, + 2206, 216, -570, 449, 216, 216, 216, 216, 216, 116, + 2114, 159, 256, -570, -570, -570, -570, 3075, -570, 326, + -570, 330, 332, 3462, -570, 3201, 3425, 346, -570, -570, + -570, -9, -570, 182, 3425, 623, -570, -570, 317, -570, + -570, 159, 1664, -570, -570, 416, -7, -12, -570, -570, + -570, -570, -570, -570, 318, -570, -570, -570, 335, -570, + -570, -570, 343, -570, -570, 6, 2756, 2114, -570, -570, + 216, 349, 347, 2756, -570, 17, -570, 373, 3489, 0, + 374, 377, -570, 480, 159, -570, -570, -570, -570, 159, + 2369, 159, 382, 383, -570, 456, -570, -570, -570, -570, + 416, 1374, 370, 416, 1374, 416, 623, -570, -570, 381, + 623, 623, 623, 623, 623, 125, -570, 3516, -570, 378, + -570, 180, -570, 384, 1754, 2675, 388, 416, 416, 2368, + 416, 416, 416, 416, -570, 122, -570, 3075, 2114, -570, + 2114, 2756, 1374, -570, -570, 2114, -570, 257, 259, 506, + -33, -570, -570, 0, -23, 403, 3543, 402, 456, 407, + 429, 3201, -570, -570, 401, 456, 456, 456, 456, 456, + 456, -29, -570, 416, -570, 122, -570, -570, -570, 456, + -570, 3425, 408, -570, 3369, 398, 412, -570, 2114, 2114, + 2114, 1274, 2114, 405, 16, -570, 456, 2789, -570, 182, + -570, 416, 235, 410, -570, 122, 174, 623, 404, 404, + 404, 404, 404, -570, 2114, -570, 1374, -570, 1146, -570, + -570, 159, 2114, 1754, 406, 427, 2756, -570, -570, 416, + 213, 213, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, 411, 409, + -570, -570, 213, 213, 213, 261, 188, 1664, -570, 2114, + 432, -570, -570, 373, -22, 21, 415, 2722, 159, 470, + 159, -570, -570, 470, -570, 470, -570, 470, 470, 470, + 3570, -570, 535, 435, 159, -570, 3257, -29, 3257, -570, + -570, -570, -570, 456, 420, 420, 420, 420, 420, 179, + 705, 2114, -570, -570, -570, 122, 441, -570, -24, 456, + 3257, 430, 3257, 3257, 6, 6, 6, 425, 32, 6, + 503, -570, 1474, -24, 2114, 2114, 2114, 2114, 2114, 2114, + 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, + 2114, 2114, 2114, 2114, 2114, 1844, 2114, 285, 557, 438, + 503, 459, -570, -570, 404, 1374, 440, 445, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, -570, -570, 447, -570, 446, 452, -570, + 1934, 213, -570, -570, -570, -570, 2675, 1374, 453, 416, + -570, -570, 503, -570, -570, -570, -570, -570, -570, -570, + -570, -570, -570, 450, -570, 457, -570, -570, -570, 420, + 443, 469, 463, 482, 705, 705, 705, 705, 1274, 705, + 2903, -570, 466, 491, -570, 416, 2114, -570, -24, 486, + 2114, 479, 492, 2114, -570, -570, 79, -570, -570, -570, + -570, 1291, 2176, 792, 792, 1527, 1527, 644, 644, -570, + 2739, 2918, 2933, 2982, 1527, 1527, 154, 154, 6, 6, + 6, -570, -570, 35, 2231, 485, -570, 79, 416, 1374, + 493, -570, 503, 1018, -570, -570, -570, 1754, 2756, 494, + -570, -570, 79, 504, 515, 1374, 3257, 3257, 3257, 49, + 49, 49, 49, 499, 63, 49, 705, 705, 705, 705, + 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, + 705, 705, 705, 705, 705, 2024, 2114, -570, 416, -570, + 2756, -570, 487, 500, -570, 509, 6, -570, 510, 2114, + -570, -570, -570, 1374, -570, 501, 503, 79, -570, 508, + 503, -570, -570, 502, 522, 513, 526, 705, -570, 1491, + 2948, 3114, 3114, 1566, 1566, 830, 830, -570, 2870, 3060, + 3076, 877, 594, 594, 49, 49, 49, -570, -570, 68, + 2250, -570, 2114, -570, 2114, 14, 2756, 1374, 518, 503, + 79, -570, 79, 503, 525, -570, 527, 49, 705, -570, + -570, 117, 118, -570, 524, 529, 503, 79, 79, 2114, + 2114, 2903, -570, -570, -570, 503, 79, 144, 156, 79, + -570, -570 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -491, -491, -102, -491, 194, -491, -491, 469, -491, -491, - -79, 251, -491, -491, -491, -82, -159, -491, -491, -491, - -117, -208, 494, -491, -491, -491, -491, -491, -491, -491, - -316, -491, -491, 258, -491, -491, -491, 260, 330, -306, - -491, -362, -491, 119, -413, -279, -490, -491, 85, -160, - -354, -71, -5, 499, 243, -14, -88, -491, -84, -491, - -491, -491, 275, -83, -491, -284, -491, -491, -11, -9, - -491, -491, -491, -12, 71, -491, -491, 209, -491, -29, - -491, -459, -57, -34, -4, 0, -62, -491, -491, -394, - 157, -157, -1 + -570, -570, -179, -570, 152, -570, -570, 465, -570, -570, + -58, -74, -570, -570, -570, -119, -197, -570, -570, -570, + -153, -245, 464, -570, -570, -570, -570, -570, -570, -570, + -554, -570, -570, 232, -570, -570, -570, 236, 305, -346, + -570, -370, -570, 89, -384, -262, -500, -570, 56, -318, + -332, 76, -44, 476, 238, 5, -53, -570, -48, -570, + -570, -570, 272, -42, -570, -278, -570, -570, 19, 69, + -570, -570, -570, 46, 536, -570, -570, 207, -570, -19, + -570, -465, -94, -20, -51, 57, -569, -570, -570, -283, + 436, -195, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -250 +#define YYTABLE_NINF -255 static const yytype_int16 yytable[] = { - 6, 138, 37, 223, 97, 759, 200, 224, 225, 353, - 612, 113, 111, 378, 112, 173, 174, 73, 476, 173, - 174, 137, -232, 149, 375, -232, 98, 647, 565, 567, - 99, 120, 121, 122, 123, 597, 140, 173, 174, 173, - 174, 165, 232, 233, 234, 235, 236, 252, 238, 239, - 240, 100, 309, 252, 557, 573, -249, 245, 246, 411, - 184, 249, 250, 190, 252, 642, 253, 908, 173, 174, - 448, 101, 344, 475, 574, 478, 252, 102, 578, 228, - 226, 909, 227, 771, 97, 586, 587, 588, 589, 590, - 237, 769, 299, 104, 278, 772, 502, 503, 599, 544, - 545, 546, 247, 248, 173, 174, 613, 281, 282, 283, - 284, 285, 223, 286, 347, 614, 224, 225, 161, 162, - 163, 186, 169, 379, 171, 172, 648, 554, 276, 176, - 552, 173, 174, 803, 974, 202, 188, 103, 194, 105, - 596, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 418, 277, 184, 419, 776, 885, 638, 598, - 778, 106, 779, 45, 780, 781, 782, 184, 184, 184, - 184, 184, 107, 804, 289, 334, 808, 114, 228, 226, - 97, 227, 354, 6, 177, 762, 492, 493, 178, 643, - 115, 821, 308, 169, 171, 172, 176, 116, 311, 346, - 117, 392, 55, 175, 164, 436, 437, 438, 559, 57, - 472, 439, 479, 472, 187, 189, 481, 482, 483, 484, - 118, 790, 173, 174, 401, 179, 252, 195, 402, 169, - 119, 169, 252, 203, 185, 149, 809, 421, 422, 423, - 591, 341, 342, 252, 252, 815, 192, 292, 440, 472, - 430, 911, 895, 896, 897, 592, 241, 424, 243, 244, - 592, 791, 929, 970, 315, 403, 316, 317, 318, 184, - 807, 193, 252, 196, 851, 350, 349, 252, 252, 372, - 383, 384, 385, 6, 358, 592, 386, 374, 97, 180, - 373, 983, 404, 197, 181, 382, 984, 991, 198, 182, - 391, 315, 6, 316, 547, 548, 242, 805, 400, 251, - 645, 280, 441, 286, 571, 848, 252, 442, 297, 549, - 550, 472, 443, 387, 156, 157, 158, 159, 160, 405, - 161, 162, 163, 415, 406, 992, 293, 766, 300, 407, - 298, 173, 174, 97, 372, 580, 1, 2, 3, 305, - 301, 6, 485, 486, 292, 568, 569, 570, 920, 10, - 445, 306, 469, 312, 307, 469, 473, 314, 555, 473, - 556, 391, 320, 322, 323, 391, 391, 391, 391, 644, - 486, 97, 549, 550, 491, 324, 902, 388, 499, 498, - 252, 325, 389, 326, 327, 639, 860, 328, 553, 352, - 329, 469, 561, 561, 561, 473, 885, 330, 331, 558, - 549, 550, 640, 372, 332, 6, 333, 338, 335, 97, - 609, 445, 336, 97, 337, 149, 339, 758, 445, 445, - 445, 445, 445, 594, 351, 113, 111, 553, 112, 600, - 608, 445, 340, 393, 639, 355, 472, 863, 359, 360, - 412, 605, 606, 607, 413, 610, 414, 416, 445, 549, - 550, 765, -248, 426, 398, 427, 417, 553, 428, 391, - 435, 434, 292, 469, 489, 350, 349, 473, 916, 472, - 474, 480, 223, 494, 499, 498, 224, 225, 501, 639, - 448, 575, 577, 579, 924, 890, 891, 892, 893, 894, - 84, 895, 896, 897, 549, 550, 846, 429, 585, 601, - 603, 604, 431, 611, 433, 486, 158, 159, 160, 802, - 161, 162, 163, 761, 641, 770, 760, 918, 763, 764, - 773, 784, 785, 478, 592, 806, 811, 816, 767, 350, - 349, 561, 959, 814, 766, 561, 847, 561, 849, 561, - 561, 561, 852, 787, 855, 789, 853, 856, 228, 226, - 97, 227, 885, 145, 146, 147, 148, 594, 563, 563, - 563, 857, 861, 864, 445, 149, 865, 810, 866, 812, - 813, 350, 349, 596, 867, 553, 976, 868, 553, 445, - 869, 961, 844, 898, 903, 963, 899, 905, 469, 906, - 818, 472, 917, 553, 913, 822, 823, 824, 825, 826, - 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, - 837, 838, 839, 840, 841, 842, 921, 845, 922, 923, - 818, 469, 928, 953, 978, 473, 954, 955, 979, 956, - 398, 962, 960, 964, 7, 8, 9, 10, 965, 11, - 296, 987, 966, 892, 893, 894, 967, 895, 896, 897, - 990, 977, 154, 155, 156, 157, 158, 159, 160, 980, - 161, 162, 163, 981, 985, 581, 986, 757, 862, 900, - 915, 952, 583, 472, 303, 584, 432, 788, 820, 304, - 602, 756, 572, 854, 398, 792, 0, 0, 0, 472, - 0, 0, 0, 19, 0, 0, 775, 563, 777, 0, - 0, 563, 0, 563, 0, 563, 563, 563, 0, 0, - 0, 491, 786, 802, 802, 802, 802, 793, 802, 794, - 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 904, 0, 0, 472, 0, 0, - 0, 859, 0, 469, 0, 875, 795, 473, 0, 0, - 796, 797, 818, 0, 798, 0, 799, 0, 0, 0, - 800, 0, 0, 0, 0, 874, 0, 0, 0, 0, - 0, 870, 871, 872, 873, 0, 876, 881, 882, 883, - 884, 472, 0, 0, 0, 0, 0, 901, 553, 885, - 0, 0, 0, 0, 907, 802, 802, 802, 802, 802, - 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, - 802, 802, 802, 802, 143, 144, 145, 146, 147, 148, - 0, 0, 0, 0, 0, 469, 0, 0, 149, 473, - 0, 0, 818, 925, 926, 927, 0, 499, 498, 0, - 0, 469, 950, 0, 0, 473, 802, 0, 0, 0, - 0, 0, 0, 930, 931, 932, 933, 934, 935, 936, - 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, - 947, 948, 0, 0, 0, 0, 0, 951, 890, 891, - 892, 893, 894, 0, 895, 896, 897, 802, 0, 469, - 957, 0, 0, 473, 0, 0, 818, 0, 0, 972, - 818, 973, 0, 0, 968, 0, 0, 0, 0, 0, - 0, 0, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 0, 161, 162, 163, 988, 989, 0, 0, - 0, 0, 0, 469, 0, 0, 0, 473, 0, 818, - 0, 0, 0, 818, 0, 982, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 818, 649, 650, 651, - 652, 653, 654, 655, 656, 818, 657, 658, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 0, 0, 0, - 0, 0, 0, 668, 669, 670, 671, 672, 673, 674, - 675, 676, 677, 678, 679, 680, 681, 0, 0, 682, - 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, - 0, 693, 0, 694, 695, 696, 697, 698, 699, 700, - 701, 702, 703, 704, 705, 0, 0, 0, 706, 0, - 707, 0, 708, 709, 710, 711, 712, 713, 714, 715, - 716, 717, 718, 719, 0, 720, 721, 722, 723, 724, - 725, 726, 0, 727, 728, 729, 730, 731, 0, 0, - 0, 732, 733, 734, 735, 736, 737, 738, 739, 740, - 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, - 751, 752, 919, 753, 754, 649, 650, 651, 652, 653, - 654, 655, 656, 975, 657, 658, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 0, 0, 0, 0, 0, - 0, 668, 669, 670, 671, 672, 673, 674, 675, 676, - 677, 678, 679, 680, 681, 0, 0, 682, 683, 684, - 685, 686, 687, 688, 689, 690, 691, 692, 0, 693, - 0, 694, 695, 696, 697, 698, 699, 700, 701, 702, - 703, 704, 705, 0, 0, 0, 706, 0, 707, 0, - 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, - 718, 719, 0, 720, 721, 722, 723, 724, 725, 726, - 0, 727, 728, 729, 730, 731, 0, 173, 174, 732, - 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, - 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 0, 753, 754, 7, 8, 9, 10, 0, 11, 124, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 142, 143, 144, 145, 146, 147, 148, 0, 0, - 0, 0, 0, 0, 0, 125, 149, 126, 127, 128, - 45, 46, 0, 129, 18, 0, 0, 48, 55, 0, - 0, 0, 19, 130, 559, 57, 0, 0, 560, 131, - 132, 52, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 133, 134, 26, 0, 27, 55, - 0, 0, 28, 0, 0, 56, 57, 135, 0, 0, - 59, 0, 136, 449, 450, 451, 10, 0, 452, 40, - 0, 0, 453, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 0, 35, 173, 174, 0, 36, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 0, 161, 162, 163, 0, 41, 0, 42, 43, 44, - 45, 454, 0, 47, 455, 0, 0, 48, 0, 0, - 0, 0, 456, 49, 0, 0, 0, 0, 45, 50, - 51, 52, 0, 0, 0, 0, 457, 0, 0, 0, - 0, 0, 0, 0, 53, 54, 458, 0, 459, 55, - 0, 0, 460, 0, 0, 56, 57, 58, 0, 0, - 59, 0, 60, 449, 450, 451, 10, 55, 452, 40, - 0, 0, 819, 559, 57, 461, 0, 564, 0, 462, - 0, 0, 0, 463, 0, 464, 173, 174, 0, 465, - 0, 878, 879, 880, 881, 882, 883, 884, 0, 0, - 0, 0, 0, 0, 0, 41, 885, 42, 43, 44, - 45, 454, 0, 47, 455, 0, 0, 48, 0, 0, - 0, 0, 456, 49, 0, 0, 0, 0, 45, 50, - 51, 52, 147, 148, 0, 0, 457, 0, 0, 0, - 0, 0, 149, 0, 53, 54, 458, 0, 459, 55, - 0, 0, 460, 0, 0, 56, 57, 58, 0, 0, - 59, 0, 60, 7, 8, 9, 10, 55, 11, 12, - 0, 883, 884, 559, 57, 461, 0, 566, 0, 462, - 0, 885, 0, 463, 0, 464, 0, 0, 0, 465, - 887, 888, 889, 0, 0, 890, 891, 892, 893, 894, - 0, 895, 896, 897, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 0, 21, - 22, 156, 157, 158, 159, 160, 23, 161, 162, 163, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, - 890, 891, 892, 893, 894, 31, 895, 896, 897, 32, - 33, 0, 0, 34, 0, 35, 0, 275, 0, 36, - 0, 0, 0, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 0, 21, - 22, 0, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 41, 399, 42, 43, - 44, 0, 0, 0, 166, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 167, 35, 0, 0, 0, 36, - 50, 168, 52, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 53, 54, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 58, 21, - 22, 0, 0, 60, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 41, 495, 42, 43, - 44, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 279, 35, 0, 0, 0, 36, - 50, 170, 52, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 53, 54, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 58, 21, - 22, 0, 0, 60, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 41, 0, 42, 43, - 44, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 0, 35, 0, 843, 0, 36, - 50, 170, 52, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 53, 54, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 58, 21, - 22, 0, 0, 60, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 0, 858, 0, 0, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 0, 35, 0, 0, 0, 36, - 0, 0, 0, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 0, 21, - 22, 0, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 0, 27, 0, - 0, 0, 28, 7, 8, 9, 10, 29, 11, 12, - 0, 0, 30, 0, 0, 0, 41, 0, 42, 43, - 44, 0, 0, 0, 166, 31, 0, 0, 0, 32, - 33, 0, 0, 34, 167, 35, 0, 949, 0, 36, - 50, 168, 52, 0, 0, 13, 0, 14, 15, 16, - 0, 0, 0, 17, 18, 53, 54, 0, 0, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 58, 21, - 22, 0, 0, 60, 0, 0, 23, 143, 144, 145, - 146, 147, 148, 0, 24, 25, 26, 0, 27, 0, - 0, 149, 28, 0, 0, 0, 107, 29, 0, 0, - 0, 0, 30, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 31, 0, 0, 0, 32, - 33, 149, 0, 34, 0, 35, 0, 0, 0, 36, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, - 0, 0, 0, 0, 0, 0, 149, 0, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, - 0, 0, 0, 0, 0, 149, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 152, 153, 154, 155, + 6, 382, 165, 768, 97, 235, 236, 237, 238, 239, + 201, 241, 242, 243, 483, 138, 303, 313, 73, 357, + 248, 249, 173, 174, 252, 253, 200, 203, 621, 656, + 98, 811, 173, 174, 455, 149, 99, 482, 226, 485, + 137, 100, 111, 227, 255, 379, 577, 578, 579, 228, + 173, 174, 566, 173, 174, 173, 174, 101, 255, 37, + 185, 510, 511, 256, 552, 553, 554, 555, 486, 113, + 102, 606, 488, 489, 490, 491, 492, 348, 894, 427, + 428, 429, 600, 97, 97, 582, 255, 816, 120, 121, + 122, 123, 112, 140, 778, -237, 857, 601, -237, 430, + -254, 651, 601, 417, 583, 780, 587, 605, 103, 240, + 229, 383, 104, 594, 595, 596, 597, 598, 599, 358, + 205, 250, 251, 105, 622, 424, 657, 608, 425, 255, + 161, 162, 163, 106, 187, 647, 812, 231, 397, 563, + 255, 983, 279, 255, 623, 574, 576, 226, 781, 189, + 226, 338, 227, 561, 195, 227, 917, 117, 228, 824, + 230, 228, 920, 771, 185, 107, 312, 173, 174, 654, + 918, 255, 315, 904, 905, 906, 255, 185, 185, 185, + 185, 185, 185, 149, 114, 293, 479, 436, 164, 479, + 938, 97, 775, 607, 6, 979, 173, 174, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 229, + 280, 813, 229, 652, 817, 255, 255, 479, 872, 319, + 115, 320, 556, 557, 116, 811, 811, 811, 811, 830, + 811, 281, 290, 351, 992, 993, 231, 558, 559, 231, + 493, 494, 255, 580, 284, 285, 286, 287, 288, 289, + 118, 799, 378, 119, 255, 173, 174, 173, 174, 230, + 386, 1000, 230, 186, 158, 159, 160, 818, 161, 162, + 163, 191, 185, 1001, 254, 860, 785, 500, 501, 354, + 787, 197, 788, 193, 789, 790, 791, 6, 362, 653, + 494, 479, 97, 194, 377, 601, 800, 45, 927, 45, + 198, 345, 346, 199, 396, -124, 6, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 245, 476, 558, 559, + 476, 283, 290, 814, 297, 648, 55, 353, 55, 301, + 304, 376, 568, 57, 568, 57, 569, 97, 573, 350, + 558, 559, 649, 305, 310, 6, 589, 929, 811, 311, + 10, 648, 970, 324, 452, 328, 972, 255, 476, 405, + 480, 329, 200, 480, 356, 396, 558, 559, 774, 396, + 396, 396, 396, 396, 330, 648, 97, 331, 564, 499, + 565, 332, 333, 507, 421, 334, 335, 869, 767, 811, + 558, 559, 855, 336, 562, 987, 376, 609, 337, 988, + 339, 480, 340, 341, 173, 174, 406, 479, 342, 343, + 407, 6, 996, 344, 911, 97, 359, 452, 363, 97, + 364, 999, 398, 418, 452, 452, 452, 452, 452, 452, + 603, 618, 476, 319, 562, 320, 321, 322, 452, 177, + 479, 506, 419, 178, 442, 443, 444, 408, 420, 455, + 445, 1, 2, 3, 422, 452, 617, 423, 173, 174, + -253, 432, 567, 111, 562, 433, 396, 376, 434, 925, + 481, 441, 175, 354, 409, 480, 570, 570, 570, 440, + 179, 487, 507, 188, 190, 933, 497, 446, 509, 502, + 113, 584, 485, 586, 173, 174, 196, 410, 588, 84, + 45, 593, 206, 612, 610, 614, 615, 616, 613, 619, + 494, 411, 620, 112, 769, 770, 412, 650, 772, 773, + 779, 413, 782, 793, 794, 244, 601, 246, 247, 815, + 180, 353, 823, 968, 825, 820, 45, 447, 354, 55, + 506, 775, 605, 856, 181, 568, 57, 858, 875, 182, + 861, 448, 862, 865, 183, 864, 449, 873, 476, 97, + 866, 450, 479, 870, 874, 876, 603, 169, 877, 171, + 172, 796, 452, 798, 176, 55, 907, 985, 878, 908, + 354, 568, 57, 912, 562, 575, 914, 562, 452, 915, + 922, 476, 962, 931, 776, 819, 353, 821, 822, 827, + 926, 930, 562, 894, 932, 853, 937, 963, 969, 973, + 302, 387, 388, 389, 964, 965, 971, 390, 570, 974, + 975, 309, 570, 976, 570, 986, 570, 570, 570, 827, + 989, 994, 990, 766, 480, 316, 995, 300, 353, 318, + 871, 924, 909, 961, 479, 326, 327, 307, 169, 171, + 172, 176, 591, 149, 391, 438, 797, 592, 829, 308, + 479, 831, 832, 833, 834, 835, 836, 837, 838, 839, + 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, + 850, 851, 611, 854, 169, 581, 169, 765, 7, 8, + 9, 10, 0, 11, 901, 902, 903, 0, 904, 905, + 906, 0, 863, 296, 392, 0, 913, 355, 479, 0, + 0, 0, 0, 476, 0, 0, 0, 0, 393, 0, + 499, 0, 0, 394, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 879, 880, 881, 882, 403, 885, 801, + 0, 0, 156, 157, 158, 159, 160, 19, 161, 162, + 163, 0, 479, 0, 0, 0, 480, 0, 0, 0, + 0, 827, 0, 0, 0, 0, 0, 0, 884, 0, + 0, 802, 0, 803, 0, 0, 0, 28, 0, 0, + 435, 0, 0, 0, 0, 437, 0, 439, 0, 145, + 146, 147, 148, 883, 0, 476, 0, 562, 0, 0, + 804, 149, 0, 0, 805, 806, 0, 868, 807, 0, + 808, 476, 0, 296, 809, 939, 940, 941, 942, 943, + 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, + 954, 955, 956, 957, 0, 0, 0, 0, 480, 894, + 0, 827, 0, 572, 572, 572, 507, 0, 0, 0, + 0, 0, 0, 910, 480, 0, 0, 0, 0, 476, + 916, 934, 935, 936, 0, 959, 977, 0, 0, 0, + 0, 0, 888, 889, 890, 891, 892, 893, 0, 0, + 0, 0, 0, 0, 0, 0, 894, 0, 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, 163, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 0, 161, 162, 163, 0, - 0, 0, 345, 0, 0, 0, 0, 0, 0, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 0, 161, 162, 163, 0, 0, 0, 912, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 363, 364, 0, 971, 504, 505, 506, - 507, 508, 509, 510, 511, 0, 0, 0, 0, 0, - 0, 0, 0, 512, 0, 513, 514, 515, 516, 517, - 518, 519, 520, 521, 522, 523, 524, 0, 0, 0, - 41, 0, 42, 43, 44, 0, 525, 0, 47, 41, - 0, 42, 43, 44, 0, 0, 0, 0, 49, 0, - 0, 0, 0, 0, 50, 51, 52, 0, 0, 0, - 526, 0, 0, 50, 170, 52, 0, 0, 0, 53, - 54, 0, 0, 0, 0, 204, 205, 0, 53, 54, - 0, 0, 58, 0, 0, 59, 0, 60, 0, 0, - 0, 58, 527, 0, 0, 528, 60, 529, 530, 531, - 532, 533, 534, 535, 536, 537, 538, 539, 0, 540, - 541, 206, 41, 542, 42, 43, 44, 45, 207, 114, - 47, 0, 0, 0, 48, 208, 209, 210, 0, 0, - 49, 0, 0, 0, 0, 211, 50, 51, 52, 0, - 0, 212, 204, 205, 0, 213, 0, 0, 0, 214, - 0, 53, 54, 0, 215, 0, 55, 0, 0, 0, - 0, 0, 216, 57, 58, 0, 217, 59, 218, 60, - 0, 0, 0, 0, 219, 0, 0, 0, 206, 41, - 0, 42, 43, 44, 45, 302, 0, 47, 0, 0, - 220, 48, 208, 209, 210, 0, 0, 49, 0, 0, - 0, 0, 211, 50, 51, 52, 0, 0, 212, 204, - 205, 0, 213, 0, 0, 0, 214, 0, 53, 54, - 0, 215, 0, 55, 0, 0, 0, 0, 0, 216, - 57, 58, 0, 217, 59, 218, 60, 141, 142, 143, - 144, 145, 146, 147, 148, 206, 41, 0, 42, 43, - 44, 45, 207, 149, 47, 0, 0, 220, 48, 208, - 209, 210, 0, 0, 49, 0, 0, 0, 0, 211, - 50, 51, 52, 0, 0, 212, 0, 0, 0, 213, - 0, 0, 0, 214, 0, 53, 54, 0, 215, 0, - 55, 0, 0, 0, 0, 0, 216, 57, 58, 0, - 217, 59, 218, 60, 141, 142, 143, 144, 145, 146, + 0, 0, 480, 476, 506, 827, 0, 991, 0, 827, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, + 0, 0, 981, 0, 982, 0, 0, 0, 899, 900, + 901, 902, 903, 296, 904, 905, 906, 0, 0, 0, + 0, 0, 0, 960, 0, 0, 480, 0, 827, 997, + 998, 0, 827, 0, 0, 0, 966, 0, 0, 0, + 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, + 0, 0, 403, 0, 827, 899, 900, 901, 902, 903, + 0, 904, 905, 906, 784, 572, 786, 0, 0, 572, + 0, 572, 0, 572, 572, 572, 0, 0, 0, 0, + 795, 658, 659, 660, 661, 662, 663, 664, 665, 0, + 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, + 676, 0, 0, 0, 0, 0, 0, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 0, 0, 691, 692, 693, 694, 695, 696, 697, + 698, 699, 700, 701, 0, 702, 0, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 0, + 0, 0, 715, 0, 716, 0, 717, 718, 719, 720, + 721, 722, 723, 724, 725, 726, 727, 728, 0, 729, + 730, 731, 732, 733, 734, 735, 0, 736, 737, 738, + 739, 740, 0, 0, 0, 741, 742, 743, 744, 745, + 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, + 756, 757, 758, 759, 760, 761, 928, 762, 763, 658, + 659, 660, 661, 662, 663, 664, 665, 0, 666, 667, + 668, 669, 670, 671, 672, 673, 674, 675, 676, 0, + 0, 0, 0, 0, 0, 677, 678, 679, 680, 681, + 682, 683, 684, 685, 686, 687, 688, 689, 690, 0, + 0, 691, 692, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 0, 702, 0, 703, 704, 705, 706, 707, + 708, 709, 710, 711, 712, 713, 714, 0, 0, 0, + 715, 0, 716, 0, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 0, 729, 730, 731, + 732, 733, 734, 735, 0, 736, 737, 738, 739, 740, + 0, 0, 0, 741, 742, 743, 744, 745, 746, 747, + 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 0, 762, 763, 7, 8, 9, + 10, 0, 11, 124, 0, 0, 0, 0, 0, 0, + 41, 0, 42, 43, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 142, 143, 144, 145, 146, + 147, 148, 0, 0, 50, 170, 52, 0, 0, 125, + 149, 126, 127, 128, 45, 46, 0, 129, 18, 53, + 54, 48, 0, 0, 0, 0, 19, 130, 0, 0, + 0, 0, 58, 131, 132, 52, 0, 60, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 133, 134, + 26, 0, 27, 55, 0, 0, 28, 0, 0, 56, + 57, 135, 0, 0, 59, 0, 136, 456, 457, 458, + 10, 0, 459, 40, 0, 0, 460, 0, 0, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, + 0, 984, 0, 36, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 0, 161, 162, 163, 0, 41, + 0, 42, 43, 44, 45, 461, 0, 47, 462, 0, + 0, 48, 0, 0, 0, 0, 463, 49, 0, 0, + 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, + 464, 0, 0, 0, 0, 0, 0, 0, 53, 54, + 465, 0, 466, 55, 0, 0, 467, 0, 0, 56, + 57, 58, 0, 0, 59, 0, 60, 456, 457, 458, + 10, 0, 459, 40, 0, 0, 828, 0, 0, 468, + 0, 0, 0, 469, 0, 0, 0, 470, 0, 471, + 0, 0, 0, 472, 0, 887, 888, 889, 890, 891, + 892, 893, 0, 0, 0, 0, 0, 0, 0, 41, + 894, 42, 43, 44, 45, 461, 0, 47, 462, 0, + 0, 48, 0, 0, 0, 0, 463, 49, 0, 0, + 0, 0, 0, 50, 51, 52, 147, 148, 0, 0, + 464, 0, 0, 0, 0, 0, 149, 0, 53, 54, + 465, 0, 466, 55, 0, 0, 467, 0, 0, 56, + 57, 58, 0, 0, 59, 0, 60, 7, 8, 9, + 10, 0, 11, 12, 0, 892, 893, 0, 0, 468, + 0, 0, 0, 469, 0, 894, 0, 470, 0, 471, + 0, 0, 0, 472, 896, 897, 898, 0, 0, 899, + 900, 901, 902, 903, 0, 904, 905, 906, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 0, 21, 22, 156, 157, 158, 159, 160, + 23, 161, 162, 163, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 0, 0, 0, 0, 899, 900, 901, 902, 903, 31, + 904, 905, 906, 32, 33, 0, 0, 34, 0, 35, + 0, 278, 0, 36, 0, 0, 0, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 41, 404, 42, 43, 44, 0, 0, 0, 166, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 167, 35, + 0, 0, 0, 36, 50, 168, 52, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, + 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 41, 503, 42, 43, 44, 0, 0, 0, 0, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 282, 35, + 0, 0, 0, 36, 50, 170, 52, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, + 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, + 0, 852, 0, 36, 0, 0, 0, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 0, 867, 0, 0, 0, 0, 0, 0, 0, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, + 0, 0, 0, 36, 0, 0, 0, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, + 41, 0, 42, 43, 44, 0, 0, 0, 166, 31, + 0, 0, 0, 32, 33, 0, 0, 34, 167, 35, + 0, 958, 0, 36, 50, 168, 52, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, + 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, + 23, 143, 144, 145, 146, 147, 148, 0, 24, 25, + 26, 0, 27, 0, 0, 149, 28, 0, 0, 0, + 107, 29, 0, 0, 0, 0, 30, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 0, 0, 31, + 0, 0, 0, 32, 33, 149, 0, 34, 0, 35, + 0, 0, 0, 36, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, - 149, 0, 0, 0, 220, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 343, 0, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, - 163, 141, 142, 143, 144, 145, 146, 147, 148, 0, - 0, 0, 0, 0, 0, 0, 0, 149, 141, 142, + 149, 0, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 0, 0, 0, 0, 0, 0, 0, 0, 149, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, + 161, 162, 163, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, + 161, 162, 163, 0, 0, 0, 349, 0, 0, 0, + 0, 0, 0, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 0, 161, 162, 163, 0, 0, + 0, 921, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 0, 161, 162, 163, 367, 368, 0, + 980, 512, 513, 514, 515, 516, 517, 518, 519, 0, + 0, 0, 0, 0, 0, 0, 0, 520, 0, 521, + 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, + 532, 0, 0, 0, 41, 0, 42, 43, 44, 0, + 533, 0, 47, 41, 0, 42, 43, 44, 0, 0, + 0, 0, 49, 0, 0, 0, 0, 0, 50, 51, + 52, 0, 0, 0, 534, 0, 0, 50, 170, 52, + 0, 0, 0, 53, 54, 0, 0, 0, 0, 207, + 208, 0, 53, 54, 0, 0, 58, 0, 0, 59, + 0, 60, 0, 0, 0, 58, 535, 0, 0, 536, + 60, 537, 538, 539, 540, 541, 542, 543, 544, 545, + 546, 547, 0, 548, 549, 209, 41, 550, 42, 43, + 44, 45, 210, 114, 47, 0, 0, 0, 48, 211, + 212, 213, 0, 0, 49, 0, 0, 0, 0, 214, + 50, 51, 52, 0, 0, 215, 207, 208, 0, 216, + 0, 0, 0, 217, 0, 53, 54, 0, 218, 0, + 55, 0, 0, 0, 0, 0, 219, 57, 58, 0, + 220, 59, 221, 60, 0, 0, 0, 0, 222, 0, + 0, 0, 209, 41, 0, 42, 43, 44, 45, 210, + 0, 47, 0, 0, 223, 48, 211, 212, 213, 0, + 0, 49, 0, 0, 0, 0, 214, 50, 51, 52, + 0, 0, 215, 207, 208, 0, 216, 0, 0, 0, + 217, 0, 53, 54, 0, 218, 0, 55, 0, 0, + 0, 0, 0, 219, 57, 58, 0, 220, 59, 221, + 60, 141, 142, 143, 144, 145, 146, 147, 148, 209, + 41, 0, 42, 43, 44, 45, 306, 149, 47, 0, + 0, 223, 48, 211, 212, 213, 0, 0, 49, 0, + 0, 0, 0, 214, 50, 51, 52, 0, 0, 215, + 0, 0, 0, 216, 0, 0, 0, 217, 0, 53, + 54, 0, 218, 0, 55, 0, 0, 0, 0, 0, + 219, 57, 58, 0, 220, 59, 221, 60, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, - 0, 0, 0, 0, 149, 141, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, - 500, 149, 0, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 0, 161, 162, 163, 615, 616, - 617, 618, 619, 620, 621, 622, 0, 0, 0, 0, - 0, 0, 0, 0, 623, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 774, 0, 0, 0, + 0, 0, 0, 0, 149, 0, 0, 0, 223, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 347, 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 0, 161, 162, 163, 910, 0, 150, 151, 152, + 160, 0, 161, 162, 163, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, + 0, 149, 141, 142, 143, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 141, + 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, + 0, 0, 0, 0, 508, 149, 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, 161, - 162, 163, 0, 0, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 0, 161, 162, 163, 877, - 878, 879, 880, 881, 882, 883, 884, 0, 0, 0, - 0, 0, 0, 0, 0, 885, 0, 624, 625, 626, - 627, 628, 629, 630, 631, 632, 633, 634, 0, 635, - 636, 637, 877, 878, 879, 880, 881, 882, 883, 884, - 0, 0, 0, 0, 0, 0, 0, 0, 885, 143, - 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, - 0, 0, 0, 149, 879, 880, 881, 882, 883, 884, - 0, 0, 0, 0, 0, 0, 0, 0, 885, 143, - 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 969, 0, 886, 887, - 888, 889, 0, 0, 890, 891, 892, 893, 894, 0, - 895, 896, 897, 879, 880, 881, 882, 883, 884, 0, - 0, 0, 0, 0, 0, 0, 0, 885, 0, 0, - 0, 886, 887, 888, 889, 0, 0, 890, 891, 892, - 893, 894, 0, 895, 896, 897, 0, 0, 0, 153, - 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, - 163, 0, 887, 888, 889, 0, 0, 890, 891, 892, - 893, 894, 0, 895, 896, 897, 0, 0, 0, 0, - 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, - 163, 879, 880, 881, 882, 883, 884, 0, 0, 0, - 0, 0, 0, 0, 0, 885, 0, 0, 0, -2, - 0, 0, 888, 889, 0, 0, 890, 891, 892, 893, - 894, 0, 895, 896, 897, 879, 880, 881, 882, 883, - 884, 0, 0, 0, 0, 0, 0, 0, 0, 885, + 162, 163, 624, 625, 626, 627, 628, 629, 630, 631, + 0, 0, 0, 0, 0, 0, 0, 0, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, - 76, 0, 0, 77, 0, 0, 0, 0, 0, 0, - 0, 78, 79, 0, 80, 0, 0, 0, 81, 82, - 83, 889, 0, 0, 890, 891, 892, 893, 894, 84, - 895, 896, 897, 85, 363, 364, 0, 86, 0, 0, - 0, 0, 0, 0, 40, 0, 0, 0, 87, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 890, 891, - 892, 893, 894, 0, 895, 896, 897, 0, 0, 0, - 0, 41, 0, 42, 43, 44, 365, 366, 0, 47, - 41, 0, 42, 43, 44, 45, 46, 0, 47, 49, - 0, 0, 48, 0, 0, 50, 51, 52, 49, 0, - 40, 0, 0, 0, 50, 51, 52, 0, 0, 0, - 53, 54, 0, 0, 0, 0, 0, 0, 0, 53, - 54, 367, 0, 58, 55, 0, 59, 0, 60, 0, - 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, - 44, 45, 310, 0, 47, 290, 0, 0, 48, 0, - 0, 0, 0, 0, 49, 0, 108, 0, 0, 0, + 783, 0, 0, 0, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 0, 161, 162, 163, 919, + 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 0, 161, 162, 163, 0, 0, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, + 161, 162, 163, 886, 887, 888, 889, 890, 891, 892, + 893, 0, 0, 0, 0, 0, 0, 0, 0, 894, + 0, 633, 634, 635, 636, 637, 638, 639, 640, 641, + 642, 643, 0, 644, 645, 646, 886, 887, 888, 889, + 890, 891, 892, 893, 0, 0, 0, 0, 0, 0, + 0, 0, 894, 143, 144, 145, 146, 147, 148, 0, + 0, 0, 0, 0, 0, 0, 0, 149, 143, 144, + 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 888, 889, 890, 891, 892, 893, 0, + 0, 0, 0, 0, 0, 0, 0, 894, 0, 0, + 978, 0, 895, 896, 897, 898, 0, 0, 899, 900, + 901, 902, 903, 0, 904, 905, 906, 143, 144, 145, + 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, + 0, 149, 0, 0, 0, 895, 896, 897, 898, 0, + 0, 899, 900, 901, 902, 903, 0, 904, 905, 906, + 0, 0, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 0, 161, 162, 163, 0, 0, 0, 153, 154, + 155, 156, 157, 158, 159, 160, 0, 161, 162, 163, + 0, 896, 897, 898, 0, 0, 899, 900, 901, 902, + 903, 0, 904, 905, 906, 888, 889, 890, 891, 892, + 893, 0, 0, 0, 294, 0, 0, 0, 0, 894, + 0, 888, 889, 890, 891, 892, 893, 0, 154, 155, + 156, 157, 158, 159, 160, 894, 161, 162, 163, 0, + 0, 0, 41, 0, 42, 43, 44, 0, 0, 0, + 41, 0, 42, 43, 44, 0, 0, 0, 0, 0, + 0, 890, 891, 892, 893, 0, 50, 170, 52, 0, + 0, 0, 0, 894, 50, 170, 52, -2, 0, 0, + 0, 53, 54, 0, 0, 0, 0, 0, 0, 53, + 54, 0, 0, 0, 58, 0, 0, 0, 0, 60, + 0, 0, 58, 0, 897, 898, 0, 60, 899, 900, + 901, 902, 903, 0, 904, 905, 906, 0, 0, 0, + 74, 898, 115, 0, 899, 900, 901, 902, 903, 0, + 904, 905, 906, 75, 0, 0, 0, 0, 76, 367, + 368, 77, 0, 0, 0, 0, 0, 0, 0, 78, + 79, 0, 80, 0, 0, 0, 81, 82, 83, 0, + 0, 0, 899, 900, 901, 902, 903, 84, 904, 905, + 906, 85, 0, 0, 0, 86, 41, 0, 42, 43, + 44, 369, 370, 0, 47, 0, 87, 0, 0, 0, + 0, 0, 0, 0, 49, 0, 40, 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, 0, - 55, 41, 0, 42, 43, 44, 56, 57, 58, 0, - 0, 59, 41, 60, 42, 43, 44, 45, 0, 0, + 0, 41, 0, 42, 43, 44, 371, 0, 58, 0, + 0, 59, 41, 60, 42, 43, 44, 45, 46, 0, 47, 0, 0, 0, 48, 50, 170, 52, 0, 0, 49, 0, 40, 0, 0, 0, 50, 51, 52, 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 54, 58, 0, 0, 55, 41, 60, 42, - 43, 44, 109, 57, 58, 0, 0, 59, 41, 60, - 42, 43, 44, 45, 0, 0, 47, 0, 0, 0, - 48, 50, 170, 52, 0, 0, 49, 0, 0, 0, - 0, 0, 50, 51, 52, 0, 53, 54, 0, 0, - 0, 0, 0, 74, 0, 0, 0, 53, 54, 58, - 0, 0, 55, 0, 60, 0, 75, 0, 56, 57, - 58, 76, 0, 59, 77, 60, 0, 0, 0, 0, - 74, 0, 78, 79, 0, 80, 0, 115, 0, 81, - 82, 83, 0, 75, 0, 0, 0, 0, 76, 0, - 84, 77, 0, 0, 85, 0, 0, 74, 86, 78, - 79, 0, 80, 0, 0, 0, 81, 82, 83, 87, - 75, 0, 0, 0, 0, 76, 0, 84, 77, 0, - 0, 85, 0, 0, 74, 86, 78, 79, 361, 80, - 0, 0, 0, 81, 82, 83, 87, 75, 0, 0, - 0, 0, 76, 0, 84, 77, 0, 0, 85, 0, - 0, 74, 86, 78, 79, 420, 80, 0, 0, 0, - 81, 82, 83, 87, 75, 0, 0, 0, 0, 76, - 0, 84, 77, 0, 0, 85, 0, 0, 0, 86, - 78, 79, 487, 80, 0, 0, 0, 81, 82, 83, - 87, 0, 0, 0, 0, 0, 0, 0, 84, 0, - 0, 41, 85, 42, 43, 44, 86, 0, 0, 576, - 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, - 0, 0, 0, 0, 0, 50, 170, 52, 0, 0, - 0, 74, 0, 0, 0, 0, 783, 0, 0, 0, - 53, 54, 0, 0, 75, 0, 0, 0, 0, 76, - 0, 0, 77, 58, 0, 0, 0, 0, 60, 0, - 78, 79, 0, 80, 0, 0, 0, 81, 82, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, - 0, 118, 85, 0, 0, 0, 86 + 0, 53, 54, 58, 0, 0, 55, 0, 60, 0, + 0, 0, 56, 57, 58, 0, 0, 59, 41, 60, + 42, 43, 44, 45, 314, 0, 47, 0, 0, 0, + 48, 118, 0, 0, 0, 0, 49, 0, 108, 0, + 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, + 0, 0, 55, 0, 0, 0, 0, 0, 56, 57, + 58, 0, 0, 59, 41, 60, 42, 43, 44, 45, + 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, + 0, 0, 49, 0, 40, 0, 0, 0, 50, 51, + 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 53, 54, 0, 0, 0, 55, 0, + 0, 0, 0, 0, 109, 57, 58, 0, 0, 59, + 41, 60, 42, 43, 44, 45, 0, 0, 47, 0, + 0, 0, 48, 0, 0, 0, 0, 0, 49, 0, + 0, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 0, 0, 0, 74, 0, 0, 0, 53, + 54, 0, 0, 0, 55, 0, 0, 0, 75, 0, + 56, 57, 58, 76, 0, 59, 77, 60, 0, 0, + 0, 0, 74, 0, 78, 79, 0, 80, 0, 0, + 0, 81, 82, 83, 0, 75, 0, 0, 0, 0, + 76, 0, 84, 77, 0, 0, 85, 0, 0, 74, + 86, 78, 79, 0, 80, 0, 0, 0, 81, 82, + 83, 87, 75, 0, 0, 0, 0, 76, 0, 84, + 77, 0, 0, 85, 0, 0, 74, 86, 78, 79, + 365, 80, 0, 0, 0, 81, 82, 83, 87, 75, + 0, 0, 0, 0, 76, 0, 84, 77, 0, 0, + 85, 0, 0, 74, 86, 78, 79, 426, 80, 0, + 0, 0, 81, 82, 83, 87, 75, 0, 0, 0, + 0, 76, 0, 84, 77, 0, 0, 85, 0, 0, + 74, 86, 78, 79, 495, 80, 0, 0, 0, 81, + 82, 83, 87, 75, 0, 0, 0, 0, 76, 0, + 84, 77, 0, 0, 85, 0, 0, 0, 86, 78, + 79, 585, 80, 0, 0, 0, 81, 82, 83, 87, + 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, + 0, 85, 0, 0, 0, 86, 0, 0, 792 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-491))) + (!!((Yystate) == (-570))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 35, 2, 91, 5, 495, 85, 91, 91, 293, - 12, 23, 23, 10, 23, 8, 9, 0, 380, 8, - 9, 35, 107, 29, 303, 110, 125, 486, 422, 423, - 125, 31, 32, 33, 34, 448, 36, 8, 9, 8, - 9, 46, 99, 100, 101, 102, 103, 108, 105, 106, - 107, 125, 209, 108, 416, 108, 107, 114, 115, 110, - 61, 118, 119, 110, 108, 478, 127, 77, 8, 9, - 376, 125, 127, 379, 127, 381, 108, 125, 432, 91, - 91, 91, 91, 127, 85, 439, 440, 441, 442, 443, - 104, 550, 194, 116, 165, 127, 402, 403, 452, 405, - 406, 407, 116, 117, 8, 9, 108, 178, 179, 180, - 181, 182, 200, 126, 127, 469, 200, 200, 124, 125, - 126, 110, 51, 120, 53, 54, 488, 411, 162, 58, - 409, 8, 9, 592, 127, 75, 107, 125, 107, 125, - 446, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 108, 163, 165, 111, 560, 29, 474, 448, - 564, 125, 566, 50, 568, 569, 570, 178, 179, 180, - 181, 182, 125, 596, 185, 242, 599, 125, 200, 200, - 191, 200, 294, 194, 10, 501, 107, 108, 14, 478, - 125, 614, 207, 132, 133, 134, 135, 125, 213, 280, - 116, 313, 89, 56, 6, 8, 9, 10, 95, 96, - 377, 14, 382, 380, 67, 68, 386, 387, 388, 389, - 125, 585, 8, 9, 10, 51, 108, 80, 14, 168, - 125, 170, 108, 86, 107, 29, 600, 79, 80, 81, - 111, 251, 252, 108, 108, 127, 125, 186, 51, 416, - 362, 127, 124, 125, 126, 126, 109, 99, 111, 112, - 126, 127, 127, 127, 107, 51, 109, 110, 111, 280, - 111, 125, 108, 110, 646, 286, 286, 108, 108, 301, - 8, 9, 10, 294, 295, 126, 14, 302, 299, 115, - 301, 127, 78, 110, 120, 310, 127, 127, 110, 125, - 311, 107, 313, 109, 110, 111, 125, 596, 318, 127, - 480, 120, 115, 126, 426, 641, 108, 120, 8, 125, - 126, 488, 125, 51, 118, 119, 120, 121, 122, 115, - 124, 125, 126, 343, 120, 127, 110, 4, 107, 125, - 193, 8, 9, 354, 366, 434, 104, 105, 106, 202, - 116, 362, 125, 126, 293, 79, 80, 81, 858, 6, - 371, 125, 377, 216, 125, 380, 377, 220, 412, 380, - 414, 382, 109, 226, 227, 386, 387, 388, 389, 125, - 126, 392, 125, 126, 395, 127, 809, 115, 399, 399, - 108, 127, 120, 127, 127, 110, 768, 127, 409, 128, - 127, 416, 421, 422, 423, 416, 29, 117, 127, 419, - 125, 126, 127, 435, 127, 426, 127, 117, 127, 430, - 464, 432, 127, 434, 127, 29, 127, 494, 439, 440, - 441, 442, 443, 444, 287, 457, 457, 448, 457, 454, - 464, 452, 127, 125, 110, 110, 613, 773, 108, 108, - 125, 461, 462, 463, 127, 465, 125, 125, 469, 125, - 126, 127, 107, 107, 317, 108, 130, 478, 8, 480, - 108, 117, 411, 488, 128, 486, 486, 488, 850, 646, - 120, 120, 580, 125, 495, 495, 580, 580, 120, 110, - 806, 108, 111, 111, 866, 118, 119, 120, 121, 122, - 90, 124, 125, 126, 125, 126, 127, 360, 120, 116, - 125, 116, 365, 127, 367, 126, 120, 121, 122, 591, - 124, 125, 126, 108, 127, 108, 128, 853, 127, 130, - 127, 8, 109, 849, 126, 108, 125, 51, 548, 550, - 550, 560, 914, 127, 4, 564, 125, 566, 108, 568, - 569, 570, 130, 577, 128, 579, 127, 127, 580, 580, - 571, 580, 29, 17, 18, 19, 20, 578, 421, 422, - 423, 128, 130, 127, 585, 29, 127, 601, 125, 603, - 604, 592, 592, 899, 116, 596, 958, 125, 599, 600, - 116, 917, 636, 130, 117, 921, 108, 127, 613, 117, - 611, 768, 127, 614, 125, 615, 616, 617, 618, 619, - 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, - 630, 631, 632, 633, 634, 635, 127, 637, 109, 109, - 641, 646, 127, 125, 960, 646, 127, 125, 964, 125, - 493, 128, 127, 127, 3, 4, 5, 6, 117, 8, - 191, 977, 127, 120, 121, 122, 117, 124, 125, 126, - 986, 127, 116, 117, 118, 119, 120, 121, 122, 125, - 124, 125, 126, 125, 127, 434, 127, 493, 770, 806, - 849, 899, 434, 850, 200, 435, 366, 578, 613, 200, - 457, 492, 427, 732, 547, 54, -1, -1, -1, 866, - -1, -1, -1, 62, -1, -1, 559, 560, 561, -1, - -1, 564, -1, 566, -1, 568, 569, 570, -1, -1, - -1, 732, 575, 795, 796, 797, 798, 86, 800, 88, - -1, -1, -1, 92, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 811, -1, -1, 914, -1, -1, - -1, 761, -1, 768, -1, 799, 115, 768, -1, -1, - 119, 120, 773, -1, 123, -1, 125, -1, -1, -1, - 129, -1, -1, -1, -1, 799, -1, -1, -1, -1, - -1, 795, 796, 797, 798, -1, 800, 17, 18, 19, - 20, 958, -1, -1, -1, -1, -1, 807, 809, 29, - -1, -1, -1, -1, 814, 877, 878, 879, 880, 881, - 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, - 892, 893, 894, 895, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, 850, -1, -1, 29, 850, - -1, -1, 853, 867, 868, 869, -1, 858, 858, -1, - -1, 866, 896, -1, -1, 866, 928, -1, -1, -1, - -1, -1, -1, 877, 878, 879, 880, 881, 882, 883, - 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, - 894, 895, -1, -1, -1, -1, -1, 897, 118, 119, - 120, 121, 122, -1, 124, 125, 126, 969, -1, 914, - 910, -1, -1, 914, -1, -1, 917, -1, -1, 953, - 921, 955, -1, -1, 928, -1, -1, -1, -1, -1, - -1, -1, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, 980, 981, -1, -1, - -1, -1, -1, 958, -1, -1, -1, 958, -1, 960, - -1, -1, -1, 964, -1, 969, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 977, 3, 4, 5, - 6, 7, 8, 9, 10, 986, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, -1, -1, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - -1, 57, -1, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, -1, -1, -1, 74, -1, - 76, -1, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, - 96, 97, -1, 99, 100, 101, 102, 103, -1, -1, - -1, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 3, 4, 5, 6, 7, - 8, 9, 10, 956, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, -1, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, - -1, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, -1, -1, -1, 74, -1, 76, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, -1, 91, 92, 93, 94, 95, 96, 97, - -1, 99, 100, 101, 102, 103, -1, 8, 9, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - -1, 129, 130, 3, 4, 5, 6, -1, 8, 9, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, 45, 29, 47, 48, 49, - 50, 51, -1, 53, 54, -1, -1, 57, 89, -1, - -1, -1, 62, 63, 95, 96, -1, -1, 99, 69, - 70, 71, -1, -1, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, 89, - -1, -1, 92, -1, -1, 95, 96, 97, -1, -1, - 100, -1, 102, 3, 4, 5, 6, -1, 8, 9, - -1, -1, 12, -1, -1, 115, -1, -1, -1, 119, - 120, -1, -1, 123, -1, 125, 8, 9, -1, 129, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - -1, 124, 125, 126, -1, 45, -1, 47, 48, 49, - 50, 51, -1, 53, 54, -1, -1, 57, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 50, 69, - 70, 71, -1, -1, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, 89, - -1, -1, 92, -1, -1, 95, 96, 97, -1, -1, - 100, -1, 102, 3, 4, 5, 6, 89, 8, 9, - -1, -1, 12, 95, 96, 115, -1, 99, -1, 119, - -1, -1, -1, 123, -1, 125, 8, 9, -1, 129, - -1, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, 45, 29, 47, 48, 49, - 50, 51, -1, 53, 54, -1, -1, 57, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 50, 69, - 70, 71, 19, 20, -1, -1, 76, -1, -1, -1, - -1, -1, 29, -1, 84, 85, 86, -1, 88, 89, - -1, -1, 92, -1, -1, 95, 96, 97, -1, -1, - 100, -1, 102, 3, 4, 5, 6, 89, 8, 9, - -1, 19, 20, 95, 96, 115, -1, 99, -1, 119, - -1, 29, -1, 123, -1, 125, -1, -1, -1, 129, - 113, 114, 115, -1, -1, 118, 119, 120, 121, 122, - -1, 124, 125, 126, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, -1, -1, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, -1, 69, - 70, 118, 119, 120, 121, 122, 76, 124, 125, 126, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, -1, -1, -1, -1, - 118, 119, 120, 121, 122, 115, 124, 125, 126, 119, - 120, -1, -1, 123, -1, 125, -1, 127, -1, 129, - -1, -1, -1, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, -1, -1, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, -1, 69, - 70, -1, -1, -1, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, 45, 107, 47, 48, - 49, -1, -1, -1, 53, 115, -1, -1, -1, 119, - 120, -1, -1, 123, 63, 125, -1, -1, -1, 129, - 69, 70, 71, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, 84, 85, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 97, 69, - 70, -1, -1, 102, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, 45, 107, 47, 48, - 49, -1, -1, -1, -1, 115, -1, -1, -1, 119, - 120, -1, -1, 123, 63, 125, -1, -1, -1, 129, - 69, 70, 71, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, 84, 85, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 97, 69, - 70, -1, -1, 102, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, 45, -1, 47, 48, - 49, -1, -1, -1, -1, 115, -1, -1, -1, 119, - 120, -1, -1, 123, -1, 125, -1, 127, -1, 129, - 69, 70, 71, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, 84, 85, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 97, 69, - 70, -1, -1, 102, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, -1, 107, -1, -1, - -1, -1, -1, -1, -1, 115, -1, -1, -1, 119, - 120, -1, -1, 123, -1, 125, -1, -1, -1, 129, - -1, -1, -1, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, -1, -1, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, -1, 69, - 70, -1, -1, -1, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, 88, -1, - -1, -1, 92, 3, 4, 5, 6, 97, 8, 9, - -1, -1, 102, -1, -1, -1, 45, -1, 47, 48, - 49, -1, -1, -1, 53, 115, -1, -1, -1, 119, - 120, -1, -1, 123, 63, 125, -1, 127, -1, 129, - 69, 70, 71, -1, -1, 45, -1, 47, 48, 49, - -1, -1, -1, 53, 54, 84, 85, -1, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, 97, 69, - 70, -1, -1, 102, -1, -1, 76, 15, 16, 17, - 18, 19, 20, -1, 84, 85, 86, -1, 88, -1, - -1, 29, 92, -1, -1, -1, 125, 97, -1, -1, - -1, -1, 102, -1, -1, 13, 14, 15, 16, 17, - 18, 19, 20, -1, -1, 115, -1, -1, -1, 119, - 120, 29, -1, 123, -1, 125, -1, -1, -1, 129, - 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, -1, -1, 13, - 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 114, 115, 116, 117, + 1, 10, 46, 503, 5, 99, 100, 101, 102, 103, + 84, 105, 106, 107, 384, 35, 195, 212, 0, 297, + 114, 115, 8, 9, 118, 119, 84, 85, 12, 494, + 125, 600, 8, 9, 380, 29, 125, 383, 91, 385, + 35, 125, 23, 91, 108, 307, 79, 80, 81, 91, + 8, 9, 422, 8, 9, 8, 9, 125, 108, 2, + 61, 407, 408, 127, 410, 411, 412, 413, 386, 23, + 125, 455, 390, 391, 392, 393, 394, 127, 29, 79, + 80, 81, 111, 84, 85, 108, 108, 111, 31, 32, + 33, 34, 23, 36, 559, 107, 650, 126, 110, 99, + 107, 485, 126, 110, 127, 127, 438, 453, 125, 104, + 91, 120, 116, 445, 446, 447, 448, 449, 450, 298, + 75, 116, 117, 125, 108, 108, 496, 459, 111, 108, + 124, 125, 126, 125, 110, 481, 601, 91, 317, 417, + 108, 127, 162, 108, 476, 428, 429, 200, 127, 107, + 203, 245, 200, 415, 107, 203, 77, 116, 200, 127, + 91, 203, 127, 509, 165, 125, 210, 8, 9, 487, + 91, 108, 216, 124, 125, 126, 108, 178, 179, 180, + 181, 182, 183, 29, 125, 186, 381, 366, 6, 384, + 127, 192, 4, 455, 195, 127, 8, 9, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 200, + 163, 605, 203, 485, 608, 108, 108, 422, 782, 107, + 125, 109, 110, 111, 125, 804, 805, 806, 807, 623, + 809, 165, 126, 127, 127, 127, 200, 125, 126, 203, + 125, 126, 108, 432, 178, 179, 180, 181, 182, 183, + 125, 593, 306, 125, 108, 8, 9, 8, 9, 200, + 314, 127, 203, 107, 120, 121, 122, 609, 124, 125, + 126, 110, 283, 127, 127, 655, 569, 107, 108, 290, + 573, 110, 575, 125, 577, 578, 579, 298, 299, 125, + 126, 496, 303, 125, 305, 126, 127, 50, 862, 50, + 110, 254, 255, 110, 315, 116, 317, 886, 887, 888, + 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, + 899, 900, 901, 902, 903, 904, 125, 381, 125, 126, + 384, 120, 126, 605, 110, 110, 89, 290, 89, 8, + 107, 305, 95, 96, 95, 96, 99, 358, 99, 283, + 125, 126, 127, 116, 125, 366, 440, 867, 937, 125, + 6, 110, 926, 109, 375, 127, 930, 108, 422, 322, + 381, 127, 440, 384, 128, 386, 125, 126, 127, 390, + 391, 392, 393, 394, 127, 110, 397, 127, 418, 400, + 420, 127, 127, 404, 347, 117, 127, 777, 502, 978, + 125, 126, 127, 127, 415, 969, 370, 461, 127, 973, + 127, 422, 127, 127, 8, 9, 10, 622, 117, 127, + 14, 432, 986, 127, 818, 436, 110, 438, 108, 440, + 108, 995, 125, 125, 445, 446, 447, 448, 449, 450, + 451, 471, 496, 107, 455, 109, 110, 111, 459, 10, + 655, 404, 127, 14, 8, 9, 10, 51, 125, 815, + 14, 104, 105, 106, 125, 476, 471, 130, 8, 9, + 107, 107, 425, 464, 485, 108, 487, 441, 8, 859, + 120, 108, 56, 494, 78, 496, 427, 428, 429, 117, + 51, 120, 503, 67, 68, 875, 128, 51, 120, 125, + 464, 108, 858, 111, 8, 9, 80, 101, 111, 90, + 50, 120, 86, 125, 116, 468, 469, 470, 116, 472, + 126, 115, 127, 464, 128, 108, 120, 127, 127, 130, + 108, 125, 127, 8, 109, 109, 126, 111, 112, 108, + 101, 494, 127, 923, 51, 125, 50, 101, 559, 89, + 503, 4, 908, 125, 115, 95, 96, 108, 125, 120, + 130, 115, 127, 127, 125, 128, 120, 127, 622, 580, + 128, 125, 777, 130, 127, 116, 587, 51, 125, 53, + 54, 586, 593, 588, 58, 89, 130, 967, 116, 108, + 601, 95, 96, 117, 605, 99, 127, 608, 609, 117, + 125, 655, 125, 109, 557, 610, 559, 612, 613, 620, + 127, 127, 623, 29, 109, 645, 127, 127, 127, 127, + 194, 8, 9, 10, 125, 125, 128, 14, 569, 117, + 127, 205, 573, 117, 575, 127, 577, 578, 579, 650, + 125, 127, 125, 501, 655, 219, 127, 192, 601, 223, + 779, 858, 815, 908, 859, 229, 230, 203, 132, 133, + 134, 135, 440, 29, 51, 370, 587, 441, 622, 203, + 875, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 464, 646, 168, 433, 170, 500, 3, 4, + 5, 6, -1, 8, 120, 121, 122, -1, 124, 125, + 126, -1, 741, 187, 101, -1, 820, 291, 923, -1, + -1, -1, -1, 777, -1, -1, -1, -1, 115, -1, + 741, -1, -1, 120, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 804, 805, 806, 807, 321, 809, 54, + -1, -1, 118, 119, 120, 121, 122, 62, 124, 125, + 126, -1, 967, -1, -1, -1, 777, -1, -1, -1, + -1, 782, -1, -1, -1, -1, -1, -1, 808, -1, + -1, 86, -1, 88, -1, -1, -1, 92, -1, -1, + 364, -1, -1, -1, -1, 369, -1, 371, -1, 17, + 18, 19, 20, 808, -1, 859, -1, 818, -1, -1, + 115, 29, -1, -1, 119, 120, -1, 770, 123, -1, + 125, 875, -1, 297, 129, 886, 887, 888, 889, 890, + 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, + 901, 902, 903, 904, -1, -1, -1, -1, 859, 29, + -1, 862, -1, 427, 428, 429, 867, -1, -1, -1, + -1, -1, -1, 816, 875, -1, -1, -1, -1, 923, + 823, 876, 877, 878, -1, 905, 937, -1, -1, -1, + -1, -1, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, 29, -1, 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, -1, 124, 125, 126, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - -1, 124, 125, 126, -1, -1, -1, 130, 112, 113, + -1, -1, 923, 967, 867, 926, -1, 978, -1, 930, + -1, -1, -1, -1, -1, -1, -1, 501, -1, -1, + -1, -1, 962, -1, 964, -1, -1, -1, 118, 119, + 120, 121, 122, 417, 124, 125, 126, -1, -1, -1, + -1, -1, -1, 906, -1, -1, 967, -1, 969, 989, + 990, -1, 973, -1, -1, -1, 919, -1, -1, -1, + -1, -1, -1, -1, -1, 986, -1, -1, -1, -1, + -1, -1, 556, -1, 995, 118, 119, 120, 121, 122, + -1, 124, 125, 126, 568, 569, 570, -1, -1, 573, + -1, 575, -1, 577, 578, 579, -1, -1, -1, -1, + 584, 3, 4, 5, 6, 7, 8, 9, 10, -1, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, -1, -1, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, -1, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, + -1, -1, 74, -1, 76, -1, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, -1, 91, + 92, 93, 94, 95, 96, 97, -1, 99, 100, 101, + 102, 103, -1, -1, -1, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 3, + 4, 5, 6, 7, 8, 9, 10, -1, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, -1, 57, -1, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, + 74, -1, 76, -1, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, -1, 91, 92, 93, + 94, 95, 96, 97, -1, 99, 100, 101, 102, 103, + -1, -1, -1, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, -1, 129, 130, 3, 4, 5, + 6, -1, 8, 9, -1, -1, -1, -1, -1, -1, + 45, -1, 47, 48, 49, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 14, 15, 16, 17, 18, + 19, 20, -1, -1, 69, 70, 71, -1, -1, 45, + 29, 47, 48, 49, 50, 51, -1, 53, 54, 84, + 85, 57, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, 97, 69, 70, 71, -1, 102, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, + 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, + 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, + -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, + -1, 965, -1, 129, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, -1, 124, 125, 126, -1, 45, + -1, 47, 48, 49, 50, 51, -1, 53, 54, -1, + -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, + 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, + 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, + -1, -1, -1, 119, -1, -1, -1, 123, -1, 125, + -1, -1, -1, 129, -1, 14, 15, 16, 17, 18, + 19, 20, -1, -1, -1, -1, -1, -1, -1, 45, + 29, 47, 48, 49, 50, 51, -1, 53, 54, -1, + -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, 71, 19, 20, -1, -1, + 76, -1, -1, -1, -1, -1, 29, -1, 84, 85, + 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, + 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, + 6, -1, 8, 9, -1, 19, 20, -1, -1, 115, + -1, -1, -1, 119, -1, 29, -1, 123, -1, 125, + -1, -1, -1, 129, 113, 114, 115, -1, -1, 118, + 119, 120, 121, 122, -1, 124, 125, 126, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, + -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, 118, 119, 120, 121, 122, + 76, 124, 125, 126, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + -1, -1, -1, -1, 118, 119, 120, 121, 122, 115, + 124, 125, 126, 119, 120, -1, -1, 123, -1, 125, + -1, 127, -1, 129, -1, -1, -1, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, + -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + 45, 107, 47, 48, 49, -1, -1, -1, 53, 115, + -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, + -1, -1, -1, 129, 69, 70, 71, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, + 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + 45, 107, 47, 48, 49, -1, -1, -1, -1, 115, + -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, + -1, -1, -1, 129, 69, 70, 71, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, + 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 115, + -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, + -1, 127, -1, 129, -1, -1, -1, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, + -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + -1, 107, -1, -1, -1, -1, -1, -1, -1, 115, + -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, + -1, -1, -1, 129, -1, -1, -1, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, + -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, + 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, + 45, -1, 47, 48, 49, -1, -1, -1, 53, 115, + -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, + -1, 127, -1, 129, 69, 70, 71, -1, -1, 45, + -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, + 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, + 76, 15, 16, 17, 18, 19, 20, -1, 84, 85, + 86, -1, 88, -1, -1, 29, 92, -1, -1, -1, + 125, 97, -1, -1, -1, -1, 102, -1, -1, 13, + 14, 15, 16, 17, 18, 19, 20, -1, -1, 115, + -1, -1, -1, 119, 120, 29, -1, 123, -1, 125, + -1, -1, -1, 129, 13, 14, 15, 16, 17, 18, + 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, + 29, -1, -1, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, 8, 9, -1, 130, 13, 14, 15, - 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, - -1, -1, -1, 29, -1, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, -1, -1, -1, - 45, -1, 47, 48, 49, -1, 52, -1, 53, 45, - -1, 47, 48, 49, -1, -1, -1, -1, 63, -1, - -1, -1, -1, -1, 69, 70, 71, -1, -1, -1, - 76, -1, -1, 69, 70, 71, -1, -1, -1, 84, - 85, -1, -1, -1, -1, 8, 9, -1, 84, 85, - -1, -1, 97, -1, -1, 100, -1, 102, -1, -1, - -1, 97, 108, -1, -1, 111, 102, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, -1, 125, - 126, 44, 45, 129, 47, 48, 49, 50, 51, 125, - 53, -1, -1, -1, 57, 58, 59, 60, -1, -1, - 63, -1, -1, -1, -1, 68, 69, 70, 71, -1, - -1, 74, 8, 9, -1, 78, -1, -1, -1, 82, - -1, 84, 85, -1, 87, -1, 89, -1, -1, -1, - -1, -1, 95, 96, 97, -1, 99, 100, 101, 102, - -1, -1, -1, -1, 107, -1, -1, -1, 44, 45, - -1, 47, 48, 49, 50, 51, -1, 53, -1, -1, - 123, 57, 58, 59, 60, -1, -1, 63, -1, -1, - -1, -1, 68, 69, 70, 71, -1, -1, 74, 8, - 9, -1, 78, -1, -1, -1, 82, -1, 84, 85, - -1, 87, -1, 89, -1, -1, -1, -1, -1, 95, - 96, 97, -1, 99, 100, 101, 102, 13, 14, 15, - 16, 17, 18, 19, 20, 44, 45, -1, 47, 48, - 49, 50, 51, 29, 53, -1, -1, 123, 57, 58, + 124, 125, 126, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, + 124, 125, 126, -1, -1, -1, 130, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, -1, 124, 125, 126, -1, -1, + -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, -1, 124, 125, 126, 8, 9, -1, + 130, 13, 14, 15, 16, 17, 18, 19, 20, -1, + -1, -1, -1, -1, -1, -1, -1, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, -1, -1, -1, 45, -1, 47, 48, 49, -1, + 52, -1, 53, 45, -1, 47, 48, 49, -1, -1, + -1, -1, 63, -1, -1, -1, -1, -1, 69, 70, + 71, -1, -1, -1, 76, -1, -1, 69, 70, 71, + -1, -1, -1, 84, 85, -1, -1, -1, -1, 8, + 9, -1, 84, 85, -1, -1, 97, -1, -1, 100, + -1, 102, -1, -1, -1, 97, 108, -1, -1, 111, + 102, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, -1, 125, 126, 44, 45, 129, 47, 48, + 49, 50, 51, 125, 53, -1, -1, -1, 57, 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, 68, - 69, 70, 71, -1, -1, 74, -1, -1, -1, 78, + 69, 70, 71, -1, -1, 74, 8, 9, -1, 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, -1, 89, -1, -1, -1, -1, -1, 95, 96, 97, -1, - 99, 100, 101, 102, 13, 14, 15, 16, 17, 18, - 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, 123, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, - 126, 13, 14, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, 13, 14, + 99, 100, 101, 102, -1, -1, -1, -1, 107, -1, + -1, -1, 44, 45, -1, 47, 48, 49, 50, 51, + -1, 53, -1, -1, 123, 57, 58, 59, 60, -1, + -1, 63, -1, -1, -1, -1, 68, 69, 70, 71, + -1, -1, 74, 8, 9, -1, 78, -1, -1, -1, + 82, -1, 84, 85, -1, 87, -1, 89, -1, -1, + -1, -1, -1, 95, 96, 97, -1, 99, 100, 101, + 102, 13, 14, 15, 16, 17, 18, 19, 20, 44, + 45, -1, 47, 48, 49, 50, 51, 29, 53, -1, + -1, 123, 57, 58, 59, 60, -1, -1, 63, -1, + -1, -1, -1, 68, 69, 70, 71, -1, -1, 74, + -1, -1, -1, 78, -1, -1, -1, 82, -1, 84, + 85, -1, 87, -1, 89, -1, -1, -1, -1, -1, + 95, 96, 97, -1, 99, 100, 101, 102, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, - -1, -1, -1, -1, 29, 13, 14, 15, 16, 17, - 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, - 109, 29, -1, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, -1, 124, 125, 126, 13, 14, - 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, + -1, -1, -1, -1, 29, -1, -1, -1, 123, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, -1, 124, 125, 126, 110, -1, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, -1, 124, - 125, 126, -1, -1, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, + 122, -1, 124, 125, 126, 13, 14, 15, 16, 17, + 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, + -1, 29, 13, 14, 15, 16, 17, 18, 19, 20, + -1, -1, -1, -1, -1, -1, -1, -1, 29, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, 112, 113, 114, + -1, -1, -1, -1, 109, 29, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, 14, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, 15, - 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, - -1, -1, -1, 29, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, 15, - 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, - -1, -1, -1, 29, -1, -1, 110, -1, 112, 113, - 114, 115, -1, -1, 118, 119, 120, 121, 122, -1, - 124, 125, 126, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, - -1, 112, 113, 114, 115, -1, -1, 118, 119, 120, - 121, 122, -1, 124, 125, 126, -1, -1, -1, 115, - 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, - 126, -1, 113, 114, 115, -1, -1, 118, 119, 120, - 121, 122, -1, 124, 125, 126, -1, -1, -1, -1, - 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, - 126, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 0, - -1, -1, 114, 115, -1, -1, 118, 119, 120, 121, - 122, -1, 124, 125, 126, 15, 16, 17, 18, 19, - 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, + -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 56, -1, -1, -1, -1, - 61, -1, -1, 64, -1, -1, -1, -1, -1, -1, - -1, 72, 73, -1, 75, -1, -1, -1, 79, 80, - 81, 115, -1, -1, 118, 119, 120, 121, 122, 90, - 124, 125, 126, 94, 8, 9, -1, 98, -1, -1, - -1, -1, -1, -1, 9, -1, -1, -1, 109, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 118, 119, + 108, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, -1, 124, 125, 126, 110, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, -1, 124, 125, 126, -1, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, + 124, 125, 126, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, -1, 124, 125, 126, 13, 14, 15, 16, + 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, + -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, + -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, + 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, + -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, + -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, + 110, -1, 112, 113, 114, 115, -1, -1, 118, 119, + 120, 121, 122, -1, 124, 125, 126, 15, 16, 17, + 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 112, 113, 114, 115, -1, + -1, 118, 119, 120, 121, 122, -1, 124, 125, 126, + -1, -1, 114, 115, 116, 117, 118, 119, 120, 121, + 122, -1, 124, 125, 126, -1, -1, -1, 115, 116, + 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, + -1, 113, 114, 115, -1, -1, 118, 119, 120, 121, + 122, -1, 124, 125, 126, 15, 16, 17, 18, 19, + 20, -1, -1, -1, 9, -1, -1, -1, -1, 29, + -1, 15, 16, 17, 18, 19, 20, -1, 116, 117, + 118, 119, 120, 121, 122, 29, 124, 125, 126, -1, + -1, -1, 45, -1, 47, 48, 49, -1, -1, -1, + 45, -1, 47, 48, 49, -1, -1, -1, -1, -1, + -1, 17, 18, 19, 20, -1, 69, 70, 71, -1, + -1, -1, -1, 29, 69, 70, 71, 0, -1, -1, + -1, 84, 85, -1, -1, -1, -1, -1, -1, 84, + 85, -1, -1, -1, 97, -1, -1, -1, -1, 102, + -1, -1, 97, -1, 114, 115, -1, 102, 118, 119, 120, 121, 122, -1, 124, 125, 126, -1, -1, -1, - -1, 45, -1, 47, 48, 49, 50, 51, -1, 53, - 45, -1, 47, 48, 49, 50, 51, -1, 53, 63, - -1, -1, 57, -1, -1, 69, 70, 71, 63, -1, - 9, -1, -1, -1, 69, 70, 71, -1, -1, -1, - 84, 85, -1, -1, -1, -1, -1, -1, -1, 84, - 85, 95, -1, 97, 89, -1, 100, -1, 102, -1, - 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, - 49, 50, 51, -1, 53, 9, -1, -1, 57, -1, + 43, 115, 125, -1, 118, 119, 120, 121, 122, -1, + 124, 125, 126, 56, -1, -1, -1, -1, 61, 8, + 9, 64, -1, -1, -1, -1, -1, -1, -1, 72, + 73, -1, 75, -1, -1, -1, 79, 80, 81, -1, + -1, -1, 118, 119, 120, 121, 122, 90, 124, 125, + 126, 94, -1, -1, -1, 98, 45, -1, 47, 48, + 49, 50, 51, -1, 53, -1, 109, -1, -1, -1, -1, -1, -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, -1, - 89, 45, -1, 47, 48, 49, 95, 96, 97, -1, - -1, 100, 45, 102, 47, 48, 49, 50, -1, -1, + -1, 45, -1, 47, 48, 49, 95, -1, 97, -1, + -1, 100, 45, 102, 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, 57, 69, 70, 71, -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, 71, -1, 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 84, 85, 97, -1, -1, 89, 45, 102, 47, - 48, 49, 95, 96, 97, -1, -1, 100, 45, 102, - 47, 48, 49, 50, -1, -1, 53, -1, -1, -1, - 57, 69, 70, 71, -1, -1, 63, -1, -1, -1, - -1, -1, 69, 70, 71, -1, 84, 85, -1, -1, - -1, -1, -1, 43, -1, -1, -1, 84, 85, 97, - -1, -1, 89, -1, 102, -1, 56, -1, 95, 96, - 97, 61, -1, 100, 64, 102, -1, -1, -1, -1, - 43, -1, 72, 73, -1, 75, -1, 125, -1, 79, - 80, 81, -1, 56, -1, -1, -1, -1, 61, -1, - 90, 64, -1, -1, 94, -1, -1, 43, 98, 72, - 73, -1, 75, -1, -1, -1, 79, 80, 81, 109, - 56, -1, -1, -1, -1, 61, -1, 90, 64, -1, - -1, 94, -1, -1, 43, 98, 72, 73, 128, 75, - -1, -1, -1, 79, 80, 81, 109, 56, -1, -1, - -1, -1, 61, -1, 90, 64, -1, -1, 94, -1, - -1, 43, 98, 72, 73, 128, 75, -1, -1, -1, - 79, 80, 81, 109, 56, -1, -1, -1, -1, 61, - -1, 90, 64, -1, -1, 94, -1, -1, -1, 98, - 72, 73, 128, 75, -1, -1, -1, 79, 80, 81, - 109, -1, -1, -1, -1, -1, -1, -1, 90, -1, - -1, 45, 94, 47, 48, 49, 98, -1, -1, 128, - -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, - -1, -1, -1, -1, -1, 69, 70, 71, -1, -1, - -1, 43, -1, -1, -1, -1, 128, -1, -1, -1, - 84, 85, -1, -1, 56, -1, -1, -1, -1, 61, - -1, -1, 64, 97, -1, -1, -1, -1, 102, -1, - 72, 73, -1, 75, -1, -1, -1, 79, 80, 81, - -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, - -1, 125, 94, -1, -1, -1, 98 + -1, 84, 85, 97, -1, -1, 89, -1, 102, -1, + -1, -1, 95, 96, 97, -1, -1, 100, 45, 102, + 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, + 57, 125, -1, -1, -1, -1, 63, -1, 9, -1, + -1, -1, 69, 70, 71, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, + -1, -1, 89, -1, -1, -1, -1, -1, 95, 96, + 97, -1, -1, 100, 45, 102, 47, 48, 49, 50, + -1, -1, 53, -1, -1, -1, 57, -1, -1, -1, + -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, + 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 84, 85, -1, -1, -1, 89, -1, + -1, -1, -1, -1, 95, 96, 97, -1, -1, 100, + 45, 102, 47, 48, 49, 50, -1, -1, 53, -1, + -1, -1, 57, -1, -1, -1, -1, -1, 63, -1, + -1, -1, -1, -1, 69, 70, 71, -1, -1, -1, + -1, -1, -1, -1, -1, 43, -1, -1, -1, 84, + 85, -1, -1, -1, 89, -1, -1, -1, 56, -1, + 95, 96, 97, 61, -1, 100, 64, 102, -1, -1, + -1, -1, 43, -1, 72, 73, -1, 75, -1, -1, + -1, 79, 80, 81, -1, 56, -1, -1, -1, -1, + 61, -1, 90, 64, -1, -1, 94, -1, -1, 43, + 98, 72, 73, -1, 75, -1, -1, -1, 79, 80, + 81, 109, 56, -1, -1, -1, -1, 61, -1, 90, + 64, -1, -1, 94, -1, -1, 43, 98, 72, 73, + 128, 75, -1, -1, -1, 79, 80, 81, 109, 56, + -1, -1, -1, -1, 61, -1, 90, 64, -1, -1, + 94, -1, -1, 43, 98, 72, 73, 128, 75, -1, + -1, -1, 79, 80, 81, 109, 56, -1, -1, -1, + -1, 61, -1, 90, 64, -1, -1, 94, -1, -1, + 43, 98, 72, 73, 128, 75, -1, -1, -1, 79, + 80, 81, 109, 56, -1, -1, -1, -1, 61, -1, + 90, 64, -1, -1, 94, -1, -1, -1, 98, 72, + 73, 128, 75, -1, -1, -1, 79, 80, 81, 109, + -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, + -1, 94, -1, -1, -1, 98, -1, -1, 128 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2344,88 +2364,89 @@ static const yytype_uint8 yystos[] = 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 6, 183, 53, 63, 70, 205, 70, 205, 205, 8, 9, 221, 205, 10, 14, 51, - 115, 120, 125, 182, 223, 107, 110, 221, 107, 221, - 110, 140, 125, 125, 107, 221, 110, 110, 110, 165, - 141, 148, 75, 221, 8, 9, 44, 51, 58, 59, - 60, 68, 74, 78, 82, 87, 95, 99, 101, 107, - 123, 153, 184, 187, 189, 194, 199, 200, 204, 213, - 214, 223, 213, 213, 213, 213, 213, 186, 213, 213, - 213, 221, 125, 221, 221, 213, 213, 186, 186, 213, - 213, 127, 108, 127, 216, 216, 216, 216, 216, 216, + 101, 115, 120, 125, 182, 223, 107, 110, 221, 107, + 221, 110, 140, 125, 125, 107, 221, 110, 110, 110, + 141, 142, 165, 141, 148, 75, 221, 8, 9, 44, + 51, 58, 59, 60, 68, 74, 78, 82, 87, 95, + 99, 101, 107, 123, 153, 184, 187, 189, 194, 199, + 200, 204, 213, 214, 223, 213, 213, 213, 213, 213, + 186, 213, 213, 213, 221, 125, 221, 221, 213, 213, + 186, 186, 213, 213, 127, 108, 127, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 127, 214, 216, 182, 63, - 120, 182, 182, 182, 182, 182, 126, 197, 198, 223, - 9, 196, 205, 110, 188, 190, 138, 8, 221, 133, - 107, 116, 51, 153, 184, 221, 125, 125, 183, 222, - 51, 183, 221, 137, 221, 107, 109, 110, 111, 176, - 109, 144, 221, 221, 127, 127, 127, 127, 127, 127, - 117, 127, 127, 127, 213, 127, 127, 127, 117, 127, - 127, 216, 216, 110, 127, 130, 182, 127, 212, 216, - 223, 221, 128, 196, 133, 110, 191, 192, 223, 108, - 108, 128, 202, 8, 9, 50, 51, 95, 166, 167, - 168, 169, 204, 223, 183, 176, 149, 154, 10, 120, - 155, 145, 183, 8, 9, 10, 14, 51, 115, 120, - 180, 223, 133, 125, 208, 209, 134, 135, 221, 107, - 216, 10, 14, 51, 78, 115, 120, 125, 146, 170, - 221, 110, 125, 127, 125, 216, 125, 130, 108, 111, - 128, 79, 80, 81, 99, 193, 107, 108, 8, 221, - 133, 221, 169, 221, 117, 108, 8, 9, 10, 14, - 51, 115, 120, 125, 181, 223, 150, 151, 170, 3, - 4, 5, 8, 12, 51, 54, 62, 76, 86, 88, - 92, 115, 119, 123, 125, 129, 172, 173, 179, 183, - 218, 219, 222, 223, 120, 170, 172, 147, 170, 180, - 120, 180, 180, 180, 180, 125, 126, 128, 156, 128, - 210, 223, 107, 108, 125, 107, 177, 178, 216, 223, - 109, 120, 170, 170, 13, 14, 15, 16, 17, 18, - 19, 20, 29, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 52, 76, 108, 111, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 125, 126, 129, 162, 170, 170, 170, 110, 111, 125, - 126, 175, 176, 223, 196, 214, 214, 172, 216, 95, - 99, 200, 220, 221, 99, 220, 99, 220, 79, 80, - 81, 133, 193, 108, 127, 108, 128, 111, 181, 111, - 141, 142, 163, 164, 168, 120, 181, 181, 181, 181, - 181, 111, 126, 174, 223, 152, 170, 175, 176, 181, - 183, 116, 185, 125, 116, 216, 216, 216, 186, 214, - 216, 127, 12, 108, 181, 13, 14, 15, 16, 17, - 18, 19, 20, 29, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 124, 125, 126, 170, 110, - 127, 127, 175, 176, 125, 180, 159, 212, 172, 3, - 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 57, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 74, 76, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 91, 92, 93, 94, 95, 96, 97, 99, 100, 101, - 102, 103, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 129, 130, 211, 208, 135, 213, 177, - 128, 108, 170, 127, 130, 127, 4, 216, 171, 212, - 108, 127, 127, 127, 108, 221, 220, 221, 220, 220, - 220, 220, 220, 128, 8, 109, 221, 186, 174, 186, - 181, 127, 54, 86, 88, 115, 119, 120, 123, 125, - 129, 215, 217, 212, 175, 176, 108, 111, 175, 181, - 186, 125, 186, 186, 127, 127, 51, 161, 223, 12, - 179, 175, 216, 216, 216, 216, 216, 216, 216, 216, + 216, 216, 216, 216, 216, 216, 216, 216, 127, 214, + 216, 182, 63, 120, 182, 182, 182, 182, 182, 182, + 126, 197, 198, 223, 9, 196, 205, 110, 188, 190, + 138, 8, 221, 133, 107, 116, 51, 153, 184, 221, + 125, 125, 183, 222, 51, 183, 221, 137, 221, 107, + 109, 110, 111, 176, 109, 144, 221, 221, 127, 127, + 127, 127, 127, 127, 117, 127, 127, 127, 213, 127, + 127, 127, 117, 127, 127, 216, 216, 110, 127, 130, + 182, 127, 212, 216, 223, 221, 128, 196, 133, 110, + 191, 192, 223, 108, 108, 128, 202, 8, 9, 50, + 51, 95, 166, 167, 168, 169, 204, 223, 183, 176, + 149, 154, 10, 120, 155, 145, 183, 8, 9, 10, + 14, 51, 101, 115, 120, 180, 223, 133, 125, 208, + 209, 134, 135, 221, 107, 216, 10, 14, 51, 78, + 101, 115, 120, 125, 146, 170, 221, 110, 125, 127, + 125, 216, 125, 130, 108, 111, 128, 79, 80, 81, + 99, 193, 107, 108, 8, 221, 133, 221, 169, 221, + 117, 108, 8, 9, 10, 14, 51, 101, 115, 120, + 125, 181, 223, 150, 151, 170, 3, 4, 5, 8, + 12, 51, 54, 62, 76, 86, 88, 92, 115, 119, + 123, 125, 129, 172, 173, 179, 183, 218, 219, 222, + 223, 120, 170, 172, 147, 170, 180, 120, 180, 180, + 180, 180, 180, 125, 126, 128, 156, 128, 210, 223, + 107, 108, 125, 107, 177, 178, 216, 223, 109, 120, + 170, 170, 13, 14, 15, 16, 17, 18, 19, 20, + 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 52, 76, 108, 111, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, + 129, 162, 170, 170, 170, 170, 110, 111, 125, 126, + 175, 176, 223, 196, 214, 214, 172, 216, 95, 99, + 200, 220, 221, 99, 220, 99, 220, 79, 80, 81, + 133, 193, 108, 127, 108, 128, 111, 181, 111, 142, + 163, 164, 168, 120, 181, 181, 181, 181, 181, 181, + 111, 126, 174, 223, 152, 170, 175, 176, 181, 183, + 116, 185, 125, 116, 216, 216, 216, 186, 214, 216, + 127, 12, 108, 181, 13, 14, 15, 16, 17, 18, + 19, 20, 29, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 124, 125, 126, 170, 110, 127, + 127, 175, 176, 125, 180, 159, 212, 172, 3, 4, + 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 74, 76, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, + 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, + 103, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 129, 130, 211, 208, 135, 213, 177, 128, + 108, 170, 127, 130, 127, 4, 216, 171, 212, 108, + 127, 127, 127, 108, 221, 220, 221, 220, 220, 220, + 220, 220, 128, 8, 109, 221, 186, 174, 186, 181, + 127, 54, 86, 88, 115, 119, 120, 123, 125, 129, + 215, 217, 212, 175, 176, 108, 111, 175, 181, 186, + 125, 186, 186, 127, 127, 51, 161, 223, 12, 179, + 175, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 127, 214, 216, 127, 125, 161, 108, - 160, 172, 130, 127, 210, 128, 127, 128, 107, 216, - 172, 130, 146, 161, 127, 127, 125, 116, 125, 116, - 215, 215, 215, 215, 186, 214, 215, 13, 14, 15, - 16, 17, 18, 19, 20, 29, 112, 113, 114, 115, - 118, 119, 120, 121, 122, 124, 125, 126, 130, 108, - 151, 216, 175, 117, 213, 127, 117, 216, 77, 91, - 110, 127, 130, 125, 157, 147, 172, 127, 161, 128, - 177, 127, 109, 109, 172, 186, 186, 186, 127, 127, + 216, 216, 127, 214, 216, 127, 125, 161, 108, 160, + 172, 130, 127, 210, 128, 127, 128, 107, 216, 172, + 130, 146, 161, 127, 127, 125, 116, 125, 116, 215, + 215, 215, 215, 186, 214, 215, 13, 14, 15, 16, + 17, 18, 19, 20, 29, 112, 113, 114, 115, 118, + 119, 120, 121, 122, 124, 125, 126, 130, 108, 151, + 216, 175, 117, 213, 127, 117, 216, 77, 91, 110, + 127, 130, 125, 157, 147, 172, 127, 161, 128, 177, + 127, 109, 109, 172, 186, 186, 186, 127, 127, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 127, - 214, 216, 152, 125, 127, 125, 125, 216, 158, 172, - 127, 161, 128, 161, 127, 117, 127, 117, 215, 110, - 127, 130, 214, 214, 127, 221, 172, 127, 161, 161, - 125, 125, 215, 127, 127, 127, 127, 161, 214, 214, - 161, 127, 127 + 215, 215, 215, 215, 215, 215, 215, 215, 127, 214, + 216, 152, 125, 127, 125, 125, 216, 158, 172, 127, + 161, 128, 161, 127, 117, 127, 117, 215, 110, 127, + 130, 214, 214, 127, 221, 172, 127, 161, 161, 125, + 125, 215, 127, 127, 127, 127, 161, 214, 214, 161, + 127, 127 }; #define yyerrok (yyerrstatus = 0) @@ -3801,7 +3822,7 @@ yyreduce: inst->_storage_class |= (current_storage_class | (yyvsp[(1) - (3)].u.integer)); current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[(2) - (3)])); CPPTypedefType *typedef_type = new CPPTypedefType(inst->_type, inst->_ident, current_scope); - current_scope->add_declaration(typedef_type, global_scope, current_lexer, (yylsp[(2) - (3)])); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(2) - (3)])); } } } @@ -3813,7 +3834,7 @@ yyreduce: { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); - current_scope->add_declaration(typedef_type, global_scope, current_lexer, (yylsp[(1) - (2)])); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (2)])); } break; @@ -3823,7 +3844,7 @@ yyreduce: { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); - current_scope->add_declaration(typedef_type, global_scope, current_lexer, (yylsp[(1) - (4)])); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (4)])); } break; @@ -3834,7 +3855,7 @@ yyreduce: (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); - current_scope->add_declaration(typedef_type, global_scope, current_lexer, (yylsp[(1) - (2)])); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (2)])); } break; @@ -3845,7 +3866,7 @@ yyreduce: (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); - current_scope->add_declaration(typedef_type, global_scope, current_lexer, (yylsp[(1) - (4)])); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (4)])); } break; @@ -4437,9 +4458,9 @@ yyreduce: } break; - case 128: + case 129: /* Line 1792 of yacc.c */ -#line 1150 "dtool/src/cppparser/cppBison.yxx" +#line 1151 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4447,9 +4468,9 @@ yyreduce: } break; - case 129: + case 130: /* Line 1792 of yacc.c */ -#line 1156 "dtool/src/cppparser/cppBison.yxx" +#line 1157 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4457,41 +4478,41 @@ yyreduce: } break; - case 130: -/* Line 1792 of yacc.c */ -#line 1165 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); -} - break; - case 131: /* Line 1792 of yacc.c */ -#line 1169 "dtool/src/cppparser/cppBison.yxx" +#line 1166 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } break; case 132: /* Line 1792 of yacc.c */ -#line 1173 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); -} - break; - - case 133: -/* Line 1792 of yacc.c */ -#line 1177 "dtool/src/cppparser/cppBison.yxx" +#line 1170 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } break; + case 133: +/* Line 1792 of yacc.c */ +#line 1174 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); +} + break; + case 134: /* Line 1792 of yacc.c */ -#line 1181 "dtool/src/cppparser/cppBison.yxx" +#line 1178 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); +} + break; + + case 135: +/* Line 1792 of yacc.c */ +#line 1182 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); inst->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4499,9 +4520,9 @@ yyreduce: } break; - case 135: + case 136: /* Line 1792 of yacc.c */ -#line 1187 "dtool/src/cppparser/cppBison.yxx" +#line 1188 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4510,43 +4531,43 @@ yyreduce: } break; - case 136: + case 137: /* Line 1792 of yacc.c */ -#line 1197 "dtool/src/cppparser/cppBison.yxx" +#line 1198 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 137: + case 138: /* Line 1792 of yacc.c */ -#line 1201 "dtool/src/cppparser/cppBison.yxx" +#line 1202 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } break; - case 138: + case 139: /* Line 1792 of yacc.c */ -#line 1206 "dtool/src/cppparser/cppBison.yxx" +#line 1207 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.type) != NULL); } break; - case 139: + case 140: /* Line 1792 of yacc.c */ -#line 1215 "dtool/src/cppparser/cppBison.yxx" +#line 1216 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; - case 140: + case 141: /* Line 1792 of yacc.c */ -#line 1219 "dtool/src/cppparser/cppBison.yxx" +#line 1220 "dtool/src/cppparser/cppBison.yxx" { // For an operator function. We implement this simply by building a // ficticious name for the function; in other respects it's just @@ -4562,89 +4583,98 @@ yyreduce: } break; - case 141: + case 142: /* Line 1792 of yacc.c */ -#line 1233 "dtool/src/cppparser/cppBison.yxx" +#line 1234 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 142: + case 143: /* Line 1792 of yacc.c */ -#line 1238 "dtool/src/cppparser/cppBison.yxx" +#line 1239 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 144: +/* Line 1792 of yacc.c */ +#line 1244 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 143: + case 145: /* Line 1792 of yacc.c */ -#line 1243 "dtool/src/cppparser/cppBison.yxx" +#line 1249 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 144: + case 146: /* Line 1792 of yacc.c */ -#line 1248 "dtool/src/cppparser/cppBison.yxx" +#line 1254 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 145: + case 147: /* Line 1792 of yacc.c */ -#line 1253 "dtool/src/cppparser/cppBison.yxx" +#line 1259 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 146: + case 148: /* Line 1792 of yacc.c */ -#line 1258 "dtool/src/cppparser/cppBison.yxx" +#line 1264 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 147: + case 149: /* Line 1792 of yacc.c */ -#line 1263 "dtool/src/cppparser/cppBison.yxx" +#line 1269 "dtool/src/cppparser/cppBison.yxx" { // bitfield definition. We ignore the bitfield for now. (yyval.u.inst_ident) = (yyvsp[(1) - (3)].u.inst_ident); } break; - case 148: + case 150: /* Line 1792 of yacc.c */ -#line 1268 "dtool/src/cppparser/cppBison.yxx" +#line 1274 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 149: + case 151: /* Line 1792 of yacc.c */ -#line 1273 "dtool/src/cppparser/cppBison.yxx" +#line 1279 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 150: + case 152: /* Line 1792 of yacc.c */ -#line 1277 "dtool/src/cppparser/cppBison.yxx" +#line 1283 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); (yyval.u.inst_ident) = (yyvsp[(1) - (6)].u.inst_ident); @@ -4660,86 +4690,70 @@ yyreduce: } break; - case 151: -/* Line 1792 of yacc.c */ -#line 1295 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; -} - break; - - case 152: -/* Line 1792 of yacc.c */ -#line 1299 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; - (yyval.u.param_list)->_includes_ellipsis = true; -} - break; - case 153: /* Line 1792 of yacc.c */ -#line 1304 "dtool/src/cppparser/cppBison.yxx" +#line 1301 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; } break; case 154: /* Line 1792 of yacc.c */ -#line 1308 "dtool/src/cppparser/cppBison.yxx" +#line 1305 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_includes_ellipsis = true; } break; case 155: /* Line 1792 of yacc.c */ -#line 1313 "dtool/src/cppparser/cppBison.yxx" +#line 1310 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); +} + break; + + case 156: +/* Line 1792 of yacc.c */ +#line 1314 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); + (yyval.u.param_list)->_includes_ellipsis = true; +} + break; + + case 157: +/* Line 1792 of yacc.c */ +#line 1319 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } break; - case 156: + case 158: /* Line 1792 of yacc.c */ -#line 1321 "dtool/src/cppparser/cppBison.yxx" +#line 1327 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[(1) - (1)].u.instance)); } break; - case 157: + case 159: /* Line 1792 of yacc.c */ -#line 1326 "dtool/src/cppparser/cppBison.yxx" +#line 1332 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[(3) - (3)].u.instance)); } break; - case 158: -/* Line 1792 of yacc.c */ -#line 1334 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 159: -/* Line 1792 of yacc.c */ -#line 1338 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); -} - break; - case 160: /* Line 1792 of yacc.c */ -#line 1345 "dtool/src/cppparser/cppBison.yxx" +#line 1340 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4747,7 +4761,7 @@ yyreduce: case 161: /* Line 1792 of yacc.c */ -#line 1349 "dtool/src/cppparser/cppBison.yxx" +#line 1344 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } @@ -4755,7 +4769,7 @@ yyreduce: case 162: /* Line 1792 of yacc.c */ -#line 1356 "dtool/src/cppparser/cppBison.yxx" +#line 1351 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4763,15 +4777,15 @@ yyreduce: case 163: /* Line 1792 of yacc.c */ -#line 1360 "dtool/src/cppparser/cppBison.yxx" +#line 1355 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (CPPExpression *)NULL; + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } break; case 164: /* Line 1792 of yacc.c */ -#line 1364 "dtool/src/cppparser/cppBison.yxx" +#line 1362 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4779,39 +4793,55 @@ yyreduce: case 165: /* Line 1792 of yacc.c */ -#line 1368 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 166: -/* Line 1792 of yacc.c */ -#line 1372 "dtool/src/cppparser/cppBison.yxx" +#line 1366 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 170: + case 166: /* Line 1792 of yacc.c */ -#line 1385 "dtool/src/cppparser/cppBison.yxx" +#line 1370 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 167: +/* Line 1792 of yacc.c */ +#line 1374 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 168: +/* Line 1792 of yacc.c */ +#line 1378 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 172: +/* Line 1792 of yacc.c */ +#line 1391 "dtool/src/cppparser/cppBison.yxx" { } break; - case 174: + case 176: /* Line 1792 of yacc.c */ -#line 1394 "dtool/src/cppparser/cppBison.yxx" +#line 1400 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); } break; - case 175: + case 177: /* Line 1792 of yacc.c */ -#line 1399 "dtool/src/cppparser/cppBison.yxx" +#line 1405 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (3)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (3)])); CPPType *type = @@ -4821,9 +4851,9 @@ yyreduce: } break; - case 176: + case 178: /* Line 1792 of yacc.c */ -#line 1407 "dtool/src/cppparser/cppBison.yxx" +#line 1413 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4831,9 +4861,9 @@ yyreduce: } break; - case 177: + case 179: /* Line 1792 of yacc.c */ -#line 1413 "dtool/src/cppparser/cppBison.yxx" +#line 1419 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter)); @@ -4842,165 +4872,183 @@ yyreduce: } break; - case 178: -/* Line 1792 of yacc.c */ -#line 1423 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 179: -/* Line 1792 of yacc.c */ -#line 1427 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - case 180: /* Line 1792 of yacc.c */ -#line 1431 "dtool/src/cppparser/cppBison.yxx" +#line 1429 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; case 181: /* Line 1792 of yacc.c */ -#line 1435 "dtool/src/cppparser/cppBison.yxx" +#line 1433 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_const); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 182: /* Line 1792 of yacc.c */ -#line 1440 "dtool/src/cppparser/cppBison.yxx" +#line 1437 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_pointer); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 183: /* Line 1792 of yacc.c */ -#line 1445 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_reference); -} - break; - - case 184: -/* Line 1792 of yacc.c */ -#line 1450 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); -} - break; - - case 185: -/* Line 1792 of yacc.c */ -#line 1455 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); - (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); -} - break; - - case 186: -/* Line 1792 of yacc.c */ -#line 1460 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); - (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); -} - break; - - case 187: -/* Line 1792 of yacc.c */ -#line 1468 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 188: -/* Line 1792 of yacc.c */ -#line 1472 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 189: -/* Line 1792 of yacc.c */ -#line 1476 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 190: -/* Line 1792 of yacc.c */ -#line 1480 "dtool/src/cppparser/cppBison.yxx" +#line 1441 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 191: + case 184: /* Line 1792 of yacc.c */ -#line 1485 "dtool/src/cppparser/cppBison.yxx" +#line 1446 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 185: +/* Line 1792 of yacc.c */ +#line 1451 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 192: + case 186: /* Line 1792 of yacc.c */ -#line 1490 "dtool/src/cppparser/cppBison.yxx" +#line 1456 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 193: + case 187: /* Line 1792 of yacc.c */ -#line 1495 "dtool/src/cppparser/cppBison.yxx" +#line 1461 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 194: + case 188: /* Line 1792 of yacc.c */ -#line 1500 "dtool/src/cppparser/cppBison.yxx" +#line 1466 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 195: + case 189: /* Line 1792 of yacc.c */ -#line 1505 "dtool/src/cppparser/cppBison.yxx" +#line 1471 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; + case 190: +/* Line 1792 of yacc.c */ +#line 1479 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); +} + break; + + case 191: +/* Line 1792 of yacc.c */ +#line 1483 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 192: +/* Line 1792 of yacc.c */ +#line 1487 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 193: +/* Line 1792 of yacc.c */ +#line 1491 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_const); +} + break; + + case 194: +/* Line 1792 of yacc.c */ +#line 1496 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 195: +/* Line 1792 of yacc.c */ +#line 1501 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_pointer); +} + break; + case 196: /* Line 1792 of yacc.c */ -#line 1510 "dtool/src/cppparser/cppBison.yxx" +#line 1506 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_reference); +} + break; + + case 197: +/* Line 1792 of yacc.c */ +#line 1511 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); +} + break; + + case 198: +/* Line 1792 of yacc.c */ +#line 1516 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); + (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); +} + break; + + case 199: +/* Line 1792 of yacc.c */ +#line 1521 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); + (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); +} + break; + + case 200: +/* Line 1792 of yacc.c */ +#line 1526 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5008,80 +5056,89 @@ yyreduce: } break; - case 197: + case 201: /* Line 1792 of yacc.c */ -#line 1516 "dtool/src/cppparser/cppBison.yxx" +#line 1532 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 198: + case 202: /* Line 1792 of yacc.c */ -#line 1524 "dtool/src/cppparser/cppBison.yxx" +#line 1540 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 199: + case 203: /* Line 1792 of yacc.c */ -#line 1528 "dtool/src/cppparser/cppBison.yxx" +#line 1544 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 200: + case 204: /* Line 1792 of yacc.c */ -#line 1533 "dtool/src/cppparser/cppBison.yxx" +#line 1549 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 205: +/* Line 1792 of yacc.c */ +#line 1554 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 201: + case 206: /* Line 1792 of yacc.c */ -#line 1538 "dtool/src/cppparser/cppBison.yxx" +#line 1559 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 202: + case 207: /* Line 1792 of yacc.c */ -#line 1543 "dtool/src/cppparser/cppBison.yxx" +#line 1564 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 203: + case 208: /* Line 1792 of yacc.c */ -#line 1548 "dtool/src/cppparser/cppBison.yxx" +#line 1569 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 204: + case 209: /* Line 1792 of yacc.c */ -#line 1553 "dtool/src/cppparser/cppBison.yxx" +#line 1574 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 205: + case 210: /* Line 1792 of yacc.c */ -#line 1558 "dtool/src/cppparser/cppBison.yxx" +#line 1579 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5089,52 +5146,11 @@ yyreduce: } break; - case 206: -/* Line 1792 of yacc.c */ -#line 1567 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); -} - break; - - case 207: -/* Line 1792 of yacc.c */ -#line 1571 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert((yyval.u.type) != NULL); -} - break; - - case 208: -/* Line 1792 of yacc.c */ -#line 1576 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - - case 209: -/* Line 1792 of yacc.c */ -#line 1580 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - - case 210: -/* Line 1792 of yacc.c */ -#line 1584 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - case 211: /* Line 1792 of yacc.c */ #line 1588 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; @@ -5142,6 +5158,47 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1592 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + assert((yyval.u.type) != NULL); +} + break; + + case 213: +/* Line 1792 of yacc.c */ +#line 1597 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); +} + break; + + case 214: +/* Line 1792 of yacc.c */ +#line 1601 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); +} + break; + + case 215: +/* Line 1792 of yacc.c */ +#line 1605 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); +} + break; + + case 216: +/* Line 1792 of yacc.c */ +#line 1609 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); +} + break; + + case 217: +/* Line 1792 of yacc.c */ +#line 1613 "dtool/src/cppparser/cppBison.yxx" + { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { (yyval.u.type) = type; @@ -5158,9 +5215,9 @@ yyreduce: } break; - case 213: + case 218: /* Line 1792 of yacc.c */ -#line 1608 "dtool/src/cppparser/cppBison.yxx" +#line 1629 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5178,52 +5235,11 @@ yyreduce: } break; - case 214: -/* Line 1792 of yacc.c */ -#line 1627 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); -} - break; - - case 215: -/* Line 1792 of yacc.c */ -#line 1631 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert((yyval.u.decl) != NULL); -} - break; - - case 216: -/* Line 1792 of yacc.c */ -#line 1636 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - - case 217: -/* Line 1792 of yacc.c */ -#line 1640 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - - case 218: -/* Line 1792 of yacc.c */ -#line 1644 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); -} - break; - case 219: /* Line 1792 of yacc.c */ #line 1648 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; @@ -5231,6 +5247,47 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1652 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + assert((yyval.u.decl) != NULL); +} + break; + + case 221: +/* Line 1792 of yacc.c */ +#line 1657 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); +} + break; + + case 222: +/* Line 1792 of yacc.c */ +#line 1661 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); +} + break; + + case 223: +/* Line 1792 of yacc.c */ +#line 1665 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); +} + break; + + case 224: +/* Line 1792 of yacc.c */ +#line 1669 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); +} + break; + + case 225: +/* Line 1792 of yacc.c */ +#line 1673 "dtool/src/cppparser/cppBison.yxx" + { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { (yyval.u.decl) = type; @@ -5247,9 +5304,9 @@ yyreduce: } break; - case 221: + case 226: /* Line 1792 of yacc.c */ -#line 1668 "dtool/src/cppparser/cppBison.yxx" +#line 1689 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5267,9 +5324,9 @@ yyreduce: } break; - case 222: + case 227: /* Line 1792 of yacc.c */ -#line 1684 "dtool/src/cppparser/cppBison.yxx" +#line 1705 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5289,34 +5346,34 @@ yyreduce: } break; - case 223: + case 228: /* Line 1792 of yacc.c */ -#line 1705 "dtool/src/cppparser/cppBison.yxx" +#line 1726 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 224: + case 229: /* Line 1792 of yacc.c */ -#line 1709 "dtool/src/cppparser/cppBison.yxx" +#line 1730 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.type) != NULL); } break; - case 225: + case 230: /* Line 1792 of yacc.c */ -#line 1714 "dtool/src/cppparser/cppBison.yxx" +#line 1735 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 226: + case 231: /* Line 1792 of yacc.c */ -#line 1718 "dtool/src/cppparser/cppBison.yxx" +#line 1739 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5334,9 +5391,9 @@ yyreduce: } break; - case 227: + case 232: /* Line 1792 of yacc.c */ -#line 1734 "dtool/src/cppparser/cppBison.yxx" +#line 1755 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5354,9 +5411,9 @@ yyreduce: } break; - case 228: + case 233: /* Line 1792 of yacc.c */ -#line 1753 "dtool/src/cppparser/cppBison.yxx" +#line 1774 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5364,9 +5421,9 @@ yyreduce: } break; - case 229: + case 234: /* Line 1792 of yacc.c */ -#line 1759 "dtool/src/cppparser/cppBison.yxx" +#line 1780 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5375,9 +5432,9 @@ yyreduce: } break; - case 230: + case 235: /* Line 1792 of yacc.c */ -#line 1769 "dtool/src/cppparser/cppBison.yxx" +#line 1790 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5393,9 +5450,9 @@ yyreduce: } break; - case 231: + case 236: /* Line 1792 of yacc.c */ -#line 1783 "dtool/src/cppparser/cppBison.yxx" +#line 1804 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5404,9 +5461,9 @@ yyreduce: } break; - case 232: + case 237: /* Line 1792 of yacc.c */ -#line 1793 "dtool/src/cppparser/cppBison.yxx" +#line 1814 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5428,9 +5485,9 @@ yyreduce: } break; - case 233: + case 238: /* Line 1792 of yacc.c */ -#line 1813 "dtool/src/cppparser/cppBison.yxx" +#line 1834 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5439,138 +5496,138 @@ yyreduce: } break; - case 238: + case 243: /* Line 1792 of yacc.c */ -#line 1833 "dtool/src/cppparser/cppBison.yxx" +#line 1854 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } break; - case 239: + case 244: /* Line 1792 of yacc.c */ -#line 1837 "dtool/src/cppparser/cppBison.yxx" +#line 1858 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } break; - case 240: + case 245: /* Line 1792 of yacc.c */ -#line 1841 "dtool/src/cppparser/cppBison.yxx" +#line 1862 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } break; - case 241: -/* Line 1792 of yacc.c */ -#line 1845 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 242: -/* Line 1792 of yacc.c */ -#line 1849 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); -} - break; - - case 243: -/* Line 1792 of yacc.c */ -#line 1853 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); -} - break; - - case 244: -/* Line 1792 of yacc.c */ -#line 1857 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 245: -/* Line 1792 of yacc.c */ -#line 1861 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); -} - break; - case 246: /* Line 1792 of yacc.c */ -#line 1865 "dtool/src/cppparser/cppBison.yxx" +#line 1866 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } break; case 247: /* Line 1792 of yacc.c */ -#line 1872 "dtool/src/cppparser/cppBison.yxx" +#line 1870 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); +} + break; + + case 248: +/* Line 1792 of yacc.c */ +#line 1874 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); +} + break; + + case 249: +/* Line 1792 of yacc.c */ +#line 1878 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); +} + break; + + case 250: +/* Line 1792 of yacc.c */ +#line 1882 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); +} + break; + + case 251: +/* Line 1792 of yacc.c */ +#line 1886 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); +} + break; + + case 252: +/* Line 1792 of yacc.c */ +#line 1893 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.enum_type) = current_enum; current_enum = NULL; } break; - case 248: + case 253: /* Line 1792 of yacc.c */ -#line 1880 "dtool/src/cppparser/cppBison.yxx" +#line 1901 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } break; - case 249: + case 254: /* Line 1792 of yacc.c */ -#line 1884 "dtool/src/cppparser/cppBison.yxx" +#line 1905 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } break; - case 250: + case 255: /* Line 1792 of yacc.c */ -#line 1888 "dtool/src/cppparser/cppBison.yxx" +#line 1909 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } break; - case 251: + case 256: /* Line 1792 of yacc.c */ -#line 1892 "dtool/src/cppparser/cppBison.yxx" +#line 1913 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); } break; - case 252: + case 257: /* Line 1792 of yacc.c */ -#line 1899 "dtool/src/cppparser/cppBison.yxx" +#line 1920 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 253: + case 258: /* Line 1792 of yacc.c */ -#line 1903 "dtool/src/cppparser/cppBison.yxx" +#line 1924 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } break; - case 255: + case 260: /* Line 1792 of yacc.c */ -#line 1911 "dtool/src/cppparser/cppBison.yxx" +#line 1932 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); @@ -5578,9 +5635,9 @@ yyreduce: } break; - case 256: + case 261: /* Line 1792 of yacc.c */ -#line 1917 "dtool/src/cppparser/cppBison.yxx" +#line 1938 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5588,9 +5645,9 @@ yyreduce: } break; - case 258: + case 263: /* Line 1792 of yacc.c */ -#line 1926 "dtool/src/cppparser/cppBison.yxx" +#line 1947 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5598,9 +5655,9 @@ yyreduce: } break; - case 259: + case 264: /* Line 1792 of yacc.c */ -#line 1932 "dtool/src/cppparser/cppBison.yxx" +#line 1953 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5608,41 +5665,41 @@ yyreduce: } break; - case 260: + case 265: /* Line 1792 of yacc.c */ -#line 1941 "dtool/src/cppparser/cppBison.yxx" +#line 1962 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } break; - case 261: + case 266: /* Line 1792 of yacc.c */ -#line 1948 "dtool/src/cppparser/cppBison.yxx" +#line 1969 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_class; } break; - case 262: + case 267: /* Line 1792 of yacc.c */ -#line 1952 "dtool/src/cppparser/cppBison.yxx" +#line 1973 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } break; - case 263: + case 268: /* Line 1792 of yacc.c */ -#line 1956 "dtool/src/cppparser/cppBison.yxx" +#line 1977 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_union; } break; - case 264: + case 269: /* Line 1792 of yacc.c */ -#line 1963 "dtool/src/cppparser/cppBison.yxx" +#line 1984 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -5662,80 +5719,39 @@ yyreduce: } break; - case 265: + case 270: /* Line 1792 of yacc.c */ -#line 1981 "dtool/src/cppparser/cppBison.yxx" +#line 2002 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 267: -/* Line 1792 of yacc.c */ -#line 1989 "dtool/src/cppparser/cppBison.yxx" - { - CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); - current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); - current_scope->add_using(using_decl, global_scope, current_lexer); -} - break; - - case 268: -/* Line 1792 of yacc.c */ -#line 1995 "dtool/src/cppparser/cppBison.yxx" - { - CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); - current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); - current_scope->add_using(using_decl, global_scope, current_lexer); -} - break; - case 272: /* Line 1792 of yacc.c */ #line 2010 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); + CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); + current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); + current_scope->add_using(using_decl, global_scope, current_lexer); } break; case 273: /* Line 1792 of yacc.c */ -#line 2014 "dtool/src/cppparser/cppBison.yxx" +#line 2016 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); -} - break; - - case 274: -/* Line 1792 of yacc.c */ -#line 2018 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); -} - break; - - case 275: -/* Line 1792 of yacc.c */ -#line 2022 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); -} - break; - - case 276: -/* Line 1792 of yacc.c */ -#line 2026 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); + CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); + current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); + current_scope->add_using(using_decl, global_scope, current_lexer); } break; case 277: /* Line 1792 of yacc.c */ -#line 2030 "dtool/src/cppparser/cppBison.yxx" +#line 2031 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, - CPPSimpleType::F_short); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; @@ -5743,58 +5759,99 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2035 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, - CPPSimpleType::F_long); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; case 279: /* Line 1792 of yacc.c */ -#line 2040 "dtool/src/cppparser/cppBison.yxx" +#line 2039 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); +} + break; + + case 280: +/* Line 1792 of yacc.c */ +#line 2043 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); +} + break; + + case 281: +/* Line 1792 of yacc.c */ +#line 2047 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); +} + break; + + case 282: +/* Line 1792 of yacc.c */ +#line 2051 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, + CPPSimpleType::F_short); +} + break; + + case 283: +/* Line 1792 of yacc.c */ +#line 2056 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, + CPPSimpleType::F_long); +} + break; + + case 284: +/* Line 1792 of yacc.c */ +#line 2061 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 280: + case 285: /* Line 1792 of yacc.c */ -#line 2045 "dtool/src/cppparser/cppBison.yxx" +#line 2066 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 281: + case 286: /* Line 1792 of yacc.c */ -#line 2050 "dtool/src/cppparser/cppBison.yxx" +#line 2071 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 282: + case 287: /* Line 1792 of yacc.c */ -#line 2055 "dtool/src/cppparser/cppBison.yxx" +#line 2076 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 283: + case 288: /* Line 1792 of yacc.c */ -#line 2059 "dtool/src/cppparser/cppBison.yxx" +#line 2080 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 284: + case 289: /* Line 1792 of yacc.c */ -#line 2064 "dtool/src/cppparser/cppBison.yxx" +#line 2085 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -5805,205 +5862,165 @@ yyreduce: } break; - case 285: + case 290: /* Line 1792 of yacc.c */ -#line 2073 "dtool/src/cppparser/cppBison.yxx" +#line 2094 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 286: + case 291: /* Line 1792 of yacc.c */ -#line 2078 "dtool/src/cppparser/cppBison.yxx" +#line 2099 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 287: + case 292: /* Line 1792 of yacc.c */ -#line 2086 "dtool/src/cppparser/cppBison.yxx" +#line 2107 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 288: + case 293: /* Line 1792 of yacc.c */ -#line 2090 "dtool/src/cppparser/cppBison.yxx" +#line 2111 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; - case 289: + case 294: /* Line 1792 of yacc.c */ -#line 2095 "dtool/src/cppparser/cppBison.yxx" +#line 2116 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; - case 290: + case 295: /* Line 1792 of yacc.c */ -#line 2099 "dtool/src/cppparser/cppBison.yxx" +#line 2120 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_longlong); } break; - case 291: + case 296: /* Line 1792 of yacc.c */ -#line 2104 "dtool/src/cppparser/cppBison.yxx" +#line 2125 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, CPPSimpleType::F_long); } break; - case 292: + case 297: /* Line 1792 of yacc.c */ -#line 2112 "dtool/src/cppparser/cppBison.yxx" +#line 2133 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); } break; - case 293: + case 298: /* Line 1792 of yacc.c */ -#line 2121 "dtool/src/cppparser/cppBison.yxx" +#line 2142 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = false; } break; - case 294: + case 299: /* Line 1792 of yacc.c */ -#line 2125 "dtool/src/cppparser/cppBison.yxx" +#line 2146 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = true; } break; - case 297: -/* Line 1792 of yacc.c */ -#line 2137 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 298: -/* Line 1792 of yacc.c */ -#line 2140 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 299: -/* Line 1792 of yacc.c */ -#line 2143 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 300: -/* Line 1792 of yacc.c */ -#line 2146 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 301: -/* Line 1792 of yacc.c */ -#line 2149 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - case 302: /* Line 1792 of yacc.c */ -#line 2152 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 303: -/* Line 1792 of yacc.c */ -#line 2155 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 304: -/* Line 1792 of yacc.c */ #line 2158 "dtool/src/cppparser/cppBison.yxx" { } break; - case 379: + case 303: +/* Line 1792 of yacc.c */ +#line 2161 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 304: +/* Line 1792 of yacc.c */ +#line 2164 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 305: +/* Line 1792 of yacc.c */ +#line 2167 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 306: +/* Line 1792 of yacc.c */ +#line 2170 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 307: +/* Line 1792 of yacc.c */ +#line 2173 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 308: +/* Line 1792 of yacc.c */ +#line 2176 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 309: /* Line 1792 of yacc.c */ #line 2179 "dtool/src/cppparser/cppBison.yxx" { } break; - case 403: + case 384: /* Line 1792 of yacc.c */ -#line 2188 "dtool/src/cppparser/cppBison.yxx" +#line 2200 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 404: -/* Line 1792 of yacc.c */ -#line 2192 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 405: -/* Line 1792 of yacc.c */ -#line 2199 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 406: -/* Line 1792 of yacc.c */ -#line 2203 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 407: -/* Line 1792 of yacc.c */ -#line 2210 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 408: /* Line 1792 of yacc.c */ -#line 2214 "dtool/src/cppparser/cppBison.yxx" +#line 2209 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 409: /* Line 1792 of yacc.c */ -#line 2221 "dtool/src/cppparser/cppBison.yxx" +#line 2213 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6011,55 +6028,95 @@ yyreduce: case 410: /* Line 1792 of yacc.c */ -#line 2225 "dtool/src/cppparser/cppBison.yxx" +#line 2220 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 411: /* Line 1792 of yacc.c */ -#line 2229 "dtool/src/cppparser/cppBison.yxx" +#line 2224 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 412: /* Line 1792 of yacc.c */ -#line 2233 "dtool/src/cppparser/cppBison.yxx" +#line 2231 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 413: /* Line 1792 of yacc.c */ -#line 2237 "dtool/src/cppparser/cppBison.yxx" +#line 2235 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 414: /* Line 1792 of yacc.c */ -#line 2241 "dtool/src/cppparser/cppBison.yxx" +#line 2242 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 415: /* Line 1792 of yacc.c */ -#line 2245 "dtool/src/cppparser/cppBison.yxx" +#line 2246 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; case 416: /* Line 1792 of yacc.c */ -#line 2249 "dtool/src/cppparser/cppBison.yxx" +#line 2250 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 417: +/* Line 1792 of yacc.c */ +#line 2254 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 418: +/* Line 1792 of yacc.c */ +#line 2258 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 419: +/* Line 1792 of yacc.c */ +#line 2262 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 420: +/* Line 1792 of yacc.c */ +#line 2266 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 421: +/* Line 1792 of yacc.c */ +#line 2270 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6073,241 +6130,241 @@ yyreduce: } break; - case 417: + case 422: /* Line 1792 of yacc.c */ -#line 2261 "dtool/src/cppparser/cppBison.yxx" +#line 2282 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; - case 418: + case 423: /* Line 1792 of yacc.c */ -#line 2265 "dtool/src/cppparser/cppBison.yxx" +#line 2286 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 419: + case 424: /* Line 1792 of yacc.c */ -#line 2269 "dtool/src/cppparser/cppBison.yxx" +#line 2290 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 420: + case 425: /* Line 1792 of yacc.c */ -#line 2273 "dtool/src/cppparser/cppBison.yxx" +#line 2294 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 421: + case 426: /* Line 1792 of yacc.c */ -#line 2277 "dtool/src/cppparser/cppBison.yxx" +#line 2298 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 422: + case 427: /* Line 1792 of yacc.c */ -#line 2281 "dtool/src/cppparser/cppBison.yxx" +#line 2302 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 423: + case 428: /* Line 1792 of yacc.c */ -#line 2285 "dtool/src/cppparser/cppBison.yxx" +#line 2306 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 424: + case 429: /* Line 1792 of yacc.c */ -#line 2289 "dtool/src/cppparser/cppBison.yxx" +#line 2310 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 425: + case 430: /* Line 1792 of yacc.c */ -#line 2293 "dtool/src/cppparser/cppBison.yxx" +#line 2314 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 426: + case 431: /* Line 1792 of yacc.c */ -#line 2297 "dtool/src/cppparser/cppBison.yxx" +#line 2318 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 427: + case 432: /* Line 1792 of yacc.c */ -#line 2301 "dtool/src/cppparser/cppBison.yxx" +#line 2322 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 428: + case 433: /* Line 1792 of yacc.c */ -#line 2305 "dtool/src/cppparser/cppBison.yxx" +#line 2326 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 429: + case 434: /* Line 1792 of yacc.c */ -#line 2309 "dtool/src/cppparser/cppBison.yxx" +#line 2330 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 430: + case 435: /* Line 1792 of yacc.c */ -#line 2313 "dtool/src/cppparser/cppBison.yxx" +#line 2334 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 431: + case 436: /* Line 1792 of yacc.c */ -#line 2317 "dtool/src/cppparser/cppBison.yxx" +#line 2338 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 432: + case 437: /* Line 1792 of yacc.c */ -#line 2321 "dtool/src/cppparser/cppBison.yxx" +#line 2342 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 433: + case 438: /* Line 1792 of yacc.c */ -#line 2325 "dtool/src/cppparser/cppBison.yxx" +#line 2346 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 434: + case 439: /* Line 1792 of yacc.c */ -#line 2329 "dtool/src/cppparser/cppBison.yxx" +#line 2350 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 435: + case 440: /* Line 1792 of yacc.c */ -#line 2333 "dtool/src/cppparser/cppBison.yxx" +#line 2354 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 436: + case 441: /* Line 1792 of yacc.c */ -#line 2337 "dtool/src/cppparser/cppBison.yxx" +#line 2358 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 437: + case 442: /* Line 1792 of yacc.c */ -#line 2341 "dtool/src/cppparser/cppBison.yxx" +#line 2362 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 438: + case 443: /* Line 1792 of yacc.c */ -#line 2345 "dtool/src/cppparser/cppBison.yxx" +#line 2366 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 439: + case 444: /* Line 1792 of yacc.c */ -#line 2349 "dtool/src/cppparser/cppBison.yxx" +#line 2370 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 440: + case 445: /* Line 1792 of yacc.c */ -#line 2353 "dtool/src/cppparser/cppBison.yxx" +#line 2374 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 441: + case 446: /* Line 1792 of yacc.c */ -#line 2357 "dtool/src/cppparser/cppBison.yxx" +#line 2378 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 442: + case 447: /* Line 1792 of yacc.c */ -#line 2365 "dtool/src/cppparser/cppBison.yxx" +#line 2386 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 443: + case 448: /* Line 1792 of yacc.c */ -#line 2369 "dtool/src/cppparser/cppBison.yxx" +#line 2390 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; - case 444: + case 449: /* Line 1792 of yacc.c */ -#line 2373 "dtool/src/cppparser/cppBison.yxx" +#line 2394 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; - case 445: + case 450: /* Line 1792 of yacc.c */ -#line 2377 "dtool/src/cppparser/cppBison.yxx" +#line 2398 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; - case 446: + case 451: /* Line 1792 of yacc.c */ -#line 2381 "dtool/src/cppparser/cppBison.yxx" +#line 2402 "dtool/src/cppparser/cppBison.yxx" { // A constructor call. CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -6316,9 +6373,9 @@ yyreduce: } break; - case 447: + case 452: /* Line 1792 of yacc.c */ -#line 2388 "dtool/src/cppparser/cppBison.yxx" +#line 2409 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6326,9 +6383,9 @@ yyreduce: } break; - case 448: + case 453: /* Line 1792 of yacc.c */ -#line 2394 "dtool/src/cppparser/cppBison.yxx" +#line 2415 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6336,9 +6393,9 @@ yyreduce: } break; - case 449: + case 454: /* Line 1792 of yacc.c */ -#line 2400 "dtool/src/cppparser/cppBison.yxx" +#line 2421 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6346,9 +6403,9 @@ yyreduce: } break; - case 450: + case 455: /* Line 1792 of yacc.c */ -#line 2406 "dtool/src/cppparser/cppBison.yxx" +#line 2427 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6356,9 +6413,9 @@ yyreduce: } break; - case 451: + case 456: /* Line 1792 of yacc.c */ -#line 2412 "dtool/src/cppparser/cppBison.yxx" +#line 2433 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6366,9 +6423,9 @@ yyreduce: } break; - case 452: + case 457: /* Line 1792 of yacc.c */ -#line 2418 "dtool/src/cppparser/cppBison.yxx" +#line 2439 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6376,9 +6433,9 @@ yyreduce: } break; - case 453: + case 458: /* Line 1792 of yacc.c */ -#line 2424 "dtool/src/cppparser/cppBison.yxx" +#line 2445 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6387,9 +6444,9 @@ yyreduce: } break; - case 454: + case 459: /* Line 1792 of yacc.c */ -#line 2431 "dtool/src/cppparser/cppBison.yxx" +#line 2452 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6398,9 +6455,9 @@ yyreduce: } break; - case 455: + case 460: /* Line 1792 of yacc.c */ -#line 2438 "dtool/src/cppparser/cppBison.yxx" +#line 2459 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6409,9 +6466,9 @@ yyreduce: } break; - case 456: + case 461: /* Line 1792 of yacc.c */ -#line 2445 "dtool/src/cppparser/cppBison.yxx" +#line 2466 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6420,9 +6477,9 @@ yyreduce: } break; - case 457: + case 462: /* Line 1792 of yacc.c */ -#line 2452 "dtool/src/cppparser/cppBison.yxx" +#line 2473 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6430,9 +6487,9 @@ yyreduce: } break; - case 458: + case 463: /* Line 1792 of yacc.c */ -#line 2458 "dtool/src/cppparser/cppBison.yxx" +#line 2479 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6440,409 +6497,49 @@ yyreduce: } break; - case 459: -/* Line 1792 of yacc.c */ -#line 2464 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 460: -/* Line 1792 of yacc.c */ -#line 2468 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); -} - break; - - case 461: -/* Line 1792 of yacc.c */ -#line 2472 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); -} - break; - - case 462: -/* Line 1792 of yacc.c */ -#line 2476 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 463: -/* Line 1792 of yacc.c */ -#line 2480 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - case 464: /* Line 1792 of yacc.c */ -#line 2484 "dtool/src/cppparser/cppBison.yxx" +#line 2485 "dtool/src/cppparser/cppBison.yxx" { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 465: /* Line 1792 of yacc.c */ -#line 2496 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 466: -/* Line 1792 of yacc.c */ -#line 2500 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 467: -/* Line 1792 of yacc.c */ -#line 2504 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 468: -/* Line 1792 of yacc.c */ -#line 2508 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 469: -/* Line 1792 of yacc.c */ -#line 2512 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 470: -/* Line 1792 of yacc.c */ -#line 2516 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 471: -/* Line 1792 of yacc.c */ -#line 2520 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 472: -/* Line 1792 of yacc.c */ -#line 2524 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 473: -/* Line 1792 of yacc.c */ -#line 2528 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 474: -/* Line 1792 of yacc.c */ -#line 2532 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 475: -/* Line 1792 of yacc.c */ -#line 2536 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 476: -/* Line 1792 of yacc.c */ -#line 2540 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 477: -/* Line 1792 of yacc.c */ -#line 2544 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 478: -/* Line 1792 of yacc.c */ -#line 2548 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 479: -/* Line 1792 of yacc.c */ -#line 2552 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 480: -/* Line 1792 of yacc.c */ -#line 2556 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 481: -/* Line 1792 of yacc.c */ -#line 2560 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 482: -/* Line 1792 of yacc.c */ -#line 2564 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 483: -/* Line 1792 of yacc.c */ -#line 2568 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 484: -/* Line 1792 of yacc.c */ -#line 2572 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 485: -/* Line 1792 of yacc.c */ -#line 2576 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 486: -/* Line 1792 of yacc.c */ -#line 2580 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 487: -/* Line 1792 of yacc.c */ -#line 2584 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 488: -/* Line 1792 of yacc.c */ -#line 2588 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 489: -/* Line 1792 of yacc.c */ -#line 2592 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 490: -/* Line 1792 of yacc.c */ -#line 2596 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 491: -/* Line 1792 of yacc.c */ -#line 2600 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 492: -/* Line 1792 of yacc.c */ -#line 2607 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 493: -/* Line 1792 of yacc.c */ -#line 2611 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(true); -} - break; - - case 494: -/* Line 1792 of yacc.c */ -#line 2615 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(false); -} - break; - - case 495: -/* Line 1792 of yacc.c */ -#line 2619 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 496: -/* Line 1792 of yacc.c */ -#line 2623 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); -} - break; - - case 497: -/* Line 1792 of yacc.c */ -#line 2627 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); -} - break; - - case 498: -/* Line 1792 of yacc.c */ -#line 2631 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); -} - break; - - case 499: -/* Line 1792 of yacc.c */ -#line 2645 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 500: -/* Line 1792 of yacc.c */ -#line 2649 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 501: -/* Line 1792 of yacc.c */ -#line 2653 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 502: -/* Line 1792 of yacc.c */ -#line 2657 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 503: -/* Line 1792 of yacc.c */ -#line 2661 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 504: -/* Line 1792 of yacc.c */ -#line 2665 "dtool/src/cppparser/cppBison.yxx" +#line 2489 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; - case 505: + case 466: /* Line 1792 of yacc.c */ -#line 2669 "dtool/src/cppparser/cppBison.yxx" +#line 2493 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; - case 506: + case 467: /* Line 1792 of yacc.c */ -#line 2673 "dtool/src/cppparser/cppBison.yxx" +#line 2497 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; - case 507: + case 468: /* Line 1792 of yacc.c */ -#line 2677 "dtool/src/cppparser/cppBison.yxx" +#line 2501 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; - case 508: + case 469: /* Line 1792 of yacc.c */ -#line 2681 "dtool/src/cppparser/cppBison.yxx" +#line 2505 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6856,265 +6553,625 @@ yyreduce: } break; - case 509: + case 470: /* Line 1792 of yacc.c */ -#line 2693 "dtool/src/cppparser/cppBison.yxx" +#line 2517 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 471: +/* Line 1792 of yacc.c */ +#line 2521 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 510: + case 472: /* Line 1792 of yacc.c */ -#line 2697 "dtool/src/cppparser/cppBison.yxx" +#line 2525 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 511: + case 473: /* Line 1792 of yacc.c */ -#line 2701 "dtool/src/cppparser/cppBison.yxx" +#line 2529 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 512: + case 474: /* Line 1792 of yacc.c */ -#line 2705 "dtool/src/cppparser/cppBison.yxx" +#line 2533 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 513: + case 475: /* Line 1792 of yacc.c */ -#line 2709 "dtool/src/cppparser/cppBison.yxx" +#line 2537 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 514: + case 476: /* Line 1792 of yacc.c */ -#line 2713 "dtool/src/cppparser/cppBison.yxx" +#line 2541 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 515: + case 477: /* Line 1792 of yacc.c */ -#line 2717 "dtool/src/cppparser/cppBison.yxx" +#line 2545 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 516: + case 478: /* Line 1792 of yacc.c */ -#line 2721 "dtool/src/cppparser/cppBison.yxx" +#line 2549 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 517: + case 479: /* Line 1792 of yacc.c */ -#line 2725 "dtool/src/cppparser/cppBison.yxx" +#line 2553 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 518: + case 480: /* Line 1792 of yacc.c */ -#line 2729 "dtool/src/cppparser/cppBison.yxx" +#line 2557 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 519: + case 481: /* Line 1792 of yacc.c */ -#line 2733 "dtool/src/cppparser/cppBison.yxx" +#line 2561 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 520: + case 482: /* Line 1792 of yacc.c */ -#line 2737 "dtool/src/cppparser/cppBison.yxx" +#line 2565 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 521: + case 483: /* Line 1792 of yacc.c */ -#line 2741 "dtool/src/cppparser/cppBison.yxx" +#line 2569 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 522: + case 484: /* Line 1792 of yacc.c */ -#line 2745 "dtool/src/cppparser/cppBison.yxx" +#line 2573 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 523: + case 485: /* Line 1792 of yacc.c */ -#line 2749 "dtool/src/cppparser/cppBison.yxx" +#line 2577 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 524: + case 486: /* Line 1792 of yacc.c */ -#line 2753 "dtool/src/cppparser/cppBison.yxx" +#line 2581 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 525: + case 487: /* Line 1792 of yacc.c */ -#line 2757 "dtool/src/cppparser/cppBison.yxx" +#line 2585 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 526: + case 488: /* Line 1792 of yacc.c */ -#line 2761 "dtool/src/cppparser/cppBison.yxx" +#line 2589 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 527: + case 489: /* Line 1792 of yacc.c */ -#line 2765 "dtool/src/cppparser/cppBison.yxx" +#line 2593 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 528: + case 490: /* Line 1792 of yacc.c */ -#line 2769 "dtool/src/cppparser/cppBison.yxx" +#line 2597 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 529: + case 491: /* Line 1792 of yacc.c */ -#line 2773 "dtool/src/cppparser/cppBison.yxx" +#line 2601 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 530: + case 492: /* Line 1792 of yacc.c */ -#line 2777 "dtool/src/cppparser/cppBison.yxx" +#line 2605 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 531: + case 493: /* Line 1792 of yacc.c */ -#line 2781 "dtool/src/cppparser/cppBison.yxx" +#line 2609 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 532: + case 494: /* Line 1792 of yacc.c */ -#line 2785 "dtool/src/cppparser/cppBison.yxx" +#line 2613 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 533: + case 495: /* Line 1792 of yacc.c */ -#line 2789 "dtool/src/cppparser/cppBison.yxx" +#line 2617 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 534: + case 496: /* Line 1792 of yacc.c */ -#line 2793 "dtool/src/cppparser/cppBison.yxx" +#line 2621 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 535: + case 497: /* Line 1792 of yacc.c */ -#line 2800 "dtool/src/cppparser/cppBison.yxx" +#line 2628 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 536: + case 498: /* Line 1792 of yacc.c */ -#line 2804 "dtool/src/cppparser/cppBison.yxx" +#line 2632 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(true); } break; - case 537: + case 499: /* Line 1792 of yacc.c */ -#line 2808 "dtool/src/cppparser/cppBison.yxx" +#line 2636 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(false); } break; - case 538: + case 500: /* Line 1792 of yacc.c */ -#line 2812 "dtool/src/cppparser/cppBison.yxx" +#line 2640 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 539: + case 501: /* Line 1792 of yacc.c */ -#line 2816 "dtool/src/cppparser/cppBison.yxx" +#line 2644 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; - case 540: + case 502: /* Line 1792 of yacc.c */ -#line 2820 "dtool/src/cppparser/cppBison.yxx" +#line 2648 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); } break; + case 503: +/* Line 1792 of yacc.c */ +#line 2652 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 504: +/* Line 1792 of yacc.c */ +#line 2666 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 505: +/* Line 1792 of yacc.c */ +#line 2670 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 506: +/* Line 1792 of yacc.c */ +#line 2674 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 507: +/* Line 1792 of yacc.c */ +#line 2678 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 508: +/* Line 1792 of yacc.c */ +#line 2682 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 509: +/* Line 1792 of yacc.c */ +#line 2686 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); +} + break; + + case 510: +/* Line 1792 of yacc.c */ +#line 2690 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); +} + break; + + case 511: +/* Line 1792 of yacc.c */ +#line 2694 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 512: +/* Line 1792 of yacc.c */ +#line 2698 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 513: +/* Line 1792 of yacc.c */ +#line 2702 "dtool/src/cppparser/cppBison.yxx" + { + if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; + } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; + } else { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + } +} + break; + + case 514: +/* Line 1792 of yacc.c */ +#line 2714 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 515: +/* Line 1792 of yacc.c */ +#line 2718 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 516: +/* Line 1792 of yacc.c */ +#line 2722 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 517: +/* Line 1792 of yacc.c */ +#line 2726 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 518: +/* Line 1792 of yacc.c */ +#line 2730 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 519: +/* Line 1792 of yacc.c */ +#line 2734 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 520: +/* Line 1792 of yacc.c */ +#line 2738 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 521: +/* Line 1792 of yacc.c */ +#line 2742 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 522: +/* Line 1792 of yacc.c */ +#line 2746 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 523: +/* Line 1792 of yacc.c */ +#line 2750 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 524: +/* Line 1792 of yacc.c */ +#line 2754 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 525: +/* Line 1792 of yacc.c */ +#line 2758 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 526: +/* Line 1792 of yacc.c */ +#line 2762 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 527: +/* Line 1792 of yacc.c */ +#line 2766 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 528: +/* Line 1792 of yacc.c */ +#line 2770 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 529: +/* Line 1792 of yacc.c */ +#line 2774 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 530: +/* Line 1792 of yacc.c */ +#line 2778 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 531: +/* Line 1792 of yacc.c */ +#line 2782 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 532: +/* Line 1792 of yacc.c */ +#line 2786 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 533: +/* Line 1792 of yacc.c */ +#line 2790 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 534: +/* Line 1792 of yacc.c */ +#line 2794 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 535: +/* Line 1792 of yacc.c */ +#line 2798 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 536: +/* Line 1792 of yacc.c */ +#line 2802 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 537: +/* Line 1792 of yacc.c */ +#line 2806 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 538: +/* Line 1792 of yacc.c */ +#line 2810 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 539: +/* Line 1792 of yacc.c */ +#line 2814 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 540: +/* Line 1792 of yacc.c */ +#line 2821 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + case 541: /* Line 1792 of yacc.c */ -#line 2827 "dtool/src/cppparser/cppBison.yxx" +#line 2825 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(true); +} + break; + + case 542: +/* Line 1792 of yacc.c */ +#line 2829 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(false); +} + break; + + case 543: +/* Line 1792 of yacc.c */ +#line 2833 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + + case 544: +/* Line 1792 of yacc.c */ +#line 2837 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); +} + break; + + case 545: +/* Line 1792 of yacc.c */ +#line 2841 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); +} + break; + + case 546: +/* Line 1792 of yacc.c */ +#line 2848 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7124,9 +7181,9 @@ yyreduce: } break; - case 542: + case 547: /* Line 1792 of yacc.c */ -#line 2835 "dtool/src/cppparser/cppBison.yxx" +#line 2856 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7136,41 +7193,41 @@ yyreduce: } break; - case 543: + case 548: /* Line 1792 of yacc.c */ -#line 2843 "dtool/src/cppparser/cppBison.yxx" +#line 2864 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 544: + case 549: /* Line 1792 of yacc.c */ -#line 2866 "dtool/src/cppparser/cppBison.yxx" +#line 2887 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 545: + case 550: /* Line 1792 of yacc.c */ -#line 2870 "dtool/src/cppparser/cppBison.yxx" +#line 2891 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 546: + case 551: /* Line 1792 of yacc.c */ -#line 2877 "dtool/src/cppparser/cppBison.yxx" +#line 2898 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; - case 547: + case 552: /* Line 1792 of yacc.c */ -#line 2881 "dtool/src/cppparser/cppBison.yxx" +#line 2902 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = (yyvsp[(1) - (2)].str) + (yyvsp[(2) - (2)].str); } @@ -7178,7 +7235,7 @@ yyreduce: /* Line 1792 of yacc.c */ -#line 7182 "built/tmp/cppBison.yxx.c" +#line 7239 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 7fd639d497..c6a704e516 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -1138,6 +1138,7 @@ template_declaration: { pop_scope(); } + | KW_TEMPLATE type_like_declaration ; template_formal_parameters: From 62e8106ef1309fbe01514c1a0e3c52b2b16da52f Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 9 Oct 2015 18:58:13 +0200 Subject: [PATCH 156/200] Interrogate now correctly implements C++11 semantics for closing template parameter lists --- dtool/src/cppparser/cppPreprocessor.cxx | 33 ++++++++++++++++--------- dtool/src/cppparser/cppPreprocessor.h | 2 +- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index f51a2e8b2a..e4098af553 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -189,7 +189,7 @@ CPPPreprocessor() { _noangles = false; _state = S_eof; _paren_nesting = 0; - _angle_bracket_found = false; + _parsing_template_params = false; _unget = '\0'; _last_c = '\0'; _start_of_line = true; @@ -847,6 +847,11 @@ internal_get_next_token() { break; case '>': + if (_parsing_template_params && _paren_nesting <= 0) { + // Don't parse > as greater-than when parsing a template list, as per C++11. + // However, nested >> must be preserved, such as in A<(2>>1)> + break; + } if (next_c == '>' && _last_c == '=') { _last_c = get(); return CPPToken(RSHIFTEQUAL, first_line, first_col, first_file); @@ -934,7 +939,7 @@ internal_get_next_token() { case '>': if (_paren_nesting <= 0) { - _angle_bracket_found = true; + _parsing_template_params = false; _state = S_end_nested; return CPPToken::eof(); } @@ -2351,14 +2356,18 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { State old_state = _state; int old_nesting = _paren_nesting; + bool old_parsing_params = _parsing_template_params; const CPPTemplateParameterList &formal_params = scope->_parameters; CPPTemplateParameterList::Parameters::const_iterator pi; - _angle_bracket_found = false; + + _state = S_nested; + _paren_nesting = 0; + _parsing_template_params = true; CPPToken token = internal_get_next_token(); if (token._token == '>') { - _angle_bracket_found = true; + _parsing_template_params = false; } else { _saved_tokens.push_back(token); } @@ -2366,17 +2375,15 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { CPPTemplateParameterList *actual_params = new CPPTemplateParameterList; for (pi = formal_params._parameters.begin(); - pi != formal_params._parameters.end() && !_angle_bracket_found; + pi != formal_params._parameters.end() && _parsing_template_params; ++pi) { - _state = S_nested; - _paren_nesting = 0; - CPPFile first_file = get_file(); int first_line = get_line_number(); int first_col = get_col_number(); CPPDeclaration *decl = (*pi); if (decl->as_type()) { + // Parse a typename template parameter. _saved_tokens.push_back(CPPToken(START_TYPE)); CPPType *type = ::parse_type(this, current_scope, global_scope); if (type == NULL) { @@ -2386,6 +2393,7 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { } actual_params->_parameters.push_back(type); } else { + // Parse a constant expression template parameter. _saved_tokens.push_back(CPPToken(START_CONST_EXPR)); CPPExpression *expr = parse_const_expr(this, current_scope, global_scope); if (expr == NULL) { @@ -2395,16 +2403,19 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { } actual_params->_parameters.push_back(expr); } + + _state = S_nested; + _paren_nesting = 0; } - if (!_angle_bracket_found) { + if (_parsing_template_params) { warning("Ignoring extra parameters in template instantiation"); skip_to_angle_bracket(); } _state = old_state; _paren_nesting = old_nesting; - _angle_bracket_found = false; + _parsing_template_params = old_parsing_params; #ifdef CPP_VERBOSE_LEX indent(cerr, _files.size() * 2) @@ -2461,7 +2472,7 @@ skip_to_angle_bracket() { << "Skipping tokens:\n"; #endif - while (!_angle_bracket_found && _state != S_eof) { + while (_parsing_template_params && _state != S_eof) { _state = S_nested; while (_state != S_end_nested && _state != S_eof) { get_next_token(); diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 9aedcb24de..e04dbf75a5 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -198,7 +198,7 @@ private: }; State _state; int _paren_nesting; - bool _angle_bracket_found; + bool _parsing_template_params; bool _start_of_line; int _unget; From 7004283150c10fef8452d55f6b62f8ac17ada5dc Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 10 Oct 2015 14:33:53 +0200 Subject: [PATCH 157/200] Fix stdpy error reporting in Python 2 --- direct/src/stdpy/file.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index c7b198be50..e31fb76b89 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -19,13 +19,21 @@ from posixpath import join _vfs = core.VirtualFileSystem.getGlobalPtr() +if sys.version < (3, 0): + # Python 3 defines these subtypes of IOError, but Python 2 doesn't. + FileNotFoundError = IOError + IsADirectoryError = IOError + FileExistsError = IOError + PermissionError = IOError + + def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True): if sys.version_info >= (3, 0): # Python 3 is much stricter than Python 2, which lets # unknown flags fall through. for ch in mode: if ch not in 'rwxabt+U': - raise IOError("invalid mode: '%s'" % (mode)) + raise ValueError("invalid mode: '%s'" % (mode)) creating = 'x' in mode writing = 'w' in mode @@ -36,7 +44,7 @@ def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, reading = universal or 'r' in mode if binary and 't' in mode: - raise IOError("can't have text and binary mode at once") + raise ValueError("can't have text and binary mode at once") if creating + reading + writing + appending > 1: raise ValueError("must have exactly one of create/read/write/append mode") From e327c7e9788bc99f3d9bb4f1aa8d8a048585d323 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 10 Oct 2015 15:15:22 +0200 Subject: [PATCH 158/200] Vastly improve quality of Interrogate error messages, also fix erroneous location indications This change also causes Interrogate to safely ignore "register" keywords in function parameters --- dtool/src/cppparser/cppBison.cxx.prebuilt | 4766 +++++++++++---------- dtool/src/cppparser/cppBison.yxx | 33 +- dtool/src/cppparser/cppIdentifier.cxx | 42 +- dtool/src/cppparser/cppIdentifier.h | 5 +- dtool/src/cppparser/cppInstance.h | 1 - dtool/src/cppparser/cppNameComponent.h | 1 + dtool/src/cppparser/cppPreprocessor.cxx | 876 ++-- dtool/src/cppparser/cppPreprocessor.h | 42 +- dtool/src/cppparser/cppScope.cxx | 28 +- dtool/src/cppparser/cppToken.cxx | 12 + dtool/src/cppparser/cppToken.h | 3 + dtool/src/interrogate/typeManager.cxx | 1 + 12 files changed, 3113 insertions(+), 2697 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index 714d121a40..e82963410c 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -50,7 +50,7 @@ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ -#define YYPURE 1 +#define YYPURE 2 /* Push parsers. */ #define YYPUSH 0 @@ -129,14 +129,19 @@ yyerror(const string &msg) { current_lexer->error(msg); } +static void +yyerror(YYLTYPE *loc, const string &msg) { + current_lexer->error(msg, *loc); +} + static void yyerror(const string &msg, YYLTYPE &loc) { - current_lexer->error(msg, loc.first_line, loc.first_column); + current_lexer->error(msg, loc); } static void yywarning(const string &msg, YYLTYPE &loc) { - current_lexer->warning(msg, loc.first_line, loc.first_column); + current_lexer->warning(msg, loc); } static int @@ -261,7 +266,7 @@ pop_struct() { /* Line 371 of yacc.c */ -#line 265 "built/tmp/cppBison.yxx.c" +#line 270 "built/tmp/cppBison.yxx.c" # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -550,7 +555,7 @@ int cppyyparse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 554 "built/tmp/cppBison.yxx.c" +#line 559 "built/tmp/cppBison.yxx.c" #ifdef short # undef short @@ -772,16 +777,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3698 +#define YYLAST 3857 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 131 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 93 /* YYNRULES -- Number of rules. */ -#define YYNRULES 553 +#define YYNRULES 555 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1002 +#define YYNSTATES 1008 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -855,44 +860,44 @@ static const yytype_uint16 yyprhs[] = 470, 474, 475, 482, 484, 486, 488, 492, 495, 497, 501, 503, 506, 508, 511, 513, 517, 523, 527, 532, 534, 536, 539, 541, 545, 549, 555, 559, 563, 568, - 570, 572, 574, 576, 579, 582, 585, 588, 591, 595, - 600, 602, 604, 606, 609, 612, 615, 618, 621, 625, - 630, 638, 642, 644, 647, 650, 653, 656, 659, 663, - 668, 676, 678, 680, 683, 685, 687, 689, 692, 697, - 699, 701, 704, 706, 708, 710, 713, 718, 721, 723, - 725, 728, 731, 734, 737, 741, 742, 748, 749, 757, - 759, 761, 764, 768, 771, 774, 777, 781, 785, 789, - 793, 797, 801, 806, 811, 814, 818, 820, 822, 824, - 826, 830, 836, 838, 841, 846, 848, 850, 852, 854, - 855, 862, 867, 870, 874, 876, 878, 880, 882, 884, - 886, 888, 890, 892, 894, 896, 898, 900, 902, 905, - 908, 911, 914, 916, 919, 921, 925, 928, 930, 931, - 934, 936, 939, 941, 943, 945, 947, 949, 951, 953, - 955, 957, 959, 961, 963, 965, 967, 969, 971, 973, - 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, - 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, - 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, - 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, - 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, - 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, - 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, - 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, - 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, 1153, 1155, - 1157, 1159, 1161, 1163, 1167, 1169, 1174, 1182, 1190, 1195, - 1198, 1201, 1204, 1207, 1210, 1214, 1218, 1222, 1226, 1230, - 1234, 1238, 1242, 1246, 1250, 1254, 1258, 1262, 1266, 1270, - 1274, 1280, 1285, 1290, 1294, 1298, 1302, 1306, 1308, 1313, - 1321, 1329, 1334, 1339, 1344, 1349, 1354, 1359, 1364, 1369, - 1374, 1379, 1384, 1389, 1394, 1399, 1402, 1408, 1411, 1414, - 1417, 1420, 1423, 1427, 1431, 1435, 1439, 1443, 1447, 1451, - 1455, 1459, 1463, 1467, 1471, 1475, 1479, 1483, 1487, 1491, - 1495, 1501, 1506, 1511, 1515, 1519, 1523, 1527, 1529, 1531, - 1533, 1535, 1537, 1539, 1541, 1543, 1548, 1556, 1564, 1569, - 1572, 1578, 1581, 1584, 1587, 1590, 1594, 1598, 1602, 1606, - 1610, 1614, 1618, 1622, 1626, 1630, 1634, 1638, 1642, 1646, - 1650, 1654, 1658, 1662, 1668, 1673, 1678, 1682, 1686, 1690, - 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1711, 1714, - 1716, 1718, 1720, 1723 + 574, 577, 579, 581, 583, 585, 588, 591, 594, 597, + 600, 604, 609, 611, 613, 615, 618, 621, 624, 627, + 630, 634, 639, 647, 651, 653, 656, 659, 662, 665, + 668, 672, 677, 685, 687, 689, 692, 694, 696, 698, + 701, 706, 708, 710, 713, 715, 717, 719, 722, 727, + 730, 732, 734, 737, 740, 743, 746, 750, 751, 757, + 758, 766, 768, 770, 773, 777, 780, 783, 786, 790, + 794, 798, 802, 806, 810, 815, 820, 823, 827, 829, + 831, 833, 835, 839, 845, 847, 850, 855, 857, 859, + 861, 863, 864, 871, 876, 879, 883, 885, 887, 889, + 891, 893, 895, 897, 899, 901, 903, 905, 907, 909, + 911, 914, 917, 920, 923, 925, 928, 930, 934, 937, + 939, 940, 943, 945, 948, 950, 952, 954, 956, 958, + 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, + 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, + 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, + 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, + 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, + 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, + 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, + 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, + 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, + 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, + 1162, 1164, 1166, 1168, 1170, 1172, 1176, 1178, 1183, 1191, + 1199, 1204, 1207, 1210, 1213, 1216, 1219, 1223, 1227, 1231, + 1235, 1239, 1243, 1247, 1251, 1255, 1259, 1263, 1267, 1271, + 1275, 1279, 1283, 1289, 1294, 1299, 1303, 1307, 1311, 1315, + 1317, 1322, 1330, 1338, 1343, 1348, 1353, 1358, 1363, 1368, + 1373, 1378, 1383, 1388, 1393, 1398, 1403, 1408, 1411, 1417, + 1420, 1423, 1426, 1429, 1432, 1436, 1440, 1444, 1448, 1452, + 1456, 1460, 1464, 1468, 1472, 1476, 1480, 1484, 1488, 1492, + 1496, 1500, 1504, 1510, 1515, 1520, 1524, 1528, 1532, 1536, + 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1557, 1565, + 1573, 1578, 1581, 1587, 1590, 1593, 1596, 1599, 1603, 1607, + 1611, 1615, 1619, 1623, 1627, 1631, 1635, 1639, 1643, 1647, + 1651, 1655, 1659, 1663, 1667, 1671, 1677, 1682, 1687, 1691, + 1695, 1699, 1703, 1705, 1707, 1709, 1711, 1713, 1715, 1717, + 1720, 1723, 1725, 1727, 1729, 1732 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -954,184 +959,185 @@ static const yytype_int16 yyrhs[] = 128, -1, 223, -1, 178, -1, 178, 108, -1, 216, -1, 107, 177, 128, -1, 178, 108, 216, -1, 178, 108, 107, 177, 128, -1, 183, 181, 175, -1, 8, - 181, 175, -1, 51, 183, 181, 175, -1, 218, -1, - 223, -1, 8, -1, 9, -1, 51, 180, -1, 101, - 180, -1, 120, 180, -1, 115, 180, -1, 14, 180, - -1, 10, 120, 180, -1, 180, 126, 212, 130, -1, - 223, -1, 8, -1, 9, -1, 51, 181, -1, 101, - 181, -1, 120, 181, -1, 115, 181, -1, 14, 181, - -1, 10, 120, 181, -1, 181, 126, 212, 130, -1, - 125, 181, 127, 125, 172, 127, 161, -1, 125, 181, - 127, -1, 223, -1, 51, 182, -1, 101, 182, -1, - 120, 182, -1, 115, 182, -1, 14, 182, -1, 10, - 120, 182, -1, 182, 126, 212, 130, -1, 125, 182, - 127, 125, 172, 127, 161, -1, 204, -1, 9, -1, + 181, 175, -1, 51, 183, 181, 175, -1, 51, 82, + 183, 181, 175, -1, 82, 179, -1, 218, -1, 223, + -1, 8, -1, 9, -1, 51, 180, -1, 101, 180, + -1, 120, 180, -1, 115, 180, -1, 14, 180, -1, + 10, 120, 180, -1, 180, 126, 212, 130, -1, 223, + -1, 8, -1, 9, -1, 51, 181, -1, 101, 181, + -1, 120, 181, -1, 115, 181, -1, 14, 181, -1, + 10, 120, 181, -1, 181, 126, 212, 130, -1, 125, + 181, 127, 125, 172, 127, 161, -1, 125, 181, 127, + -1, 223, -1, 51, 182, -1, 101, 182, -1, 120, + 182, -1, 115, 182, -1, 14, 182, -1, 10, 120, + 182, -1, 182, 126, 212, 130, -1, 125, 182, 127, + 125, 172, 127, 161, -1, 204, -1, 9, -1, 95, + 221, -1, 187, -1, 189, -1, 194, -1, 200, 221, + -1, 199, 221, 110, 196, -1, 204, -1, 9, -1, 95, 221, -1, 187, -1, 189, -1, 194, -1, 200, - 221, -1, 199, 221, 110, 196, -1, 204, -1, 9, - -1, 95, 221, -1, 187, -1, 189, -1, 194, -1, - 200, 221, -1, 199, 221, 110, 196, -1, 199, 221, - -1, 204, -1, 9, -1, 95, 221, -1, 200, 221, - -1, 199, 221, -1, 183, 182, -1, 51, 183, 182, - -1, -1, 200, 107, 188, 133, 128, -1, -1, 200, - 221, 190, 191, 107, 133, 128, -1, 223, -1, 192, - -1, 110, 193, -1, 192, 108, 193, -1, 81, 220, - -1, 80, 220, -1, 79, 220, -1, 99, 81, 220, - -1, 99, 80, 220, -1, 99, 79, 220, -1, 81, - 99, 220, -1, 80, 99, 220, -1, 79, 99, 220, - -1, 195, 107, 198, 128, -1, 199, 221, 110, 196, - -1, 199, 221, -1, 199, 110, 196, -1, 199, -1, - 205, -1, 9, -1, 223, -1, 197, 221, 108, -1, - 197, 221, 111, 216, 108, -1, 197, -1, 197, 221, - -1, 197, 221, 111, 216, -1, 57, -1, 50, -1, - 89, -1, 96, -1, -1, 75, 221, 107, 202, 133, - 128, -1, 75, 107, 133, 128, -1, 98, 221, -1, - 98, 75, 221, -1, 205, -1, 206, -1, 207, -1, - 45, -1, 47, -1, 102, -1, 48, -1, 49, -1, - 84, -1, 70, -1, 71, -1, 97, -1, 85, -1, - 69, -1, 84, 205, -1, 70, 205, -1, 97, 205, - -1, 85, 205, -1, 63, -1, 70, 63, -1, 53, - -1, 70, 70, 63, -1, 70, 53, -1, 100, -1, - -1, 209, 210, -1, 223, -1, 210, 211, -1, 3, - -1, 4, -1, 6, -1, 5, -1, 8, -1, 9, - -1, 10, -1, 7, -1, 12, -1, 13, -1, 14, - -1, 15, -1, 16, -1, 17, -1, 18, -1, 19, - -1, 20, -1, 21, -1, 22, -1, 29, -1, 30, - -1, 31, -1, 32, -1, 33, -1, 34, -1, 35, - -1, 36, -1, 37, -1, 38, -1, 39, -1, 40, - -1, 41, -1, 42, -1, 45, -1, 46, -1, 47, - -1, 48, -1, 49, -1, 102, -1, 50, -1, 51, - -1, 52, -1, 53, -1, 54, -1, 55, -1, 57, - -1, 59, -1, 60, -1, 62, -1, 63, -1, 64, - -1, 65, -1, 66, -1, 67, -1, 68, -1, 69, - -1, 70, -1, 74, -1, 76, -1, 79, -1, 80, - -1, 81, -1, 61, -1, 82, -1, 83, -1, 84, - -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, - -1, 91, -1, 92, -1, 93, -1, 94, -1, 95, - -1, 96, -1, 97, -1, 99, -1, 100, -1, 101, - -1, 103, -1, 78, -1, 118, -1, 119, -1, 120, - -1, 121, -1, 115, -1, 113, -1, 114, -1, 129, - -1, 123, -1, 111, -1, 122, -1, 116, -1, 117, - -1, 125, -1, 127, -1, 124, -1, 108, -1, 109, - -1, 110, -1, 126, -1, 130, -1, 112, -1, 107, - 210, 128, -1, 223, -1, 216, -1, 223, -1, 214, - -1, 216, -1, 214, 108, 216, -1, 217, -1, 125, - 186, 127, 215, -1, 88, 116, 186, 117, 125, 214, - 127, -1, 54, 116, 186, 117, 125, 214, 127, -1, - 86, 125, 186, 127, -1, 129, 215, -1, 123, 215, - -1, 119, 215, -1, 120, 215, -1, 115, 215, -1, - 215, 120, 215, -1, 215, 121, 215, -1, 215, 122, - 215, -1, 215, 118, 215, -1, 215, 119, 215, -1, - 215, 113, 215, -1, 215, 114, 215, -1, 215, 115, - 215, -1, 215, 13, 215, -1, 215, 14, 215, -1, - 215, 15, 215, -1, 215, 16, 215, -1, 215, 17, - 215, -1, 215, 18, 215, -1, 215, 19, 215, -1, - 215, 20, 215, -1, 215, 112, 215, 110, 215, -1, - 215, 126, 216, 130, -1, 215, 125, 214, 127, -1, - 215, 125, 127, -1, 215, 124, 215, -1, 215, 29, - 215, -1, 125, 214, 127, -1, 217, -1, 125, 186, - 127, 216, -1, 88, 116, 186, 117, 125, 214, 127, - -1, 54, 116, 186, 117, 125, 214, 127, -1, 9, - 125, 213, 127, -1, 69, 125, 213, 127, -1, 47, - 125, 213, 127, -1, 102, 125, 213, 127, -1, 48, - 125, 213, 127, -1, 49, 125, 213, 127, -1, 45, - 125, 213, 127, -1, 84, 125, 213, 127, -1, 70, - 125, 213, 127, -1, 97, 125, 213, 127, -1, 85, - 125, 213, 127, -1, 63, 125, 213, 127, -1, 53, - 125, 213, 127, -1, 86, 125, 186, 127, -1, 76, - 185, -1, 76, 185, 125, 213, 127, -1, 129, 216, - -1, 123, 216, -1, 119, 216, -1, 120, 216, -1, - 115, 216, -1, 216, 120, 216, -1, 216, 121, 216, - -1, 216, 122, 216, -1, 216, 118, 216, -1, 216, - 119, 216, -1, 216, 113, 216, -1, 216, 114, 216, - -1, 216, 115, 216, -1, 216, 13, 216, -1, 216, - 14, 216, -1, 216, 15, 216, -1, 216, 16, 216, - -1, 216, 17, 216, -1, 216, 18, 216, -1, 216, - 116, 216, -1, 216, 117, 216, -1, 216, 19, 216, - -1, 216, 20, 216, -1, 216, 112, 216, 110, 216, - -1, 216, 126, 216, 130, -1, 216, 125, 214, 127, - -1, 216, 125, 127, -1, 216, 124, 216, -1, 216, - 29, 216, -1, 125, 214, 127, -1, 4, -1, 92, - -1, 62, -1, 5, -1, 3, -1, 222, -1, 8, - -1, 219, -1, 125, 186, 127, 216, -1, 88, 116, - 186, 117, 125, 214, 127, -1, 54, 116, 186, 117, - 125, 214, 127, -1, 86, 125, 186, 127, -1, 76, - 185, -1, 76, 185, 125, 213, 127, -1, 129, 216, - -1, 123, 216, -1, 119, 216, -1, 115, 216, -1, - 218, 120, 216, -1, 218, 121, 216, -1, 218, 122, - 216, -1, 218, 118, 216, -1, 218, 119, 216, -1, - 218, 113, 216, -1, 218, 114, 216, -1, 218, 115, - 216, -1, 218, 13, 216, -1, 218, 14, 216, -1, - 218, 15, 216, -1, 218, 16, 216, -1, 218, 17, - 216, -1, 218, 18, 216, -1, 218, 116, 216, -1, - 218, 117, 216, -1, 218, 19, 216, -1, 218, 20, - 216, -1, 218, 112, 216, 110, 216, -1, 218, 126, - 216, 130, -1, 218, 125, 214, 127, -1, 218, 125, - 127, -1, 218, 124, 216, -1, 218, 29, 216, -1, - 125, 214, 127, -1, 4, -1, 92, -1, 62, -1, - 5, -1, 3, -1, 222, -1, 221, -1, 200, 221, - -1, 95, 221, -1, 8, -1, 9, -1, 6, -1, - 222, 6, -1, -1 + 221, -1, 199, 221, 110, 196, -1, 199, 221, -1, + 204, -1, 9, -1, 95, 221, -1, 200, 221, -1, + 199, 221, -1, 183, 182, -1, 51, 183, 182, -1, + -1, 200, 107, 188, 133, 128, -1, -1, 200, 221, + 190, 191, 107, 133, 128, -1, 223, -1, 192, -1, + 110, 193, -1, 192, 108, 193, -1, 81, 220, -1, + 80, 220, -1, 79, 220, -1, 99, 81, 220, -1, + 99, 80, 220, -1, 99, 79, 220, -1, 81, 99, + 220, -1, 80, 99, 220, -1, 79, 99, 220, -1, + 195, 107, 198, 128, -1, 199, 221, 110, 196, -1, + 199, 221, -1, 199, 110, 196, -1, 199, -1, 205, + -1, 9, -1, 223, -1, 197, 221, 108, -1, 197, + 221, 111, 216, 108, -1, 197, -1, 197, 221, -1, + 197, 221, 111, 216, -1, 57, -1, 50, -1, 89, + -1, 96, -1, -1, 75, 221, 107, 202, 133, 128, + -1, 75, 107, 133, 128, -1, 98, 221, -1, 98, + 75, 221, -1, 205, -1, 206, -1, 207, -1, 45, + -1, 47, -1, 102, -1, 48, -1, 49, -1, 84, + -1, 70, -1, 71, -1, 97, -1, 85, -1, 69, + -1, 84, 205, -1, 70, 205, -1, 97, 205, -1, + 85, 205, -1, 63, -1, 70, 63, -1, 53, -1, + 70, 70, 63, -1, 70, 53, -1, 100, -1, -1, + 209, 210, -1, 223, -1, 210, 211, -1, 3, -1, + 4, -1, 6, -1, 5, -1, 8, -1, 9, -1, + 10, -1, 7, -1, 12, -1, 13, -1, 14, -1, + 15, -1, 16, -1, 17, -1, 18, -1, 19, -1, + 20, -1, 21, -1, 22, -1, 29, -1, 30, -1, + 31, -1, 32, -1, 33, -1, 34, -1, 35, -1, + 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, + 41, -1, 42, -1, 45, -1, 46, -1, 47, -1, + 48, -1, 49, -1, 102, -1, 50, -1, 51, -1, + 52, -1, 53, -1, 54, -1, 55, -1, 57, -1, + 59, -1, 60, -1, 62, -1, 63, -1, 64, -1, + 65, -1, 66, -1, 67, -1, 68, -1, 69, -1, + 70, -1, 74, -1, 76, -1, 79, -1, 80, -1, + 81, -1, 61, -1, 82, -1, 83, -1, 84, -1, + 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, + 91, -1, 92, -1, 93, -1, 94, -1, 95, -1, + 96, -1, 97, -1, 99, -1, 100, -1, 101, -1, + 103, -1, 78, -1, 118, -1, 119, -1, 120, -1, + 121, -1, 115, -1, 113, -1, 114, -1, 129, -1, + 123, -1, 111, -1, 122, -1, 116, -1, 117, -1, + 125, -1, 127, -1, 124, -1, 108, -1, 109, -1, + 110, -1, 126, -1, 130, -1, 112, -1, 107, 210, + 128, -1, 223, -1, 216, -1, 223, -1, 214, -1, + 216, -1, 214, 108, 216, -1, 217, -1, 125, 186, + 127, 215, -1, 88, 116, 186, 117, 125, 214, 127, + -1, 54, 116, 186, 117, 125, 214, 127, -1, 86, + 125, 186, 127, -1, 129, 215, -1, 123, 215, -1, + 119, 215, -1, 120, 215, -1, 115, 215, -1, 215, + 120, 215, -1, 215, 121, 215, -1, 215, 122, 215, + -1, 215, 118, 215, -1, 215, 119, 215, -1, 215, + 113, 215, -1, 215, 114, 215, -1, 215, 115, 215, + -1, 215, 13, 215, -1, 215, 14, 215, -1, 215, + 15, 215, -1, 215, 16, 215, -1, 215, 17, 215, + -1, 215, 18, 215, -1, 215, 19, 215, -1, 215, + 20, 215, -1, 215, 112, 215, 110, 215, -1, 215, + 126, 216, 130, -1, 215, 125, 214, 127, -1, 215, + 125, 127, -1, 215, 124, 215, -1, 215, 29, 215, + -1, 125, 214, 127, -1, 217, -1, 125, 186, 127, + 216, -1, 88, 116, 186, 117, 125, 214, 127, -1, + 54, 116, 186, 117, 125, 214, 127, -1, 9, 125, + 213, 127, -1, 69, 125, 213, 127, -1, 47, 125, + 213, 127, -1, 102, 125, 213, 127, -1, 48, 125, + 213, 127, -1, 49, 125, 213, 127, -1, 45, 125, + 213, 127, -1, 84, 125, 213, 127, -1, 70, 125, + 213, 127, -1, 97, 125, 213, 127, -1, 85, 125, + 213, 127, -1, 63, 125, 213, 127, -1, 53, 125, + 213, 127, -1, 86, 125, 186, 127, -1, 76, 185, + -1, 76, 185, 125, 213, 127, -1, 129, 216, -1, + 123, 216, -1, 119, 216, -1, 120, 216, -1, 115, + 216, -1, 216, 120, 216, -1, 216, 121, 216, -1, + 216, 122, 216, -1, 216, 118, 216, -1, 216, 119, + 216, -1, 216, 113, 216, -1, 216, 114, 216, -1, + 216, 115, 216, -1, 216, 13, 216, -1, 216, 14, + 216, -1, 216, 15, 216, -1, 216, 16, 216, -1, + 216, 17, 216, -1, 216, 18, 216, -1, 216, 116, + 216, -1, 216, 117, 216, -1, 216, 19, 216, -1, + 216, 20, 216, -1, 216, 112, 216, 110, 216, -1, + 216, 126, 216, 130, -1, 216, 125, 214, 127, -1, + 216, 125, 127, -1, 216, 124, 216, -1, 216, 29, + 216, -1, 125, 214, 127, -1, 4, -1, 92, -1, + 62, -1, 5, -1, 3, -1, 222, -1, 8, -1, + 219, -1, 125, 186, 127, 216, -1, 88, 116, 186, + 117, 125, 214, 127, -1, 54, 116, 186, 117, 125, + 214, 127, -1, 86, 125, 186, 127, -1, 76, 185, + -1, 76, 185, 125, 213, 127, -1, 129, 216, -1, + 123, 216, -1, 119, 216, -1, 115, 216, -1, 218, + 120, 216, -1, 218, 121, 216, -1, 218, 122, 216, + -1, 218, 118, 216, -1, 218, 119, 216, -1, 218, + 113, 216, -1, 218, 114, 216, -1, 218, 115, 216, + -1, 218, 13, 216, -1, 218, 14, 216, -1, 218, + 15, 216, -1, 218, 16, 216, -1, 218, 17, 216, + -1, 218, 18, 216, -1, 218, 116, 216, -1, 218, + 117, 216, -1, 218, 19, 216, -1, 218, 20, 216, + -1, 218, 112, 216, 110, 216, -1, 218, 126, 216, + 130, -1, 218, 125, 214, 127, -1, 218, 125, 127, + -1, 218, 124, 216, -1, 218, 29, 216, -1, 125, + 214, 127, -1, 4, -1, 92, -1, 62, -1, 5, + -1, 3, -1, 222, -1, 221, -1, 200, 221, -1, + 95, 221, -1, 8, -1, 9, -1, 6, -1, 222, + 6, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 386, 386, 387, 391, 398, 399, 400, 404, 405, - 409, 422, 421, 433, 434, 435, 436, 437, 438, 439, - 440, 453, 462, 466, 474, 478, 482, 493, 514, 523, - 522, 537, 541, 545, 556, 560, 564, 568, 572, 576, - 580, 584, 588, 595, 599, 608, 620, 619, 635, 634, - 652, 660, 671, 680, 694, 693, 709, 708, 719, 734, - 740, 749, 756, 769, 768, 791, 790, 815, 814, 845, - 844, 860, 859, 877, 876, 908, 907, 933, 946, 950, - 954, 958, 962, 969, 973, 977, 981, 985, 989, 993, - 997, 1001, 1005, 1009, 1013, 1017, 1021, 1025, 1029, 1033, - 1037, 1041, 1045, 1049, 1053, 1057, 1061, 1065, 1069, 1073, - 1077, 1081, 1085, 1089, 1093, 1097, 1101, 1105, 1109, 1113, - 1117, 1121, 1128, 1129, 1134, 1133, 1141, 1145, 1146, 1150, - 1156, 1165, 1169, 1173, 1177, 1181, 1187, 1197, 1201, 1206, - 1215, 1219, 1233, 1238, 1243, 1248, 1253, 1258, 1263, 1268, - 1273, 1279, 1278, 1300, 1304, 1309, 1313, 1318, 1326, 1331, - 1339, 1343, 1350, 1354, 1361, 1365, 1369, 1373, 1377, 1384, - 1385, 1386, 1390, 1393, 1394, 1395, 1399, 1404, 1412, 1418, - 1428, 1432, 1436, 1440, 1445, 1450, 1455, 1460, 1465, 1470, - 1478, 1482, 1486, 1490, 1495, 1500, 1505, 1510, 1515, 1520, - 1525, 1531, 1539, 1543, 1548, 1553, 1558, 1563, 1568, 1573, - 1578, 1587, 1591, 1596, 1600, 1604, 1608, 1612, 1628, 1647, - 1651, 1656, 1660, 1664, 1668, 1672, 1688, 1704, 1725, 1729, - 1734, 1738, 1754, 1773, 1779, 1790, 1789, 1814, 1813, 1843, - 1844, 1848, 1849, 1853, 1857, 1861, 1865, 1869, 1873, 1877, - 1881, 1885, 1892, 1900, 1904, 1908, 1912, 1919, 1923, 1930, - 1931, 1937, 1945, 1946, 1952, 1961, 1968, 1972, 1976, 1984, - 1983, 2005, 2009, 2015, 2024, 2025, 2026, 2030, 2034, 2038, - 2042, 2046, 2050, 2055, 2060, 2065, 2070, 2075, 2079, 2084, - 2093, 2098, 2106, 2110, 2115, 2119, 2124, 2132, 2142, 2142, - 2152, 2153, 2157, 2160, 2163, 2166, 2169, 2172, 2175, 2178, - 2181, 2181, 2181, 2182, 2182, 2182, 2182, 2183, 2183, 2183, - 2183, 2183, 2184, 2184, 2184, 2185, 2185, 2185, 2185, 2185, - 2186, 2186, 2186, 2186, 2186, 2187, 2187, 2187, 2187, 2187, - 2188, 2188, 2188, 2189, 2189, 2189, 2189, 2189, 2190, 2190, - 2190, 2191, 2191, 2191, 2191, 2192, 2192, 2192, 2193, 2193, - 2193, 2193, 2193, 2194, 2194, 2194, 2194, 2195, 2195, 2195, - 2195, 2195, 2196, 2196, 2196, 2196, 2196, 2196, 2197, 2197, - 2197, 2197, 2197, 2198, 2199, 2202, 2202, 2202, 2202, 2202, - 2202, 2202, 2202, 2202, 2202, 2202, 2203, 2203, 2203, 2203, - 2203, 2203, 2203, 2203, 2203, 2203, 2204, 2204, 2208, 2212, - 2219, 2223, 2230, 2234, 2241, 2245, 2249, 2253, 2257, 2261, - 2265, 2269, 2281, 2285, 2289, 2293, 2297, 2301, 2305, 2309, - 2313, 2317, 2321, 2325, 2329, 2333, 2337, 2341, 2345, 2349, - 2353, 2357, 2361, 2365, 2369, 2373, 2377, 2385, 2389, 2393, - 2397, 2401, 2408, 2414, 2420, 2426, 2432, 2438, 2444, 2451, - 2458, 2465, 2472, 2478, 2484, 2488, 2492, 2496, 2500, 2504, - 2516, 2520, 2524, 2528, 2532, 2536, 2540, 2544, 2548, 2552, - 2556, 2560, 2564, 2568, 2572, 2576, 2580, 2584, 2588, 2592, - 2596, 2600, 2604, 2608, 2612, 2616, 2620, 2627, 2631, 2635, - 2639, 2643, 2647, 2651, 2665, 2669, 2673, 2677, 2681, 2685, - 2689, 2693, 2697, 2701, 2713, 2717, 2721, 2725, 2729, 2733, - 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2765, 2769, 2773, - 2777, 2781, 2785, 2789, 2793, 2797, 2801, 2805, 2809, 2813, - 2820, 2824, 2828, 2832, 2836, 2840, 2847, 2855, 2863, 2886, - 2890, 2897, 2901, 2907 + 0, 397, 397, 398, 402, 409, 410, 411, 415, 416, + 420, 433, 432, 444, 445, 446, 447, 448, 449, 450, + 451, 464, 473, 477, 485, 489, 493, 504, 525, 534, + 533, 548, 552, 556, 567, 571, 575, 579, 583, 587, + 591, 595, 599, 606, 610, 619, 631, 630, 646, 645, + 663, 671, 682, 691, 705, 704, 720, 719, 730, 745, + 751, 760, 767, 780, 779, 802, 801, 826, 825, 856, + 855, 871, 870, 888, 887, 919, 918, 944, 957, 961, + 965, 969, 973, 980, 984, 988, 992, 996, 1000, 1004, + 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, + 1048, 1052, 1056, 1060, 1064, 1068, 1072, 1076, 1080, 1084, + 1088, 1092, 1096, 1100, 1104, 1108, 1112, 1116, 1120, 1124, + 1128, 1132, 1139, 1140, 1145, 1144, 1152, 1156, 1157, 1161, + 1167, 1176, 1180, 1184, 1188, 1192, 1198, 1208, 1212, 1217, + 1226, 1230, 1244, 1249, 1254, 1259, 1264, 1269, 1274, 1279, + 1284, 1290, 1289, 1311, 1315, 1320, 1324, 1329, 1337, 1342, + 1350, 1354, 1361, 1365, 1372, 1376, 1380, 1384, 1388, 1395, + 1396, 1397, 1401, 1404, 1405, 1406, 1410, 1415, 1423, 1429, + 1435, 1439, 1449, 1453, 1457, 1461, 1466, 1471, 1476, 1481, + 1486, 1491, 1499, 1503, 1507, 1511, 1516, 1521, 1526, 1531, + 1536, 1541, 1546, 1552, 1560, 1564, 1569, 1574, 1579, 1584, + 1589, 1594, 1599, 1608, 1612, 1617, 1621, 1625, 1629, 1633, + 1649, 1668, 1672, 1677, 1681, 1685, 1689, 1693, 1709, 1725, + 1746, 1750, 1755, 1759, 1775, 1794, 1800, 1811, 1810, 1835, + 1834, 1864, 1865, 1869, 1870, 1874, 1878, 1882, 1886, 1890, + 1894, 1898, 1902, 1906, 1913, 1921, 1925, 1929, 1933, 1940, + 1944, 1951, 1952, 1958, 1966, 1967, 1973, 1982, 1989, 1993, + 1997, 2005, 2004, 2026, 2030, 2036, 2045, 2046, 2047, 2051, + 2055, 2059, 2063, 2067, 2071, 2076, 2081, 2086, 2091, 2096, + 2100, 2105, 2114, 2119, 2127, 2131, 2136, 2140, 2145, 2153, + 2163, 2163, 2173, 2174, 2178, 2181, 2184, 2187, 2190, 2193, + 2196, 2199, 2202, 2202, 2202, 2203, 2203, 2203, 2203, 2204, + 2204, 2204, 2204, 2204, 2205, 2205, 2205, 2206, 2206, 2206, + 2206, 2206, 2207, 2207, 2207, 2207, 2207, 2208, 2208, 2208, + 2208, 2208, 2209, 2209, 2209, 2210, 2210, 2210, 2210, 2210, + 2211, 2211, 2211, 2212, 2212, 2212, 2212, 2213, 2213, 2213, + 2214, 2214, 2214, 2214, 2214, 2215, 2215, 2215, 2215, 2216, + 2216, 2216, 2216, 2216, 2217, 2217, 2217, 2217, 2217, 2217, + 2218, 2218, 2218, 2218, 2218, 2219, 2220, 2223, 2223, 2223, + 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2224, 2224, + 2224, 2224, 2224, 2224, 2224, 2224, 2224, 2224, 2225, 2225, + 2229, 2233, 2240, 2244, 2251, 2255, 2262, 2266, 2270, 2274, + 2278, 2282, 2286, 2290, 2302, 2306, 2310, 2314, 2318, 2322, + 2326, 2330, 2334, 2338, 2342, 2346, 2350, 2354, 2358, 2362, + 2366, 2370, 2374, 2378, 2382, 2386, 2390, 2394, 2398, 2406, + 2410, 2414, 2418, 2422, 2429, 2435, 2441, 2447, 2453, 2459, + 2465, 2472, 2479, 2486, 2493, 2499, 2505, 2509, 2513, 2517, + 2521, 2525, 2537, 2541, 2545, 2549, 2553, 2557, 2561, 2565, + 2569, 2573, 2577, 2581, 2585, 2589, 2593, 2597, 2601, 2605, + 2609, 2613, 2617, 2621, 2625, 2629, 2633, 2637, 2641, 2648, + 2652, 2656, 2660, 2664, 2668, 2672, 2686, 2690, 2694, 2698, + 2702, 2706, 2710, 2714, 2718, 2722, 2734, 2738, 2742, 2746, + 2750, 2754, 2758, 2762, 2766, 2770, 2774, 2778, 2782, 2786, + 2790, 2794, 2798, 2802, 2806, 2810, 2814, 2818, 2822, 2826, + 2830, 2834, 2841, 2845, 2849, 2853, 2857, 2861, 2868, 2876, + 2884, 2907, 2911, 2918, 2922, 2928 }; #endif @@ -1237,19 +1243,19 @@ static const yytype_uint8 yyr1[] = 170, 171, 170, 172, 172, 172, 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, 176, 176, 176, 177, 177, 177, 178, 178, 178, 178, 179, 179, 179, 179, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, - 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 183, 183, 183, 183, 183, 183, 183, 183, 184, - 184, 184, 184, 184, 184, 184, 184, 184, 185, 185, - 185, 185, 185, 186, 186, 188, 187, 190, 189, 191, - 191, 192, 192, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 194, 195, 195, 195, 195, 196, 196, 197, - 197, 197, 198, 198, 198, 199, 200, 200, 200, 202, - 201, 201, 203, 203, 204, 204, 204, 205, 205, 205, + 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 183, 183, 183, 183, 183, 183, 183, + 183, 184, 184, 184, 184, 184, 184, 184, 184, 184, + 185, 185, 185, 185, 185, 186, 186, 188, 187, 190, + 189, 191, 191, 192, 192, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 194, 195, 195, 195, 195, 196, + 196, 197, 197, 197, 198, 198, 198, 199, 200, 200, + 200, 202, 201, 201, 203, 203, 204, 204, 204, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 206, 206, 206, 206, 206, 207, 209, 208, - 210, 210, 211, 211, 211, 211, 211, 211, 211, 211, + 205, 205, 205, 205, 206, 206, 206, 206, 206, 207, + 209, 208, 210, 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, @@ -1259,22 +1265,22 @@ static const yytype_uint8 yyr1[] = 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 212, 212, - 213, 213, 214, 214, 215, 215, 215, 215, 215, 215, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 212, 212, 213, 213, 214, 214, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 216, 216, 216, + 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 217, 217, 217, - 217, 217, 217, 217, 218, 218, 218, 218, 218, 218, + 216, 216, 216, 216, 216, 216, 216, 216, 216, 217, + 217, 217, 217, 217, 217, 217, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, - 219, 219, 219, 219, 219, 219, 220, 220, 220, 221, - 221, 222, 222, 223 + 218, 218, 219, 219, 219, 219, 219, 219, 220, 220, + 220, 221, 221, 222, 222, 223 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1297,20 +1303,20 @@ static const yytype_uint8 yyr2[] = 1, 2, 2, 2, 2, 2, 2, 3, 4, 3, 3, 0, 6, 1, 1, 1, 3, 2, 1, 3, 1, 2, 1, 2, 1, 3, 5, 3, 4, 1, - 1, 2, 1, 3, 3, 5, 3, 3, 4, 1, - 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, - 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, - 7, 3, 1, 2, 2, 2, 2, 2, 3, 4, - 7, 1, 1, 2, 1, 1, 1, 2, 4, 1, - 1, 2, 1, 1, 1, 2, 4, 2, 1, 1, - 2, 2, 2, 2, 3, 0, 5, 0, 7, 1, - 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, - 3, 3, 4, 4, 2, 3, 1, 1, 1, 1, - 3, 5, 1, 2, 4, 1, 1, 1, 1, 0, - 6, 4, 2, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 1, 2, 1, 3, 2, 1, 0, 2, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 3, 3, 5, 3, 3, 4, 5, + 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, + 3, 4, 1, 1, 1, 2, 2, 2, 2, 2, + 3, 4, 7, 3, 1, 2, 2, 2, 2, 2, + 3, 4, 7, 1, 1, 2, 1, 1, 1, 2, + 4, 1, 1, 2, 1, 1, 1, 2, 4, 2, + 1, 1, 2, 2, 2, 2, 3, 0, 5, 0, + 7, 1, 1, 2, 3, 2, 2, 2, 3, 3, + 3, 3, 3, 3, 4, 4, 2, 3, 1, 1, + 1, 1, 3, 5, 1, 2, 4, 1, 1, 1, + 1, 0, 6, 4, 2, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 1, 2, 1, 3, 2, 1, + 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1320,22 +1326,22 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 1, 4, 7, 7, 4, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 1, 4, 7, 7, + 4, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, + 4, 7, 7, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 2, 5, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 4, 3, 3, 3, 3, 1, 4, 7, - 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 2, 5, 2, 2, 2, - 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, + 4, 2, 5, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 4, 3, 3, 3, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 4, 7, 7, 4, 2, - 5, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 5, 4, 4, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, - 1, 1, 2, 0 + 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 1, 1, 1, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1343,751 +1349,780 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 553, 0, 0, 0, 553, 5, 501, 497, 500, - 551, 503, 0, 0, 0, 0, 0, 0, 0, 499, - 0, 0, 0, 0, 0, 0, 0, 0, 498, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 447, 502, - 212, 277, 278, 280, 281, 266, 0, 294, 265, 292, - 287, 283, 284, 282, 286, 267, 0, 268, 285, 297, - 279, 553, 4, 214, 215, 216, 0, 256, 0, 211, - 274, 275, 276, 1, 20, 21, 0, 29, 0, 0, - 0, 0, 0, 0, 553, 553, 0, 6, 15, 7, - 18, 0, 13, 43, 14, 16, 17, 31, 553, 553, - 553, 553, 553, 553, 0, 553, 553, 553, 229, 0, - 465, 0, 0, 228, 553, 553, 0, 0, 553, 553, - 471, 469, 470, 468, 212, 277, 278, 280, 281, 294, - 292, 287, 283, 282, 286, 285, 279, 0, 0, 412, - 467, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 555, 0, 0, 0, 555, 5, 503, 499, 502, + 553, 505, 0, 0, 0, 0, 0, 0, 0, 501, + 0, 0, 0, 0, 0, 0, 0, 0, 500, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 449, 504, + 214, 279, 280, 282, 283, 268, 0, 296, 267, 294, + 289, 285, 286, 284, 288, 269, 0, 270, 287, 299, + 281, 555, 4, 216, 217, 218, 0, 258, 0, 213, + 276, 277, 278, 1, 20, 21, 0, 29, 0, 0, + 0, 0, 0, 0, 555, 555, 0, 6, 15, 7, + 18, 0, 13, 43, 14, 16, 17, 31, 555, 555, + 555, 555, 555, 555, 0, 555, 555, 555, 231, 0, + 467, 0, 0, 230, 555, 555, 0, 0, 555, 555, + 473, 471, 472, 470, 214, 279, 280, 282, 283, 296, + 294, 289, 285, 284, 288, 287, 281, 0, 0, 414, + 469, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 552, 553, 296, 293, 283, 289, - 283, 288, 291, 549, 550, 213, 290, 0, 553, 553, - 553, 553, 553, 553, 233, 202, 553, 0, 254, 235, - 217, 22, 553, 0, 0, 553, 0, 25, 24, 23, - 0, 126, 0, 0, 19, 0, 272, 77, 220, 41, + 0, 0, 0, 0, 554, 555, 298, 295, 285, 291, + 285, 290, 293, 551, 552, 215, 292, 0, 555, 555, + 555, 555, 555, 555, 235, 204, 555, 0, 256, 237, + 219, 22, 555, 0, 0, 555, 0, 25, 24, 23, + 0, 126, 0, 0, 19, 0, 274, 77, 222, 41, 0, 42, 32, 37, 35, 39, 0, 40, 34, 0, - 36, 38, 11, 0, 0, 46, 222, 223, 224, 256, - 0, 219, 0, 411, 410, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 230, 553, 232, 231, 0, 0, - 0, 0, 0, 0, 0, 0, 496, 480, 481, 482, - 483, 484, 485, 488, 489, 495, 0, 477, 478, 479, - 486, 487, 475, 476, 472, 473, 474, 494, 493, 0, - 0, 234, 295, 553, 207, 203, 204, 206, 205, 0, - 553, 262, 0, 259, 258, 255, 257, 0, 553, 553, - 30, 0, 0, 553, 269, 553, 0, 0, 54, 273, - 63, 65, 48, 33, 0, 553, 221, 553, 0, 298, - 164, 0, 0, 45, 44, 0, 227, 225, 451, 457, - 453, 455, 456, 463, 0, 462, 452, 459, 0, 458, - 461, 464, 0, 460, 454, 448, 413, 0, 492, 491, - 208, 0, 0, 409, 408, 263, 252, 218, 553, 0, - 0, 240, 239, 0, 0, 271, 553, 138, 139, 0, - 0, 0, 0, 128, 129, 553, 137, 127, 56, 58, - 0, 553, 0, 0, 553, 0, 553, 181, 182, 0, - 553, 553, 553, 553, 553, 0, 180, 553, 67, 0, - 553, 0, 8, 0, 553, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 553, 140, 0, 0, 466, - 0, 490, 553, 209, 260, 0, 236, 0, 0, 0, - 0, 241, 553, 0, 0, 0, 553, 131, 553, 133, - 553, 0, 191, 192, 0, 553, 553, 553, 553, 553, - 553, 553, 190, 0, 55, 553, 544, 540, 543, 553, - 154, 0, 0, 542, 0, 0, 0, 541, 0, 0, - 0, 0, 0, 0, 155, 158, 553, 179, 504, 545, - 153, 0, 0, 0, 49, 553, 0, 553, 187, 183, - 184, 186, 185, 73, 553, 12, 553, 165, 299, 300, - 298, 0, 553, 553, 0, 170, 172, 169, 167, 0, - 146, 142, 93, 94, 95, 96, 97, 98, 101, 102, - 117, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 121, 120, 104, 103, 90, 92, 91, - 99, 100, 88, 89, 85, 86, 87, 84, 0, 0, - 83, 141, 143, 145, 144, 0, 0, 0, 151, 553, - 0, 50, 162, 226, 0, 0, 0, 264, 0, 0, - 0, 245, 546, 0, 244, 0, 243, 0, 0, 0, - 553, 242, 0, 0, 0, 270, 0, 553, 0, 122, - 125, 123, 130, 553, 197, 193, 194, 196, 195, 0, - 0, 553, 135, 160, 57, 553, 0, 59, 553, 553, - 0, 509, 0, 0, 514, 513, 512, 0, 0, 511, - 553, 157, 0, 553, 0, 0, 0, 0, 0, 0, + 36, 38, 11, 0, 0, 46, 224, 225, 226, 258, + 0, 221, 0, 413, 412, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 232, 555, 234, 233, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 482, 483, 484, + 485, 486, 487, 490, 491, 497, 0, 479, 480, 481, + 488, 489, 477, 478, 474, 475, 476, 496, 495, 0, + 0, 236, 297, 555, 209, 205, 206, 208, 207, 0, + 555, 264, 0, 261, 260, 257, 259, 0, 555, 555, + 30, 0, 0, 555, 271, 555, 0, 0, 54, 275, + 63, 65, 48, 33, 0, 555, 223, 555, 0, 300, + 164, 0, 0, 45, 44, 0, 229, 227, 453, 459, + 455, 457, 458, 465, 0, 464, 454, 461, 0, 460, + 463, 466, 0, 462, 456, 450, 415, 0, 494, 493, + 210, 0, 0, 411, 410, 265, 254, 220, 555, 0, + 0, 242, 241, 0, 0, 273, 555, 138, 139, 0, + 0, 0, 0, 128, 129, 555, 137, 127, 56, 58, + 0, 555, 0, 0, 555, 0, 555, 183, 184, 0, + 555, 555, 555, 555, 555, 0, 182, 555, 67, 0, + 555, 0, 8, 0, 555, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 47, 555, 140, 0, 0, 468, + 0, 492, 555, 211, 262, 0, 238, 0, 0, 0, + 0, 243, 555, 0, 0, 0, 555, 131, 555, 133, + 555, 0, 193, 194, 0, 555, 555, 555, 555, 555, + 555, 555, 192, 0, 55, 555, 546, 542, 545, 555, + 154, 0, 0, 544, 0, 0, 0, 0, 543, 0, + 0, 0, 0, 0, 0, 155, 158, 555, 181, 506, + 547, 153, 0, 0, 0, 49, 555, 0, 555, 189, + 185, 186, 188, 187, 73, 555, 12, 555, 165, 301, + 302, 300, 0, 555, 555, 0, 170, 172, 169, 167, + 0, 146, 142, 93, 94, 95, 96, 97, 98, 101, + 102, 117, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 121, 120, 104, 103, 90, 92, + 91, 99, 100, 88, 89, 85, 86, 87, 84, 0, + 0, 83, 141, 143, 145, 144, 0, 0, 0, 151, + 555, 0, 50, 162, 228, 0, 0, 0, 266, 0, + 0, 0, 247, 548, 0, 246, 0, 245, 0, 0, + 0, 555, 244, 0, 0, 0, 272, 0, 555, 0, + 122, 125, 123, 130, 555, 199, 195, 196, 198, 197, + 0, 0, 555, 135, 160, 57, 555, 0, 59, 555, + 0, 555, 0, 511, 180, 0, 0, 516, 515, 514, + 0, 0, 513, 555, 157, 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 553, 0, 52, 75, 188, 553, 0, 0, 302, 303, - 305, 304, 309, 306, 307, 308, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, 335, 336, 337, 338, 339, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 364, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 384, 361, 362, - 363, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 378, 379, 380, 381, 382, 340, - 383, 553, 401, 402, 403, 394, 406, 390, 391, 389, - 396, 397, 385, 386, 387, 388, 395, 393, 400, 398, - 404, 399, 392, 405, 301, 0, 9, 0, 0, 168, - 171, 147, 119, 118, 150, 149, 163, 553, 0, 0, - 450, 449, 553, 261, 548, 251, 547, 250, 249, 248, - 247, 246, 238, 0, 26, 0, 132, 136, 134, 198, - 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 161, 414, 0, 0, 61, 0, 0, 177, 553, 0, - 553, 0, 0, 0, 539, 79, 64, 78, 156, 159, - 176, 523, 524, 525, 526, 527, 528, 531, 532, 538, - 0, 520, 521, 522, 529, 530, 518, 519, 515, 516, - 517, 537, 536, 0, 0, 0, 69, 66, 0, 553, - 0, 189, 553, 0, 166, 10, 173, 553, 174, 0, - 148, 51, 210, 0, 0, 553, 0, 0, 0, 423, - 421, 422, 420, 0, 0, 419, 0, 0, 0, 0, + 0, 0, 0, 555, 0, 52, 75, 190, 555, 0, + 0, 304, 305, 307, 306, 311, 308, 309, 310, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 343, + 344, 345, 346, 347, 348, 349, 350, 351, 366, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 386, 363, 364, 365, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, + 383, 384, 342, 385, 555, 403, 404, 405, 396, 408, + 392, 393, 391, 398, 399, 387, 388, 389, 390, 397, + 395, 402, 400, 406, 401, 394, 407, 303, 0, 9, + 0, 0, 168, 171, 147, 119, 118, 150, 149, 163, + 555, 0, 0, 452, 451, 555, 263, 550, 253, 549, + 252, 251, 250, 249, 248, 240, 0, 26, 0, 132, + 136, 134, 200, 203, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 161, 416, 0, 0, 61, 0, 0, + 177, 555, 555, 0, 555, 0, 0, 0, 541, 79, + 64, 78, 156, 159, 176, 525, 526, 527, 528, 529, + 530, 533, 534, 540, 0, 522, 523, 524, 531, 532, + 520, 521, 517, 518, 519, 539, 538, 0, 0, 0, + 69, 66, 0, 555, 0, 191, 555, 0, 166, 10, + 173, 555, 174, 0, 148, 51, 212, 0, 0, 555, + 0, 0, 0, 425, 423, 424, 422, 0, 0, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 199, 0, 60, - 163, 178, 0, 0, 508, 0, 505, 80, 0, 0, - 535, 534, 71, 553, 53, 0, 553, 68, 407, 0, - 553, 27, 28, 0, 0, 0, 0, 0, 446, 432, - 433, 434, 435, 436, 437, 438, 439, 445, 0, 429, - 430, 431, 427, 428, 424, 425, 426, 444, 443, 0, - 0, 62, 0, 510, 0, 0, 533, 553, 0, 553, - 74, 175, 152, 553, 0, 418, 0, 415, 0, 442, - 441, 0, 0, 81, 0, 0, 553, 76, 200, 0, - 0, 440, 507, 506, 82, 553, 70, 0, 0, 72, - 417, 416 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 201, 0, 60, 163, 555, 178, 0, 0, 510, + 0, 507, 80, 0, 0, 537, 536, 71, 555, 53, + 0, 555, 68, 409, 0, 555, 27, 28, 0, 0, + 0, 0, 0, 448, 434, 435, 436, 437, 438, 439, + 440, 441, 447, 0, 431, 432, 433, 429, 430, 426, + 427, 428, 446, 445, 0, 0, 62, 179, 0, 512, + 0, 0, 535, 555, 0, 555, 74, 175, 152, 555, + 0, 420, 0, 417, 0, 444, 443, 0, 0, 81, + 0, 0, 555, 76, 202, 0, 0, 442, 509, 508, + 82, 555, 70, 0, 0, 72, 419, 418 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 4, 5, 401, 402, 88, 317, 89, 90, 192, - 91, 92, 93, 325, 385, 414, 484, 204, 380, 453, - 454, 604, 224, 381, 384, 496, 923, 967, 655, 859, - 826, 551, 590, 94, 202, 372, 373, 374, 375, 415, - 777, 473, 474, 602, 560, 323, 504, 505, 475, 395, + 91, 92, 93, 325, 385, 414, 485, 204, 380, 453, + 454, 605, 224, 381, 384, 497, 928, 973, 658, 863, + 830, 552, 591, 94, 202, 372, 373, 374, 375, 415, + 780, 474, 475, 603, 561, 323, 505, 506, 476, 395, 451, 184, 61, 225, 110, 62, 63, 298, 64, 299, 360, 361, 431, 65, 66, 295, 291, 292, 67, 68, - 95, 366, 96, 69, 70, 71, 72, 399, 400, 498, - 764, 352, 232, 233, 810, 139, 38, 477, 478, 571, + 95, 366, 96, 69, 70, 71, 72, 399, 400, 499, + 767, 352, 232, 233, 813, 139, 38, 478, 479, 572, 416, 39, 234 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -570 +#define YYPACT_NINF -646 static const yytype_int16 yypact[] = { - 367, -570, 2114, 3257, 18, 3147, -570, -570, -570, -570, - -570, -570, -95, -89, -84, -68, -55, -17, -4, -570, - -2, 8, 40, 3369, 59, 105, 109, 41, -570, 135, - 138, 2114, 2114, 2114, 2114, 1274, 2114, 2756, -570, 182, - -570, -570, -570, -570, -570, -570, 3425, -570, -570, -570, - -570, 1725, -570, 1245, 1245, -570, 159, -570, 1245, -570, - -570, 449, -570, -570, -570, -570, 166, 24, 42, -570, - -570, -570, -570, -570, -570, -570, 171, -570, 168, 178, - 47, 181, 200, 203, 199, -570, 45, -570, -570, -570, - -570, 2451, -570, -570, -570, -570, -570, -570, 2114, 2114, - 2114, 2114, 2114, 2114, 3257, 2114, 2114, 2114, -570, 159, - 211, 159, 159, -570, 2114, 2114, 3257, 3257, 2114, 2114, - 6, 6, 6, 6, -95, -89, -84, -68, -55, -17, - -2, 8, 2085, 2378, 3067, 3246, 138, 157, -64, 2756, - 6, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, - 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, - 2114, 2114, 1574, 2114, -570, 449, -570, -570, 1815, -570, - 1245, -570, -570, -570, -570, -570, -570, 221, 449, 449, - 449, 449, 449, 449, 216, -570, -570, 3075, 234, -570, - -12, -570, 3597, 341, 159, -570, 243, -570, -570, -570, - 2518, -570, 247, 2585, -570, 159, -570, 239, 244, -570, - 3425, -570, 364, -570, -570, -570, 3313, -570, -570, 159, - -570, -570, -570, 159, 346, 264, -570, -570, -570, 24, - 42, -570, 248, 269, -570, 254, 267, 270, 274, 275, - 288, 279, 286, 291, -570, 2114, -570, -570, 293, 295, - 296, 311, 302, 306, 2114, 2114, -570, 1291, 2176, 792, - 792, 1527, 1527, 644, 644, -570, 2608, 2918, 2933, 2982, - 1527, 1527, 154, 154, 6, 6, 6, -570, -570, -50, - 2206, 216, -570, 449, 216, 216, 216, 216, 216, 116, - 2114, 159, 256, -570, -570, -570, -570, 3075, -570, 326, - -570, 330, 332, 3462, -570, 3201, 3425, 346, -570, -570, - -570, -9, -570, 182, 3425, 623, -570, -570, 317, -570, - -570, 159, 1664, -570, -570, 416, -7, -12, -570, -570, - -570, -570, -570, -570, 318, -570, -570, -570, 335, -570, - -570, -570, 343, -570, -570, 6, 2756, 2114, -570, -570, - 216, 349, 347, 2756, -570, 17, -570, 373, 3489, 0, - 374, 377, -570, 480, 159, -570, -570, -570, -570, 159, - 2369, 159, 382, 383, -570, 456, -570, -570, -570, -570, - 416, 1374, 370, 416, 1374, 416, 623, -570, -570, 381, - 623, 623, 623, 623, 623, 125, -570, 3516, -570, 378, - -570, 180, -570, 384, 1754, 2675, 388, 416, 416, 2368, - 416, 416, 416, 416, -570, 122, -570, 3075, 2114, -570, - 2114, 2756, 1374, -570, -570, 2114, -570, 257, 259, 506, - -33, -570, -570, 0, -23, 403, 3543, 402, 456, 407, - 429, 3201, -570, -570, 401, 456, 456, 456, 456, 456, - 456, -29, -570, 416, -570, 122, -570, -570, -570, 456, - -570, 3425, 408, -570, 3369, 398, 412, -570, 2114, 2114, - 2114, 1274, 2114, 405, 16, -570, 456, 2789, -570, 182, - -570, 416, 235, 410, -570, 122, 174, 623, 404, 404, - 404, 404, 404, -570, 2114, -570, 1374, -570, 1146, -570, - -570, 159, 2114, 1754, 406, 427, 2756, -570, -570, 416, - 213, 213, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, 411, 409, - -570, -570, 213, 213, 213, 261, 188, 1664, -570, 2114, - 432, -570, -570, 373, -22, 21, 415, 2722, 159, 470, - 159, -570, -570, 470, -570, 470, -570, 470, 470, 470, - 3570, -570, 535, 435, 159, -570, 3257, -29, 3257, -570, - -570, -570, -570, 456, 420, 420, 420, 420, 420, 179, - 705, 2114, -570, -570, -570, 122, 441, -570, -24, 456, - 3257, 430, 3257, 3257, 6, 6, 6, 425, 32, 6, - 503, -570, 1474, -24, 2114, 2114, 2114, 2114, 2114, 2114, - 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, - 2114, 2114, 2114, 2114, 2114, 1844, 2114, 285, 557, 438, - 503, 459, -570, -570, 404, 1374, 440, 445, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, -570, -570, 447, -570, 446, 452, -570, - 1934, 213, -570, -570, -570, -570, 2675, 1374, 453, 416, - -570, -570, 503, -570, -570, -570, -570, -570, -570, -570, - -570, -570, -570, 450, -570, 457, -570, -570, -570, 420, - 443, 469, 463, 482, 705, 705, 705, 705, 1274, 705, - 2903, -570, 466, 491, -570, 416, 2114, -570, -24, 486, - 2114, 479, 492, 2114, -570, -570, 79, -570, -570, -570, - -570, 1291, 2176, 792, 792, 1527, 1527, 644, 644, -570, - 2739, 2918, 2933, 2982, 1527, 1527, 154, 154, 6, 6, - 6, -570, -570, 35, 2231, 485, -570, 79, 416, 1374, - 493, -570, 503, 1018, -570, -570, -570, 1754, 2756, 494, - -570, -570, 79, 504, 515, 1374, 3257, 3257, 3257, 49, - 49, 49, 49, 499, 63, 49, 705, 705, 705, 705, - 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, - 705, 705, 705, 705, 705, 2024, 2114, -570, 416, -570, - 2756, -570, 487, 500, -570, 509, 6, -570, 510, 2114, - -570, -570, -570, 1374, -570, 501, 503, 79, -570, 508, - 503, -570, -570, 502, 522, 513, 526, 705, -570, 1491, - 2948, 3114, 3114, 1566, 1566, 830, 830, -570, 2870, 3060, - 3076, 877, 594, 594, 49, 49, 49, -570, -570, 68, - 2250, -570, 2114, -570, 2114, 14, 2756, 1374, 518, 503, - 79, -570, 79, 503, 525, -570, 527, 49, 705, -570, - -570, 117, 118, -570, 524, 529, 503, 79, 79, 2114, - 2114, 2903, -570, -570, -570, 503, 79, 144, 156, 79, - -570, -570 + 21, -646, 2272, 3337, 36, 3218, -646, -646, -646, -646, + -646, -646, -96, -63, -33, -9, 16, 18, -71, -646, + 24, 33, 40, 3505, 42, 47, 65, 79, -646, 80, + 82, 2272, 2272, 2272, 2272, 1532, 2272, 2813, -646, 99, + -646, -646, -646, -646, -646, -646, 3561, -646, -646, -646, + -646, 1793, -646, 1503, 1503, -646, 234, -646, 1503, -646, + -646, 318, -646, -646, -646, -646, 106, 29, 77, -646, + -646, -646, -646, -646, -646, -646, 44, -646, 100, 110, + 86, 140, 156, 178, 169, -646, 49, -646, -646, -646, + -646, 2508, -646, -646, -646, -646, -646, -646, 2272, 2272, + 2272, 2272, 2272, 2272, 3337, 2272, 2272, 2272, -646, 234, + 171, 234, 234, -646, 2272, 2272, 3337, 3337, 2272, 2272, + 122, 122, 122, 122, -96, -63, -33, -9, 16, 18, + 24, 33, 2243, 3438, 3550, 3727, 82, 182, -62, 2813, + 122, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, + 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, + 2272, 2272, 1732, 2272, -646, 318, -646, -646, 1883, -646, + 1503, -646, -646, -646, -646, -646, -646, 193, 318, 318, + 318, 318, 318, 318, 191, -646, -646, 2341, 210, -646, + 126, -646, 3759, 316, 234, -646, 222, -646, -646, -646, + 2575, -646, 223, 2642, -646, 234, -646, 219, 221, -646, + 3561, -646, 343, -646, -646, -646, 3393, -646, -646, 234, + -646, -646, -646, 234, 196, 255, -646, -646, -646, 29, + 77, -646, 240, 270, -646, 248, 259, 261, 274, 275, + 280, 277, 279, 285, -646, 2272, -646, -646, 288, 290, + 291, 312, 305, 309, 2272, 2272, -646, 1549, 2991, 715, + 715, 668, 668, 347, 347, -646, 2665, 837, 3006, 3039, + 668, 668, 201, 201, 122, 122, 122, -646, -646, -49, + 1107, 191, -646, 318, 191, 191, 191, 191, 191, 131, + 2272, 234, 313, -646, -646, -646, -646, 2341, -646, 297, + -646, 332, 334, 3132, -646, 3272, 3561, 196, -646, -646, + -646, 11, -646, 99, 3561, 218, -646, -646, 326, -646, + -646, 234, 1822, -646, -646, 230, 177, 126, -646, -646, + -646, -646, -646, -646, 330, -646, -646, -646, 336, -646, + -646, -646, 345, -646, -646, 122, 2813, 2272, -646, -646, + 191, 356, 359, 2813, -646, 166, -646, 350, 3598, 38, + 379, 382, -646, 483, 234, -646, -646, -646, -646, 234, + 3328, 234, 375, 387, -646, 136, -646, -646, -646, -646, + 230, 984, 378, 230, 984, 230, 218, -646, -646, 380, + 218, 218, 218, 218, 218, 175, -646, 3625, -646, 369, + -646, 253, -646, 374, 1912, 2732, 381, 230, 230, 2415, + 230, 230, 230, 230, -646, 438, -646, 2341, 2272, -646, + 2272, 2813, 984, -646, -646, 2272, -646, 327, 466, 642, + 272, -646, -646, 38, -40, 394, 3652, 395, 136, 400, + 415, 3272, -646, -646, 393, 136, 136, 136, 136, 136, + 136, -50, -646, 230, -646, 438, -646, -646, -646, 136, + -646, 3449, 399, -646, 3505, 1632, 392, 423, -646, 2272, + 2272, 2272, 1532, 2272, 414, 1, -646, 136, 2846, -646, + 99, -646, 230, 153, 424, -646, 438, 216, 218, 426, + 426, 426, 426, 426, -646, 2272, -646, 984, -646, 1404, + -646, -646, 234, 2272, 1912, 422, 446, 2813, -646, -646, + 230, 245, 245, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, 429, + 427, -646, -646, 245, 245, 245, 185, 267, 1822, -646, + 2272, 450, -646, -646, 350, -31, -26, 433, 2779, 234, + 871, 234, -646, -646, 871, -646, 871, -646, 871, 871, + 871, 3679, -646, 558, 459, 234, -646, 3337, -50, 3337, + -646, -646, -646, -646, 136, 447, 447, 447, 447, 447, + 268, 586, 2272, -646, -646, -646, 438, 467, -646, -36, + 3561, 136, 3337, 452, -646, 3337, 3337, 122, 122, 122, + 451, -19, 122, 530, -646, 1084, -36, 2272, 2272, 2272, + 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, + 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2002, 2272, + 383, 579, 460, 530, 478, -646, -646, 426, 984, 458, + 468, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, -646, -646, 469, -646, + 473, 476, -646, 2092, 245, -646, -646, -646, -646, 2732, + 984, 477, 230, -646, -646, 530, -646, -646, -646, -646, + -646, -646, -646, -646, -646, -646, 479, -646, 482, -646, + -646, -646, 447, 471, 496, 488, 498, 586, 586, 586, + 586, 1532, 586, 2960, -646, 485, 508, -646, 230, 2272, + -646, 136, -36, 501, 2272, 492, 503, 2272, -646, -646, + 2, -646, -646, -646, -646, 1549, 2991, 715, 715, 668, + 668, 347, 347, -646, 2796, 837, 3006, 3039, 668, 668, + 201, 201, 122, 122, 122, -646, -646, -6, 2364, 499, + -646, 2, 230, 984, 494, -646, 530, 1276, -646, -646, + -646, 1912, 2813, 500, -646, -646, 2, 514, 520, 984, + 3337, 3337, 3337, 167, 167, 167, 167, 506, 20, 167, + 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, + 586, 586, 586, 586, 586, 586, 586, 586, 586, 2182, + 2272, -646, 230, -646, 2813, -36, -646, 505, 507, -646, + 519, 122, -646, 521, 2272, -646, -646, -646, 984, -646, + 522, 530, 2, -646, 525, 530, -646, -646, 527, 509, + 528, 539, 586, -646, 2976, 798, 1145, 1145, 1120, 1120, + 517, 517, -646, 2927, 3118, 3133, 3151, 358, 358, 167, + 167, 167, -646, -646, 93, 2389, -646, -646, 2272, -646, + 2272, 26, 2813, 984, 531, 530, 2, -646, 2, 530, + 534, -646, 535, 167, 586, -646, -646, 133, 137, -646, + 536, 537, 530, 2, 2, 2272, 2272, 2960, -646, -646, + -646, 530, 2, 141, 145, 2, -646, -646 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -570, -570, -179, -570, 152, -570, -570, 465, -570, -570, - -58, -74, -570, -570, -570, -119, -197, -570, -570, -570, - -153, -245, 464, -570, -570, -570, -570, -570, -570, -570, - -554, -570, -570, 232, -570, -570, -570, 236, 305, -346, - -570, -370, -570, 89, -384, -262, -500, -570, 56, -318, - -332, 76, -44, 476, 238, 5, -53, -570, -48, -570, - -570, -570, 272, -42, -570, -278, -570, -570, 19, 69, - -570, -570, -570, 46, 536, -570, -570, 207, -570, -19, - -570, -465, -94, -20, -51, 57, -569, -570, -570, -283, - 436, -195, -1 + -646, -646, -162, -646, 160, -646, -646, 455, -646, -646, + -82, -77, -646, -646, -646, -116, -187, -646, -646, -646, + -142, -235, 480, -646, -646, -646, -646, -646, -646, -646, + -645, -646, -646, 239, -646, -646, -646, 241, 310, -251, + -646, -375, -646, 96, -438, -252, -503, -646, -459, -279, + -396, -109, -41, 487, 232, -13, -80, -646, -27, -646, + -646, -646, 265, 19, -646, -287, -646, -646, -3, 115, + -646, -646, -646, -11, -35, -646, -646, 202, -646, -58, + -646, -454, -75, -20, 0, 377, -139, -646, -646, -362, + 143, -198, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -255 +#define YYTABLE_NINF -257 static const yytype_int16 yytable[] = { - 6, 382, 165, 768, 97, 235, 236, 237, 238, 239, - 201, 241, 242, 243, 483, 138, 303, 313, 73, 357, - 248, 249, 173, 174, 252, 253, 200, 203, 621, 656, - 98, 811, 173, 174, 455, 149, 99, 482, 226, 485, - 137, 100, 111, 227, 255, 379, 577, 578, 579, 228, - 173, 174, 566, 173, 174, 173, 174, 101, 255, 37, - 185, 510, 511, 256, 552, 553, 554, 555, 486, 113, - 102, 606, 488, 489, 490, 491, 492, 348, 894, 427, - 428, 429, 600, 97, 97, 582, 255, 816, 120, 121, - 122, 123, 112, 140, 778, -237, 857, 601, -237, 430, - -254, 651, 601, 417, 583, 780, 587, 605, 103, 240, - 229, 383, 104, 594, 595, 596, 597, 598, 599, 358, - 205, 250, 251, 105, 622, 424, 657, 608, 425, 255, - 161, 162, 163, 106, 187, 647, 812, 231, 397, 563, - 255, 983, 279, 255, 623, 574, 576, 226, 781, 189, - 226, 338, 227, 561, 195, 227, 917, 117, 228, 824, - 230, 228, 920, 771, 185, 107, 312, 173, 174, 654, - 918, 255, 315, 904, 905, 906, 255, 185, 185, 185, - 185, 185, 185, 149, 114, 293, 479, 436, 164, 479, - 938, 97, 775, 607, 6, 979, 173, 174, 257, 258, + 6, 771, 200, 203, 97, 165, 614, 201, 861, 484, + 357, 226, 113, 624, 313, 138, 169, 607, 171, 172, + 111, 382, 137, 176, 235, 236, 237, 238, 239, 98, + 241, 242, 243, 303, 173, 174, 73, 173, 174, 248, + 249, 659, 588, 252, 253, 104, 255, 567, 654, 595, + 596, 597, 598, 599, 600, 379, 281, 173, 174, 255, + 185, 601, 99, 609, 227, 256, 575, 577, 583, 284, + 285, 286, 287, 288, 289, 819, 602, 255, 348, 922, + 231, 626, 255, 97, 97, 173, 174, 584, 229, 255, + 602, 240, 100, 923, 173, 174, 783, 169, 171, 172, + 176, 784, 255, 250, 251, 164, 781, 487, 828, 625, + 228, 489, 490, 491, 492, 493, 101, 427, 428, 429, + 226, 925, 660, 226, 205, 1, 2, 3, 255, 455, + 564, 383, 483, 169, 486, 169, 358, 430, 112, 187, + 876, 102, 279, 103, 442, 443, 444, 943, 815, 105, + 445, 149, 296, 989, 191, 397, 511, 512, 106, 553, + 554, 555, 556, 562, 185, 107, 833, 114, 816, 312, + 338, 820, 115, 227, 350, 315, 227, 185, 185, 185, + 185, 185, 185, 480, 189, 293, 480, 446, 834, 231, + 116, 97, 231, 195, 6, 117, 898, 229, 802, 175, + 229, 255, 606, 608, 436, 118, 230, 119, 788, 657, + 188, 190, 790, 186, 791, 822, 792, 793, 794, 228, + 985, 932, 228, 196, 480, 193, 387, 388, 389, 206, + 149, 650, 390, -239, 655, 194, -239, 447, 173, 174, + 406, 255, 173, 174, 407, 255, 161, 162, 163, 255, + 197, 448, 244, 255, 246, 247, 449, 290, 351, 774, + 998, 450, 296, 651, 999, 378, 198, 480, 1006, 391, + 581, 778, 1007, 386, 424, 173, 174, 425, 559, 560, + 652, 408, 185, 864, -256, -124, 976, 417, 199, 354, + 978, 908, 909, 910, 376, 651, 245, 6, 362, 480, + 494, 495, 97, 319, 377, 320, 321, 322, 409, 254, + 559, 560, 777, 283, 396, 230, 6, 290, 230, 392, + 297, 158, 159, 160, 301, 161, 162, 163, 177, 304, + 993, 410, 178, 393, 994, 173, 174, 302, 394, 305, + 477, 656, 495, 477, 310, 411, 311, 1002, 309, 10, + 412, 578, 579, 580, 817, 413, 1005, 97, 200, 376, + 501, 502, 316, 590, 324, 6, 318, 328, 934, 179, + 559, 560, 326, 327, 452, 329, 149, 45, 255, 37, + 481, 477, 296, 481, 916, 396, 330, 898, 331, 396, + 396, 396, 396, 396, 602, 803, 97, 334, 565, 500, + 566, 332, 333, 508, 335, 873, 336, 359, 120, 121, + 122, 123, 337, 140, 563, 339, 55, 340, 341, 180, + 611, 481, 569, 57, 477, 915, 570, 480, 770, 342, + 376, 6, 343, 181, 355, 97, 344, 452, 182, 97, + 363, 356, 364, 183, 452, 452, 452, 452, 452, 452, + 604, 398, 621, 113, 563, 418, 477, -255, 452, 620, + 480, 111, 814, 419, 403, 156, 157, 158, 159, 160, + 420, 161, 162, 163, 173, 174, 452, 967, 905, 906, + 907, 422, 908, 909, 910, 563, 432, 396, 930, 423, + 433, 434, 440, 651, 354, 441, 481, 498, 482, 503, + 488, 510, 585, 508, 938, 84, 587, 435, 559, 560, + 859, 589, 437, 594, 439, 612, 45, 615, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 229, - 280, 813, 229, 652, 817, 255, 255, 479, 872, 319, - 115, 320, 556, 557, 116, 811, 811, 811, 811, 830, - 811, 281, 290, 351, 992, 993, 231, 558, 559, 231, - 493, 494, 255, 580, 284, 285, 286, 287, 288, 289, - 118, 799, 378, 119, 255, 173, 174, 173, 174, 230, - 386, 1000, 230, 186, 158, 159, 160, 818, 161, 162, - 163, 191, 185, 1001, 254, 860, 785, 500, 501, 354, - 787, 197, 788, 193, 789, 790, 791, 6, 362, 653, - 494, 479, 97, 194, 377, 601, 800, 45, 927, 45, - 198, 345, 346, 199, 396, -124, 6, 811, 811, 811, - 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, - 811, 811, 811, 811, 811, 811, 245, 476, 558, 559, - 476, 283, 290, 814, 297, 648, 55, 353, 55, 301, - 304, 376, 568, 57, 568, 57, 569, 97, 573, 350, - 558, 559, 649, 305, 310, 6, 589, 929, 811, 311, - 10, 648, 970, 324, 452, 328, 972, 255, 476, 405, - 480, 329, 200, 480, 356, 396, 558, 559, 774, 396, - 396, 396, 396, 396, 330, 648, 97, 331, 564, 499, - 565, 332, 333, 507, 421, 334, 335, 869, 767, 811, - 558, 559, 855, 336, 562, 987, 376, 609, 337, 988, - 339, 480, 340, 341, 173, 174, 406, 479, 342, 343, - 407, 6, 996, 344, 911, 97, 359, 452, 363, 97, - 364, 999, 398, 418, 452, 452, 452, 452, 452, 452, - 603, 618, 476, 319, 562, 320, 321, 322, 452, 177, - 479, 506, 419, 178, 442, 443, 444, 408, 420, 455, - 445, 1, 2, 3, 422, 452, 617, 423, 173, 174, - -253, 432, 567, 111, 562, 433, 396, 376, 434, 925, - 481, 441, 175, 354, 409, 480, 570, 570, 570, 440, - 179, 487, 507, 188, 190, 933, 497, 446, 509, 502, - 113, 584, 485, 586, 173, 174, 196, 410, 588, 84, - 45, 593, 206, 612, 610, 614, 615, 616, 613, 619, - 494, 411, 620, 112, 769, 770, 412, 650, 772, 773, - 779, 413, 782, 793, 794, 244, 601, 246, 247, 815, - 180, 353, 823, 968, 825, 820, 45, 447, 354, 55, - 506, 775, 605, 856, 181, 568, 57, 858, 875, 182, - 861, 448, 862, 865, 183, 864, 449, 873, 476, 97, - 866, 450, 479, 870, 874, 876, 603, 169, 877, 171, - 172, 796, 452, 798, 176, 55, 907, 985, 878, 908, - 354, 568, 57, 912, 562, 575, 914, 562, 452, 915, - 922, 476, 962, 931, 776, 819, 353, 821, 822, 827, - 926, 930, 562, 894, 932, 853, 937, 963, 969, 973, - 302, 387, 388, 389, 964, 965, 971, 390, 570, 974, - 975, 309, 570, 976, 570, 986, 570, 570, 570, 827, - 989, 994, 990, 766, 480, 316, 995, 300, 353, 318, - 871, 924, 909, 961, 479, 326, 327, 307, 169, 171, - 172, 176, 591, 149, 391, 438, 797, 592, 829, 308, - 479, 831, 832, 833, 834, 835, 836, 837, 838, 839, - 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, - 850, 851, 611, 854, 169, 581, 169, 765, 7, 8, - 9, 10, 0, 11, 901, 902, 903, 0, 904, 905, - 906, 0, 863, 296, 392, 0, 913, 355, 479, 0, - 0, 0, 0, 476, 0, 0, 0, 0, 393, 0, - 499, 0, 0, 394, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 879, 880, 881, 882, 403, 885, 801, - 0, 0, 156, 157, 158, 159, 160, 19, 161, 162, - 163, 0, 479, 0, 0, 0, 480, 0, 0, 0, - 0, 827, 0, 0, 0, 0, 0, 0, 884, 0, - 0, 802, 0, 803, 0, 0, 0, 28, 0, 0, - 435, 0, 0, 0, 0, 437, 0, 439, 0, 145, - 146, 147, 148, 883, 0, 476, 0, 562, 0, 0, - 804, 149, 0, 0, 805, 806, 0, 868, 807, 0, - 808, 476, 0, 296, 809, 939, 940, 941, 942, 943, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 616, + 280, 623, 571, 571, 571, 319, 898, 320, 557, 558, + 772, 653, 495, 974, 773, 55, 775, 776, 782, 354, + 785, 569, 57, 559, 560, 574, 796, 455, 797, 821, + 573, 573, 573, 602, 799, 818, 801, 824, 827, 112, + 97, 829, 480, 778, 477, 860, 862, 604, 865, 7, + 8, 9, 10, 452, 11, 866, 879, 868, 991, 823, + 869, 354, 825, 826, 870, 563, 877, 874, 563, 878, + 452, 486, 880, 881, 882, 911, 912, 477, 917, 919, + 920, 931, 831, 936, 927, 563, 980, 935, 857, 937, + 968, 345, 346, 942, 969, 903, 904, 905, 906, 907, + 804, 908, 909, 910, 970, 403, 971, 300, 19, 975, + 173, 174, 831, 977, 979, 981, 982, 481, 992, 995, + 996, 606, 769, 1000, 1001, 480, 875, 353, 814, 814, + 814, 814, 805, 814, 806, 929, 913, 966, 28, 592, + 438, 480, 593, 307, 800, 571, 867, 147, 148, 571, + 308, 571, 45, 571, 571, 571, 613, 149, 582, 405, + 403, 807, 0, 768, 0, 808, 809, 0, 0, 810, + 0, 811, 787, 573, 789, 812, 0, 573, 0, 573, + 0, 573, 573, 573, 421, 0, 0, 0, 798, 0, + 480, 55, 145, 146, 147, 148, 0, 569, 57, 477, + 0, 576, 0, 500, 149, 0, 0, 0, 0, 918, + 0, 814, 814, 814, 814, 814, 814, 814, 814, 814, + 814, 814, 814, 814, 814, 814, 814, 814, 814, 814, + 0, 0, 0, 0, 0, 480, 0, 0, 0, 481, + 0, 507, 0, 0, 831, 0, 156, 157, 158, 159, + 160, 888, 161, 162, 163, 0, 0, 0, 887, 0, + 0, 0, 568, 814, 0, 0, 0, 883, 884, 885, + 886, 0, 889, 892, 893, 894, 895, 896, 897, 0, + 452, 563, 477, 0, 0, 0, 0, 898, 0, 0, + 0, 154, 155, 156, 157, 158, 159, 160, 477, 161, + 162, 163, 0, 0, 0, 814, 617, 618, 619, 0, + 622, 0, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 481, 0, 0, 831, 149, 939, 940, 941, + 508, 0, 353, 0, 0, 0, 0, 0, 481, 173, + 174, 507, 0, 0, 0, 0, 0, 477, 0, 964, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, - 954, 955, 956, 957, 0, 0, 0, 0, 480, 894, - 0, 827, 0, 572, 572, 572, 507, 0, 0, 0, - 0, 0, 0, 910, 480, 0, 0, 0, 0, 476, - 916, 934, 935, 936, 0, 959, 977, 0, 0, 0, - 0, 0, 888, 889, 890, 891, 892, 893, 0, 0, - 0, 0, 0, 0, 0, 0, 894, 0, 154, 155, - 156, 157, 158, 159, 160, 0, 161, 162, 163, 0, - 0, 0, 480, 476, 506, 827, 0, 991, 0, 827, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, - 0, 0, 981, 0, 982, 0, 0, 0, 899, 900, - 901, 902, 903, 296, 904, 905, 906, 0, 0, 0, - 0, 0, 0, 960, 0, 0, 480, 0, 827, 997, - 998, 0, 827, 0, 0, 0, 966, 0, 0, 0, - 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, - 0, 0, 403, 0, 827, 899, 900, 901, 902, 903, - 0, 904, 905, 906, 784, 572, 786, 0, 0, 572, - 0, 572, 0, 572, 572, 572, 0, 0, 0, 0, - 795, 658, 659, 660, 661, 662, 663, 664, 665, 0, - 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, - 676, 0, 0, 0, 0, 0, 0, 677, 678, 679, - 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, - 690, 0, 0, 691, 692, 693, 694, 695, 696, 697, - 698, 699, 700, 701, 0, 702, 0, 703, 704, 705, - 706, 707, 708, 709, 710, 711, 712, 713, 714, 0, - 0, 0, 715, 0, 716, 0, 717, 718, 719, 720, - 721, 722, 723, 724, 725, 726, 727, 728, 0, 729, - 730, 731, 732, 733, 734, 735, 0, 736, 737, 738, - 739, 740, 0, 0, 0, 741, 742, 743, 744, 745, - 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, - 756, 757, 758, 759, 760, 761, 928, 762, 763, 658, - 659, 660, 661, 662, 663, 664, 665, 0, 666, 667, - 668, 669, 670, 671, 672, 673, 674, 675, 676, 0, - 0, 0, 0, 0, 0, 677, 678, 679, 680, 681, - 682, 683, 684, 685, 686, 687, 688, 689, 690, 0, - 0, 691, 692, 693, 694, 695, 696, 697, 698, 699, - 700, 701, 0, 702, 0, 703, 704, 705, 706, 707, - 708, 709, 710, 711, 712, 713, 714, 0, 0, 0, - 715, 0, 716, 0, 717, 718, 719, 720, 721, 722, - 723, 724, 725, 726, 727, 728, 0, 729, 730, 731, - 732, 733, 734, 735, 0, 736, 737, 738, 739, 740, - 0, 0, 0, 741, 742, 743, 744, 745, 746, 747, - 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, - 758, 759, 760, 761, 0, 762, 763, 7, 8, 9, - 10, 0, 11, 124, 0, 0, 0, 0, 0, 0, - 41, 0, 42, 43, 44, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 142, 143, 144, 145, 146, - 147, 148, 0, 0, 50, 170, 52, 0, 0, 125, - 149, 126, 127, 128, 45, 46, 0, 129, 18, 53, - 54, 48, 0, 0, 0, 0, 19, 130, 0, 0, - 0, 0, 58, 131, 132, 52, 0, 60, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 133, 134, - 26, 0, 27, 55, 0, 0, 28, 0, 0, 56, - 57, 135, 0, 0, 59, 0, 136, 456, 457, 458, - 10, 0, 459, 40, 0, 0, 460, 0, 0, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, - 0, 984, 0, 36, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 0, 161, 162, 163, 0, 41, + 954, 955, 956, 957, 958, 959, 960, 961, 962, 0, + 0, 900, 901, 902, 563, 0, 903, 904, 905, 906, + 907, 45, 908, 909, 910, 0, 0, 481, 0, 0, + 831, 0, 477, 0, 831, 779, 0, 353, 0, 0, + 0, 0, 983, 0, 0, 0, 0, 0, 987, 0, + 988, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 55, 161, 162, 163, 0, 0, 569, 57, 0, 0, + 0, 0, 481, 0, 831, 1003, 1004, 0, 831, 353, + 0, 0, 0, 0, 997, 0, 0, 456, 457, 458, + 10, 831, 459, 40, 0, 0, 460, 0, 0, 0, + 831, 0, 0, 0, 835, 836, 837, 838, 839, 840, + 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, + 851, 852, 853, 854, 855, 0, 858, 0, 0, 41, 0, 42, 43, 44, 45, 461, 0, 47, 462, 0, 0, 48, 0, 0, 0, 0, 463, 49, 0, 0, 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, - 464, 0, 0, 0, 0, 0, 0, 0, 53, 54, - 465, 0, 466, 55, 0, 0, 467, 0, 0, 56, + 464, 0, 0, 0, 0, 0, 465, 0, 53, 54, + 466, 0, 467, 55, 0, 0, 468, 0, 0, 56, 57, 58, 0, 0, 59, 0, 60, 456, 457, 458, - 10, 0, 459, 40, 0, 0, 828, 0, 0, 468, - 0, 0, 0, 469, 0, 0, 0, 470, 0, 471, - 0, 0, 0, 472, 0, 887, 888, 889, 890, 891, - 892, 893, 0, 0, 0, 0, 0, 0, 0, 41, - 894, 42, 43, 44, 45, 461, 0, 47, 462, 0, - 0, 48, 0, 0, 0, 0, 463, 49, 0, 0, - 0, 0, 0, 50, 51, 52, 147, 148, 0, 0, - 464, 0, 0, 0, 0, 0, 149, 0, 53, 54, - 465, 0, 466, 55, 0, 0, 467, 0, 0, 56, - 57, 58, 0, 0, 59, 0, 60, 7, 8, 9, - 10, 0, 11, 12, 0, 892, 893, 0, 0, 468, - 0, 0, 0, 469, 0, 894, 0, 470, 0, 471, - 0, 0, 0, 472, 896, 897, 898, 0, 0, 899, - 900, 901, 902, 903, 0, 904, 905, 906, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, - 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 0, 21, 22, 156, 157, 158, 159, 160, - 23, 161, 162, 163, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 0, 0, 0, 0, 899, 900, 901, 902, 903, 31, - 904, 905, 906, 32, 33, 0, 0, 34, 0, 35, - 0, 278, 0, 36, 0, 0, 0, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, - 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 41, 404, 42, 43, 44, 0, 0, 0, 166, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 167, 35, - 0, 0, 0, 36, 50, 168, 52, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, - 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 41, 503, 42, 43, 44, 0, 0, 0, 0, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 282, 35, - 0, 0, 0, 36, 50, 170, 52, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, - 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, - 0, 852, 0, 36, 0, 0, 0, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, - 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 0, 867, 0, 0, 0, 0, 0, 0, 0, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 0, 35, - 0, 0, 0, 36, 0, 0, 0, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 0, - 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 0, 27, 0, 0, 0, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 0, 0, - 41, 0, 42, 43, 44, 0, 0, 0, 166, 31, - 0, 0, 0, 32, 33, 0, 0, 34, 167, 35, - 0, 958, 0, 36, 50, 168, 52, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 0, 17, 18, 53, - 54, 0, 0, 0, 0, 0, 19, 20, 0, 0, - 0, 0, 58, 21, 22, 0, 0, 60, 0, 0, - 23, 143, 144, 145, 146, 147, 148, 0, 24, 25, - 26, 0, 27, 0, 0, 149, 28, 0, 0, 0, - 107, 29, 0, 0, 0, 0, 30, 0, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 0, 0, 31, - 0, 0, 0, 32, 33, 149, 0, 34, 0, 35, - 0, 0, 0, 36, 141, 142, 143, 144, 145, 146, - 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, - 149, 0, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 0, 0, 0, 0, 0, 0, 0, 0, 149, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 0, 0, 0, 349, 0, 0, 0, - 0, 0, 0, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 0, 161, 162, 163, 0, 0, - 0, 921, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 0, 161, 162, 163, 367, 368, 0, - 980, 512, 513, 514, 515, 516, 517, 518, 519, 0, - 0, 0, 0, 0, 0, 0, 0, 520, 0, 521, - 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, - 532, 0, 0, 0, 41, 0, 42, 43, 44, 0, - 533, 0, 47, 41, 0, 42, 43, 44, 0, 0, - 0, 0, 49, 0, 0, 0, 0, 0, 50, 51, - 52, 0, 0, 0, 534, 0, 0, 50, 170, 52, - 0, 0, 0, 53, 54, 0, 0, 0, 0, 207, - 208, 0, 53, 54, 0, 0, 58, 0, 0, 59, - 0, 60, 0, 0, 0, 58, 535, 0, 0, 536, - 60, 537, 538, 539, 540, 541, 542, 543, 544, 545, - 546, 547, 0, 548, 549, 209, 41, 550, 42, 43, - 44, 45, 210, 114, 47, 0, 0, 0, 48, 211, - 212, 213, 0, 0, 49, 0, 0, 0, 0, 214, - 50, 51, 52, 0, 0, 215, 207, 208, 0, 216, - 0, 0, 0, 217, 0, 53, 54, 0, 218, 0, - 55, 0, 0, 0, 0, 0, 219, 57, 58, 0, - 220, 59, 221, 60, 0, 0, 0, 0, 222, 0, + 10, 0, 459, 40, 0, 0, 832, 0, 0, 469, + 0, 0, 0, 470, 0, 0, 0, 471, 0, 472, + 0, 0, 0, 473, 990, 0, 0, 0, 0, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 0, 41, + 0, 42, 43, 44, 45, 461, 149, 47, 462, 896, + 897, 48, 0, 0, 0, 0, 463, 49, 0, 898, + 872, 0, 0, 50, 51, 52, 0, 0, 0, 0, + 464, 0, 894, 895, 896, 897, 465, 0, 53, 54, + 466, 0, 467, 55, 898, 0, 468, 0, 0, 56, + 57, 58, 0, 0, 59, 0, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 914, 0, 0, 469, + 0, 0, 0, 470, 921, 0, 0, 471, 0, 472, + 0, 0, 0, 473, 0, 0, 0, 0, 0, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 0, 161, 162, 163, 0, 0, 0, 349, 903, 904, + 905, 906, 907, 0, 908, 909, 910, 0, 507, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 903, 904, 905, 906, 907, 0, 908, + 909, 910, 0, 0, 0, 0, 0, 0, 0, 661, + 662, 663, 664, 665, 666, 667, 668, 965, 669, 670, + 671, 672, 673, 674, 675, 676, 677, 678, 679, 0, + 0, 972, 0, 0, 0, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 0, + 0, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 0, 705, 0, 706, 707, 708, 709, 710, + 711, 712, 713, 714, 715, 716, 717, 0, 0, 0, + 718, 0, 719, 0, 720, 721, 722, 723, 724, 725, + 726, 727, 728, 729, 730, 731, 0, 732, 733, 734, + 735, 736, 737, 738, 0, 739, 740, 741, 742, 743, + 0, 0, 0, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 764, 933, 765, 766, 661, 662, 663, + 664, 665, 666, 667, 668, 0, 669, 670, 671, 672, + 673, 674, 675, 676, 677, 678, 679, 0, 0, 0, + 0, 0, 0, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 0, 0, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 0, 705, 0, 706, 707, 708, 709, 710, 711, 712, + 713, 714, 715, 716, 717, 0, 0, 0, 718, 0, + 719, 0, 720, 721, 722, 723, 724, 725, 726, 727, + 728, 729, 730, 731, 0, 732, 733, 734, 735, 736, + 737, 738, 0, 739, 740, 741, 742, 743, 0, 0, + 0, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 0, 765, 766, 7, 8, 9, 10, 0, + 11, 124, 0, 0, 0, 0, 0, 0, 41, 0, + 42, 43, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, + 0, 0, 50, 170, 52, 0, 0, 125, 149, 126, + 127, 128, 45, 46, 0, 129, 18, 53, 54, 48, + 0, 0, 0, 0, 19, 130, 0, 0, 0, 0, + 58, 131, 132, 52, 0, 60, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 133, 134, 26, 0, + 27, 55, 0, 0, 28, 0, 0, 56, 57, 135, + 0, 0, 59, 0, 136, 456, 457, 458, 10, 0, + 459, 40, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, + 0, 36, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 0, 161, 162, 163, 0, 41, 0, 42, + 43, 44, 45, 461, 0, 47, 462, 0, 0, 48, + 0, 0, 0, 0, 463, 49, 0, 0, 0, 0, + 0, 50, 51, 52, 0, 0, 0, 0, 464, 0, + 0, 0, 0, 0, 465, 0, 53, 54, 466, 0, + 467, 55, 0, 0, 468, 0, 0, 56, 57, 58, + 0, 0, 59, 0, 60, 7, 8, 9, 10, 0, + 11, 12, 0, 0, 0, 0, 0, 469, 0, 0, + 0, 470, 0, 0, 0, 471, 0, 472, 0, 0, + 0, 473, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 41, 0, + 42, 43, 44, 0, 0, 0, 166, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 167, 35, 0, 278, + 0, 36, 50, 168, 52, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 41, 404, + 42, 43, 44, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 282, 35, 0, 0, + 0, 36, 50, 170, 52, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 0, 504, + 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 0, 35, 0, 856, + 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 0, 871, + 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, + 11, 12, 0, 0, 30, 0, 0, 0, 41, 0, + 42, 43, 44, 0, 0, 0, 166, 31, 0, 0, + 0, 32, 33, 0, 0, 34, 167, 35, 0, 963, + 0, 36, 50, 168, 52, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, + 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, + 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, + 294, 0, 0, 0, 0, 0, 24, 25, 26, 0, + 27, 0, 0, 0, 28, 0, 0, 0, 107, 29, + 0, 0, 0, 0, 30, 0, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 0, 41, 31, 42, 43, + 44, 32, 33, 149, 0, 34, 0, 35, 0, 0, + 0, 36, 141, 142, 143, 144, 145, 146, 147, 148, + 50, 170, 52, 0, 0, 0, 0, 0, 149, 0, + 0, 0, 0, 0, 0, 53, 54, 0, 513, 514, + 515, 516, 517, 518, 519, 520, 0, 0, 58, 0, + 0, 0, 0, 60, 521, 0, 522, 523, 524, 525, + 526, 527, 528, 529, 530, 531, 532, 533, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 534, 0, 0, + 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, + 163, 535, 0, 0, 926, 0, 0, 0, 0, 0, + 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 0, 161, 162, 163, 207, 208, 0, 986, + 0, 0, 0, 536, 0, 0, 537, 0, 538, 539, + 540, 541, 542, 543, 544, 545, 546, 547, 548, 0, + 549, 550, 0, 0, 551, 0, 0, 0, 0, 0, 0, 0, 209, 41, 0, 42, 43, 44, 45, 210, - 0, 47, 0, 0, 223, 48, 211, 212, 213, 0, + 0, 47, 0, 0, 0, 48, 211, 212, 213, 0, 0, 49, 0, 0, 0, 0, 214, 50, 51, 52, 0, 0, 215, 207, 208, 0, 216, 0, 0, 0, 217, 0, 53, 54, 0, 218, 0, 55, 0, 0, 0, 0, 0, 219, 57, 58, 0, 220, 59, 221, - 60, 141, 142, 143, 144, 145, 146, 147, 148, 209, - 41, 0, 42, 43, 44, 45, 306, 149, 47, 0, + 60, 0, 0, 0, 0, 222, 0, 0, 0, 209, + 41, 0, 42, 43, 44, 45, 210, 0, 47, 0, 0, 223, 48, 211, 212, 213, 0, 0, 49, 0, 0, 0, 0, 214, 50, 51, 52, 0, 0, 215, - 0, 0, 0, 216, 0, 0, 0, 217, 0, 53, + 207, 208, 0, 216, 0, 0, 0, 217, 0, 53, 54, 0, 218, 0, 55, 0, 0, 0, 0, 0, 219, 57, 58, 0, 220, 59, 221, 60, 141, 142, - 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, - 0, 0, 0, 0, 149, 0, 0, 0, 223, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 347, 0, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 0, 161, 162, 163, 141, 142, 143, 144, 145, + 143, 144, 145, 146, 147, 148, 209, 41, 0, 42, + 43, 44, 45, 306, 149, 47, 0, 0, 223, 48, + 211, 212, 213, 0, 0, 49, 0, 0, 0, 0, + 214, 50, 51, 52, 0, 0, 215, 0, 0, 0, + 216, 0, 0, 0, 217, 0, 53, 54, 0, 218, + 0, 55, 0, 0, 0, 0, 0, 219, 57, 58, + 0, 220, 59, 221, 60, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, - 0, 149, 141, 142, 143, 144, 145, 146, 147, 148, + 0, 149, 0, 0, 0, 223, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 347, 0, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 0, 161, + 162, 163, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, 149, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, - 0, 0, 0, 0, 508, 149, 0, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 0, 161, - 162, 163, 624, 625, 626, 627, 628, 629, 630, 631, - 0, 0, 0, 0, 0, 0, 0, 0, 632, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 783, 0, 0, 0, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 0, 161, 162, 163, 919, - 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 0, 161, 162, 163, 0, 0, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 886, 887, 888, 889, 890, 891, 892, - 893, 0, 0, 0, 0, 0, 0, 0, 0, 894, - 0, 633, 634, 635, 636, 637, 638, 639, 640, 641, - 642, 643, 0, 644, 645, 646, 886, 887, 888, 889, - 890, 891, 892, 893, 0, 0, 0, 0, 0, 0, - 0, 0, 894, 143, 144, 145, 146, 147, 148, 0, - 0, 0, 0, 0, 0, 0, 0, 149, 143, 144, + 0, 0, 0, 0, 0, 149, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, - 0, 0, 149, 888, 889, 890, 891, 892, 893, 0, - 0, 0, 0, 0, 0, 0, 0, 894, 0, 0, - 978, 0, 895, 896, 897, 898, 0, 0, 899, 900, - 901, 902, 903, 0, 904, 905, 906, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, - 0, 149, 0, 0, 0, 895, 896, 897, 898, 0, - 0, 899, 900, 901, 902, 903, 0, 904, 905, 906, - 0, 0, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 0, 161, 162, 163, 0, 0, 0, 153, 154, + 0, 509, 149, 0, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 0, 161, 162, 163, 627, + 628, 629, 630, 631, 632, 633, 634, 0, 0, 0, + 0, 0, 0, 0, 0, 635, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, + 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 0, 161, 162, 163, 924, 0, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, + 161, 162, 163, 0, 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, 163, - 0, 896, 897, 898, 0, 0, 899, 900, 901, 902, - 903, 0, 904, 905, 906, 888, 889, 890, 891, 892, - 893, 0, 0, 0, 294, 0, 0, 0, 0, 894, - 0, 888, 889, 890, 891, 892, 893, 0, 154, 155, - 156, 157, 158, 159, 160, 894, 161, 162, 163, 0, - 0, 0, 41, 0, 42, 43, 44, 0, 0, 0, - 41, 0, 42, 43, 44, 0, 0, 0, 0, 0, - 0, 890, 891, 892, 893, 0, 50, 170, 52, 0, - 0, 0, 0, 894, 50, 170, 52, -2, 0, 0, - 0, 53, 54, 0, 0, 0, 0, 0, 0, 53, - 54, 0, 0, 0, 58, 0, 0, 0, 0, 60, - 0, 0, 58, 0, 897, 898, 0, 60, 899, 900, - 901, 902, 903, 0, 904, 905, 906, 0, 0, 0, - 74, 898, 115, 0, 899, 900, 901, 902, 903, 0, - 904, 905, 906, 75, 0, 0, 0, 0, 76, 367, - 368, 77, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 0, 80, 0, 0, 0, 81, 82, 83, 0, - 0, 0, 899, 900, 901, 902, 903, 84, 904, 905, - 906, 85, 0, 0, 0, 86, 41, 0, 42, 43, - 44, 369, 370, 0, 47, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 49, 0, 40, 0, 0, 0, - 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 54, 0, 0, 0, - 0, 41, 0, 42, 43, 44, 371, 0, 58, 0, - 0, 59, 41, 60, 42, 43, 44, 45, 46, 0, - 47, 0, 0, 0, 48, 50, 170, 52, 0, 0, + 890, 891, 892, 893, 894, 895, 896, 897, 0, 0, + 0, 0, 0, 0, 0, 0, 898, 0, 636, 637, + 638, 639, 640, 641, 642, 643, 644, 645, 646, 0, + 647, 648, 649, 890, 891, 892, 893, 894, 895, 896, + 897, 0, 0, 0, 0, 0, 0, 0, 0, 898, + 891, 892, 893, 894, 895, 896, 897, 0, 0, 0, + 0, 0, 0, 0, 0, 898, 143, 144, 145, 146, + 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, + 149, 143, 144, 145, 146, 147, 148, 0, 0, 0, + 0, 0, 0, 0, 0, 149, 0, 984, 0, 899, + 900, 901, 902, 0, 0, 903, 904, 905, 906, 907, + 0, 908, 909, 910, 143, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, + 0, 0, 899, 900, 901, 902, 0, 0, 903, 904, + 905, 906, 907, 0, 908, 909, 910, 0, 0, 900, + 901, 902, 0, 0, 903, 904, 905, 906, 907, 0, + 908, 909, 910, 0, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 0, 161, 162, 163, 0, 0, + 0, 153, 154, 155, 156, 157, 158, 159, 160, 0, + 161, 162, 163, 892, 893, 894, 895, 896, 897, 0, + 0, 0, 0, 0, 0, 0, 0, 898, 892, 893, + 894, 895, 896, 897, 0, 154, 155, 156, 157, 158, + 159, 160, 898, 161, 162, 163, 892, 893, 894, 895, + 896, 897, 0, 0, 0, 74, 0, 0, 0, 0, + 898, 0, 0, 0, 0, 0, 0, 0, 75, 0, + 0, 0, 0, 76, 0, 0, 77, 0, 0, 0, + 0, 0, 0, 0, 78, 79, 0, 80, 0, 0, + 0, 81, 82, 83, 0, 0, 0, 0, -2, 0, + 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, + 86, 0, 901, 902, 0, 0, 903, 904, 905, 906, + 907, 87, 908, 909, 910, 0, 0, 0, 902, 0, + 0, 903, 904, 905, 906, 907, 0, 908, 909, 910, + 365, 74, 0, 0, 0, 0, 0, 0, 0, 903, + 904, 905, 906, 907, 75, 908, 909, 910, 0, 76, + 367, 368, 77, 0, 0, 0, 0, 0, 0, 0, + 78, 79, 0, 80, 0, 0, 0, 81, 82, 83, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, + 0, 0, 85, 0, 0, 0, 86, 41, 0, 42, + 43, 44, 369, 370, 0, 47, 0, 87, 0, 0, + 0, 0, 0, 0, 0, 49, 367, 368, 0, 0, + 0, 50, 51, 52, 0, 0, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 371, 0, 58, + 0, 0, 59, 41, 60, 42, 43, 44, 0, 0, + 0, 47, 41, 0, 42, 43, 44, 45, 46, 0, + 47, 49, 0, 0, 48, 0, 0, 50, 51, 52, 49, 0, 40, 0, 0, 0, 50, 51, 52, 0, - 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 54, 58, 0, 0, 55, 0, 60, 0, - 0, 0, 56, 57, 58, 0, 0, 59, 41, 60, + 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, + 0, 53, 54, 0, 0, 58, 55, 0, 59, 0, + 60, 0, 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, 44, 45, 314, 0, 47, 0, 0, 0, - 48, 118, 0, 0, 0, 0, 49, 0, 108, 0, + 48, 0, 0, 0, 0, 0, 49, 0, 40, 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 56, 57, + 0, 0, 55, 41, 0, 42, 43, 44, 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, 44, 45, - 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, - 0, 0, 49, 0, 40, 0, 0, 0, 50, 51, - 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 54, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 109, 57, 58, 0, 0, 59, + 0, 0, 47, 0, 0, 0, 48, 50, 170, 52, + 0, 0, 49, 0, 108, 0, 0, 0, 50, 51, + 52, 0, 53, 54, 0, 0, 0, 0, 0, 0, + 0, 610, 0, 53, 54, 58, 0, 0, 55, 0, + 60, 0, 0, 0, 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, 44, 45, 0, 0, 47, 0, - 0, 0, 48, 0, 0, 0, 0, 0, 49, 0, - 0, 0, 0, 0, 50, 51, 52, 0, 0, 0, - 0, 0, 0, 0, 0, 74, 0, 0, 0, 53, - 54, 0, 0, 0, 55, 0, 0, 0, 75, 0, - 56, 57, 58, 76, 0, 59, 77, 60, 0, 0, - 0, 0, 74, 0, 78, 79, 0, 80, 0, 0, - 0, 81, 82, 83, 0, 75, 0, 0, 0, 0, - 76, 0, 84, 77, 0, 0, 85, 0, 0, 74, - 86, 78, 79, 0, 80, 0, 0, 0, 81, 82, - 83, 87, 75, 0, 0, 0, 0, 76, 0, 84, - 77, 0, 0, 85, 0, 0, 74, 86, 78, 79, - 365, 80, 0, 0, 0, 81, 82, 83, 87, 75, - 0, 0, 0, 0, 76, 0, 84, 77, 0, 0, - 85, 0, 0, 74, 86, 78, 79, 426, 80, 0, - 0, 0, 81, 82, 83, 87, 75, 0, 0, 0, - 0, 76, 0, 84, 77, 0, 0, 85, 0, 0, - 74, 86, 78, 79, 495, 80, 0, 0, 0, 81, - 82, 83, 87, 75, 0, 0, 0, 0, 76, 0, - 84, 77, 0, 0, 85, 0, 0, 0, 86, 78, - 79, 585, 80, 0, 0, 0, 81, 82, 83, 87, - 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, - 0, 85, 0, 0, 0, 86, 0, 0, 792 + 0, 0, 48, 114, 0, 0, 0, 0, 49, 0, + 40, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 54, 0, 0, 0, 55, 41, 0, 42, 43, 44, + 109, 57, 58, 0, 0, 59, 41, 60, 42, 43, + 44, 45, 0, 0, 47, 0, 0, 0, 48, 50, + 170, 52, 0, 0, 49, 0, 0, 0, 0, 0, + 50, 51, 52, 0, 53, 54, 0, 0, 0, 0, + 0, 74, 0, 0, 0, 53, 54, 58, 0, 0, + 55, 0, 60, 0, 75, 0, 56, 57, 58, 76, + 0, 59, 77, 60, 0, 0, 0, 0, 74, 0, + 78, 79, 0, 80, 0, 115, 0, 81, 82, 83, + 0, 75, 0, 0, 0, 0, 76, 0, 84, 77, + 0, 0, 85, 0, 0, 74, 86, 78, 79, 0, + 80, 0, 0, 0, 81, 82, 83, 87, 75, 0, + 0, 0, 0, 76, 0, 84, 77, 0, 0, 85, + 0, 0, 74, 86, 78, 79, 426, 80, 0, 0, + 0, 81, 82, 83, 87, 75, 0, 0, 0, 0, + 76, 0, 84, 77, 0, 0, 85, 0, 0, 0, + 86, 78, 79, 496, 80, 0, 0, 0, 81, 82, + 83, 87, 0, 0, 0, 0, 0, 0, 0, 84, + 0, 0, 41, 85, 42, 43, 44, 86, 0, 0, + 586, 0, 0, 0, 0, 0, 0, 0, 87, 0, + 0, 0, 0, 0, 0, 0, 50, 170, 52, 0, + 0, 0, 74, 0, 0, 0, 0, 795, 0, 0, + 0, 53, 54, 0, 0, 75, 0, 0, 0, 0, + 76, 0, 0, 77, 58, 0, 0, 0, 0, 60, + 0, 78, 79, 0, 80, 0, 0, 0, 81, 82, + 83, 0, 0, 0, 0, 0, 0, 0, 0, 84, + 0, 0, 118, 85, 0, 0, 0, 86 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-570))) + (!!((Yystate) == (-646))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 10, 46, 503, 5, 99, 100, 101, 102, 103, - 84, 105, 106, 107, 384, 35, 195, 212, 0, 297, - 114, 115, 8, 9, 118, 119, 84, 85, 12, 494, - 125, 600, 8, 9, 380, 29, 125, 383, 91, 385, - 35, 125, 23, 91, 108, 307, 79, 80, 81, 91, - 8, 9, 422, 8, 9, 8, 9, 125, 108, 2, - 61, 407, 408, 127, 410, 411, 412, 413, 386, 23, - 125, 455, 390, 391, 392, 393, 394, 127, 29, 79, - 80, 81, 111, 84, 85, 108, 108, 111, 31, 32, - 33, 34, 23, 36, 559, 107, 650, 126, 110, 99, - 107, 485, 126, 110, 127, 127, 438, 453, 125, 104, - 91, 120, 116, 445, 446, 447, 448, 449, 450, 298, - 75, 116, 117, 125, 108, 108, 496, 459, 111, 108, - 124, 125, 126, 125, 110, 481, 601, 91, 317, 417, - 108, 127, 162, 108, 476, 428, 429, 200, 127, 107, - 203, 245, 200, 415, 107, 203, 77, 116, 200, 127, - 91, 203, 127, 509, 165, 125, 210, 8, 9, 487, - 91, 108, 216, 124, 125, 126, 108, 178, 179, 180, - 181, 182, 183, 29, 125, 186, 381, 366, 6, 384, - 127, 192, 4, 455, 195, 127, 8, 9, 141, 142, + 1, 504, 84, 85, 5, 46, 465, 84, 653, 384, + 297, 91, 23, 12, 212, 35, 51, 455, 53, 54, + 23, 10, 35, 58, 99, 100, 101, 102, 103, 125, + 105, 106, 107, 195, 8, 9, 0, 8, 9, 114, + 115, 495, 438, 118, 119, 116, 108, 422, 486, 445, + 446, 447, 448, 449, 450, 307, 165, 8, 9, 108, + 61, 111, 125, 459, 91, 127, 428, 429, 108, 178, + 179, 180, 181, 182, 183, 111, 126, 108, 127, 77, + 91, 477, 108, 84, 85, 8, 9, 127, 91, 108, + 126, 104, 125, 91, 8, 9, 127, 132, 133, 134, + 135, 127, 108, 116, 117, 6, 560, 386, 127, 108, + 91, 390, 391, 392, 393, 394, 125, 79, 80, 81, + 200, 127, 497, 203, 75, 104, 105, 106, 108, 380, + 417, 120, 383, 168, 385, 170, 298, 99, 23, 110, + 785, 125, 162, 125, 8, 9, 10, 127, 602, 125, + 14, 29, 187, 127, 110, 317, 407, 408, 125, 410, + 411, 412, 413, 415, 165, 125, 625, 125, 606, 210, + 245, 609, 125, 200, 283, 216, 203, 178, 179, 180, + 181, 182, 183, 381, 107, 186, 384, 51, 626, 200, + 125, 192, 203, 107, 195, 116, 29, 200, 594, 56, + 203, 108, 453, 455, 366, 125, 91, 125, 570, 488, + 67, 68, 574, 107, 576, 611, 578, 579, 580, 200, + 127, 866, 203, 80, 422, 125, 8, 9, 10, 86, + 29, 482, 14, 107, 486, 125, 110, 101, 8, 9, + 10, 108, 8, 9, 14, 108, 124, 125, 126, 108, + 110, 115, 109, 108, 111, 112, 120, 126, 127, 510, + 127, 125, 297, 110, 127, 306, 110, 465, 127, 51, + 432, 4, 127, 314, 108, 8, 9, 111, 125, 126, + 127, 51, 283, 658, 107, 116, 931, 110, 110, 290, + 935, 124, 125, 126, 305, 110, 125, 298, 299, 497, + 125, 126, 303, 107, 305, 109, 110, 111, 78, 127, + 125, 126, 127, 120, 315, 200, 317, 126, 203, 101, + 110, 120, 121, 122, 8, 124, 125, 126, 10, 107, + 975, 101, 14, 115, 979, 8, 9, 194, 120, 116, + 381, 125, 126, 384, 125, 115, 125, 992, 205, 6, + 120, 79, 80, 81, 606, 125, 1001, 358, 440, 370, + 107, 108, 219, 440, 109, 366, 223, 127, 871, 51, + 125, 126, 229, 230, 375, 127, 29, 50, 108, 2, + 381, 422, 417, 384, 822, 386, 127, 29, 127, 390, + 391, 392, 393, 394, 126, 127, 397, 117, 418, 400, + 420, 127, 127, 404, 127, 780, 127, 110, 31, 32, + 33, 34, 127, 36, 415, 127, 89, 127, 127, 101, + 461, 422, 95, 96, 465, 821, 99, 625, 503, 117, + 441, 432, 127, 115, 291, 436, 127, 438, 120, 440, + 108, 128, 108, 125, 445, 446, 447, 448, 449, 450, + 451, 125, 472, 464, 455, 125, 497, 107, 459, 472, + 658, 464, 601, 127, 321, 118, 119, 120, 121, 122, + 125, 124, 125, 126, 8, 9, 477, 915, 120, 121, + 122, 125, 124, 125, 126, 486, 107, 488, 863, 130, + 108, 8, 117, 110, 495, 108, 497, 128, 120, 125, + 120, 120, 108, 504, 879, 90, 111, 364, 125, 126, + 127, 111, 369, 120, 371, 116, 50, 125, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 200, - 163, 605, 203, 485, 608, 108, 108, 422, 782, 107, - 125, 109, 110, 111, 125, 804, 805, 806, 807, 623, - 809, 165, 126, 127, 127, 127, 200, 125, 126, 203, - 125, 126, 108, 432, 178, 179, 180, 181, 182, 183, - 125, 593, 306, 125, 108, 8, 9, 8, 9, 200, - 314, 127, 203, 107, 120, 121, 122, 609, 124, 125, - 126, 110, 283, 127, 127, 655, 569, 107, 108, 290, - 573, 110, 575, 125, 577, 578, 579, 298, 299, 125, - 126, 496, 303, 125, 305, 126, 127, 50, 862, 50, - 110, 254, 255, 110, 315, 116, 317, 886, 887, 888, - 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, - 899, 900, 901, 902, 903, 904, 125, 381, 125, 126, - 384, 120, 126, 605, 110, 110, 89, 290, 89, 8, - 107, 305, 95, 96, 95, 96, 99, 358, 99, 283, - 125, 126, 127, 116, 125, 366, 440, 867, 937, 125, - 6, 110, 926, 109, 375, 127, 930, 108, 422, 322, - 381, 127, 440, 384, 128, 386, 125, 126, 127, 390, - 391, 392, 393, 394, 127, 110, 397, 127, 418, 400, - 420, 127, 127, 404, 347, 117, 127, 777, 502, 978, - 125, 126, 127, 127, 415, 969, 370, 461, 127, 973, - 127, 422, 127, 127, 8, 9, 10, 622, 117, 127, - 14, 432, 986, 127, 818, 436, 110, 438, 108, 440, - 108, 995, 125, 125, 445, 446, 447, 448, 449, 450, - 451, 471, 496, 107, 455, 109, 110, 111, 459, 10, - 655, 404, 127, 14, 8, 9, 10, 51, 125, 815, - 14, 104, 105, 106, 125, 476, 471, 130, 8, 9, - 107, 107, 425, 464, 485, 108, 487, 441, 8, 859, - 120, 108, 56, 494, 78, 496, 427, 428, 429, 117, - 51, 120, 503, 67, 68, 875, 128, 51, 120, 125, - 464, 108, 858, 111, 8, 9, 80, 101, 111, 90, - 50, 120, 86, 125, 116, 468, 469, 470, 116, 472, - 126, 115, 127, 464, 128, 108, 120, 127, 127, 130, - 108, 125, 127, 8, 109, 109, 126, 111, 112, 108, - 101, 494, 127, 923, 51, 125, 50, 101, 559, 89, - 503, 4, 908, 125, 115, 95, 96, 108, 125, 120, - 130, 115, 127, 127, 125, 128, 120, 127, 622, 580, - 128, 125, 777, 130, 127, 116, 587, 51, 125, 53, - 54, 586, 593, 588, 58, 89, 130, 967, 116, 108, - 601, 95, 96, 117, 605, 99, 127, 608, 609, 117, - 125, 655, 125, 109, 557, 610, 559, 612, 613, 620, - 127, 127, 623, 29, 109, 645, 127, 127, 127, 127, - 194, 8, 9, 10, 125, 125, 128, 14, 569, 117, - 127, 205, 573, 117, 575, 127, 577, 578, 579, 650, - 125, 127, 125, 501, 655, 219, 127, 192, 601, 223, - 779, 858, 815, 908, 859, 229, 230, 203, 132, 133, - 134, 135, 440, 29, 51, 370, 587, 441, 622, 203, - 875, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 116, + 163, 127, 427, 428, 429, 107, 29, 109, 110, 111, + 128, 127, 126, 928, 108, 89, 127, 130, 108, 560, + 127, 95, 96, 125, 126, 99, 8, 818, 109, 610, + 427, 428, 429, 126, 587, 108, 589, 125, 127, 464, + 581, 51, 780, 4, 625, 125, 108, 588, 130, 3, + 4, 5, 6, 594, 8, 127, 125, 128, 973, 612, + 127, 602, 615, 616, 128, 606, 127, 130, 609, 127, + 611, 862, 116, 125, 116, 130, 108, 658, 117, 127, + 117, 127, 623, 109, 125, 626, 117, 127, 648, 109, + 125, 254, 255, 127, 127, 118, 119, 120, 121, 122, + 54, 124, 125, 126, 125, 502, 125, 192, 62, 127, + 8, 9, 653, 128, 127, 127, 117, 658, 127, 125, + 125, 912, 502, 127, 127, 863, 782, 290, 807, 808, + 809, 810, 86, 812, 88, 862, 818, 912, 92, 440, + 370, 879, 441, 203, 588, 570, 744, 19, 20, 574, + 203, 576, 50, 578, 579, 580, 464, 29, 433, 322, + 557, 115, -1, 501, -1, 119, 120, -1, -1, 123, + -1, 125, 569, 570, 571, 129, -1, 574, -1, 576, + -1, 578, 579, 580, 347, -1, -1, -1, 585, -1, + 928, 89, 17, 18, 19, 20, -1, 95, 96, 780, + -1, 99, -1, 744, 29, -1, -1, -1, -1, 824, + -1, 890, 891, 892, 893, 894, 895, 896, 897, 898, + 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, + -1, -1, -1, -1, -1, 973, -1, -1, -1, 780, + -1, 404, -1, -1, 785, -1, 118, 119, 120, 121, + 122, 811, 124, 125, 126, -1, -1, -1, 811, -1, + -1, -1, 425, 942, -1, -1, -1, 807, 808, 809, + 810, -1, 812, 15, 16, 17, 18, 19, 20, -1, + 821, 822, 863, -1, -1, -1, -1, 29, -1, -1, + -1, 116, 117, 118, 119, 120, 121, 122, 879, 124, + 125, 126, -1, -1, -1, 984, 469, 470, 471, -1, + 473, -1, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, 863, -1, -1, 866, 29, 880, 881, 882, + 871, -1, 495, -1, -1, -1, -1, -1, 879, 8, + 9, 504, -1, -1, -1, -1, -1, 928, -1, 909, + 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, + 900, 901, 902, 903, 904, 905, 906, 907, 908, -1, + -1, 113, 114, 115, 915, -1, 118, 119, 120, 121, + 122, 50, 124, 125, 126, -1, -1, 928, -1, -1, + 931, -1, 973, -1, 935, 558, -1, 560, -1, -1, + -1, -1, 942, -1, -1, -1, -1, -1, 968, -1, + 970, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 89, 124, 125, 126, -1, -1, 95, 96, -1, -1, + -1, -1, 973, -1, 975, 995, 996, -1, 979, 602, + -1, -1, -1, -1, 984, -1, -1, 3, 4, 5, + 6, 992, 8, 9, -1, -1, 12, -1, -1, -1, + 1001, -1, -1, -1, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, - 643, 644, 464, 646, 168, 433, 170, 500, 3, 4, - 5, 6, -1, 8, 120, 121, 122, -1, 124, 125, - 126, -1, 741, 187, 101, -1, 820, 291, 923, -1, - -1, -1, -1, 777, -1, -1, -1, -1, 115, -1, - 741, -1, -1, 120, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 804, 805, 806, 807, 321, 809, 54, - -1, -1, 118, 119, 120, 121, 122, 62, 124, 125, - 126, -1, 967, -1, -1, -1, 777, -1, -1, -1, - -1, 782, -1, -1, -1, -1, -1, -1, 808, -1, - -1, 86, -1, 88, -1, -1, -1, 92, -1, -1, - 364, -1, -1, -1, -1, 369, -1, 371, -1, 17, - 18, 19, 20, 808, -1, 859, -1, 818, -1, -1, - 115, 29, -1, -1, 119, 120, -1, 770, 123, -1, - 125, 875, -1, 297, 129, 886, 887, 888, 889, 890, - 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, - 901, 902, 903, 904, -1, -1, -1, -1, 859, 29, - -1, 862, -1, 427, 428, 429, 867, -1, -1, -1, - -1, -1, -1, 816, 875, -1, -1, -1, -1, 923, - 823, 876, 877, 878, -1, 905, 937, -1, -1, -1, - -1, -1, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, -1, 116, 117, - 118, 119, 120, 121, 122, -1, 124, 125, 126, -1, - -1, -1, 923, 967, 867, 926, -1, 978, -1, 930, - -1, -1, -1, -1, -1, -1, -1, 501, -1, -1, - -1, -1, 962, -1, 964, -1, -1, -1, 118, 119, - 120, 121, 122, 417, 124, 125, 126, -1, -1, -1, - -1, -1, -1, 906, -1, -1, 967, -1, 969, 989, - 990, -1, 973, -1, -1, -1, 919, -1, -1, -1, - -1, -1, -1, -1, -1, 986, -1, -1, -1, -1, - -1, -1, 556, -1, 995, 118, 119, 120, 121, 122, - -1, 124, 125, 126, 568, 569, 570, -1, -1, 573, - -1, 575, -1, 577, 578, 579, -1, -1, -1, -1, - 584, 3, 4, 5, 6, 7, 8, 9, 10, -1, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, -1, -1, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, -1, 57, -1, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, - -1, -1, 74, -1, 76, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, -1, 91, - 92, 93, 94, 95, 96, 97, -1, 99, 100, 101, - 102, 103, -1, -1, -1, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 3, - 4, 5, 6, 7, 8, 9, 10, -1, 12, 13, + 643, 644, 645, 646, 647, -1, 649, -1, -1, 45, + -1, 47, 48, 49, 50, 51, -1, 53, 54, -1, + -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, + 76, -1, -1, -1, -1, -1, 82, -1, 84, 85, + 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, + 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, + 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, + -1, -1, -1, 119, -1, -1, -1, 123, -1, 125, + -1, -1, -1, 129, 971, -1, -1, -1, -1, -1, + 13, 14, 15, 16, 17, 18, 19, 20, -1, 45, + -1, 47, 48, 49, 50, 51, 29, 53, 54, 19, + 20, 57, -1, -1, -1, -1, 62, 63, -1, 29, + 773, -1, -1, 69, 70, 71, -1, -1, -1, -1, + 76, -1, 17, 18, 19, 20, 82, -1, 84, 85, + 86, -1, 88, 89, 29, -1, 92, -1, -1, 95, + 96, 97, -1, -1, 100, -1, 102, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 819, -1, -1, 115, + -1, -1, -1, 119, 827, -1, -1, 123, -1, 125, + -1, -1, -1, 129, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + -1, 124, 125, 126, -1, -1, -1, 130, 118, 119, + 120, 121, 122, -1, 124, 125, 126, -1, 871, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 118, 119, 120, 121, 122, -1, 124, + 125, 126, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, 6, 7, 8, 9, 10, 910, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, - -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, + -1, 924, -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, 60, 61, 62, 63, @@ -2097,249 +2132,252 @@ static const yytype_int16 yycheck[] = 94, 95, 96, 97, -1, 99, 100, 101, 102, 103, -1, -1, -1, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, -1, 129, 130, 3, 4, 5, - 6, -1, 8, 9, -1, -1, -1, -1, -1, -1, - 45, -1, 47, 48, 49, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 14, 15, 16, 17, 18, - 19, 20, -1, -1, 69, 70, 71, -1, -1, 45, - 29, 47, 48, 49, 50, 51, -1, 53, 54, 84, - 85, 57, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, 97, 69, 70, 71, -1, 102, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, - 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, - 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, - -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, - -1, 965, -1, 129, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, -1, 124, 125, 126, -1, 45, - -1, 47, 48, 49, 50, 51, -1, 53, 54, -1, - -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, - 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, - 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, - -1, -1, -1, 119, -1, -1, -1, 123, -1, 125, - -1, -1, -1, 129, -1, 14, 15, 16, 17, 18, - 19, 20, -1, -1, -1, -1, -1, -1, -1, 45, - 29, 47, 48, 49, 50, 51, -1, 53, 54, -1, - -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, 71, 19, 20, -1, -1, - 76, -1, -1, -1, -1, -1, 29, -1, 84, 85, - 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, - 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, - 6, -1, 8, 9, -1, 19, 20, -1, -1, 115, - -1, -1, -1, 119, -1, 29, -1, 123, -1, 125, - -1, -1, -1, 129, 113, 114, 115, -1, -1, 118, - 119, 120, 121, 122, -1, 124, 125, 126, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, - -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, 118, 119, 120, 121, 122, - 76, 124, 125, 126, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - -1, -1, -1, -1, 118, 119, 120, 121, 122, 115, - 124, 125, 126, 119, 120, -1, -1, 123, -1, 125, - -1, 127, -1, 129, -1, -1, -1, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, - -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - 45, 107, 47, 48, 49, -1, -1, -1, 53, 115, - -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, - -1, -1, -1, 129, 69, 70, 71, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, - 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - 45, 107, 47, 48, 49, -1, -1, -1, -1, 115, - -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, - -1, -1, -1, 129, 69, 70, 71, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, - 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 115, - -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, - -1, 127, -1, 129, -1, -1, -1, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, - -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - -1, 107, -1, -1, -1, -1, -1, -1, -1, 115, - -1, -1, -1, 119, 120, -1, -1, 123, -1, 125, - -1, -1, -1, 129, -1, -1, -1, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, -1, - -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, -1, -1, -1, -1, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, -1, 88, -1, -1, -1, 92, 3, 4, 5, - 6, 97, 8, 9, -1, -1, 102, -1, -1, -1, - 45, -1, 47, 48, 49, -1, -1, -1, 53, 115, - -1, -1, -1, 119, 120, -1, -1, 123, 63, 125, - -1, 127, -1, 129, 69, 70, 71, -1, -1, 45, - -1, 47, 48, 49, -1, -1, -1, 53, 54, 84, - 85, -1, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, 97, 69, 70, -1, -1, 102, -1, -1, - 76, 15, 16, 17, 18, 19, 20, -1, 84, 85, - 86, -1, 88, -1, -1, 29, 92, -1, -1, -1, - 125, 97, -1, -1, -1, -1, 102, -1, -1, 13, - 14, 15, 16, 17, 18, 19, 20, -1, -1, 115, - -1, -1, -1, 119, 120, 29, -1, 123, -1, 125, - -1, -1, -1, 129, 13, 14, 15, 16, 17, 18, - 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, - 29, -1, -1, 13, 14, 15, 16, 17, 18, 19, - 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, -1, 124, 125, 126, -1, -1, - -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, -1, 124, 125, 126, 8, 9, -1, - 130, 13, 14, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, -1, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, -1, -1, -1, 45, -1, 47, 48, 49, -1, - 52, -1, 53, 45, -1, 47, 48, 49, -1, -1, - -1, -1, 63, -1, -1, -1, -1, -1, 69, 70, - 71, -1, -1, -1, 76, -1, -1, 69, 70, 71, - -1, -1, -1, 84, 85, -1, -1, -1, -1, 8, - 9, -1, 84, 85, -1, -1, 97, -1, -1, 100, - -1, 102, -1, -1, -1, 97, 108, -1, -1, 111, - 102, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, -1, 125, 126, 44, 45, 129, 47, 48, - 49, 50, 51, 125, 53, -1, -1, -1, 57, 58, - 59, 60, -1, -1, 63, -1, -1, -1, -1, 68, - 69, 70, 71, -1, -1, 74, 8, 9, -1, 78, - -1, -1, -1, 82, -1, 84, 85, -1, 87, -1, - 89, -1, -1, -1, -1, -1, 95, 96, 97, -1, - 99, 100, 101, 102, -1, -1, -1, -1, 107, -1, + 124, 125, 126, 127, 128, 129, 130, 3, 4, 5, + 6, 7, 8, 9, 10, -1, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, -1, -1, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + -1, 57, -1, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, -1, -1, -1, 74, -1, + 76, -1, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, + 96, 97, -1, 99, 100, 101, 102, 103, -1, -1, + -1, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, -1, 129, 130, 3, 4, 5, 6, -1, + 8, 9, -1, -1, -1, -1, -1, -1, 45, -1, + 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, + -1, -1, 69, 70, 71, -1, -1, 45, 29, 47, + 48, 49, 50, 51, -1, 53, 54, 84, 85, 57, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + 97, 69, 70, 71, -1, 102, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, 89, -1, -1, 92, -1, -1, 95, 96, 97, + -1, -1, 100, -1, 102, 3, 4, 5, 6, -1, + 8, 9, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, + -1, 129, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, -1, 124, 125, 126, -1, 45, -1, 47, + 48, 49, 50, 51, -1, 53, 54, -1, -1, 57, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, 71, -1, -1, -1, -1, 76, -1, + -1, -1, -1, -1, 82, -1, 84, 85, 86, -1, + 88, 89, -1, -1, 92, -1, -1, 95, 96, 97, + -1, -1, 100, -1, 102, 3, 4, 5, 6, -1, + 8, 9, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 119, -1, -1, -1, 123, -1, 125, -1, -1, + -1, 129, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, 45, -1, + 47, 48, 49, -1, -1, -1, 53, 115, -1, -1, + -1, 119, 120, -1, -1, 123, 63, 125, -1, 127, + -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, 45, 107, + 47, 48, 49, -1, -1, -1, -1, 115, -1, -1, + -1, 119, 120, -1, -1, 123, 63, 125, -1, -1, + -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, -1, 107, + -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, + -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 119, 120, -1, -1, 123, -1, 125, -1, 127, + -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, -1, 107, + -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, + -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, + 8, 9, -1, -1, 102, -1, -1, -1, 45, -1, + 47, 48, 49, -1, -1, -1, 53, 115, -1, -1, + -1, 119, 120, -1, -1, 123, 63, 125, -1, 127, + -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, + -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, + 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, + 9, -1, -1, -1, -1, -1, 84, 85, 86, -1, + 88, -1, -1, -1, 92, -1, -1, -1, 125, 97, + -1, -1, -1, -1, 102, -1, -1, 13, 14, 15, + 16, 17, 18, 19, 20, -1, 45, 115, 47, 48, + 49, 119, 120, 29, -1, 123, -1, 125, -1, -1, + -1, 129, 13, 14, 15, 16, 17, 18, 19, 20, + 69, 70, 71, -1, -1, -1, -1, -1, 29, -1, + -1, -1, -1, -1, -1, 84, 85, -1, 13, 14, + 15, 16, 17, 18, 19, 20, -1, -1, 97, -1, + -1, -1, -1, 102, 29, -1, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, + -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, + 126, 76, -1, -1, 130, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, -1, 124, 125, 126, 8, 9, -1, 130, + -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, + 125, 126, -1, -1, 129, -1, -1, -1, -1, -1, -1, -1, 44, 45, -1, 47, 48, 49, 50, 51, - -1, 53, -1, -1, 123, 57, 58, 59, 60, -1, + -1, 53, -1, -1, -1, 57, 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, 68, 69, 70, 71, -1, -1, 74, 8, 9, -1, 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, -1, 89, -1, -1, -1, -1, -1, 95, 96, 97, -1, 99, 100, 101, - 102, 13, 14, 15, 16, 17, 18, 19, 20, 44, - 45, -1, 47, 48, 49, 50, 51, 29, 53, -1, + 102, -1, -1, -1, -1, 107, -1, -1, -1, 44, + 45, -1, 47, 48, 49, 50, 51, -1, 53, -1, -1, 123, 57, 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, 68, 69, 70, 71, -1, -1, 74, - -1, -1, -1, 78, -1, -1, -1, 82, -1, 84, + 8, 9, -1, 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, -1, 89, -1, -1, -1, -1, -1, 95, 96, 97, -1, 99, 100, 101, 102, 13, 14, - 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 123, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 110, -1, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, -1, 124, 125, 126, 13, 14, 15, 16, 17, + 15, 16, 17, 18, 19, 20, 44, 45, -1, 47, + 48, 49, 50, 51, 29, 53, -1, -1, 123, 57, + 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, + 68, 69, 70, 71, -1, -1, 74, -1, -1, -1, + 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, + -1, 89, -1, -1, -1, -1, -1, 95, 96, 97, + -1, 99, 100, 101, 102, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, - -1, 29, 13, 14, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, 13, - 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, 109, 29, -1, 112, 113, 114, + -1, 29, -1, -1, -1, 123, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, 14, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 108, -1, -1, -1, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, -1, 124, 125, 126, 110, + -1, -1, -1, -1, -1, -1, -1, -1, 29, 13, + 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, + -1, -1, -1, -1, -1, 29, 13, 14, 15, 16, + 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, + -1, 109, 29, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, + 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, + -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, -1, -1, 112, 113, + 121, 122, -1, 124, 125, 126, 110, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, + 124, 125, 126, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, 29, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, - -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, 13, 14, 15, 16, - 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, - -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, + 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, + -1, -1, -1, -1, -1, 29, 15, 16, 17, 18, + 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, + 29, 15, 16, 17, 18, 19, 20, -1, -1, -1, + -1, -1, -1, -1, -1, 29, -1, 110, -1, 112, + 113, 114, 115, -1, -1, 118, 119, 120, 121, 122, + -1, 124, 125, 126, 15, 16, 17, 18, 19, 20, + -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 112, 113, 114, 115, -1, -1, 118, 119, + 120, 121, 122, -1, 124, 125, 126, -1, -1, 113, + 114, 115, -1, -1, 118, 119, 120, 121, 122, -1, + 124, 125, 126, -1, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, -1, 124, 125, 126, -1, -1, + -1, 115, 116, 117, 118, 119, 120, 121, 122, -1, + 124, 125, 126, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, - 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, - -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, - 110, -1, 112, 113, 114, 115, -1, -1, 118, 119, - 120, 121, 122, -1, 124, 125, 126, 15, 16, 17, - 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, - -1, 29, -1, -1, -1, 112, 113, 114, 115, -1, + 17, 18, 19, 20, -1, 116, 117, 118, 119, 120, + 121, 122, 29, 124, 125, 126, 15, 16, 17, 18, + 19, 20, -1, -1, -1, 43, -1, -1, -1, -1, + 29, -1, -1, -1, -1, -1, -1, -1, 56, -1, + -1, -1, -1, 61, -1, -1, 64, -1, -1, -1, + -1, -1, -1, -1, 72, 73, -1, 75, -1, -1, + -1, 79, 80, 81, -1, -1, -1, -1, 0, -1, + -1, -1, 90, -1, -1, -1, 94, -1, -1, -1, + 98, -1, 114, 115, -1, -1, 118, 119, 120, 121, + 122, 109, 124, 125, 126, -1, -1, -1, 115, -1, -1, 118, 119, 120, 121, 122, -1, 124, 125, 126, - -1, -1, 114, 115, 116, 117, 118, 119, 120, 121, - 122, -1, 124, 125, 126, -1, -1, -1, 115, 116, - 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, - -1, 113, 114, 115, -1, -1, 118, 119, 120, 121, - 122, -1, 124, 125, 126, 15, 16, 17, 18, 19, - 20, -1, -1, -1, 9, -1, -1, -1, -1, 29, - -1, 15, 16, 17, 18, 19, 20, -1, 116, 117, - 118, 119, 120, 121, 122, 29, 124, 125, 126, -1, - -1, -1, 45, -1, 47, 48, 49, -1, -1, -1, - 45, -1, 47, 48, 49, -1, -1, -1, -1, -1, - -1, 17, 18, 19, 20, -1, 69, 70, 71, -1, - -1, -1, -1, 29, 69, 70, 71, 0, -1, -1, - -1, 84, 85, -1, -1, -1, -1, -1, -1, 84, - 85, -1, -1, -1, 97, -1, -1, -1, -1, 102, - -1, -1, 97, -1, 114, 115, -1, 102, 118, 119, - 120, 121, 122, -1, 124, 125, 126, -1, -1, -1, - 43, 115, 125, -1, 118, 119, 120, 121, 122, -1, - 124, 125, 126, 56, -1, -1, -1, -1, 61, 8, - 9, 64, -1, -1, -1, -1, -1, -1, -1, 72, - 73, -1, 75, -1, -1, -1, 79, 80, 81, -1, - -1, -1, 118, 119, 120, 121, 122, 90, 124, 125, - 126, 94, -1, -1, -1, 98, 45, -1, 47, 48, - 49, 50, 51, -1, 53, -1, 109, -1, -1, -1, - -1, -1, -1, -1, 63, -1, 9, -1, -1, -1, - 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 84, 85, -1, -1, -1, - -1, 45, -1, 47, 48, 49, 95, -1, 97, -1, - -1, 100, 45, 102, 47, 48, 49, 50, 51, -1, - 53, -1, -1, -1, 57, 69, 70, 71, -1, -1, + 128, 43, -1, -1, -1, -1, -1, -1, -1, 118, + 119, 120, 121, 122, 56, 124, 125, 126, -1, 61, + 8, 9, 64, -1, -1, -1, -1, -1, -1, -1, + 72, 73, -1, 75, -1, -1, -1, 79, 80, 81, + -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, + -1, -1, 94, -1, -1, -1, 98, 45, -1, 47, + 48, 49, 50, 51, -1, 53, -1, 109, -1, -1, + -1, -1, -1, -1, -1, 63, 8, 9, -1, -1, + -1, 69, 70, 71, -1, -1, 9, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, 97, + -1, -1, 100, 45, 102, 47, 48, 49, -1, -1, + -1, 53, 45, -1, 47, 48, 49, 50, 51, -1, + 53, 63, -1, -1, 57, -1, -1, 69, 70, 71, 63, -1, 9, -1, -1, -1, 69, 70, 71, -1, - 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 84, 85, 97, -1, -1, 89, -1, 102, -1, - -1, -1, 95, 96, 97, -1, -1, 100, 45, 102, + -1, -1, 84, 85, -1, -1, -1, -1, -1, -1, + -1, 84, 85, -1, -1, 97, 89, -1, 100, -1, + 102, -1, 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, - 57, 125, -1, -1, -1, -1, 63, -1, 9, -1, + 57, -1, -1, -1, -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, - -1, -1, 89, -1, -1, -1, -1, -1, 95, 96, + -1, -1, 89, 45, -1, 47, 48, 49, 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, 49, 50, - -1, -1, 53, -1, -1, -1, 57, -1, -1, -1, + -1, -1, 53, -1, -1, -1, 57, 69, 70, 71, -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, - 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 84, 85, -1, -1, -1, 89, -1, - -1, -1, -1, -1, 95, 96, 97, -1, -1, 100, + 71, -1, 84, 85, -1, -1, -1, -1, -1, -1, + -1, 82, -1, 84, 85, 97, -1, -1, 89, -1, + 102, -1, -1, -1, 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, 49, 50, -1, -1, 53, -1, - -1, -1, 57, -1, -1, -1, -1, -1, 63, -1, - -1, -1, -1, -1, 69, 70, 71, -1, -1, -1, - -1, -1, -1, -1, -1, 43, -1, -1, -1, 84, - 85, -1, -1, -1, 89, -1, -1, -1, 56, -1, - 95, 96, 97, 61, -1, 100, 64, 102, -1, -1, - -1, -1, 43, -1, 72, 73, -1, 75, -1, -1, - -1, 79, 80, 81, -1, 56, -1, -1, -1, -1, - 61, -1, 90, 64, -1, -1, 94, -1, -1, 43, - 98, 72, 73, -1, 75, -1, -1, -1, 79, 80, - 81, 109, 56, -1, -1, -1, -1, 61, -1, 90, - 64, -1, -1, 94, -1, -1, 43, 98, 72, 73, - 128, 75, -1, -1, -1, 79, 80, 81, 109, 56, - -1, -1, -1, -1, 61, -1, 90, 64, -1, -1, - 94, -1, -1, 43, 98, 72, 73, 128, 75, -1, - -1, -1, 79, 80, 81, 109, 56, -1, -1, -1, - -1, 61, -1, 90, 64, -1, -1, 94, -1, -1, - 43, 98, 72, 73, 128, 75, -1, -1, -1, 79, - 80, 81, 109, 56, -1, -1, -1, -1, 61, -1, - 90, 64, -1, -1, 94, -1, -1, -1, 98, 72, - 73, 128, 75, -1, -1, -1, 79, 80, 81, 109, - -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, - -1, 94, -1, -1, -1, 98, -1, -1, 128 + -1, -1, 57, 125, -1, -1, -1, -1, 63, -1, + 9, -1, -1, -1, 69, 70, 71, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, + 85, -1, -1, -1, 89, 45, -1, 47, 48, 49, + 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, + 49, 50, -1, -1, 53, -1, -1, -1, 57, 69, + 70, 71, -1, -1, 63, -1, -1, -1, -1, -1, + 69, 70, 71, -1, 84, 85, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 84, 85, 97, -1, -1, + 89, -1, 102, -1, 56, -1, 95, 96, 97, 61, + -1, 100, 64, 102, -1, -1, -1, -1, 43, -1, + 72, 73, -1, 75, -1, 125, -1, 79, 80, 81, + -1, 56, -1, -1, -1, -1, 61, -1, 90, 64, + -1, -1, 94, -1, -1, 43, 98, 72, 73, -1, + 75, -1, -1, -1, 79, 80, 81, 109, 56, -1, + -1, -1, -1, 61, -1, 90, 64, -1, -1, 94, + -1, -1, 43, 98, 72, 73, 128, 75, -1, -1, + -1, 79, 80, 81, 109, 56, -1, -1, -1, -1, + 61, -1, 90, 64, -1, -1, 94, -1, -1, -1, + 98, 72, 73, 128, 75, -1, -1, -1, 79, 80, + 81, 109, -1, -1, -1, -1, -1, -1, -1, 90, + -1, -1, 45, 94, 47, 48, 49, 98, -1, -1, + 128, -1, -1, -1, -1, -1, -1, -1, 109, -1, + -1, -1, -1, -1, -1, -1, 69, 70, 71, -1, + -1, -1, 43, -1, -1, -1, -1, 128, -1, -1, + -1, 84, 85, -1, -1, 56, -1, -1, -1, -1, + 61, -1, -1, 64, 97, -1, -1, -1, -1, 102, + -1, 72, 73, -1, 75, -1, -1, -1, 79, 80, + 81, -1, -1, -1, -1, -1, -1, -1, -1, 90, + -1, -1, 125, 94, -1, -1, -1, 98 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2392,61 +2430,61 @@ static const yytype_uint8 yystos[] = 99, 193, 107, 108, 8, 221, 133, 221, 169, 221, 117, 108, 8, 9, 10, 14, 51, 101, 115, 120, 125, 181, 223, 150, 151, 170, 3, 4, 5, 8, - 12, 51, 54, 62, 76, 86, 88, 92, 115, 119, - 123, 125, 129, 172, 173, 179, 183, 218, 219, 222, - 223, 120, 170, 172, 147, 170, 180, 120, 180, 180, - 180, 180, 180, 125, 126, 128, 156, 128, 210, 223, - 107, 108, 125, 107, 177, 178, 216, 223, 109, 120, - 170, 170, 13, 14, 15, 16, 17, 18, 19, 20, - 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 52, 76, 108, 111, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, - 129, 162, 170, 170, 170, 170, 110, 111, 125, 126, - 175, 176, 223, 196, 214, 214, 172, 216, 95, 99, - 200, 220, 221, 99, 220, 99, 220, 79, 80, 81, - 133, 193, 108, 127, 108, 128, 111, 181, 111, 142, - 163, 164, 168, 120, 181, 181, 181, 181, 181, 181, - 111, 126, 174, 223, 152, 170, 175, 176, 181, 183, - 116, 185, 125, 116, 216, 216, 216, 186, 214, 216, - 127, 12, 108, 181, 13, 14, 15, 16, 17, 18, - 19, 20, 29, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 124, 125, 126, 170, 110, 127, - 127, 175, 176, 125, 180, 159, 212, 172, 3, 4, - 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 74, 76, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, - 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, - 103, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 129, 130, 211, 208, 135, 213, 177, 128, - 108, 170, 127, 130, 127, 4, 216, 171, 212, 108, - 127, 127, 127, 108, 221, 220, 221, 220, 220, 220, - 220, 220, 128, 8, 109, 221, 186, 174, 186, 181, - 127, 54, 86, 88, 115, 119, 120, 123, 125, 129, - 215, 217, 212, 175, 176, 108, 111, 175, 181, 186, - 125, 186, 186, 127, 127, 51, 161, 223, 12, 179, - 175, 216, 216, 216, 216, 216, 216, 216, 216, 216, + 12, 51, 54, 62, 76, 82, 86, 88, 92, 115, + 119, 123, 125, 129, 172, 173, 179, 183, 218, 219, + 222, 223, 120, 170, 172, 147, 170, 180, 120, 180, + 180, 180, 180, 180, 125, 126, 128, 156, 128, 210, + 223, 107, 108, 125, 107, 177, 178, 216, 223, 109, + 120, 170, 170, 13, 14, 15, 16, 17, 18, 19, + 20, 29, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 52, 76, 108, 111, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, + 126, 129, 162, 170, 170, 170, 170, 110, 111, 125, + 126, 175, 176, 223, 196, 214, 214, 172, 216, 95, + 99, 200, 220, 221, 99, 220, 99, 220, 79, 80, + 81, 133, 193, 108, 127, 108, 128, 111, 181, 111, + 142, 163, 164, 168, 120, 181, 181, 181, 181, 181, + 181, 111, 126, 174, 223, 152, 170, 175, 176, 181, + 82, 183, 116, 185, 179, 125, 116, 216, 216, 216, + 186, 214, 216, 127, 12, 108, 181, 13, 14, 15, + 16, 17, 18, 19, 20, 29, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, + 170, 110, 127, 127, 175, 176, 125, 180, 159, 212, + 172, 3, 4, 5, 6, 7, 8, 9, 10, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 57, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 74, 76, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 91, 92, 93, 94, 95, 96, 97, 99, + 100, 101, 102, 103, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 129, 130, 211, 208, 135, + 213, 177, 128, 108, 170, 127, 130, 127, 4, 216, + 171, 212, 108, 127, 127, 127, 108, 221, 220, 221, + 220, 220, 220, 220, 220, 128, 8, 109, 221, 186, + 174, 186, 181, 127, 54, 86, 88, 115, 119, 120, + 123, 125, 129, 215, 217, 212, 175, 176, 108, 111, + 175, 183, 181, 186, 125, 186, 186, 127, 127, 51, + 161, 223, 12, 179, 175, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 127, 214, 216, 127, 125, 161, 108, 160, - 172, 130, 127, 210, 128, 127, 128, 107, 216, 172, - 130, 146, 161, 127, 127, 125, 116, 125, 116, 215, - 215, 215, 215, 186, 214, 215, 13, 14, 15, 16, - 17, 18, 19, 20, 29, 112, 113, 114, 115, 118, - 119, 120, 121, 122, 124, 125, 126, 130, 108, 151, - 216, 175, 117, 213, 127, 117, 216, 77, 91, 110, - 127, 130, 125, 157, 147, 172, 127, 161, 128, 177, - 127, 109, 109, 172, 186, 186, 186, 127, 127, 215, + 216, 216, 216, 216, 216, 216, 127, 214, 216, 127, + 125, 161, 108, 160, 172, 130, 127, 210, 128, 127, + 128, 107, 216, 172, 130, 146, 161, 127, 127, 125, + 116, 125, 116, 215, 215, 215, 215, 186, 214, 215, + 13, 14, 15, 16, 17, 18, 19, 20, 29, 112, + 113, 114, 115, 118, 119, 120, 121, 122, 124, 125, + 126, 130, 108, 151, 216, 181, 175, 117, 213, 127, + 117, 216, 77, 91, 110, 127, 130, 125, 157, 147, + 172, 127, 161, 128, 177, 127, 109, 109, 172, 186, + 186, 186, 127, 127, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 127, 214, - 216, 152, 125, 127, 125, 125, 216, 158, 172, 127, - 161, 128, 161, 127, 117, 127, 117, 215, 110, 127, - 130, 214, 214, 127, 221, 172, 127, 161, 161, 125, - 125, 215, 127, 127, 127, 127, 161, 214, 214, 161, - 127, 127 + 215, 215, 215, 127, 214, 216, 152, 175, 125, 127, + 125, 125, 216, 158, 172, 127, 161, 128, 161, 127, + 117, 127, 117, 215, 110, 127, 130, 214, 214, 127, + 221, 172, 127, 161, 161, 125, 125, 215, 127, 127, + 127, 127, 161, 214, 214, 161, 127, 127 }; #define yyerrok (yyerrstatus = 0) @@ -2488,7 +2526,7 @@ do \ } \ else \ { \ - yyerror (YY_("syntax error: cannot back up")); \ + yyerror (&yylloc, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) @@ -3369,7 +3407,7 @@ yyreduce: { case 3: /* Line 1792 of yacc.c */ -#line 388 "dtool/src/cppparser/cppBison.yxx" +#line 399 "dtool/src/cppparser/cppBison.yxx" { current_expr = (yyvsp[(2) - (2)].u.expr); } @@ -3377,7 +3415,7 @@ yyreduce: case 4: /* Line 1792 of yacc.c */ -#line 392 "dtool/src/cppparser/cppBison.yxx" +#line 403 "dtool/src/cppparser/cppBison.yxx" { current_type = (yyvsp[(2) - (2)].u.type); } @@ -3385,7 +3423,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 410 "dtool/src/cppparser/cppBison.yxx" +#line 421 "dtool/src/cppparser/cppBison.yxx" { delete (yyvsp[(3) - (4)].u.expr); } @@ -3393,7 +3431,7 @@ yyreduce: case 11: /* Line 1792 of yacc.c */ -#line 422 "dtool/src/cppparser/cppBison.yxx" +#line 433 "dtool/src/cppparser/cppBison.yxx" { push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) | ((yyvsp[(1) - (2)].u.integer) & CPPInstance::SC_c_binding)); @@ -3402,7 +3440,7 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 427 "dtool/src/cppparser/cppBison.yxx" +#line 438 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3410,7 +3448,7 @@ yyreduce: case 20: /* Line 1792 of yacc.c */ -#line 441 "dtool/src/cppparser/cppBison.yxx" +#line 452 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 0) { yyerror("Unclosed __begin_publish", publish_loc); @@ -3427,7 +3465,7 @@ yyreduce: case 21: /* Line 1792 of yacc.c */ -#line 454 "dtool/src/cppparser/cppBison.yxx" +#line 465 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 1) { yyerror("Unmatched __end_publish", (yylsp[(1) - (1)])); @@ -3440,7 +3478,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 463 "dtool/src/cppparser/cppBison.yxx" +#line 474 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_published); } @@ -3448,7 +3486,7 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 467 "dtool/src/cppparser/cppBison.yxx" +#line 478 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level > 0) { current_scope->set_current_vis(V_published); @@ -3460,7 +3498,7 @@ yyreduce: case 24: /* Line 1792 of yacc.c */ -#line 475 "dtool/src/cppparser/cppBison.yxx" +#line 486 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_protected); } @@ -3468,7 +3506,7 @@ yyreduce: case 25: /* Line 1792 of yacc.c */ -#line 479 "dtool/src/cppparser/cppBison.yxx" +#line 490 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_private); } @@ -3476,7 +3514,7 @@ yyreduce: case 26: /* Line 1792 of yacc.c */ -#line 483 "dtool/src/cppparser/cppBison.yxx" +#line 494 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (7)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -3491,7 +3529,7 @@ yyreduce: case 27: /* Line 1792 of yacc.c */ -#line 494 "dtool/src/cppparser/cppBison.yxx" +#line 505 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (9)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); if (getter == (CPPDeclaration *)NULL || getter->get_subtype() != CPPDeclaration::ST_function_group) { @@ -3516,7 +3554,7 @@ yyreduce: case 28: /* Line 1792 of yacc.c */ -#line 515 "dtool/src/cppparser/cppBison.yxx" +#line 526 "dtool/src/cppparser/cppBison.yxx" { CPPMakeSeq *make_seq = new CPPMakeSeq((yyvsp[(3) - (9)].u.identifier)->get_simple_name(), (yyvsp[(5) - (9)].u.identifier)->get_simple_name(), (yyvsp[(7) - (9)].u.identifier)->get_simple_name(), (yylsp[(1) - (9)]).file); current_scope->add_declaration(make_seq, global_scope, current_lexer, (yylsp[(1) - (9)])); @@ -3525,7 +3563,7 @@ yyreduce: case 29: /* Line 1792 of yacc.c */ -#line 523 "dtool/src/cppparser/cppBison.yxx" +#line 534 "dtool/src/cppparser/cppBison.yxx" { CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("temp"), V_public); @@ -3535,7 +3573,7 @@ yyreduce: case 30: /* Line 1792 of yacc.c */ -#line 529 "dtool/src/cppparser/cppBison.yxx" +#line 540 "dtool/src/cppparser/cppBison.yxx" { delete current_scope; pop_scope(); @@ -3544,7 +3582,7 @@ yyreduce: case 31: /* Line 1792 of yacc.c */ -#line 538 "dtool/src/cppparser/cppBison.yxx" +#line 549 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } @@ -3552,7 +3590,7 @@ yyreduce: case 32: /* Line 1792 of yacc.c */ -#line 542 "dtool/src/cppparser/cppBison.yxx" +#line 553 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extern; } @@ -3560,7 +3598,7 @@ yyreduce: case 33: /* Line 1792 of yacc.c */ -#line 546 "dtool/src/cppparser/cppBison.yxx" +#line 557 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (3)].u.integer) | (int)CPPInstance::SC_extern; if ((yyvsp[(3) - (3)].str) == "C") { @@ -3575,7 +3613,7 @@ yyreduce: case 34: /* Line 1792 of yacc.c */ -#line 557 "dtool/src/cppparser/cppBison.yxx" +#line 568 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_static; } @@ -3583,7 +3621,7 @@ yyreduce: case 35: /* Line 1792 of yacc.c */ -#line 561 "dtool/src/cppparser/cppBison.yxx" +#line 572 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_inline; } @@ -3591,7 +3629,7 @@ yyreduce: case 36: /* Line 1792 of yacc.c */ -#line 565 "dtool/src/cppparser/cppBison.yxx" +#line 576 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_virtual; } @@ -3599,7 +3637,7 @@ yyreduce: case 37: /* Line 1792 of yacc.c */ -#line 569 "dtool/src/cppparser/cppBison.yxx" +#line 580 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_explicit; } @@ -3607,7 +3645,7 @@ yyreduce: case 38: /* Line 1792 of yacc.c */ -#line 573 "dtool/src/cppparser/cppBison.yxx" +#line 584 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_volatile; } @@ -3615,7 +3653,7 @@ yyreduce: case 39: /* Line 1792 of yacc.c */ -#line 577 "dtool/src/cppparser/cppBison.yxx" +#line 588 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_mutable; } @@ -3623,7 +3661,7 @@ yyreduce: case 40: /* Line 1792 of yacc.c */ -#line 581 "dtool/src/cppparser/cppBison.yxx" +#line 592 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_register; } @@ -3631,7 +3669,7 @@ yyreduce: case 41: /* Line 1792 of yacc.c */ -#line 585 "dtool/src/cppparser/cppBison.yxx" +#line 596 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_blocking; } @@ -3639,7 +3677,7 @@ yyreduce: case 42: /* Line 1792 of yacc.c */ -#line 589 "dtool/src/cppparser/cppBison.yxx" +#line 600 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extension; } @@ -3647,7 +3685,7 @@ yyreduce: case 43: /* Line 1792 of yacc.c */ -#line 596 "dtool/src/cppparser/cppBison.yxx" +#line 607 "dtool/src/cppparser/cppBison.yxx" { /* multiple_var_declaration adds itself to the scope. */ } @@ -3655,7 +3693,7 @@ yyreduce: case 44: /* Line 1792 of yacc.c */ -#line 600 "dtool/src/cppparser/cppBison.yxx" +#line 611 "dtool/src/cppparser/cppBison.yxx" { // We don't really care about the storage class here. In fact, it's // not actually legal to define a class or struct using a particular @@ -3668,7 +3706,7 @@ yyreduce: case 45: /* Line 1792 of yacc.c */ -#line 609 "dtool/src/cppparser/cppBison.yxx" +#line 620 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPInstance *)NULL) { (yyvsp[(2) - (3)].u.instance)->_storage_class |= (current_storage_class | (yyvsp[(1) - (3)].u.integer)); @@ -3680,7 +3718,7 @@ yyreduce: case 46: /* Line 1792 of yacc.c */ -#line 620 "dtool/src/cppparser/cppBison.yxx" +#line 631 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3695,7 +3733,7 @@ yyreduce: case 47: /* Line 1792 of yacc.c */ -#line 631 "dtool/src/cppparser/cppBison.yxx" +#line 642 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3703,7 +3741,7 @@ yyreduce: case 48: /* Line 1792 of yacc.c */ -#line 635 "dtool/src/cppparser/cppBison.yxx" +#line 646 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3714,7 +3752,7 @@ yyreduce: case 49: /* Line 1792 of yacc.c */ -#line 642 "dtool/src/cppparser/cppBison.yxx" +#line 653 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3722,7 +3760,7 @@ yyreduce: case 50: /* Line 1792 of yacc.c */ -#line 653 "dtool/src/cppparser/cppBison.yxx" +#line 664 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), current_storage_class, @@ -3734,7 +3772,7 @@ yyreduce: case 51: /* Line 1792 of yacc.c */ -#line 661 "dtool/src/cppparser/cppBison.yxx" +#line 672 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), current_storage_class, @@ -3746,7 +3784,7 @@ yyreduce: case 52: /* Line 1792 of yacc.c */ -#line 672 "dtool/src/cppparser/cppBison.yxx" +#line 683 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), @@ -3759,7 +3797,7 @@ yyreduce: case 53: /* Line 1792 of yacc.c */ -#line 681 "dtool/src/cppparser/cppBison.yxx" +#line 692 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), @@ -3772,7 +3810,7 @@ yyreduce: case 54: /* Line 1792 of yacc.c */ -#line 694 "dtool/src/cppparser/cppBison.yxx" +#line 705 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3787,7 +3825,7 @@ yyreduce: case 55: /* Line 1792 of yacc.c */ -#line 705 "dtool/src/cppparser/cppBison.yxx" +#line 716 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3795,7 +3833,7 @@ yyreduce: case 56: /* Line 1792 of yacc.c */ -#line 709 "dtool/src/cppparser/cppBison.yxx" +#line 720 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3806,7 +3844,7 @@ yyreduce: case 57: /* Line 1792 of yacc.c */ -#line 716 "dtool/src/cppparser/cppBison.yxx" +#line 727 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3814,7 +3852,7 @@ yyreduce: case 58: /* Line 1792 of yacc.c */ -#line 720 "dtool/src/cppparser/cppBison.yxx" +#line 731 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPDeclaration *)NULL) { CPPInstance *inst = (yyvsp[(2) - (3)].u.instance)->as_instance(); @@ -3830,7 +3868,7 @@ yyreduce: case 59: /* Line 1792 of yacc.c */ -#line 735 "dtool/src/cppparser/cppBison.yxx" +#line 746 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); @@ -3840,7 +3878,7 @@ yyreduce: case 60: /* Line 1792 of yacc.c */ -#line 741 "dtool/src/cppparser/cppBison.yxx" +#line 752 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); @@ -3850,7 +3888,7 @@ yyreduce: case 61: /* Line 1792 of yacc.c */ -#line 750 "dtool/src/cppparser/cppBison.yxx" +#line 761 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -3861,7 +3899,7 @@ yyreduce: case 62: /* Line 1792 of yacc.c */ -#line 757 "dtool/src/cppparser/cppBison.yxx" +#line 768 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -3872,7 +3910,7 @@ yyreduce: case 63: /* Line 1792 of yacc.c */ -#line 769 "dtool/src/cppparser/cppBison.yxx" +#line 780 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3880,7 +3918,7 @@ yyreduce: case 64: /* Line 1792 of yacc.c */ -#line 773 "dtool/src/cppparser/cppBison.yxx" +#line 784 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -3902,7 +3940,7 @@ yyreduce: case 65: /* Line 1792 of yacc.c */ -#line 791 "dtool/src/cppparser/cppBison.yxx" +#line 802 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3910,7 +3948,7 @@ yyreduce: case 66: /* Line 1792 of yacc.c */ -#line 795 "dtool/src/cppparser/cppBison.yxx" +#line 806 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -3932,7 +3970,7 @@ yyreduce: case 67: /* Line 1792 of yacc.c */ -#line 815 "dtool/src/cppparser/cppBison.yxx" +#line 826 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(2) - (3)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3940,14 +3978,14 @@ yyreduce: case 68: /* Line 1792 of yacc.c */ -#line 819 "dtool/src/cppparser/cppBison.yxx" +#line 830 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); if ((yyvsp[(2) - (7)].u.identifier)->is_scoped()) { yyerror("Invalid destructor name: ~" + (yyvsp[(2) - (7)].u.identifier)->get_fully_scoped_name(), (yylsp[(2) - (7)])); } else { CPPIdentifier *ident = - new CPPIdentifier("~" + (yyvsp[(2) - (7)].u.identifier)->get_simple_name(), (yylsp[(2) - (7)]).file); + new CPPIdentifier("~" + (yyvsp[(2) - (7)].u.identifier)->get_simple_name(), (yylsp[(2) - (7)])); delete (yyvsp[(2) - (7)].u.identifier); CPPType *type; @@ -3963,7 +4001,7 @@ yyreduce: case 69: /* Line 1792 of yacc.c */ -#line 845 "dtool/src/cppparser/cppBison.yxx" +#line 856 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(4) - (6)].u.inst_ident)->get_scope(current_scope, global_scope)); } @@ -3971,7 +4009,7 @@ yyreduce: case 70: /* Line 1792 of yacc.c */ -#line 849 "dtool/src/cppparser/cppBison.yxx" +#line 860 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (10)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -3986,7 +4024,7 @@ yyreduce: case 71: /* Line 1792 of yacc.c */ -#line 860 "dtool/src/cppparser/cppBison.yxx" +#line 871 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(5) - (7)].u.inst_ident)->get_scope(current_scope, global_scope)); } @@ -3994,7 +4032,7 @@ yyreduce: case 72: /* Line 1792 of yacc.c */ -#line 864 "dtool/src/cppparser/cppBison.yxx" +#line 875 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (11)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -4009,7 +4047,7 @@ yyreduce: case 73: /* Line 1792 of yacc.c */ -#line 877 "dtool/src/cppparser/cppBison.yxx" +#line 888 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (4)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (4)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4019,7 +4057,7 @@ yyreduce: case 74: /* Line 1792 of yacc.c */ -#line 883 "dtool/src/cppparser/cppBison.yxx" +#line 894 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (8)].u.identifier) != NULL) { pop_scope(); @@ -4037,7 +4075,7 @@ yyreduce: string name = "operator typecast " + (yyvsp[(2) - (8)].u.type)->get_simple_name(); CPPIdentifier *ident = (yyvsp[(1) - (8)].u.identifier); if (ident == NULL) { - ident = new CPPIdentifier(name, (yylsp[(1) - (8)]).file); + ident = new CPPIdentifier(name, (yylsp[(2) - (8)])); } else { ident->add_name(name); } @@ -4048,7 +4086,7 @@ yyreduce: case 75: /* Line 1792 of yacc.c */ -#line 908 "dtool/src/cppparser/cppBison.yxx" +#line 919 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (5)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (5)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4058,7 +4096,7 @@ yyreduce: case 76: /* Line 1792 of yacc.c */ -#line 914 "dtool/src/cppparser/cppBison.yxx" +#line 925 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (9)].u.identifier) != NULL) { pop_scope(); @@ -4066,7 +4104,7 @@ yyreduce: CPPIdentifier *ident = (yyvsp[(1) - (9)].u.identifier); if (ident == NULL) { - ident = new CPPIdentifier("operator typecast", (yylsp[(1) - (9)]).file); + ident = new CPPIdentifier("operator typecast", (yylsp[(4) - (9)])); } else { ident->add_name("operator typecast"); } @@ -4078,7 +4116,7 @@ yyreduce: case 77: /* Line 1792 of yacc.c */ -#line 934 "dtool/src/cppparser/cppBison.yxx" +#line 945 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *decl = (yyvsp[(1) - (1)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -4092,7 +4130,7 @@ yyreduce: case 78: /* Line 1792 of yacc.c */ -#line 947 "dtool/src/cppparser/cppBison.yxx" +#line 958 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } @@ -4100,7 +4138,7 @@ yyreduce: case 79: /* Line 1792 of yacc.c */ -#line 951 "dtool/src/cppparser/cppBison.yxx" +#line 962 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_const_method; } @@ -4108,7 +4146,7 @@ yyreduce: case 80: /* Line 1792 of yacc.c */ -#line 955 "dtool/src/cppparser/cppBison.yxx" +#line 966 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_noexcept; } @@ -4116,7 +4154,7 @@ yyreduce: case 81: /* Line 1792 of yacc.c */ -#line 959 "dtool/src/cppparser/cppBison.yxx" +#line 970 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (4)].u.integer); } @@ -4124,7 +4162,7 @@ yyreduce: case 82: /* Line 1792 of yacc.c */ -#line 963 "dtool/src/cppparser/cppBison.yxx" +#line 974 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (5)].u.integer); } @@ -4132,7 +4170,7 @@ yyreduce: case 83: /* Line 1792 of yacc.c */ -#line 970 "dtool/src/cppparser/cppBison.yxx" +#line 981 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!"; } @@ -4140,7 +4178,7 @@ yyreduce: case 84: /* Line 1792 of yacc.c */ -#line 974 "dtool/src/cppparser/cppBison.yxx" +#line 985 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "~"; } @@ -4148,7 +4186,7 @@ yyreduce: case 85: /* Line 1792 of yacc.c */ -#line 978 "dtool/src/cppparser/cppBison.yxx" +#line 989 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*"; } @@ -4156,7 +4194,7 @@ yyreduce: case 86: /* Line 1792 of yacc.c */ -#line 982 "dtool/src/cppparser/cppBison.yxx" +#line 993 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/"; } @@ -4164,7 +4202,7 @@ yyreduce: case 87: /* Line 1792 of yacc.c */ -#line 986 "dtool/src/cppparser/cppBison.yxx" +#line 997 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%"; } @@ -4172,7 +4210,7 @@ yyreduce: case 88: /* Line 1792 of yacc.c */ -#line 990 "dtool/src/cppparser/cppBison.yxx" +#line 1001 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+"; } @@ -4180,7 +4218,7 @@ yyreduce: case 89: /* Line 1792 of yacc.c */ -#line 994 "dtool/src/cppparser/cppBison.yxx" +#line 1005 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-"; } @@ -4188,7 +4226,7 @@ yyreduce: case 90: /* Line 1792 of yacc.c */ -#line 998 "dtool/src/cppparser/cppBison.yxx" +#line 1009 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|"; } @@ -4196,7 +4234,7 @@ yyreduce: case 91: /* Line 1792 of yacc.c */ -#line 1002 "dtool/src/cppparser/cppBison.yxx" +#line 1013 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&"; } @@ -4204,7 +4242,7 @@ yyreduce: case 92: /* Line 1792 of yacc.c */ -#line 1006 "dtool/src/cppparser/cppBison.yxx" +#line 1017 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^"; } @@ -4212,7 +4250,7 @@ yyreduce: case 93: /* Line 1792 of yacc.c */ -#line 1010 "dtool/src/cppparser/cppBison.yxx" +#line 1021 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "||"; } @@ -4220,7 +4258,7 @@ yyreduce: case 94: /* Line 1792 of yacc.c */ -#line 1014 "dtool/src/cppparser/cppBison.yxx" +#line 1025 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&&"; } @@ -4228,7 +4266,7 @@ yyreduce: case 95: /* Line 1792 of yacc.c */ -#line 1018 "dtool/src/cppparser/cppBison.yxx" +#line 1029 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "=="; } @@ -4236,7 +4274,7 @@ yyreduce: case 96: /* Line 1792 of yacc.c */ -#line 1022 "dtool/src/cppparser/cppBison.yxx" +#line 1033 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!="; } @@ -4244,7 +4282,7 @@ yyreduce: case 97: /* Line 1792 of yacc.c */ -#line 1026 "dtool/src/cppparser/cppBison.yxx" +#line 1037 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<="; } @@ -4252,7 +4290,7 @@ yyreduce: case 98: /* Line 1792 of yacc.c */ -#line 1030 "dtool/src/cppparser/cppBison.yxx" +#line 1041 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">="; } @@ -4260,7 +4298,7 @@ yyreduce: case 99: /* Line 1792 of yacc.c */ -#line 1034 "dtool/src/cppparser/cppBison.yxx" +#line 1045 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<"; } @@ -4268,7 +4306,7 @@ yyreduce: case 100: /* Line 1792 of yacc.c */ -#line 1038 "dtool/src/cppparser/cppBison.yxx" +#line 1049 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">"; } @@ -4276,7 +4314,7 @@ yyreduce: case 101: /* Line 1792 of yacc.c */ -#line 1042 "dtool/src/cppparser/cppBison.yxx" +#line 1053 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<"; } @@ -4284,7 +4322,7 @@ yyreduce: case 102: /* Line 1792 of yacc.c */ -#line 1046 "dtool/src/cppparser/cppBison.yxx" +#line 1057 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>"; } @@ -4292,7 +4330,7 @@ yyreduce: case 103: /* Line 1792 of yacc.c */ -#line 1050 "dtool/src/cppparser/cppBison.yxx" +#line 1061 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "="; } @@ -4300,7 +4338,7 @@ yyreduce: case 104: /* Line 1792 of yacc.c */ -#line 1054 "dtool/src/cppparser/cppBison.yxx" +#line 1065 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ","; } @@ -4308,7 +4346,7 @@ yyreduce: case 105: /* Line 1792 of yacc.c */ -#line 1058 "dtool/src/cppparser/cppBison.yxx" +#line 1069 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "++"; } @@ -4316,7 +4354,7 @@ yyreduce: case 106: /* Line 1792 of yacc.c */ -#line 1062 "dtool/src/cppparser/cppBison.yxx" +#line 1073 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "--"; } @@ -4324,7 +4362,7 @@ yyreduce: case 107: /* Line 1792 of yacc.c */ -#line 1066 "dtool/src/cppparser/cppBison.yxx" +#line 1077 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*="; } @@ -4332,7 +4370,7 @@ yyreduce: case 108: /* Line 1792 of yacc.c */ -#line 1070 "dtool/src/cppparser/cppBison.yxx" +#line 1081 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/="; } @@ -4340,7 +4378,7 @@ yyreduce: case 109: /* Line 1792 of yacc.c */ -#line 1074 "dtool/src/cppparser/cppBison.yxx" +#line 1085 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%="; } @@ -4348,7 +4386,7 @@ yyreduce: case 110: /* Line 1792 of yacc.c */ -#line 1078 "dtool/src/cppparser/cppBison.yxx" +#line 1089 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+="; } @@ -4356,7 +4394,7 @@ yyreduce: case 111: /* Line 1792 of yacc.c */ -#line 1082 "dtool/src/cppparser/cppBison.yxx" +#line 1093 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-="; } @@ -4364,7 +4402,7 @@ yyreduce: case 112: /* Line 1792 of yacc.c */ -#line 1086 "dtool/src/cppparser/cppBison.yxx" +#line 1097 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|="; } @@ -4372,7 +4410,7 @@ yyreduce: case 113: /* Line 1792 of yacc.c */ -#line 1090 "dtool/src/cppparser/cppBison.yxx" +#line 1101 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&="; } @@ -4380,7 +4418,7 @@ yyreduce: case 114: /* Line 1792 of yacc.c */ -#line 1094 "dtool/src/cppparser/cppBison.yxx" +#line 1105 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^="; } @@ -4388,7 +4426,7 @@ yyreduce: case 115: /* Line 1792 of yacc.c */ -#line 1098 "dtool/src/cppparser/cppBison.yxx" +#line 1109 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<="; } @@ -4396,7 +4434,7 @@ yyreduce: case 116: /* Line 1792 of yacc.c */ -#line 1102 "dtool/src/cppparser/cppBison.yxx" +#line 1113 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>="; } @@ -4404,7 +4442,7 @@ yyreduce: case 117: /* Line 1792 of yacc.c */ -#line 1106 "dtool/src/cppparser/cppBison.yxx" +#line 1117 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "->"; } @@ -4412,7 +4450,7 @@ yyreduce: case 118: /* Line 1792 of yacc.c */ -#line 1110 "dtool/src/cppparser/cppBison.yxx" +#line 1121 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "[]"; } @@ -4420,7 +4458,7 @@ yyreduce: case 119: /* Line 1792 of yacc.c */ -#line 1114 "dtool/src/cppparser/cppBison.yxx" +#line 1125 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "()"; } @@ -4428,7 +4466,7 @@ yyreduce: case 120: /* Line 1792 of yacc.c */ -#line 1118 "dtool/src/cppparser/cppBison.yxx" +#line 1129 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "new"; } @@ -4436,7 +4474,7 @@ yyreduce: case 121: /* Line 1792 of yacc.c */ -#line 1122 "dtool/src/cppparser/cppBison.yxx" +#line 1133 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "delete"; } @@ -4444,7 +4482,7 @@ yyreduce: case 124: /* Line 1792 of yacc.c */ -#line 1134 "dtool/src/cppparser/cppBison.yxx" +#line 1145 "dtool/src/cppparser/cppBison.yxx" { push_scope(new CPPTemplateScope(current_scope)); } @@ -4452,7 +4490,7 @@ yyreduce: case 125: /* Line 1792 of yacc.c */ -#line 1138 "dtool/src/cppparser/cppBison.yxx" +#line 1149 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } @@ -4460,7 +4498,7 @@ yyreduce: case 129: /* Line 1792 of yacc.c */ -#line 1151 "dtool/src/cppparser/cppBison.yxx" +#line 1162 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4470,7 +4508,7 @@ yyreduce: case 130: /* Line 1792 of yacc.c */ -#line 1157 "dtool/src/cppparser/cppBison.yxx" +#line 1168 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4480,7 +4518,7 @@ yyreduce: case 131: /* Line 1792 of yacc.c */ -#line 1166 "dtool/src/cppparser/cppBison.yxx" +#line 1177 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } @@ -4488,7 +4526,7 @@ yyreduce: case 132: /* Line 1792 of yacc.c */ -#line 1170 "dtool/src/cppparser/cppBison.yxx" +#line 1181 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } @@ -4496,7 +4534,7 @@ yyreduce: case 133: /* Line 1792 of yacc.c */ -#line 1174 "dtool/src/cppparser/cppBison.yxx" +#line 1185 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } @@ -4504,7 +4542,7 @@ yyreduce: case 134: /* Line 1792 of yacc.c */ -#line 1178 "dtool/src/cppparser/cppBison.yxx" +#line 1189 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } @@ -4512,7 +4550,7 @@ yyreduce: case 135: /* Line 1792 of yacc.c */ -#line 1182 "dtool/src/cppparser/cppBison.yxx" +#line 1193 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); inst->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4522,7 +4560,7 @@ yyreduce: case 136: /* Line 1792 of yacc.c */ -#line 1188 "dtool/src/cppparser/cppBison.yxx" +#line 1199 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4533,7 +4571,7 @@ yyreduce: case 137: /* Line 1792 of yacc.c */ -#line 1198 "dtool/src/cppparser/cppBison.yxx" +#line 1209 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -4541,7 +4579,7 @@ yyreduce: case 138: /* Line 1792 of yacc.c */ -#line 1202 "dtool/src/cppparser/cppBison.yxx" +#line 1213 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); @@ -4550,7 +4588,7 @@ yyreduce: case 139: /* Line 1792 of yacc.c */ -#line 1207 "dtool/src/cppparser/cppBison.yxx" +#line 1218 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.type) != NULL); @@ -4559,7 +4597,7 @@ yyreduce: case 140: /* Line 1792 of yacc.c */ -#line 1216 "dtool/src/cppparser/cppBison.yxx" +#line 1227 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -4567,14 +4605,14 @@ yyreduce: case 141: /* Line 1792 of yacc.c */ -#line 1220 "dtool/src/cppparser/cppBison.yxx" +#line 1231 "dtool/src/cppparser/cppBison.yxx" { // For an operator function. We implement this simply by building a // ficticious name for the function; in other respects it's just // like a regular function. CPPIdentifier *ident = (yyvsp[(1) - (2)].u.identifier); if (ident == NULL) { - ident = new CPPIdentifier("operator "+(yyvsp[(2) - (2)].str), (yylsp[(2) - (2)]).file); + ident = new CPPIdentifier("operator "+(yyvsp[(2) - (2)].str), (yylsp[(2) - (2)])); } else { ident->_names.push_back("operator "+(yyvsp[(2) - (2)].str)); } @@ -4585,7 +4623,7 @@ yyreduce: case 142: /* Line 1792 of yacc.c */ -#line 1234 "dtool/src/cppparser/cppBison.yxx" +#line 1245 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); @@ -4594,7 +4632,7 @@ yyreduce: case 143: /* Line 1792 of yacc.c */ -#line 1239 "dtool/src/cppparser/cppBison.yxx" +#line 1250 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); @@ -4603,7 +4641,7 @@ yyreduce: case 144: /* Line 1792 of yacc.c */ -#line 1244 "dtool/src/cppparser/cppBison.yxx" +#line 1255 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); @@ -4612,7 +4650,7 @@ yyreduce: case 145: /* Line 1792 of yacc.c */ -#line 1249 "dtool/src/cppparser/cppBison.yxx" +#line 1260 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); @@ -4621,7 +4659,7 @@ yyreduce: case 146: /* Line 1792 of yacc.c */ -#line 1254 "dtool/src/cppparser/cppBison.yxx" +#line 1265 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); @@ -4630,7 +4668,7 @@ yyreduce: case 147: /* Line 1792 of yacc.c */ -#line 1259 "dtool/src/cppparser/cppBison.yxx" +#line 1270 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); @@ -4639,7 +4677,7 @@ yyreduce: case 148: /* Line 1792 of yacc.c */ -#line 1264 "dtool/src/cppparser/cppBison.yxx" +#line 1275 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); @@ -4648,7 +4686,7 @@ yyreduce: case 149: /* Line 1792 of yacc.c */ -#line 1269 "dtool/src/cppparser/cppBison.yxx" +#line 1280 "dtool/src/cppparser/cppBison.yxx" { // bitfield definition. We ignore the bitfield for now. (yyval.u.inst_ident) = (yyvsp[(1) - (3)].u.inst_ident); @@ -4657,7 +4695,7 @@ yyreduce: case 150: /* Line 1792 of yacc.c */ -#line 1274 "dtool/src/cppparser/cppBison.yxx" +#line 1285 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -4666,7 +4704,7 @@ yyreduce: case 151: /* Line 1792 of yacc.c */ -#line 1279 "dtool/src/cppparser/cppBison.yxx" +#line 1290 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.inst_ident)->get_scope(current_scope, global_scope)); } @@ -4674,7 +4712,7 @@ yyreduce: case 152: /* Line 1792 of yacc.c */ -#line 1283 "dtool/src/cppparser/cppBison.yxx" +#line 1294 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); (yyval.u.inst_ident) = (yyvsp[(1) - (6)].u.inst_ident); @@ -4692,7 +4730,7 @@ yyreduce: case 153: /* Line 1792 of yacc.c */ -#line 1301 "dtool/src/cppparser/cppBison.yxx" +#line 1312 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; } @@ -4700,7 +4738,7 @@ yyreduce: case 154: /* Line 1792 of yacc.c */ -#line 1305 "dtool/src/cppparser/cppBison.yxx" +#line 1316 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_includes_ellipsis = true; @@ -4709,7 +4747,7 @@ yyreduce: case 155: /* Line 1792 of yacc.c */ -#line 1310 "dtool/src/cppparser/cppBison.yxx" +#line 1321 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); } @@ -4717,7 +4755,7 @@ yyreduce: case 156: /* Line 1792 of yacc.c */ -#line 1314 "dtool/src/cppparser/cppBison.yxx" +#line 1325 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; @@ -4726,7 +4764,7 @@ yyreduce: case 157: /* Line 1792 of yacc.c */ -#line 1319 "dtool/src/cppparser/cppBison.yxx" +#line 1330 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; @@ -4735,7 +4773,7 @@ yyreduce: case 158: /* Line 1792 of yacc.c */ -#line 1327 "dtool/src/cppparser/cppBison.yxx" +#line 1338 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[(1) - (1)].u.instance)); @@ -4744,7 +4782,7 @@ yyreduce: case 159: /* Line 1792 of yacc.c */ -#line 1332 "dtool/src/cppparser/cppBison.yxx" +#line 1343 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[(3) - (3)].u.instance)); @@ -4753,7 +4791,7 @@ yyreduce: case 160: /* Line 1792 of yacc.c */ -#line 1340 "dtool/src/cppparser/cppBison.yxx" +#line 1351 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4761,7 +4799,7 @@ yyreduce: case 161: /* Line 1792 of yacc.c */ -#line 1344 "dtool/src/cppparser/cppBison.yxx" +#line 1355 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } @@ -4769,7 +4807,7 @@ yyreduce: case 162: /* Line 1792 of yacc.c */ -#line 1351 "dtool/src/cppparser/cppBison.yxx" +#line 1362 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4777,7 +4815,7 @@ yyreduce: case 163: /* Line 1792 of yacc.c */ -#line 1355 "dtool/src/cppparser/cppBison.yxx" +#line 1366 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } @@ -4785,7 +4823,7 @@ yyreduce: case 164: /* Line 1792 of yacc.c */ -#line 1362 "dtool/src/cppparser/cppBison.yxx" +#line 1373 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4793,7 +4831,7 @@ yyreduce: case 165: /* Line 1792 of yacc.c */ -#line 1366 "dtool/src/cppparser/cppBison.yxx" +#line 1377 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4801,7 +4839,7 @@ yyreduce: case 166: /* Line 1792 of yacc.c */ -#line 1370 "dtool/src/cppparser/cppBison.yxx" +#line 1381 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4809,7 +4847,7 @@ yyreduce: case 167: /* Line 1792 of yacc.c */ -#line 1374 "dtool/src/cppparser/cppBison.yxx" +#line 1385 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } @@ -4817,7 +4855,7 @@ yyreduce: case 168: /* Line 1792 of yacc.c */ -#line 1378 "dtool/src/cppparser/cppBison.yxx" +#line 1389 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4825,14 +4863,14 @@ yyreduce: case 172: /* Line 1792 of yacc.c */ -#line 1391 "dtool/src/cppparser/cppBison.yxx" +#line 1402 "dtool/src/cppparser/cppBison.yxx" { } break; case 176: /* Line 1792 of yacc.c */ -#line 1400 "dtool/src/cppparser/cppBison.yxx" +#line 1411 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4841,7 +4879,7 @@ yyreduce: case 177: /* Line 1792 of yacc.c */ -#line 1405 "dtool/src/cppparser/cppBison.yxx" +#line 1416 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (3)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (3)])); CPPType *type = @@ -4853,7 +4891,7 @@ yyreduce: case 178: /* Line 1792 of yacc.c */ -#line 1413 "dtool/src/cppparser/cppBison.yxx" +#line 1424 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4863,7 +4901,25 @@ yyreduce: case 179: /* Line 1792 of yacc.c */ -#line 1419 "dtool/src/cppparser/cppBison.yxx" +#line 1430 "dtool/src/cppparser/cppBison.yxx" + { + (yyvsp[(4) - (5)].u.inst_ident)->add_modifier(IIT_const); + (yyval.u.instance) = new CPPInstance((yyvsp[(3) - (5)].u.type), (yyvsp[(4) - (5)].u.inst_ident), 0, (yylsp[(3) - (5)]).file); + (yyval.u.instance)->set_initializer((yyvsp[(5) - (5)].u.expr)); +} + break; + + case 180: +/* Line 1792 of yacc.c */ +#line 1436 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.instance) = (yyvsp[(2) - (2)].u.instance); +} + break; + + case 181: +/* Line 1792 of yacc.c */ +#line 1440 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter)); @@ -4872,183 +4928,183 @@ yyreduce: } break; - case 180: -/* Line 1792 of yacc.c */ -#line 1429 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 181: -/* Line 1792 of yacc.c */ -#line 1433 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - case 182: /* Line 1792 of yacc.c */ -#line 1437 "dtool/src/cppparser/cppBison.yxx" +#line 1450 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; case 183: /* Line 1792 of yacc.c */ -#line 1441 "dtool/src/cppparser/cppBison.yxx" +#line 1454 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_const); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 184: /* Line 1792 of yacc.c */ -#line 1446 "dtool/src/cppparser/cppBison.yxx" +#line 1458 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_volatile); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 185: /* Line 1792 of yacc.c */ -#line 1451 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_pointer); -} - break; - - case 186: -/* Line 1792 of yacc.c */ -#line 1456 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_reference); -} - break; - - case 187: -/* Line 1792 of yacc.c */ -#line 1461 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); -} - break; - - case 188: -/* Line 1792 of yacc.c */ -#line 1466 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); - (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); -} - break; - - case 189: -/* Line 1792 of yacc.c */ -#line 1471 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); - (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); -} - break; - - case 190: -/* Line 1792 of yacc.c */ -#line 1479 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 191: -/* Line 1792 of yacc.c */ -#line 1483 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 192: -/* Line 1792 of yacc.c */ -#line 1487 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 193: -/* Line 1792 of yacc.c */ -#line 1491 "dtool/src/cppparser/cppBison.yxx" +#line 1462 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 194: + case 186: /* Line 1792 of yacc.c */ -#line 1496 "dtool/src/cppparser/cppBison.yxx" +#line 1467 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 195: + case 187: /* Line 1792 of yacc.c */ -#line 1501 "dtool/src/cppparser/cppBison.yxx" +#line 1472 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 196: + case 188: /* Line 1792 of yacc.c */ -#line 1506 "dtool/src/cppparser/cppBison.yxx" +#line 1477 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 197: + case 189: /* Line 1792 of yacc.c */ -#line 1511 "dtool/src/cppparser/cppBison.yxx" +#line 1482 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 198: + case 190: /* Line 1792 of yacc.c */ -#line 1516 "dtool/src/cppparser/cppBison.yxx" +#line 1487 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 199: + case 191: /* Line 1792 of yacc.c */ -#line 1521 "dtool/src/cppparser/cppBison.yxx" +#line 1492 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; + case 192: +/* Line 1792 of yacc.c */ +#line 1500 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); +} + break; + + case 193: +/* Line 1792 of yacc.c */ +#line 1504 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 194: +/* Line 1792 of yacc.c */ +#line 1508 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 195: +/* Line 1792 of yacc.c */ +#line 1512 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_const); +} + break; + + case 196: +/* Line 1792 of yacc.c */ +#line 1517 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 197: +/* Line 1792 of yacc.c */ +#line 1522 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_pointer); +} + break; + + case 198: +/* Line 1792 of yacc.c */ +#line 1527 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_reference); +} + break; + + case 199: +/* Line 1792 of yacc.c */ +#line 1532 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); +} + break; + case 200: /* Line 1792 of yacc.c */ -#line 1526 "dtool/src/cppparser/cppBison.yxx" +#line 1537 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); + (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); +} + break; + + case 201: +/* Line 1792 of yacc.c */ +#line 1542 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); + (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); +} + break; + + case 202: +/* Line 1792 of yacc.c */ +#line 1547 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5056,89 +5112,89 @@ yyreduce: } break; - case 201: + case 203: /* Line 1792 of yacc.c */ -#line 1532 "dtool/src/cppparser/cppBison.yxx" +#line 1553 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 202: + case 204: /* Line 1792 of yacc.c */ -#line 1540 "dtool/src/cppparser/cppBison.yxx" +#line 1561 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 203: + case 205: /* Line 1792 of yacc.c */ -#line 1544 "dtool/src/cppparser/cppBison.yxx" +#line 1565 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 204: + case 206: /* Line 1792 of yacc.c */ -#line 1549 "dtool/src/cppparser/cppBison.yxx" +#line 1570 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 205: + case 207: /* Line 1792 of yacc.c */ -#line 1554 "dtool/src/cppparser/cppBison.yxx" +#line 1575 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 206: + case 208: /* Line 1792 of yacc.c */ -#line 1559 "dtool/src/cppparser/cppBison.yxx" +#line 1580 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 207: + case 209: /* Line 1792 of yacc.c */ -#line 1564 "dtool/src/cppparser/cppBison.yxx" +#line 1585 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 208: + case 210: /* Line 1792 of yacc.c */ -#line 1569 "dtool/src/cppparser/cppBison.yxx" +#line 1590 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 209: + case 211: /* Line 1792 of yacc.c */ -#line 1574 "dtool/src/cppparser/cppBison.yxx" +#line 1595 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 210: + case 212: /* Line 1792 of yacc.c */ -#line 1579 "dtool/src/cppparser/cppBison.yxx" +#line 1600 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5146,58 +5202,58 @@ yyreduce: } break; - case 211: + case 213: /* Line 1792 of yacc.c */ -#line 1588 "dtool/src/cppparser/cppBison.yxx" +#line 1609 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 212: + case 214: /* Line 1792 of yacc.c */ -#line 1592 "dtool/src/cppparser/cppBison.yxx" +#line 1613 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.type) != NULL); } break; - case 213: + case 215: /* Line 1792 of yacc.c */ -#line 1597 "dtool/src/cppparser/cppBison.yxx" +#line 1618 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 214: -/* Line 1792 of yacc.c */ -#line 1601 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - - case 215: -/* Line 1792 of yacc.c */ -#line 1605 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - case 216: /* Line 1792 of yacc.c */ -#line 1609 "dtool/src/cppparser/cppBison.yxx" +#line 1622 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; case 217: /* Line 1792 of yacc.c */ -#line 1613 "dtool/src/cppparser/cppBison.yxx" +#line 1626 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); +} + break; + + case 218: +/* Line 1792 of yacc.c */ +#line 1630 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); +} + break; + + case 219: +/* Line 1792 of yacc.c */ +#line 1634 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5215,9 +5271,9 @@ yyreduce: } break; - case 218: + case 220: /* Line 1792 of yacc.c */ -#line 1629 "dtool/src/cppparser/cppBison.yxx" +#line 1650 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5235,58 +5291,58 @@ yyreduce: } break; - case 219: + case 221: /* Line 1792 of yacc.c */ -#line 1648 "dtool/src/cppparser/cppBison.yxx" +#line 1669 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 220: + case 222: /* Line 1792 of yacc.c */ -#line 1652 "dtool/src/cppparser/cppBison.yxx" +#line 1673 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.decl) != NULL); } break; - case 221: + case 223: /* Line 1792 of yacc.c */ -#line 1657 "dtool/src/cppparser/cppBison.yxx" +#line 1678 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 222: + case 224: /* Line 1792 of yacc.c */ -#line 1661 "dtool/src/cppparser/cppBison.yxx" +#line 1682 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; - case 223: + case 225: /* Line 1792 of yacc.c */ -#line 1665 "dtool/src/cppparser/cppBison.yxx" +#line 1686 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); } break; - case 224: + case 226: /* Line 1792 of yacc.c */ -#line 1669 "dtool/src/cppparser/cppBison.yxx" +#line 1690 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); } break; - case 225: + case 227: /* Line 1792 of yacc.c */ -#line 1673 "dtool/src/cppparser/cppBison.yxx" +#line 1694 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5304,9 +5360,9 @@ yyreduce: } break; - case 226: + case 228: /* Line 1792 of yacc.c */ -#line 1689 "dtool/src/cppparser/cppBison.yxx" +#line 1710 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5324,9 +5380,9 @@ yyreduce: } break; - case 227: + case 229: /* Line 1792 of yacc.c */ -#line 1705 "dtool/src/cppparser/cppBison.yxx" +#line 1726 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5346,74 +5402,74 @@ yyreduce: } break; - case 228: + case 230: /* Line 1792 of yacc.c */ -#line 1726 "dtool/src/cppparser/cppBison.yxx" +#line 1747 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 229: + case 231: /* Line 1792 of yacc.c */ -#line 1730 "dtool/src/cppparser/cppBison.yxx" +#line 1751 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); assert((yyval.u.type) != NULL); } break; - case 230: + case 232: /* Line 1792 of yacc.c */ -#line 1735 "dtool/src/cppparser/cppBison.yxx" +#line 1756 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 231: -/* Line 1792 of yacc.c */ -#line 1739 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } -} - break; - - case 232: -/* Line 1792 of yacc.c */ -#line 1755 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } -} - break; - case 233: /* Line 1792 of yacc.c */ -#line 1774 "dtool/src/cppparser/cppBison.yxx" +#line 1760 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 234: +/* Line 1792 of yacc.c */ +#line 1776 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 235: +/* Line 1792 of yacc.c */ +#line 1795 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5421,9 +5477,9 @@ yyreduce: } break; - case 234: + case 236: /* Line 1792 of yacc.c */ -#line 1780 "dtool/src/cppparser/cppBison.yxx" +#line 1801 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5432,9 +5488,9 @@ yyreduce: } break; - case 235: + case 237: /* Line 1792 of yacc.c */ -#line 1790 "dtool/src/cppparser/cppBison.yxx" +#line 1811 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5450,9 +5506,9 @@ yyreduce: } break; - case 236: + case 238: /* Line 1792 of yacc.c */ -#line 1804 "dtool/src/cppparser/cppBison.yxx" +#line 1825 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5461,9 +5517,9 @@ yyreduce: } break; - case 237: + case 239: /* Line 1792 of yacc.c */ -#line 1814 "dtool/src/cppparser/cppBison.yxx" +#line 1835 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5485,9 +5541,9 @@ yyreduce: } break; - case 238: + case 240: /* Line 1792 of yacc.c */ -#line 1834 "dtool/src/cppparser/cppBison.yxx" +#line 1855 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5496,138 +5552,138 @@ yyreduce: } break; - case 243: + case 245: /* Line 1792 of yacc.c */ -#line 1854 "dtool/src/cppparser/cppBison.yxx" +#line 1875 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } break; - case 244: + case 246: /* Line 1792 of yacc.c */ -#line 1858 "dtool/src/cppparser/cppBison.yxx" +#line 1879 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } break; - case 245: + case 247: /* Line 1792 of yacc.c */ -#line 1862 "dtool/src/cppparser/cppBison.yxx" +#line 1883 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } break; - case 246: -/* Line 1792 of yacc.c */ -#line 1866 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 247: -/* Line 1792 of yacc.c */ -#line 1870 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); -} - break; - case 248: /* Line 1792 of yacc.c */ -#line 1874 "dtool/src/cppparser/cppBison.yxx" +#line 1887 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } break; case 249: /* Line 1792 of yacc.c */ -#line 1878 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 250: -/* Line 1792 of yacc.c */ -#line 1882 "dtool/src/cppparser/cppBison.yxx" +#line 1891 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } break; - case 251: + case 250: /* Line 1792 of yacc.c */ -#line 1886 "dtool/src/cppparser/cppBison.yxx" +#line 1895 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } break; + case 251: +/* Line 1792 of yacc.c */ +#line 1899 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); +} + break; + case 252: /* Line 1792 of yacc.c */ -#line 1893 "dtool/src/cppparser/cppBison.yxx" +#line 1903 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); +} + break; + + case 253: +/* Line 1792 of yacc.c */ +#line 1907 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); +} + break; + + case 254: +/* Line 1792 of yacc.c */ +#line 1914 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.enum_type) = current_enum; current_enum = NULL; } break; - case 253: + case 255: /* Line 1792 of yacc.c */ -#line 1901 "dtool/src/cppparser/cppBison.yxx" +#line 1922 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } break; - case 254: + case 256: /* Line 1792 of yacc.c */ -#line 1905 "dtool/src/cppparser/cppBison.yxx" +#line 1926 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } break; - case 255: + case 257: /* Line 1792 of yacc.c */ -#line 1909 "dtool/src/cppparser/cppBison.yxx" +#line 1930 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } break; - case 256: + case 258: /* Line 1792 of yacc.c */ -#line 1913 "dtool/src/cppparser/cppBison.yxx" +#line 1934 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); } break; - case 257: + case 259: /* Line 1792 of yacc.c */ -#line 1920 "dtool/src/cppparser/cppBison.yxx" +#line 1941 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 258: + case 260: /* Line 1792 of yacc.c */ -#line 1924 "dtool/src/cppparser/cppBison.yxx" +#line 1945 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } break; - case 260: + case 262: /* Line 1792 of yacc.c */ -#line 1932 "dtool/src/cppparser/cppBison.yxx" +#line 1953 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); @@ -5635,9 +5691,9 @@ yyreduce: } break; - case 261: + case 263: /* Line 1792 of yacc.c */ -#line 1938 "dtool/src/cppparser/cppBison.yxx" +#line 1959 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5645,9 +5701,9 @@ yyreduce: } break; - case 263: + case 265: /* Line 1792 of yacc.c */ -#line 1947 "dtool/src/cppparser/cppBison.yxx" +#line 1968 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5655,9 +5711,9 @@ yyreduce: } break; - case 264: + case 266: /* Line 1792 of yacc.c */ -#line 1953 "dtool/src/cppparser/cppBison.yxx" +#line 1974 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5665,41 +5721,41 @@ yyreduce: } break; - case 265: + case 267: /* Line 1792 of yacc.c */ -#line 1962 "dtool/src/cppparser/cppBison.yxx" +#line 1983 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } break; - case 266: + case 268: /* Line 1792 of yacc.c */ -#line 1969 "dtool/src/cppparser/cppBison.yxx" +#line 1990 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_class; } break; - case 267: + case 269: /* Line 1792 of yacc.c */ -#line 1973 "dtool/src/cppparser/cppBison.yxx" +#line 1994 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } break; - case 268: + case 270: /* Line 1792 of yacc.c */ -#line 1977 "dtool/src/cppparser/cppBison.yxx" +#line 1998 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_union; } break; - case 269: + case 271: /* Line 1792 of yacc.c */ -#line 1984 "dtool/src/cppparser/cppBison.yxx" +#line 2005 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -5719,17 +5775,17 @@ yyreduce: } break; - case 270: + case 272: /* Line 1792 of yacc.c */ -#line 2002 "dtool/src/cppparser/cppBison.yxx" +#line 2023 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 272: + case 274: /* Line 1792 of yacc.c */ -#line 2010 "dtool/src/cppparser/cppBison.yxx" +#line 2031 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -5737,9 +5793,9 @@ yyreduce: } break; - case 273: + case 275: /* Line 1792 of yacc.c */ -#line 2016 "dtool/src/cppparser/cppBison.yxx" +#line 2037 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); @@ -5747,111 +5803,111 @@ yyreduce: } break; - case 277: + case 279: /* Line 1792 of yacc.c */ -#line 2031 "dtool/src/cppparser/cppBison.yxx" +#line 2052 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; - case 278: + case 280: /* Line 1792 of yacc.c */ -#line 2035 "dtool/src/cppparser/cppBison.yxx" +#line 2056 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; - case 279: + case 281: /* Line 1792 of yacc.c */ -#line 2039 "dtool/src/cppparser/cppBison.yxx" +#line 2060 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } break; - case 280: + case 282: /* Line 1792 of yacc.c */ -#line 2043 "dtool/src/cppparser/cppBison.yxx" +#line 2064 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } break; - case 281: + case 283: /* Line 1792 of yacc.c */ -#line 2047 "dtool/src/cppparser/cppBison.yxx" +#line 2068 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); } break; - case 282: + case 284: /* Line 1792 of yacc.c */ -#line 2051 "dtool/src/cppparser/cppBison.yxx" +#line 2072 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_short); } break; - case 283: + case 285: /* Line 1792 of yacc.c */ -#line 2056 "dtool/src/cppparser/cppBison.yxx" +#line 2077 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } break; - case 284: + case 286: /* Line 1792 of yacc.c */ -#line 2061 "dtool/src/cppparser/cppBison.yxx" +#line 2082 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 285: + case 287: /* Line 1792 of yacc.c */ -#line 2066 "dtool/src/cppparser/cppBison.yxx" +#line 2087 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 286: + case 288: /* Line 1792 of yacc.c */ -#line 2071 "dtool/src/cppparser/cppBison.yxx" +#line 2092 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 287: + case 289: /* Line 1792 of yacc.c */ -#line 2076 "dtool/src/cppparser/cppBison.yxx" +#line 2097 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 288: + case 290: /* Line 1792 of yacc.c */ -#line 2080 "dtool/src/cppparser/cppBison.yxx" +#line 2101 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 289: + case 291: /* Line 1792 of yacc.c */ -#line 2085 "dtool/src/cppparser/cppBison.yxx" +#line 2106 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -5862,173 +5918,157 @@ yyreduce: } break; - case 290: + case 292: /* Line 1792 of yacc.c */ -#line 2094 "dtool/src/cppparser/cppBison.yxx" +#line 2115 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 291: + case 293: /* Line 1792 of yacc.c */ -#line 2099 "dtool/src/cppparser/cppBison.yxx" +#line 2120 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 292: + case 294: /* Line 1792 of yacc.c */ -#line 2107 "dtool/src/cppparser/cppBison.yxx" +#line 2128 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 293: + case 295: /* Line 1792 of yacc.c */ -#line 2111 "dtool/src/cppparser/cppBison.yxx" +#line 2132 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; - case 294: + case 296: /* Line 1792 of yacc.c */ -#line 2116 "dtool/src/cppparser/cppBison.yxx" +#line 2137 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; - case 295: + case 297: /* Line 1792 of yacc.c */ -#line 2120 "dtool/src/cppparser/cppBison.yxx" +#line 2141 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_longlong); } break; - case 296: + case 298: /* Line 1792 of yacc.c */ -#line 2125 "dtool/src/cppparser/cppBison.yxx" +#line 2146 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, CPPSimpleType::F_long); } break; - case 297: + case 299: /* Line 1792 of yacc.c */ -#line 2133 "dtool/src/cppparser/cppBison.yxx" +#line 2154 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); } break; - case 298: + case 300: /* Line 1792 of yacc.c */ -#line 2142 "dtool/src/cppparser/cppBison.yxx" +#line 2163 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = false; } break; - case 299: + case 301: /* Line 1792 of yacc.c */ -#line 2146 "dtool/src/cppparser/cppBison.yxx" +#line 2167 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = true; } break; - case 302: -/* Line 1792 of yacc.c */ -#line 2158 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 303: -/* Line 1792 of yacc.c */ -#line 2161 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - case 304: /* Line 1792 of yacc.c */ -#line 2164 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 305: -/* Line 1792 of yacc.c */ -#line 2167 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 306: -/* Line 1792 of yacc.c */ -#line 2170 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 307: -/* Line 1792 of yacc.c */ -#line 2173 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 308: -/* Line 1792 of yacc.c */ -#line 2176 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 309: -/* Line 1792 of yacc.c */ #line 2179 "dtool/src/cppparser/cppBison.yxx" { } break; - case 384: + case 305: +/* Line 1792 of yacc.c */ +#line 2182 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 306: +/* Line 1792 of yacc.c */ +#line 2185 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 307: +/* Line 1792 of yacc.c */ +#line 2188 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 308: +/* Line 1792 of yacc.c */ +#line 2191 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 309: +/* Line 1792 of yacc.c */ +#line 2194 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 310: +/* Line 1792 of yacc.c */ +#line 2197 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 311: /* Line 1792 of yacc.c */ #line 2200 "dtool/src/cppparser/cppBison.yxx" { } break; - case 408: + case 386: /* Line 1792 of yacc.c */ -#line 2209 "dtool/src/cppparser/cppBison.yxx" +#line 2221 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 409: -/* Line 1792 of yacc.c */ -#line 2213 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 410: /* Line 1792 of yacc.c */ -#line 2220 "dtool/src/cppparser/cppBison.yxx" +#line 2230 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -6036,7 +6076,7 @@ yyreduce: case 411: /* Line 1792 of yacc.c */ -#line 2224 "dtool/src/cppparser/cppBison.yxx" +#line 2234 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6044,23 +6084,23 @@ yyreduce: case 412: /* Line 1792 of yacc.c */ -#line 2231 "dtool/src/cppparser/cppBison.yxx" +#line 2241 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 413: /* Line 1792 of yacc.c */ -#line 2235 "dtool/src/cppparser/cppBison.yxx" +#line 2245 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 414: /* Line 1792 of yacc.c */ -#line 2242 "dtool/src/cppparser/cppBison.yxx" +#line 2252 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6068,55 +6108,71 @@ yyreduce: case 415: /* Line 1792 of yacc.c */ -#line 2246 "dtool/src/cppparser/cppBison.yxx" +#line 2256 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 416: /* Line 1792 of yacc.c */ -#line 2250 "dtool/src/cppparser/cppBison.yxx" +#line 2263 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 417: /* Line 1792 of yacc.c */ -#line 2254 "dtool/src/cppparser/cppBison.yxx" +#line 2267 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; case 418: /* Line 1792 of yacc.c */ -#line 2258 "dtool/src/cppparser/cppBison.yxx" +#line 2271 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 419: /* Line 1792 of yacc.c */ -#line 2262 "dtool/src/cppparser/cppBison.yxx" +#line 2275 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 420: /* Line 1792 of yacc.c */ -#line 2266 "dtool/src/cppparser/cppBison.yxx" +#line 2279 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 421: /* Line 1792 of yacc.c */ -#line 2270 "dtool/src/cppparser/cppBison.yxx" +#line 2283 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 422: +/* Line 1792 of yacc.c */ +#line 2287 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 423: +/* Line 1792 of yacc.c */ +#line 2291 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6130,241 +6186,241 @@ yyreduce: } break; - case 422: + case 424: /* Line 1792 of yacc.c */ -#line 2282 "dtool/src/cppparser/cppBison.yxx" +#line 2303 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; - case 423: + case 425: /* Line 1792 of yacc.c */ -#line 2286 "dtool/src/cppparser/cppBison.yxx" +#line 2307 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 424: + case 426: /* Line 1792 of yacc.c */ -#line 2290 "dtool/src/cppparser/cppBison.yxx" +#line 2311 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 425: + case 427: /* Line 1792 of yacc.c */ -#line 2294 "dtool/src/cppparser/cppBison.yxx" +#line 2315 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 426: + case 428: /* Line 1792 of yacc.c */ -#line 2298 "dtool/src/cppparser/cppBison.yxx" +#line 2319 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 427: + case 429: /* Line 1792 of yacc.c */ -#line 2302 "dtool/src/cppparser/cppBison.yxx" +#line 2323 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 428: + case 430: /* Line 1792 of yacc.c */ -#line 2306 "dtool/src/cppparser/cppBison.yxx" +#line 2327 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 429: + case 431: /* Line 1792 of yacc.c */ -#line 2310 "dtool/src/cppparser/cppBison.yxx" +#line 2331 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 430: + case 432: /* Line 1792 of yacc.c */ -#line 2314 "dtool/src/cppparser/cppBison.yxx" +#line 2335 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 431: + case 433: /* Line 1792 of yacc.c */ -#line 2318 "dtool/src/cppparser/cppBison.yxx" +#line 2339 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 432: + case 434: /* Line 1792 of yacc.c */ -#line 2322 "dtool/src/cppparser/cppBison.yxx" +#line 2343 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 433: + case 435: /* Line 1792 of yacc.c */ -#line 2326 "dtool/src/cppparser/cppBison.yxx" +#line 2347 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 434: + case 436: /* Line 1792 of yacc.c */ -#line 2330 "dtool/src/cppparser/cppBison.yxx" +#line 2351 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 435: + case 437: /* Line 1792 of yacc.c */ -#line 2334 "dtool/src/cppparser/cppBison.yxx" +#line 2355 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 436: + case 438: /* Line 1792 of yacc.c */ -#line 2338 "dtool/src/cppparser/cppBison.yxx" +#line 2359 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 437: + case 439: /* Line 1792 of yacc.c */ -#line 2342 "dtool/src/cppparser/cppBison.yxx" +#line 2363 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 438: + case 440: /* Line 1792 of yacc.c */ -#line 2346 "dtool/src/cppparser/cppBison.yxx" +#line 2367 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 439: + case 441: /* Line 1792 of yacc.c */ -#line 2350 "dtool/src/cppparser/cppBison.yxx" +#line 2371 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 440: + case 442: /* Line 1792 of yacc.c */ -#line 2354 "dtool/src/cppparser/cppBison.yxx" +#line 2375 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 441: + case 443: /* Line 1792 of yacc.c */ -#line 2358 "dtool/src/cppparser/cppBison.yxx" +#line 2379 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 442: + case 444: /* Line 1792 of yacc.c */ -#line 2362 "dtool/src/cppparser/cppBison.yxx" +#line 2383 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 443: + case 445: /* Line 1792 of yacc.c */ -#line 2366 "dtool/src/cppparser/cppBison.yxx" +#line 2387 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 444: + case 446: /* Line 1792 of yacc.c */ -#line 2370 "dtool/src/cppparser/cppBison.yxx" +#line 2391 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 445: + case 447: /* Line 1792 of yacc.c */ -#line 2374 "dtool/src/cppparser/cppBison.yxx" +#line 2395 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 446: + case 448: /* Line 1792 of yacc.c */ -#line 2378 "dtool/src/cppparser/cppBison.yxx" +#line 2399 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 447: + case 449: /* Line 1792 of yacc.c */ -#line 2386 "dtool/src/cppparser/cppBison.yxx" +#line 2407 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 448: + case 450: /* Line 1792 of yacc.c */ -#line 2390 "dtool/src/cppparser/cppBison.yxx" +#line 2411 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; - case 449: -/* Line 1792 of yacc.c */ -#line 2394 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 450: -/* Line 1792 of yacc.c */ -#line 2398 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - case 451: /* Line 1792 of yacc.c */ -#line 2402 "dtool/src/cppparser/cppBison.yxx" +#line 2415 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 452: +/* Line 1792 of yacc.c */ +#line 2419 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 453: +/* Line 1792 of yacc.c */ +#line 2423 "dtool/src/cppparser/cppBison.yxx" { // A constructor call. CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -6373,9 +6429,9 @@ yyreduce: } break; - case 452: + case 454: /* Line 1792 of yacc.c */ -#line 2409 "dtool/src/cppparser/cppBison.yxx" +#line 2430 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6383,9 +6439,9 @@ yyreduce: } break; - case 453: + case 455: /* Line 1792 of yacc.c */ -#line 2415 "dtool/src/cppparser/cppBison.yxx" +#line 2436 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6393,9 +6449,9 @@ yyreduce: } break; - case 454: + case 456: /* Line 1792 of yacc.c */ -#line 2421 "dtool/src/cppparser/cppBison.yxx" +#line 2442 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6403,9 +6459,9 @@ yyreduce: } break; - case 455: + case 457: /* Line 1792 of yacc.c */ -#line 2427 "dtool/src/cppparser/cppBison.yxx" +#line 2448 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6413,9 +6469,9 @@ yyreduce: } break; - case 456: + case 458: /* Line 1792 of yacc.c */ -#line 2433 "dtool/src/cppparser/cppBison.yxx" +#line 2454 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6423,9 +6479,9 @@ yyreduce: } break; - case 457: + case 459: /* Line 1792 of yacc.c */ -#line 2439 "dtool/src/cppparser/cppBison.yxx" +#line 2460 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6433,9 +6489,9 @@ yyreduce: } break; - case 458: + case 460: /* Line 1792 of yacc.c */ -#line 2445 "dtool/src/cppparser/cppBison.yxx" +#line 2466 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6444,9 +6500,9 @@ yyreduce: } break; - case 459: + case 461: /* Line 1792 of yacc.c */ -#line 2452 "dtool/src/cppparser/cppBison.yxx" +#line 2473 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6455,9 +6511,9 @@ yyreduce: } break; - case 460: + case 462: /* Line 1792 of yacc.c */ -#line 2459 "dtool/src/cppparser/cppBison.yxx" +#line 2480 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6466,9 +6522,9 @@ yyreduce: } break; - case 461: + case 463: /* Line 1792 of yacc.c */ -#line 2466 "dtool/src/cppparser/cppBison.yxx" +#line 2487 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6477,9 +6533,9 @@ yyreduce: } break; - case 462: + case 464: /* Line 1792 of yacc.c */ -#line 2473 "dtool/src/cppparser/cppBison.yxx" +#line 2494 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6487,9 +6543,9 @@ yyreduce: } break; - case 463: + case 465: /* Line 1792 of yacc.c */ -#line 2479 "dtool/src/cppparser/cppBison.yxx" +#line 2500 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6497,409 +6553,49 @@ yyreduce: } break; - case 464: -/* Line 1792 of yacc.c */ -#line 2485 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 465: -/* Line 1792 of yacc.c */ -#line 2489 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); -} - break; - case 466: /* Line 1792 of yacc.c */ -#line 2493 "dtool/src/cppparser/cppBison.yxx" +#line 2506 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 467: /* Line 1792 of yacc.c */ -#line 2497 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 468: -/* Line 1792 of yacc.c */ -#line 2501 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 469: -/* Line 1792 of yacc.c */ -#line 2505 "dtool/src/cppparser/cppBison.yxx" - { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } -} - break; - - case 470: -/* Line 1792 of yacc.c */ -#line 2517 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 471: -/* Line 1792 of yacc.c */ -#line 2521 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 472: -/* Line 1792 of yacc.c */ -#line 2525 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 473: -/* Line 1792 of yacc.c */ -#line 2529 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 474: -/* Line 1792 of yacc.c */ -#line 2533 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 475: -/* Line 1792 of yacc.c */ -#line 2537 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 476: -/* Line 1792 of yacc.c */ -#line 2541 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 477: -/* Line 1792 of yacc.c */ -#line 2545 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 478: -/* Line 1792 of yacc.c */ -#line 2549 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 479: -/* Line 1792 of yacc.c */ -#line 2553 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 480: -/* Line 1792 of yacc.c */ -#line 2557 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 481: -/* Line 1792 of yacc.c */ -#line 2561 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 482: -/* Line 1792 of yacc.c */ -#line 2565 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 483: -/* Line 1792 of yacc.c */ -#line 2569 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 484: -/* Line 1792 of yacc.c */ -#line 2573 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 485: -/* Line 1792 of yacc.c */ -#line 2577 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 486: -/* Line 1792 of yacc.c */ -#line 2581 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 487: -/* Line 1792 of yacc.c */ -#line 2585 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 488: -/* Line 1792 of yacc.c */ -#line 2589 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 489: -/* Line 1792 of yacc.c */ -#line 2593 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 490: -/* Line 1792 of yacc.c */ -#line 2597 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 491: -/* Line 1792 of yacc.c */ -#line 2601 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 492: -/* Line 1792 of yacc.c */ -#line 2605 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 493: -/* Line 1792 of yacc.c */ -#line 2609 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 494: -/* Line 1792 of yacc.c */ -#line 2613 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 495: -/* Line 1792 of yacc.c */ -#line 2617 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 496: -/* Line 1792 of yacc.c */ -#line 2621 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 497: -/* Line 1792 of yacc.c */ -#line 2628 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 498: -/* Line 1792 of yacc.c */ -#line 2632 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(true); -} - break; - - case 499: -/* Line 1792 of yacc.c */ -#line 2636 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(false); -} - break; - - case 500: -/* Line 1792 of yacc.c */ -#line 2640 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 501: -/* Line 1792 of yacc.c */ -#line 2644 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); -} - break; - - case 502: -/* Line 1792 of yacc.c */ -#line 2648 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); -} - break; - - case 503: -/* Line 1792 of yacc.c */ -#line 2652 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); -} - break; - - case 504: -/* Line 1792 of yacc.c */ -#line 2666 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 505: -/* Line 1792 of yacc.c */ -#line 2670 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 506: -/* Line 1792 of yacc.c */ -#line 2674 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 507: -/* Line 1792 of yacc.c */ -#line 2678 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 508: -/* Line 1792 of yacc.c */ -#line 2682 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 509: -/* Line 1792 of yacc.c */ -#line 2686 "dtool/src/cppparser/cppBison.yxx" +#line 2510 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; - case 510: + case 468: /* Line 1792 of yacc.c */ -#line 2690 "dtool/src/cppparser/cppBison.yxx" +#line 2514 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; - case 511: + case 469: /* Line 1792 of yacc.c */ -#line 2694 "dtool/src/cppparser/cppBison.yxx" +#line 2518 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; - case 512: + case 470: /* Line 1792 of yacc.c */ -#line 2698 "dtool/src/cppparser/cppBison.yxx" +#line 2522 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; - case 513: + case 471: /* Line 1792 of yacc.c */ -#line 2702 "dtool/src/cppparser/cppBison.yxx" +#line 2526 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6913,265 +6609,625 @@ yyreduce: } break; - case 514: + case 472: /* Line 1792 of yacc.c */ -#line 2714 "dtool/src/cppparser/cppBison.yxx" +#line 2538 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 473: +/* Line 1792 of yacc.c */ +#line 2542 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 515: + case 474: /* Line 1792 of yacc.c */ -#line 2718 "dtool/src/cppparser/cppBison.yxx" +#line 2546 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 516: + case 475: /* Line 1792 of yacc.c */ -#line 2722 "dtool/src/cppparser/cppBison.yxx" +#line 2550 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 517: + case 476: /* Line 1792 of yacc.c */ -#line 2726 "dtool/src/cppparser/cppBison.yxx" +#line 2554 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 518: + case 477: /* Line 1792 of yacc.c */ -#line 2730 "dtool/src/cppparser/cppBison.yxx" +#line 2558 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 519: + case 478: /* Line 1792 of yacc.c */ -#line 2734 "dtool/src/cppparser/cppBison.yxx" +#line 2562 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 520: + case 479: /* Line 1792 of yacc.c */ -#line 2738 "dtool/src/cppparser/cppBison.yxx" +#line 2566 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 521: + case 480: /* Line 1792 of yacc.c */ -#line 2742 "dtool/src/cppparser/cppBison.yxx" +#line 2570 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 522: + case 481: /* Line 1792 of yacc.c */ -#line 2746 "dtool/src/cppparser/cppBison.yxx" +#line 2574 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 523: + case 482: /* Line 1792 of yacc.c */ -#line 2750 "dtool/src/cppparser/cppBison.yxx" +#line 2578 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 524: + case 483: /* Line 1792 of yacc.c */ -#line 2754 "dtool/src/cppparser/cppBison.yxx" +#line 2582 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 525: + case 484: /* Line 1792 of yacc.c */ -#line 2758 "dtool/src/cppparser/cppBison.yxx" +#line 2586 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 526: + case 485: /* Line 1792 of yacc.c */ -#line 2762 "dtool/src/cppparser/cppBison.yxx" +#line 2590 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 527: + case 486: /* Line 1792 of yacc.c */ -#line 2766 "dtool/src/cppparser/cppBison.yxx" +#line 2594 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 528: + case 487: /* Line 1792 of yacc.c */ -#line 2770 "dtool/src/cppparser/cppBison.yxx" +#line 2598 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 529: + case 488: /* Line 1792 of yacc.c */ -#line 2774 "dtool/src/cppparser/cppBison.yxx" +#line 2602 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 530: + case 489: /* Line 1792 of yacc.c */ -#line 2778 "dtool/src/cppparser/cppBison.yxx" +#line 2606 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 531: + case 490: /* Line 1792 of yacc.c */ -#line 2782 "dtool/src/cppparser/cppBison.yxx" +#line 2610 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 532: + case 491: /* Line 1792 of yacc.c */ -#line 2786 "dtool/src/cppparser/cppBison.yxx" +#line 2614 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 533: + case 492: /* Line 1792 of yacc.c */ -#line 2790 "dtool/src/cppparser/cppBison.yxx" +#line 2618 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 534: + case 493: /* Line 1792 of yacc.c */ -#line 2794 "dtool/src/cppparser/cppBison.yxx" +#line 2622 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 535: + case 494: /* Line 1792 of yacc.c */ -#line 2798 "dtool/src/cppparser/cppBison.yxx" +#line 2626 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 536: + case 495: /* Line 1792 of yacc.c */ -#line 2802 "dtool/src/cppparser/cppBison.yxx" +#line 2630 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 537: + case 496: /* Line 1792 of yacc.c */ -#line 2806 "dtool/src/cppparser/cppBison.yxx" +#line 2634 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 538: + case 497: /* Line 1792 of yacc.c */ -#line 2810 "dtool/src/cppparser/cppBison.yxx" +#line 2638 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 539: + case 498: /* Line 1792 of yacc.c */ -#line 2814 "dtool/src/cppparser/cppBison.yxx" +#line 2642 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 540: + case 499: /* Line 1792 of yacc.c */ -#line 2821 "dtool/src/cppparser/cppBison.yxx" +#line 2649 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 541: + case 500: /* Line 1792 of yacc.c */ -#line 2825 "dtool/src/cppparser/cppBison.yxx" +#line 2653 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(true); } break; - case 542: + case 501: /* Line 1792 of yacc.c */ -#line 2829 "dtool/src/cppparser/cppBison.yxx" +#line 2657 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(false); } break; - case 543: + case 502: /* Line 1792 of yacc.c */ -#line 2833 "dtool/src/cppparser/cppBison.yxx" +#line 2661 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 544: + case 503: /* Line 1792 of yacc.c */ -#line 2837 "dtool/src/cppparser/cppBison.yxx" +#line 2665 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; - case 545: + case 504: /* Line 1792 of yacc.c */ -#line 2841 "dtool/src/cppparser/cppBison.yxx" +#line 2669 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); } break; + case 505: +/* Line 1792 of yacc.c */ +#line 2673 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 506: +/* Line 1792 of yacc.c */ +#line 2687 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 507: +/* Line 1792 of yacc.c */ +#line 2691 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 508: +/* Line 1792 of yacc.c */ +#line 2695 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 509: +/* Line 1792 of yacc.c */ +#line 2699 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 510: +/* Line 1792 of yacc.c */ +#line 2703 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 511: +/* Line 1792 of yacc.c */ +#line 2707 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); +} + break; + + case 512: +/* Line 1792 of yacc.c */ +#line 2711 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); +} + break; + + case 513: +/* Line 1792 of yacc.c */ +#line 2715 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 514: +/* Line 1792 of yacc.c */ +#line 2719 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 515: +/* Line 1792 of yacc.c */ +#line 2723 "dtool/src/cppparser/cppBison.yxx" + { + if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; + } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; + } else { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + } +} + break; + + case 516: +/* Line 1792 of yacc.c */ +#line 2735 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 517: +/* Line 1792 of yacc.c */ +#line 2739 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 518: +/* Line 1792 of yacc.c */ +#line 2743 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 519: +/* Line 1792 of yacc.c */ +#line 2747 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 520: +/* Line 1792 of yacc.c */ +#line 2751 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 521: +/* Line 1792 of yacc.c */ +#line 2755 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 522: +/* Line 1792 of yacc.c */ +#line 2759 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 523: +/* Line 1792 of yacc.c */ +#line 2763 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 524: +/* Line 1792 of yacc.c */ +#line 2767 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 525: +/* Line 1792 of yacc.c */ +#line 2771 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 526: +/* Line 1792 of yacc.c */ +#line 2775 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 527: +/* Line 1792 of yacc.c */ +#line 2779 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 528: +/* Line 1792 of yacc.c */ +#line 2783 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 529: +/* Line 1792 of yacc.c */ +#line 2787 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 530: +/* Line 1792 of yacc.c */ +#line 2791 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 531: +/* Line 1792 of yacc.c */ +#line 2795 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 532: +/* Line 1792 of yacc.c */ +#line 2799 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 533: +/* Line 1792 of yacc.c */ +#line 2803 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 534: +/* Line 1792 of yacc.c */ +#line 2807 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 535: +/* Line 1792 of yacc.c */ +#line 2811 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 536: +/* Line 1792 of yacc.c */ +#line 2815 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 537: +/* Line 1792 of yacc.c */ +#line 2819 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 538: +/* Line 1792 of yacc.c */ +#line 2823 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 539: +/* Line 1792 of yacc.c */ +#line 2827 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 540: +/* Line 1792 of yacc.c */ +#line 2831 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 541: +/* Line 1792 of yacc.c */ +#line 2835 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 542: +/* Line 1792 of yacc.c */ +#line 2842 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + + case 543: +/* Line 1792 of yacc.c */ +#line 2846 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(true); +} + break; + + case 544: +/* Line 1792 of yacc.c */ +#line 2850 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(false); +} + break; + + case 545: +/* Line 1792 of yacc.c */ +#line 2854 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + case 546: /* Line 1792 of yacc.c */ -#line 2848 "dtool/src/cppparser/cppBison.yxx" +#line 2858 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); +} + break; + + case 547: +/* Line 1792 of yacc.c */ +#line 2862 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); +} + break; + + case 548: +/* Line 1792 of yacc.c */ +#line 2869 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7181,9 +7237,9 @@ yyreduce: } break; - case 547: + case 549: /* Line 1792 of yacc.c */ -#line 2856 "dtool/src/cppparser/cppBison.yxx" +#line 2877 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7193,41 +7249,41 @@ yyreduce: } break; - case 548: + case 550: /* Line 1792 of yacc.c */ -#line 2864 "dtool/src/cppparser/cppBison.yxx" +#line 2885 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 549: -/* Line 1792 of yacc.c */ -#line 2887 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - - case 550: -/* Line 1792 of yacc.c */ -#line 2891 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - case 551: /* Line 1792 of yacc.c */ -#line 2898 "dtool/src/cppparser/cppBison.yxx" +#line 2908 "dtool/src/cppparser/cppBison.yxx" { - (yyval.str) = (yyvsp[(1) - (1)].str); + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; case 552: /* Line 1792 of yacc.c */ -#line 2902 "dtool/src/cppparser/cppBison.yxx" +#line 2912 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); +} + break; + + case 553: +/* Line 1792 of yacc.c */ +#line 2919 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.str) = (yyvsp[(1) - (1)].str); +} + break; + + case 554: +/* Line 1792 of yacc.c */ +#line 2923 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = (yyvsp[(1) - (2)].str) + (yyvsp[(2) - (2)].str); } @@ -7235,7 +7291,7 @@ yyreduce: /* Line 1792 of yacc.c */ -#line 7239 "built/tmp/cppBison.yxx.c" +#line 7295 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -7286,7 +7342,7 @@ yyerrlab: { ++yynerrs; #if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); + yyerror (&yylloc, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) @@ -7313,7 +7369,7 @@ yyerrlab: yymsgp = yymsg; } } - yyerror (yymsgp); + yyerror (&yylloc, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } @@ -7436,7 +7492,7 @@ yyabortlab: | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: - yyerror (YY_("memory exhausted")); + yyerror (&yylloc, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index c6a704e516..8b918d5de3 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -60,14 +60,19 @@ yyerror(const string &msg) { current_lexer->error(msg); } +static void +yyerror(YYLTYPE *loc, const string &msg) { + current_lexer->error(msg, *loc); +} + static void yyerror(const string &msg, YYLTYPE &loc) { - current_lexer->error(msg, loc.first_line, loc.first_column); + current_lexer->error(msg, loc); } static void yywarning(const string &msg, YYLTYPE &loc) { - current_lexer->warning(msg, loc.first_line, loc.first_column); + current_lexer->warning(msg, loc); } static int @@ -197,6 +202,12 @@ pop_struct() { pointers to the current yylval and yylloc. */ %pure_parser +/* Ideally we'd define this instead of the above, which gives us better + tracking of error locations, but we are still using a very old + version of Bison on Windows. */ +//%define api.pure full +//%locations + %token REAL %token INTEGER %token CHAR_TOK @@ -822,7 +833,7 @@ function_prototype: yyerror("Invalid destructor name: ~" + $2->get_fully_scoped_name(), @2); } else { CPPIdentifier *ident = - new CPPIdentifier("~" + $2->get_simple_name(), @2.file); + new CPPIdentifier("~" + $2->get_simple_name(), @2); delete $2; CPPType *type; @@ -897,7 +908,7 @@ function_prototype: string name = "operator typecast " + $2->get_simple_name(); CPPIdentifier *ident = $1; if (ident == NULL) { - ident = new CPPIdentifier(name, @1.file); + ident = new CPPIdentifier(name, @2); } else { ident->add_name(name); } @@ -918,7 +929,7 @@ function_prototype: CPPIdentifier *ident = $1; if (ident == NULL) { - ident = new CPPIdentifier("operator typecast", @1.file); + ident = new CPPIdentifier("operator typecast", @4); } else { ident->add_name("operator typecast"); } @@ -1223,7 +1234,7 @@ instance_identifier: // like a regular function. CPPIdentifier *ident = $1; if (ident == NULL) { - ident = new CPPIdentifier("operator "+$2, @2.file); + ident = new CPPIdentifier("operator "+$2, @2); } else { ident->_names.push_back("operator "+$2); } @@ -1414,6 +1425,16 @@ formal_parameter: $3->add_modifier(IIT_const); $$ = new CPPInstance($2, $3, 0, @3.file); $$->set_initializer($4); +} + | KW_CONST KW_REGISTER type formal_parameter_identifier maybe_initialize +{ + $4->add_modifier(IIT_const); + $$ = new CPPInstance($3, $4, 0, @3.file); + $$->set_initializer($5); +} + | KW_REGISTER formal_parameter +{ + $$ = $2; } | formal_const_expr { diff --git a/dtool/src/cppparser/cppIdentifier.cxx b/dtool/src/cppparser/cppIdentifier.cxx index 5c44b45a5a..e19345cd2a 100644 --- a/dtool/src/cppparser/cppIdentifier.cxx +++ b/dtool/src/cppparser/cppIdentifier.cxx @@ -28,7 +28,39 @@ // Description: //////////////////////////////////////////////////////////////////// CPPIdentifier:: -CPPIdentifier(const string &name, const CPPFile &file) : _file(file) { +CPPIdentifier(const string &name, const CPPFile &file) { + _names.push_back(CPPNameComponent(name)); + _native_scope = (CPPScope *)NULL; + _loc.first_line = 0; + _loc.first_column = 0; + _loc.last_line = 0; + _loc.last_column = 0; + _loc.file = file; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPIdentifier::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +CPPIdentifier:: +CPPIdentifier(const CPPNameComponent &name, const CPPFile &file) { + _names.push_back(name); + _native_scope = (CPPScope *)NULL; + _loc.first_line = 0; + _loc.first_column = 0; + _loc.last_line = 0; + _loc.last_column = 0; + _loc.file = file; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPIdentifier::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +CPPIdentifier:: +CPPIdentifier(const string &name, const cppyyltype &loc) : _loc(loc) { _names.push_back(CPPNameComponent(name)); _native_scope = (CPPScope *)NULL; } @@ -39,7 +71,7 @@ CPPIdentifier(const string &name, const CPPFile &file) : _file(file) { // Description: //////////////////////////////////////////////////////////////////// CPPIdentifier:: -CPPIdentifier(const CPPNameComponent &name, const CPPFile &file) : _file(file) { +CPPIdentifier(const CPPNameComponent &name, const cppyyltype &loc) : _loc(loc) { _names.push_back(name); _native_scope = (CPPScope *)NULL; } @@ -256,7 +288,8 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope, if (error_sink != NULL) { error_sink->error("Symbol " + _names[i].get_name() + " is not a known scope in " + - scope->get_fully_scoped_name()); + scope->get_fully_scoped_name(), + _loc); } return (CPPScope *)NULL; } @@ -302,7 +335,8 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope, if (error_sink != NULL) { error_sink->error("Symbol " + _names[i].get_name() + " is not a known scope in " + - scope->get_fully_scoped_name()); + scope->get_fully_scoped_name(), + _loc); } return (CPPScope *)NULL; } diff --git a/dtool/src/cppparser/cppIdentifier.h b/dtool/src/cppparser/cppIdentifier.h index 6c3e95b030..ef94910445 100644 --- a/dtool/src/cppparser/cppIdentifier.h +++ b/dtool/src/cppparser/cppIdentifier.h @@ -20,6 +20,7 @@ #include "cppDeclaration.h" #include "cppNameComponent.h" #include "cppFile.h" +#include "cppBisonDefs.h" #include #include @@ -37,6 +38,8 @@ class CPPIdentifier { public: CPPIdentifier(const string &name, const CPPFile &file = CPPFile()); CPPIdentifier(const CPPNameComponent &name, const CPPFile &file = CPPFile()); + CPPIdentifier(const string &name, const cppyyltype &loc); + CPPIdentifier(const CPPNameComponent &name, const cppyyltype &loc); void add_name(const string &name); void add_name(const CPPNameComponent &name); @@ -91,7 +94,7 @@ public: typedef vector Names; Names _names; CPPScope *_native_scope; - CPPFile _file; + cppyyltype _loc; }; inline ostream &operator << (ostream &out, const CPPIdentifier &identifier) { diff --git a/dtool/src/cppparser/cppInstance.h b/dtool/src/cppparser/cppInstance.h index e2ecbc0ced..9a8144fdd2 100644 --- a/dtool/src/cppparser/cppInstance.h +++ b/dtool/src/cppparser/cppInstance.h @@ -19,7 +19,6 @@ #include "cppDeclaration.h" #include "cppType.h" -#include "cppIdentifier.h" #include "cppTemplateParameterList.h" class CPPInstanceIdentifier; diff --git a/dtool/src/cppparser/cppNameComponent.h b/dtool/src/cppparser/cppNameComponent.h index c08389eba3..6d9b99a042 100644 --- a/dtool/src/cppparser/cppNameComponent.h +++ b/dtool/src/cppparser/cppNameComponent.h @@ -16,6 +16,7 @@ #define CPPNAMECOMPONENT_H #include "dtoolbase.h" +#include "cppBisonDefs.h" #include diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index e4098af553..71f7dbc568 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -86,8 +86,10 @@ CPPPreprocessor::InputFile:: InputFile() { _in = NULL; _ignore_manifest = NULL; - _line_number = 1; - _col_number = 1; + _line_number = 0; + _col_number = 0; + _next_line_number = 1; + _next_col_number = 1; _lock_position = false; } @@ -145,11 +147,15 @@ connect_input(const string &input) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::get // Access: Public -// Description: +// Description: Fetches a single character from the source file. //////////////////////////////////////////////////////////////////// int CPPPreprocessor::InputFile:: get() { assert(_in != NULL); + + _line_number = _next_line_number; + _col_number = _next_col_number; + int c = _in->get(); // Quietly skip over embedded carriage-return characters. We @@ -165,20 +171,42 @@ get() { case '\n': if (!_lock_position) { - _line_number++; - _col_number = 1; + ++_next_line_number; + _next_col_number = 1; } break; default: if (!_lock_position) { - _col_number++; + ++_next_col_number; } } return c; } +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::InputFile::peek +// Access: Public +// Description: Like get(), but does not advance the file pointer. +//////////////////////////////////////////////////////////////////// +int CPPPreprocessor::InputFile:: +peek() { + assert(_in != NULL); + + int c = _in->peek(); + + // Quietly skip over embedded carriage-return characters. We + // shouldn't see any of these unless there was some DOS-to-Unix file + // conversion problem. + while (c == '\r') { + get(); + c = _in->peek(); + } + + return c; +} + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::Constructor // Access: Public @@ -258,7 +286,8 @@ get_file() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_line_number // Access: Public -// Description: +// Description: Returns the line number of the last character +// returned by get(). //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_line_number() const { @@ -271,7 +300,8 @@ get_line_number() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_col_number // Access: Public -// Description: +// Description: Returns the column number of the last character +// returned by get(). //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_col_number() const { @@ -312,9 +342,7 @@ get_next_token0() { token = internal_get_next_token(); } - int first_line = token._lloc.first_line; - int first_col = token._lloc.first_column; - CPPFile first_file = token._lloc.file; + YYLTYPE loc = token._lloc; if (_resolve_identifiers && (token._token == SIMPLE_IDENTIFIER || token._token == SCOPE)) { @@ -333,7 +361,7 @@ get_next_token0() { token = internal_get_next_token(); } - CPPIdentifier *ident = new CPPIdentifier(name, token._lloc.file); + CPPIdentifier *ident = new CPPIdentifier(name, loc); YYSTYPE result; result.u.identifier = ident; @@ -351,6 +379,9 @@ get_next_token0() { } while (token._token == SCOPE) { + loc.last_line = token._lloc.last_line; + loc.last_column = token._lloc.last_column; + name += "::"; token = internal_get_next_token(); string token_prefix; @@ -376,13 +407,17 @@ get_next_token0() { return token; } _saved_tokens.push_back(token); - return CPPToken(SCOPING, first_line, first_col, first_file, - name, result); + return CPPToken(SCOPING, loc, name, result); } name += token._lval.str; ident->_names.push_back(token_prefix + token._lval.str); + loc.last_line = token._lloc.last_line; + loc.last_column = token._lloc.last_column; + ident->_loc.last_line = loc.last_line; + ident->_loc.last_column = loc.last_column; + token = internal_get_next_token(); if (token._token == '<') { @@ -409,38 +444,76 @@ get_next_token0() { token_type = TYPENAME_IDENTIFIER; } - return CPPToken(token_type, first_line, first_col, first_file, - name, result); + return CPPToken(token_type, loc, name, result); } // This is the normal case: just pass through whatever token we got. return token; } +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::peek_next_token +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +CPPToken CPPPreprocessor:: +peek_next_token() { + CPPToken token(0); + if (!_saved_tokens.empty()) { + token = _saved_tokens.back(); + } else { + token = internal_get_next_token(); + _saved_tokens.push_back(token); + } + return token; +} + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::warning // Access: Public // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -warning(const string &message, int line, int col, CPPFile file) { +warning(const string &message) { + if (_verbose < 2) { + return; + } + int line = get_line_number(); + int col = get_col_number(); + YYLTYPE loc; + loc.first_line = line; + loc.first_column = col; + loc.last_line = line; + loc.last_column = col; + loc.file = get_file(); + warning(message, loc); +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::warning +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +void CPPPreprocessor:: +warning(const string &message, const YYLTYPE &loc) { if (_verbose >= 2) { - if (line == 0) { - line = get_line_number(); - col = get_col_number(); - } - if (file.empty()) { - file = get_file(); - } - int indent_level = 0; if (_verbose >= 3) { - indent_level = _files.size() * 2; + indent(cerr, _files.size() * 2); } - indent(cerr, indent_level) - << "*** Warning in " << file - << " near line " << line << ", column " << col << ":\n"; - indent(cerr, indent_level) - << message << "\n"; + + if (!loc.file.empty()) { + cerr << loc.file << ':'; + } + if (loc.first_line) { + cerr << loc.first_line << ':'; + + if (loc.first_column) { + cerr << loc.first_column << ':'; + } + } + + cerr << " warning: " << message << "\n"; + show_line(loc); } _warning_count++; } @@ -451,7 +524,25 @@ warning(const string &message, int line, int col, CPPFile file) { // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -error(const string &message, int line, int col, CPPFile file) { +error(const string &message) { + int line = get_line_number(); + int col = get_col_number(); + YYLTYPE loc; + loc.first_line = line; + loc.first_column = col; + loc.last_line = line; + loc.last_column = col; + loc.file = get_file(); + error(message, loc); +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::error +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +void CPPPreprocessor:: +error(const string &message, const YYLTYPE &loc) { if (_state == S_nested || _state == S_end_nested) { // Don't report or log errors in the nested state. These will be // reported when the nesting level collapses. @@ -459,22 +550,23 @@ error(const string &message, int line, int col, CPPFile file) { } if (_verbose >= 1) { - if (line == 0) { - line = get_line_number(); - col = get_col_number(); - } - if (file.empty()) { - file = get_file(); - } - int indent_level = 0; if (_verbose >= 3) { - indent_level = _files.size() * 2; + indent(cerr, _files.size() * 2); } - indent(cerr, indent_level) - << "*** Error in " << file - << " near line " << line << ", column " << col << ":\n"; - indent(cerr, indent_level) - << message << "\n"; + + if (!loc.file.empty()) { + cerr << loc.file << ':'; + } + if (loc.first_line) { + cerr << loc.first_line << ':'; + + if (loc.first_column) { + cerr << loc.first_column << ':'; + } + } + + cerr << " error: " << message << "\n"; + show_line(loc); if (_error_abort) { cerr << "Aborting.\n"; @@ -484,6 +576,63 @@ error(const string &message, int line, int col, CPPFile file) { _error_count++; } +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::show_line +// Access: Public +// Description: Shows the indicated line, useful for error messages. +//////////////////////////////////////////////////////////////////// +void CPPPreprocessor:: +show_line(const YYLTYPE &loc) { + if (loc.file._filename.empty()) { + return; + } + + int indent_level = 0; + if (_verbose >= 3) { + indent_level = _files.size() * 2; + } + + // Seek to the offending line in the file. + ifstream stream; + if (loc.file._filename.open_read(stream)) { + int l = 0; + string linestr; + while (l < loc.first_line) { + getline(stream, linestr); + ++l; + } + + // Strip off trailing whitespace. + size_t last = linestr.length(); + while (isspace(linestr[--last])) { + linestr = linestr.substr(0, last); + } + + indent(cerr, indent_level) << linestr << "\n"; + + // Point the user at the offending column. + if (loc.first_column) { + int last_column; + if (loc.first_line == loc.last_line && loc.last_column) { + last_column = loc.last_column; + } else { + last_column = linestr.length(); + } + + indent(cerr, indent_level); + int i = 0; + for (; i < loc.first_column - 1; ++i) { + cerr.put(' '); + } + cerr.put('^'); + while (++i < last_column) { + cerr.put('~'); + } + cerr << "\n"; + } + } +} + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_warning_count // Access: Public @@ -800,120 +949,40 @@ internal_get_next_token() { return get_number(c); } - _last_c = c; if (c == EOF) { _state = S_eof; return CPPToken::eof(); } - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); - // Check for a number beginning with a decimal point. - int next_c = get(); + int next_c = peek(); if (c == '.' && isdigit(next_c)) { - return get_number(c, next_c); + return get_number(c); } + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + loc.last_line = loc.first_line; + loc.last_column = loc.first_column; + // Check for two- or three-character tokens. - _last_c = get(); + int di = check_digraph(c); + if (di != 0) { + c = di; + ++loc.last_column; + get(); - switch (c) { - case '+': - if (next_c == '+') return CPPToken(PLUSPLUS, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(PLUSEQUAL, first_line, first_col, first_file); - break; - - case '-': - if (next_c == '-') return CPPToken(MINUSMINUS, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(MINUSEQUAL, first_line, first_col, first_file); - if (next_c == '>' && _last_c == '*') { - _last_c = get(); - return CPPToken(POINTSAT_STAR, first_line, first_col, first_file); + int tri = check_trigraph(di); + if (tri != 0) { + ++loc.last_column; + get(); + return CPPToken(tri, loc); } - if (next_c == '>') return CPPToken(POINTSAT, first_line, first_col, first_file); - break; - - case '<': - if (next_c == '<' && _last_c == '=') { - _last_c = get(); - return CPPToken(LSHIFTEQUAL, first_line, first_col, first_file); - } - if (next_c == '<') return CPPToken(LSHIFT, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(LECOMPARE, first_line, first_col, first_file); - if (next_c == ':') return CPPToken('[', first_line, first_col, first_file); - if (next_c == '%') return CPPToken('{', first_line, first_col, first_file); - break; - - case '>': - if (_parsing_template_params && _paren_nesting <= 0) { - // Don't parse > as greater-than when parsing a template list, as per C++11. - // However, nested >> must be preserved, such as in A<(2>>1)> - break; - } - if (next_c == '>' && _last_c == '=') { - _last_c = get(); - return CPPToken(RSHIFTEQUAL, first_line, first_col, first_file); - } - if (next_c == '>') return CPPToken(RSHIFT, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(GECOMPARE, first_line, first_col, first_file); - break; - - case '|': - if (next_c == '|') return CPPToken(OROR, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(OREQUAL, first_line, first_col, first_file); - break; - - case '&': - if (next_c == '&') return CPPToken(ANDAND, first_line, first_col, first_file); - if (next_c == '=') return CPPToken(ANDEQUAL, first_line, first_col, first_file); - break; - - case '^': - if (next_c == '=') return CPPToken(XOREQUAL, first_line, first_col, first_file); - break; - - case '=': - if (next_c == '=') return CPPToken(EQCOMPARE, first_line, first_col, first_file); - break; - - case '!': - if (next_c == '=') return CPPToken(NECOMPARE, first_line, first_col, first_file); - break; - - case '.': - if (next_c == '*') return CPPToken(DOT_STAR, first_line, first_col, first_file); - if (next_c == '.' && _last_c == '.') { - _last_c = get(); - return CPPToken(ELLIPSIS, first_line, first_col, first_file); - } - break; - - case ':': - if (next_c == ':') return CPPToken(SCOPE, first_line, first_col, first_file); - if (next_c == '>') return CPPToken(']', first_line, first_col, first_file); - break; - - case '*': - if (next_c == '=') return CPPToken(TIMESEQUAL, first_line, first_col, first_file); - break; - - case '/': - if (next_c == '=') return CPPToken(DIVIDEEQUAL, first_line, first_col, first_file); - break; - - case '%': - if (next_c == '=') return CPPToken(MODEQUAL, first_line, first_col, first_file); - if (next_c == '>') return CPPToken('}', first_line, first_col, first_file); - break; + return CPPToken(di, loc); } - // It wasn't any of the two- or three-character tokens, so put back - // the lookahead character and return the one-character token. - unget(_last_c); - _last_c = next_c; - if (_state == S_nested) { // If we're running a nested lexer, keep track of the paren // levels. When we encounter a comma or closing angle bracket at @@ -946,11 +1015,142 @@ internal_get_next_token() { } } - // We skip whitespace here again, so that we can read any comments - // after this point before we parse this line. - _last_c = skip_whitespace(_last_c); + // Look for an end-of-line comment, and parse it before we finish + // this token. This is not strictly necessary, but it allows us to + // pick up docstrings from comments after enum values. + while (next_c != EOF && isspace(next_c)) { + get(); + next_c = peek(); + } + if (next_c == '/') { + _last_c = skip_whitespace(get()); + } - return CPPToken(c, first_line, first_col, first_file); + return CPPToken(c, loc); +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::check_digraph +// Access: Private +// Description: Checks the next character in the stream to see if +// this might be a two-character token. +// Returns 0 if it is only a single-character token. +//////////////////////////////////////////////////////////////////// +int CPPPreprocessor:: +check_digraph(int c) { + int next_c = peek(); + switch (c) { + case '+': + if (next_c == '+') return PLUSPLUS; + if (next_c == '=') return PLUSEQUAL; + break; + + case '-': + if (next_c == '-') return MINUSMINUS; + if (next_c == '=') return MINUSEQUAL; + if (next_c == '>') return POINTSAT; + break; + + case '<': + if (next_c == '<') return LSHIFT; + if (next_c == '=') return LECOMPARE; + if (next_c == ':') return '['; + if (next_c == '%') return '{'; + break; + + case '>': + if (_parsing_template_params && _paren_nesting <= 0) { + // Don't parse >> as right-shift when parsing a template list, as + // per C++11, to allow a syntax like A>. + // However, nested >> must be preserved, such as in A<(2>>1)> + break; + } + if (next_c == '>') return RSHIFT; + if (next_c == '=') return GECOMPARE; + break; + + case '|': + if (next_c == '|') return OROR; + if (next_c == '=') return OREQUAL; + break; + + case '&': + if (next_c == '&') return ANDAND; + if (next_c == '=') return ANDEQUAL; + break; + + case '^': + if (next_c == '=') return XOREQUAL; + break; + + case '=': + if (next_c == '=') return EQCOMPARE; + break; + + case '!': + if (next_c == '=') return NECOMPARE; + break; + + case '.': + if (next_c == '*') return DOT_STAR; + if (next_c == '.') { + get(); + if (peek() == '.') { + return ELLIPSIS; + } else { + unget('.'); + } + } + break; + + case ':': + if (next_c == ':') return SCOPE; + if (next_c == '>') return ']'; + break; + + case '*': + if (next_c == '=') return TIMESEQUAL; + break; + + case '/': + if (next_c == '=') return DIVIDEEQUAL; + break; + + case '%': + if (next_c == '=') return MODEQUAL; + if (next_c == '>') return '}'; + break; + } + + return 0; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::check_trigraph +// Access: Private +// Description: Checks the next character in the stream to see if +// this might be a three-character token; usually +// called in conjunction with check_digraph. +// Returns 0 if it is not a three-character token. +//////////////////////////////////////////////////////////////////// +int CPPPreprocessor:: +check_trigraph(int c) { + int next_c = peek(); + switch (c) { + case POINTSAT: + if (next_c == '*') return POINTSAT_STAR; + break; + + case LSHIFT: + if (next_c == '=') return LSHIFTEQUAL; + break; + + case RSHIFT: + if (next_c == '=') return RSHIFTEQUAL; + break; + } + + return 0; } //////////////////////////////////////////////////////////////////// @@ -966,11 +1166,10 @@ skip_whitespace(int c) { if (c == '\\') { // This does not usually occur in the middle of unquoted C++ // code, except before a newline character. - c = get(); - if (c != '\n') { - unget(c); + if (peek() != '\n') { return '\\'; } + c = get(); } if (!isspace(c)) { @@ -989,16 +1188,17 @@ skip_whitespace(int c) { int CPPPreprocessor:: skip_comment(int c) { while (c == '/') { - int next_c = get(); + int next_c = peek(); if (next_c == '*') { + get(); _last_cpp_comment = false; c = skip_c_comment(get()); } else if (next_c == '/') { + get(); c = skip_cpp_comment(get()); break; } else { _last_cpp_comment = false; - unget(next_c); return c; } } @@ -1015,14 +1215,21 @@ skip_comment(int c) { //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_c_comment(int c) { + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number() - 2; + loc.last_line = 0; + loc.last_column = 0; + if (_save_comments) { CPPCommentBlock *comment = new CPPCommentBlock; _comments.push_back(comment); - comment->_file = get_file(); - comment->_line_number = get_line_number(); - comment->_last_line = get_line_number(); - comment->_col_number = get_col_number() - 2; + comment->_file = loc.file; + comment->_line_number = loc.first_line; + comment->_last_line = loc.last_line; + comment->_col_number = loc.first_column; comment->_c_style = true; comment->_comment = "/*"; @@ -1041,9 +1248,10 @@ skip_c_comment(int c) { } } - warning("Comment is unterminated", - comment->_line_number, comment->_col_number, - comment->_file); + loc.last_line = get_line_number(); + comment->_last_line = loc.last_line; + + warning("Comment is unterminated", loc); } else { CPPFile first_file = get_file(); @@ -1061,9 +1269,9 @@ skip_c_comment(int c) { } } - warning("Comment is unterminated", - first_line_number, first_col_number, - first_file); + loc.last_line = get_line_number(); + + warning("Comment is unterminated", loc); } return c; @@ -1136,29 +1344,40 @@ skip_cpp_comment(int c) { //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: process_directive(int c) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); + assert(c == '#'); + c = skip_whitespace(get()); + + int begin_line = get_line_number(); + int begin_column = get_col_number(); string command, args; c = get_preprocessor_command(c, command); + + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + c = get_preprocessor_args(c, args); + loc.last_line = get_line_number(); + loc.last_column = 0; + #ifdef CPP_VERBOSE_LEX indent(cerr, _files.size() * 2) << "#" << command << " " << args << "\n"; #endif if (command == "define") { - handle_define_directive(args, first_line, first_col, first_file); + handle_define_directive(args, loc); } else if (command == "undef") { - handle_undef_directive(args, first_line, first_col, first_file); + handle_undef_directive(args, loc); } else if (command == "ifdef") { - handle_ifdef_directive(args, first_line, first_col, first_file); + handle_ifdef_directive(args, loc); } else if (command == "ifndef") { - handle_ifndef_directive(args, first_line, first_col, first_file); + handle_ifndef_directive(args, loc); } else if (command == "if") { - handle_if_directive(args, first_line, first_col, first_file); + handle_if_directive(args, loc); } else if (command == "else" || command == "elif") { // Presumably this follows some #if or #ifdef. We don't bother to // check this, however. @@ -1167,16 +1386,19 @@ process_directive(int c) { // Presumably this follows some #if or #ifdef. We don't bother to // check this, however. } else if (command == "include") { - handle_include_directive(args, first_line, first_col, first_file); + handle_include_directive(args, loc); } else if (command == "pragma") { - handle_pragma_directive(args, first_line, first_col, first_file); + handle_pragma_directive(args, loc); } else if (command == "ident") { // Quietly ignore idents. } else if (command == "error") { - handle_error_directive(args, first_line, first_col, first_file); + handle_error_directive(args, loc); } else { - warning("Ignoring unknown directive #" + command, - first_line, first_col, first_file); + loc.first_line = begin_line; + loc.first_column = begin_column; + loc.last_line = begin_line; + loc.last_column = begin_column + command.size() - 1; + warning("Ignoring unknown directive #" + command, loc); } _start_of_line = true; @@ -1190,22 +1412,16 @@ process_directive(int c) { //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_preprocessor_command(int c, string &command) { - // Skip the hash mark. - assert(c == '#'); - c = get(); - - // Also skip any whitespace following the hash mark--but don't skip - // past a newline. - while (c != EOF && (c == ' ' || c == '\t')) { - c = get(); - } - // The next sequence of characters is the command. while (c != EOF && (isalnum(c) || c == '_')) { command += c; c = get(); } + while (c != EOF && c != '\n' && isspace(c)) { + c = get(); + } + return c; } @@ -1250,13 +1466,11 @@ get_preprocessor_args(int c, string &args) { // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_define_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { +handle_define_directive(const string &args, const YYLTYPE &loc) { if (args.empty()) { - warning("Ignoring empty #define directive", - first_line, first_col, first_file); + warning("Ignoring empty #define directive", loc); } else { - CPPManifest *manifest = new CPPManifest(args, first_file); + CPPManifest *manifest = new CPPManifest(args, loc.file); manifest->_vis = preprocessor_vis; if (!manifest->_has_parameters) { string expr_string = manifest->expand(); @@ -1286,11 +1500,9 @@ handle_define_directive(const string &args, int first_line, // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_undef_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { +handle_undef_directive(const string &args, const YYLTYPE &loc) { if (args.empty()) { - warning("Ignoring empty #undef directive", - first_line, first_col, first_file); + warning("Ignoring empty #undef directive", loc); } else { Manifests::iterator mi = _manifests.find(args); if (mi != _manifests.end()) { @@ -1305,7 +1517,7 @@ handle_undef_directive(const string &args, int first_line, // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_ifdef_directive(const string &args, int, int, const CPPFile &) { +handle_ifdef_directive(const string &args, const YYLTYPE &loc) { Manifests::const_iterator mi = _manifests.find(args); if (mi != _manifests.end()) { // The macro is defined. We continue. @@ -1322,7 +1534,7 @@ handle_ifdef_directive(const string &args, int, int, const CPPFile &) { // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_ifndef_directive(const string &args, int, int, const CPPFile &) { +handle_ifndef_directive(const string &args, const YYLTYPE &loc) { Manifests::const_iterator mi = _manifests.find(args); if (mi == _manifests.end()) { // The macro is undefined. We continue. @@ -1340,8 +1552,7 @@ handle_ifndef_directive(const string &args, int, int, const CPPFile &) { // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_if_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { +handle_if_directive(const string &args, const YYLTYPE &loc) { CPPExpression *expr = parse_expr(args, global_scope, global_scope); int expression_result = 0; @@ -1349,14 +1560,12 @@ handle_if_directive(const string &args, int first_line, if (expr != (CPPExpression *)NULL) { CPPExpression::Result result = expr->evaluate(); if (result._type == CPPExpression::RT_error) { - warning("Ignoring invalid expression " + args, - first_line, first_col, first_file); + warning("Ignoring invalid expression " + args, loc); } else { expression_result = result.as_integer(); } } else { - warning("Ignoring invalid expression " + args, - first_line, first_col, first_file); + warning("Ignoring invalid expression " + args, loc); } if (expression_result) { @@ -1374,8 +1583,7 @@ handle_if_directive(const string &args, int first_line, // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_include_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { +handle_include_directive(const string &args, const YYLTYPE &loc) { bool okflag = false; Filename filename; Filename filename_as_referenced; @@ -1469,8 +1677,7 @@ handle_include_directive(const string &args, int first_line, } if (!found_file) { - warning("Cannot find " + filename.get_fullpath(), - first_line, first_col, first_file); + warning("Cannot find " + filename.get_fullpath(), loc); } else { _last_c = '\0'; @@ -1483,13 +1690,11 @@ handle_include_directive(const string &args, int first_line, } if (!push_file(file)) { - warning("Unable to read " + filename.get_fullpath(), - first_line, first_col, first_file); + warning("Unable to read " + filename.get_fullpath(), loc); } } } else { - warning("Ignoring invalid #include directive", - first_line, first_col, first_file); + warning("Ignoring invalid #include directive", loc); } } @@ -1499,10 +1704,9 @@ handle_include_directive(const string &args, int first_line, // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_pragma_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { +handle_pragma_directive(const string &args, const YYLTYPE &loc) { if (args == "once") { - ParsedFiles::iterator it = _parsed_files.find(first_file); + ParsedFiles::iterator it = _parsed_files.find(loc.file); assert(it != _parsed_files.end()); it->_pragma_once = true; } @@ -1514,9 +1718,8 @@ handle_pragma_directive(const string &args, int first_line, // Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_error_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file) { - error(args, first_line, first_col, first_file); +handle_error_directive(const string &args, const YYLTYPE &loc) { + error(args, loc); } //////////////////////////////////////////////////////////////////// @@ -1535,9 +1738,14 @@ skip_false_if_block(bool consider_elifs) { int c = skip_comment(get()); while (c != EOF) { if (c == '#' && _start_of_line) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); + c = skip_whitespace(get()); + + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + loc.last_line = loc.first_line; + loc.last_column = loc.first_column; // Is this it? string command, args; @@ -1556,7 +1764,7 @@ skip_false_if_block(bool consider_elifs) { if (level == 0 && consider_elifs) { // If we pass this test, we're in. _save_comments = true; - handle_if_directive(args, first_line, first_col, first_file); + handle_if_directive(args, loc); return; } } else if (command == "endif") { @@ -1583,18 +1791,22 @@ skip_false_if_block(bool consider_elifs) { //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_quoted_char(int c) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); - string str = scan_quoted(c); + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + string str = scan_quoted(c); YYSTYPE result; if (!str.empty()) { result.u.integer = (int)str[0]; } else { result.u.integer = 0; } - return CPPToken(CHAR_TOK, first_line, first_col, first_file, str, result); + + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + return CPPToken(CHAR_TOK, loc, str, result); } //////////////////////////////////////////////////////////////////// @@ -1604,11 +1816,16 @@ get_quoted_char(int c) { //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_quoted_string(int c) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + string str = scan_quoted(c); - return CPPToken(STRING, first_line, first_col, first_file, str); + + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + return CPPToken(STRING, loc, str); } //////////////////////////////////////////////////////////////////// @@ -1618,33 +1835,40 @@ get_quoted_string(int c) { //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_identifier(int c) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + loc.last_line = loc.first_line; + loc.last_column = loc.first_column; string name(1, (char)c); - c = get(); + c = peek(); while (c != EOF && (isalnum(c) || c == '_')) { - name += c; - c = get(); + name += get(); + c = peek(); } if (c == '\'' || c == '"') { // This is actually a wide-character or wide-string literal or // some such: a string with an alphanumeric prefix. We don't // necessarily try to parse it correctly; for most purposes, we // don't care. + get(); CPPToken token(0); if (c == '\'') { token = get_quoted_char(c); } else { token = get_quoted_string(c); } - token._lloc.first_column = first_col; + token._lloc.first_column = loc.first_column; return token; } - _last_c = c; + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + + _last_c = 0; // Is it a manifest? Manifests::const_iterator mi = _manifests.find(name); @@ -1669,11 +1893,10 @@ get_identifier(int c) { if (kw != 0) { YYSTYPE result; result.u.identifier = (CPPIdentifier *)NULL; - return CPPToken(kw, first_line, first_col, first_file, name, result); + return CPPToken(kw, loc, name, result); } - return CPPToken(SIMPLE_IDENTIFIER, first_line, first_col, first_file, - name); + return CPPToken(SIMPLE_IDENTIFIER, loc, name); } //////////////////////////////////////////////////////////////////// @@ -1723,6 +1946,9 @@ extract_manifest_args(const string &name, int num_args, int va_arg, // Skip whitespace till paren. int c = _last_c; _last_c = '\0'; + if (c == 0) { + c = get(); + } while (c != EOF && isspace(c)) { c = get(); } @@ -1806,13 +2032,18 @@ extract_manifest_args(const string &name, int num_args, int va_arg, } } + YYLTYPE loc; + loc.first_line = first_line; + loc.first_column = first_col; + loc.last_line = first_line; + loc.last_column = first_col; + loc.file = first_file; + if ((int)args.size() < num_args) { - warning("Not enough arguments for manifest " + name, - first_line, first_col, first_file); + warning("Not enough arguments for manifest " + name, loc); } else if (va_arg < 0 && (int)args.size() > num_args) { - warning("Too many arguments for manifest " + name, - first_line, first_col, first_file); + warning("Too many arguments for manifest " + name, loc); } } @@ -1942,93 +2173,103 @@ extract_manifest_args_inline(const string &name, int num_args, // Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: -get_number(int c, int c2) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); +get_number(int c) { + YYLTYPE loc; + loc.file = get_file(); + loc.first_line = get_line_number(); + loc.first_column = get_col_number(); + loc.last_line = loc.first_line; + loc.last_column = loc.first_column; string num(1, (char)c); bool leading_zero = (c == '0'); bool decimal_point = (c == '.'); - if (c2 == 0) { - c = get(); - } else { - c = c2; - } + c = peek(); + if (leading_zero && c == 'x') { // Here we have a hex number. - num += c; - c = get(); + num += get(); + c = peek(); while (c != EOF && (isdigit(c) || (tolower(c) >= 'a' && tolower(c) <= 'f'))) { - num += c; - c = get(); + num += get(); + c = peek(); } - while (c == 'L' || c == 'U') { + while (c == 'L' || c == 'U' || c == 'l' || c == 'u') { // We allow (and ignore) an 'L' and/or 'U' following the number. - c = get(); + get(); + c = peek(); } - _last_c = c; + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + + _last_c = 0; YYSTYPE result; result.u.integer = strtol(num.c_str(), (char **)NULL, 16); - return CPPToken(INTEGER, first_line, first_col, first_file, num, result); + return CPPToken(INTEGER, loc, num, result); } while (c != EOF && isdigit(c)) { - num += c; - c = get(); + num += get(); + c = peek(); } if (c == '.' && !decimal_point) { // Now we have a floating-point number. decimal_point = true; - num += c; - c = get(); + num += get(); + c = peek(); while (c != EOF && isdigit(c)) { - num += c; - c = get(); + num += get(); + c = peek(); } } if (decimal_point) { if (tolower(c) == 'e') { // An exponent is allowed. - num += c; - c = get(); + num += get(); + c = peek(); if (c == '-' || c == '+') { - num += c; - c = get(); + num += get(); + c = peek(); } while (c != EOF && isdigit(c)) { - num += c; - c = get(); + num += get(); + c = peek(); } } if (c == 'f') { // We allow (and ignore) an 'f' following the number. - c = get(); + get(); + c = peek(); } - _last_c = c; + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + YYSTYPE result; result.u.real = pstrtod(num.c_str(), (char **)NULL); - return CPPToken(REAL, first_line, first_col, first_file, num, result); + return CPPToken(REAL, loc, num, result); } // This is a decimal or octal integer number. while (c == 'L' || c == 'U') { // We allow (and ignore) an 'L' and/or 'U' following the number. - c = get(); + get(); + c = peek(); } - _last_c = c; + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + YYSTYPE result; if (leading_zero) { @@ -2042,7 +2283,7 @@ get_number(int c, int c2) { result.u.integer = strtol(num.c_str(), (char **)NULL, 10); } - return CPPToken(INTEGER, first_line, first_col, first_file, num, result); + return CPPToken(INTEGER, loc, num, result); } //////////////////////////////////////////////////////////////////// @@ -2168,7 +2409,7 @@ scan_escape_sequence(int c) { return '\v'; case 'e': - // \e is non-standard, buT GCC supports it. + // \e is non-standard, but GCC supports it. return '\x1B'; case 'x': @@ -2176,11 +2417,8 @@ scan_escape_sequence(int c) { c = get(); if (isxdigit(c)) { int val = hex_val(c); - c = get(); - if (isxdigit(c)) { - val = (val << 4) | hex_val(c); - } else { - unget(c); + if (isxdigit(peek())) { + val = (val << 4) | hex_val(get()); } return val; } @@ -2197,17 +2435,13 @@ scan_escape_sequence(int c) { // Octal character. { int val = (c - '0'); - c = get(); + c = peek(); if (c >= '0' && c <= '7') { - val = (val << 3) | (c - '0'); - c = get(); + val = (val << 3) | (get() - '0'); + c = peek(); if (c >= '0' && c <= '7') { - val = (val << 3) | (c - '0'); - } else { - unget(c); + val = (val << 3) | (get() - '0'); } - } else { - unget(c); } return val; } @@ -2244,7 +2478,6 @@ scan_quoted(int c) { return str; } - //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::should_ignore_manifest // Access: Public @@ -2326,10 +2559,44 @@ get() { return c; } +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::peek +// Access: Private +// Description: Like get(), but does not alter the current state. +//////////////////////////////////////////////////////////////////// +int CPPPreprocessor:: +peek() { + if (_unget != '\0') { + return _unget; + } + + if (_files.empty()) { + return EOF; + } + + Files::reverse_iterator it = _files.rbegin(); + int c = (*it).peek(); + + while (c == EOF && it != _files.rend()) { + int last_c = (*it)._prev_last_c; + ++it; + + if (last_c != '\0') { + c = last_c; + } else if (it != _files.rend()) { + c = (*it).peek(); + } + } + + return c; +} + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::unget // Access: Private -// Description: +// Description: Undoes the effects of a previous get(). Not +// recommended, use peek() instead where possible, as +// it doesn't cause the column index to be off. //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: unget(int c) { @@ -2377,9 +2644,8 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { for (pi = formal_params._parameters.begin(); pi != formal_params._parameters.end() && _parsing_template_params; ++pi) { - CPPFile first_file = get_file(); - int first_line = get_line_number(); - int first_col = get_col_number(); + CPPToken token = peek_next_token(); + YYLTYPE loc = token._lloc; CPPDeclaration *decl = (*pi); if (decl->as_type()) { @@ -2387,7 +2653,9 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { _saved_tokens.push_back(CPPToken(START_TYPE)); CPPType *type = ::parse_type(this, current_scope, global_scope); if (type == NULL) { - warning("Invalid type", first_line, first_col, first_file); + loc.last_line = get_line_number(); + loc.last_column = get_col_number() - 1; + warning("Invalid type", loc); skip_to_end_nested(); type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } @@ -2397,7 +2665,9 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { _saved_tokens.push_back(CPPToken(START_CONST_EXPR)); CPPExpression *expr = parse_const_expr(this, current_scope, global_scope); if (expr == NULL) { - warning("Invalid expression", first_line, first_col, first_file); + loc.last_line = get_line_number(); + loc.last_column = get_col_number() - 1; + warning("Invalid expression", loc); skip_to_end_nested(); expr = new CPPExpression(0); } diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index e04dbf75a5..c02f0a2e25 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -53,15 +53,17 @@ public: int get_col_number() const; CPPToken get_next_token(); + CPPToken peek_next_token(); #ifdef CPP_VERBOSE_LEX CPPToken get_next_token0(); int _token_index; #endif - void warning(const string &message, int line = 0, int col = 0, - CPPFile file = CPPFile()); - void error(const string &message, int line = 0, int col = 0, - CPPFile file = CPPFile()); + void warning(const string &message); + void warning(const string &message, const YYLTYPE &loc); + void error(const string &message); + void error(const string &message, const YYLTYPE &loc); + void show_line(const YYLTYPE &loc); CPPCommentBlock *get_comment_before(int line, CPPFile file); CPPCommentBlock *get_comment_on(int line, CPPFile file); @@ -112,6 +114,8 @@ protected: private: CPPToken internal_get_next_token(); + int check_digraph(int c); + int check_trigraph(int c); int skip_whitespace(int c); int skip_comment(int c); int skip_c_comment(int c); @@ -121,22 +125,14 @@ private: int get_preprocessor_command(int c, string &command); int get_preprocessor_args(int c, string &args); - void handle_define_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_undef_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_ifdef_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_ifndef_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_if_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_include_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_pragma_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); - void handle_error_directive(const string &args, int first_line, - int first_col, const CPPFile &first_file); + void handle_define_directive(const string &args, const YYLTYPE &loc); + void handle_undef_directive(const string &args, const YYLTYPE &loc); + void handle_ifdef_directive(const string &args, const YYLTYPE &loc); + void handle_ifndef_directive(const string &args, const YYLTYPE &loc); + void handle_if_directive(const string &args, const YYLTYPE &loc); + void handle_include_directive(const string &args, const YYLTYPE &loc); + void handle_pragma_directive(const string &args, const YYLTYPE &loc); + void handle_error_directive(const string &args, const YYLTYPE &loc); void skip_false_if_block(bool consider_elifs); @@ -153,7 +149,7 @@ private: int va_arg, vector_string &args, const string &expr, size_t &p); - CPPToken get_number(int c, int c2 = 0); + CPPToken get_number(int c); static int check_keyword(const string &name); int scan_escape_sequence(int c); string scan_quoted(int c); @@ -162,6 +158,7 @@ private: bool should_ignore_preprocessor() const; int get(); + int peek(); void unget(int c); CPPTemplateParameterList * @@ -177,6 +174,7 @@ private: bool open(const CPPFile &file); bool connect_input(const string &input); int get(); + int peek(); const CPPManifest *_ignore_manifest; CPPFile _file; @@ -184,6 +182,8 @@ private: istream *_in; int _line_number; int _col_number; + int _next_line_number; + int _next_col_number; bool _lock_position; int _prev_last_c; }; diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index 565a9ef4e5..e365c3e6d6 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -226,9 +226,14 @@ define_extension_type(CPPExtensionType *type, CPPPreprocessor *error_sink) { if (other_ext->_type != type->_type) { if (error_sink != NULL) { ostringstream errstr; - errstr << other_ext->_type << " " << type->get_fully_scoped_name() - << " was previously declared as " << other_ext->_type << "\n"; - error_sink->error(errstr.str()); + errstr << type->_type << " " << type->get_fully_scoped_name() + << " was previously declared as " << other_ext->_type; + error_sink->error(errstr.str(), type->_ident->_loc); + + if (other_ext->_ident != NULL) { + error_sink->error("previous declaration is here", + other_ext->_ident->_loc); + } } } (*result.first).second = type; @@ -242,10 +247,19 @@ define_extension_type(CPPExtensionType *type, CPPPreprocessor *error_sink) { if (error_sink != NULL) { ostringstream errstr; + if (!cppparser_output_class_keyword) { + errstr << type->_type << " "; + } type->output(errstr, 0, NULL, false); - errstr << " has conflicting declaration as "; + errstr << " has conflicting definition as "; other_type->output(errstr, 0, NULL, true); - error_sink->error(errstr.str()); + error_sink->error(errstr.str(), type->_ident->_loc); + + CPPExtensionType *other_ext = other_type->as_extension_type(); + if (other_ext != NULL && other_ext->_ident != NULL) { + error_sink->error("previous definition is here", + other_ext->_ident->_loc); + } } } } @@ -1107,7 +1121,9 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope, def->output(errstr, 0, NULL, false); errstr << " has conflicting declaration as "; other_type->output(errstr, 0, NULL, true); - error_sink->error(errstr.str()); + error_sink->error(errstr.str(), def->_ident->_loc); + error_sink->error("previous definition is here", + other_td->_ident->_loc); } } } else { diff --git a/dtool/src/cppparser/cppToken.cxx b/dtool/src/cppparser/cppToken.cxx index 9cb6102440..cfaf4057ed 100644 --- a/dtool/src/cppparser/cppToken.cxx +++ b/dtool/src/cppparser/cppToken.cxx @@ -38,6 +38,18 @@ CPPToken(int token, int line_number, int col_number, _lloc.file = file; } +//////////////////////////////////////////////////////////////////// +// Function: CPPToken::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +CPPToken:: +CPPToken(int token, const YYLTYPE &loc, const string &str, const YYSTYPE &val) : + _token(token), _lloc(loc), _lval(val) +{ + _lval.str = str; +} + //////////////////////////////////////////////////////////////////// // Function: CPPToken::Copy Constructor // Access: Public diff --git a/dtool/src/cppparser/cppToken.h b/dtool/src/cppparser/cppToken.h index db1bc4a44e..8f442e683e 100644 --- a/dtool/src/cppparser/cppToken.h +++ b/dtool/src/cppparser/cppToken.h @@ -29,6 +29,9 @@ public: const CPPFile &file = CPPFile(""), const string &str = string(), const YYSTYPE &lval = YYSTYPE()); + CPPToken(int token, const YYLTYPE &loc, + const string &str = string(), + const YYSTYPE &lval = YYSTYPE()); CPPToken(const CPPToken ©); void operator = (const CPPToken ©); diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index 529aa71db1..314e2d447a 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -20,6 +20,7 @@ #include "cppEnumType.h" #include "cppFunctionGroup.h" #include "cppFunctionType.h" +#include "cppIdentifier.h" #include "cppParameterList.h" #include "cppPointerType.h" #include "cppReferenceType.h" From 1c9ff40236983079754d41f6cb4de7a88fbbcf22 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 10 Oct 2015 16:29:14 +0200 Subject: [PATCH 159/200] Require new Bison version on Windows, fallback to prebuilt files if not present --- dtool/src/cppparser/cppBison.yxx | 12 ++++-------- makepanda/makepanda.py | 3 --- makepanda/makepandacore.py | 9 ++++++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 8b918d5de3..b94a21b749 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -199,14 +199,10 @@ pop_struct() { /* This is a bison-specific declaration to enable recursive calls to yyparse(). It changes the calling sequence to yylex(), passing - pointers to the current yylval and yylloc. */ -%pure_parser - -/* Ideally we'd define this instead of the above, which gives us better - tracking of error locations, but we are still using a very old - version of Bison on Windows. */ -//%define api.pure full -//%locations + pointers to the current yylval and yylloc. It also adds a pointer + to the current lloc to yyerror, which gives us better diagnostics. */ +%define api.pure full +%locations %token REAL %token INTEGER diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 07bdd7e538..180e8bd3e2 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -419,9 +419,6 @@ if (RUNTIME): # Unused packages for runtime. PkgDisable(pkg) -if (GetHost() == 'windows'): - os.environ["BISON_SIMPLE"] = GetThirdpartyBase()+"/win-util/bison.simple" - if (INSTALLER and RTDIST): exit("Cannot build an installer for the rtdist build!") diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 7d921ee9d2..dd6c06c191 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -431,9 +431,12 @@ def GetBison(): if BISON is not None: return BISON - win_util = os.path.join(GetThirdpartyBase(), 'win-util') - if GetHost() == 'windows' and os.path.isdir(win_util): - BISON = os.path.join(win_util, 'bison.exe') + # We now require a newer version of Bison than the one we previously + # shipped in the win-util dir. The new version has a 'data' + # subdirectory, so check for that. + win_util_data = os.path.join(GetThirdpartyBase(), 'win-util', 'data') + if GetHost() == 'windows' and os.path.isdir(win_util_data): + BISON = os.path.join(GetThirdpartyBase(), 'win-util', 'bison.exe') elif LocateBinary('bison'): BISON = 'bison' else: From ba45120eac612f20e17ac1c632ca268375d23671 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 11 Oct 2015 16:52:33 +0200 Subject: [PATCH 160/200] Try to stay compatible with Bison 2.5 (for Ubuntu precise), support C++11 and C++17 static_assert, improve error reporting, handle several gcc keyword aliases, fix bug handling preprocessor expression in which the same manifest occurs more than once --- dtool/src/cppparser/cppBison.cxx.prebuilt | 5782 +++++++++--------- dtool/src/cppparser/cppBison.h.prebuilt | 78 +- dtool/src/cppparser/cppBison.yxx | 56 +- dtool/src/cppparser/cppManifest.cxx | 4 +- dtool/src/cppparser/cppManifest.h | 5 +- dtool/src/cppparser/cppPreprocessor.cxx | 46 +- dtool/src/cppparser/cppPreprocessor.h | 3 + dtool/src/interrogate/interrogateBuilder.cxx | 6 +- makepanda/makepanda.py | 4 +- 9 files changed, 3046 insertions(+), 2938 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index e82963410c..bee2ccfa65 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -126,7 +126,7 @@ int yyparse(); static void yyerror(const string &msg) { - current_lexer->error(msg); + current_lexer->error(msg, current_lexer->_last_token_loc); } static void @@ -387,25 +387,26 @@ extern int cppyydebug; KW_SIGNED = 340, KW_SIZEOF = 341, KW_STATIC = 342, - KW_STATIC_CAST = 343, - KW_STRUCT = 344, - KW_TEMPLATE = 345, - KW_THROW = 346, - KW_TRUE = 347, - KW_TRY = 348, - KW_TYPEDEF = 349, - KW_TYPENAME = 350, - KW_UNION = 351, - KW_UNSIGNED = 352, - KW_USING = 353, - KW_VIRTUAL = 354, - KW_VOID = 355, - KW_VOLATILE = 356, - KW_WCHAR_T = 357, - KW_WHILE = 358, - START_CPP = 359, - START_CONST_EXPR = 360, - START_TYPE = 361 + KW_STATIC_ASSERT = 343, + KW_STATIC_CAST = 344, + KW_STRUCT = 345, + KW_TEMPLATE = 346, + KW_THROW = 347, + KW_TRUE = 348, + KW_TRY = 349, + KW_TYPEDEF = 350, + KW_TYPENAME = 351, + KW_UNION = 352, + KW_UNSIGNED = 353, + KW_USING = 354, + KW_VIRTUAL = 355, + KW_VOID = 356, + KW_VOLATILE = 357, + KW_WCHAR_T = 358, + KW_WHILE = 359, + START_CPP = 360, + START_CONST_EXPR = 361, + START_TYPE = 362 }; #endif /* Tokens. */ @@ -494,25 +495,26 @@ extern int cppyydebug; #define KW_SIGNED 340 #define KW_SIZEOF 341 #define KW_STATIC 342 -#define KW_STATIC_CAST 343 -#define KW_STRUCT 344 -#define KW_TEMPLATE 345 -#define KW_THROW 346 -#define KW_TRUE 347 -#define KW_TRY 348 -#define KW_TYPEDEF 349 -#define KW_TYPENAME 350 -#define KW_UNION 351 -#define KW_UNSIGNED 352 -#define KW_USING 353 -#define KW_VIRTUAL 354 -#define KW_VOID 355 -#define KW_VOLATILE 356 -#define KW_WCHAR_T 357 -#define KW_WHILE 358 -#define START_CPP 359 -#define START_CONST_EXPR 360 -#define START_TYPE 361 +#define KW_STATIC_ASSERT 343 +#define KW_STATIC_CAST 344 +#define KW_STRUCT 345 +#define KW_TEMPLATE 346 +#define KW_THROW 347 +#define KW_TRUE 348 +#define KW_TRY 349 +#define KW_TYPEDEF 350 +#define KW_TYPENAME 351 +#define KW_UNION 352 +#define KW_UNSIGNED 353 +#define KW_USING 354 +#define KW_VIRTUAL 355 +#define KW_VOID 356 +#define KW_VOLATILE 357 +#define KW_WCHAR_T 358 +#define KW_WHILE 359 +#define START_CPP 360 +#define START_CONST_EXPR 361 +#define START_TYPE 362 @@ -555,7 +557,7 @@ int cppyyparse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 559 "built/tmp/cppBison.yxx.c" +#line 561 "built/tmp/cppBison.yxx.c" #ifdef short # undef short @@ -777,20 +779,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3857 +#define YYLAST 3843 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 131 +#define YYNTOKENS 132 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 93 /* YYNRULES -- Number of rules. */ -#define YYNRULES 555 +#define YYNRULES 557 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1008 +#define YYNSTATES 1015 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 361 +#define YYMAXUTOK 362 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -801,16 +803,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 129, 2, 2, 2, 122, 115, 2, - 125, 127, 120, 118, 108, 119, 124, 121, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 110, 109, - 116, 111, 117, 112, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 130, 2, 2, 2, 123, 116, 2, + 126, 128, 121, 119, 109, 120, 125, 122, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 111, 110, + 117, 112, 118, 113, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 126, 2, 130, 114, 2, 2, 2, 2, 2, + 2, 127, 2, 131, 115, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 107, 113, 128, 123, 2, 2, 2, + 2, 2, 2, 108, 114, 129, 124, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -834,7 +836,7 @@ static const yytype_uint8 yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106 + 105, 106, 107 }; #if YYDEBUG @@ -845,299 +847,300 @@ static const yytype_uint16 yyprhs[] = 0, 0, 3, 6, 9, 12, 14, 17, 20, 22, 26, 31, 32, 38, 40, 42, 44, 46, 48, 50, 53, 55, 57, 60, 63, 66, 69, 77, 87, 97, - 98, 102, 104, 107, 111, 114, 117, 120, 123, 126, - 129, 132, 135, 138, 140, 144, 148, 149, 154, 155, - 161, 164, 169, 172, 177, 178, 183, 184, 190, 194, - 197, 202, 205, 210, 211, 218, 219, 226, 227, 235, - 236, 247, 248, 260, 261, 270, 271, 281, 283, 285, - 287, 290, 295, 301, 303, 305, 307, 309, 311, 313, - 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, - 335, 337, 339, 341, 343, 345, 347, 349, 351, 353, - 355, 357, 359, 361, 363, 365, 367, 369, 371, 374, - 377, 379, 381, 383, 385, 386, 393, 396, 398, 400, - 402, 406, 409, 414, 417, 422, 426, 431, 433, 435, - 437, 439, 442, 445, 448, 451, 454, 457, 461, 466, - 470, 474, 475, 482, 484, 486, 488, 492, 495, 497, - 501, 503, 506, 508, 511, 513, 517, 523, 527, 532, - 534, 536, 539, 541, 545, 549, 555, 559, 563, 568, - 574, 577, 579, 581, 583, 585, 588, 591, 594, 597, - 600, 604, 609, 611, 613, 615, 618, 621, 624, 627, - 630, 634, 639, 647, 651, 653, 656, 659, 662, 665, - 668, 672, 677, 685, 687, 689, 692, 694, 696, 698, - 701, 706, 708, 710, 713, 715, 717, 719, 722, 727, - 730, 732, 734, 737, 740, 743, 746, 750, 751, 757, - 758, 766, 768, 770, 773, 777, 780, 783, 786, 790, - 794, 798, 802, 806, 810, 815, 820, 823, 827, 829, - 831, 833, 835, 839, 845, 847, 850, 855, 857, 859, - 861, 863, 864, 871, 876, 879, 883, 885, 887, 889, - 891, 893, 895, 897, 899, 901, 903, 905, 907, 909, - 911, 914, 917, 920, 923, 925, 928, 930, 934, 937, - 939, 940, 943, 945, 948, 950, 952, 954, 956, 958, - 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, - 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, - 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, - 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, - 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, - 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, - 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, - 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, - 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, - 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, - 1162, 1164, 1166, 1168, 1170, 1172, 1176, 1178, 1183, 1191, - 1199, 1204, 1207, 1210, 1213, 1216, 1219, 1223, 1227, 1231, - 1235, 1239, 1243, 1247, 1251, 1255, 1259, 1263, 1267, 1271, - 1275, 1279, 1283, 1289, 1294, 1299, 1303, 1307, 1311, 1315, - 1317, 1322, 1330, 1338, 1343, 1348, 1353, 1358, 1363, 1368, - 1373, 1378, 1383, 1388, 1393, 1398, 1403, 1408, 1411, 1417, - 1420, 1423, 1426, 1429, 1432, 1436, 1440, 1444, 1448, 1452, - 1456, 1460, 1464, 1468, 1472, 1476, 1480, 1484, 1488, 1492, - 1496, 1500, 1504, 1510, 1515, 1520, 1524, 1528, 1532, 1536, - 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1557, 1565, - 1573, 1578, 1581, 1587, 1590, 1593, 1596, 1599, 1603, 1607, - 1611, 1615, 1619, 1623, 1627, 1631, 1635, 1639, 1643, 1647, - 1651, 1655, 1659, 1663, 1667, 1671, 1677, 1682, 1687, 1691, - 1695, 1699, 1703, 1705, 1707, 1709, 1711, 1713, 1715, 1717, - 1720, 1723, 1725, 1727, 1729, 1732 + 104, 109, 110, 114, 116, 119, 123, 126, 129, 132, + 135, 138, 141, 144, 147, 150, 152, 156, 160, 161, + 166, 167, 173, 176, 181, 184, 189, 190, 195, 196, + 202, 206, 209, 214, 217, 222, 223, 230, 231, 238, + 239, 247, 248, 259, 260, 272, 273, 282, 283, 293, + 295, 297, 299, 302, 307, 313, 315, 317, 319, 321, + 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, + 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, + 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, + 383, 386, 389, 391, 393, 395, 397, 398, 405, 408, + 410, 412, 414, 418, 421, 426, 429, 434, 438, 443, + 445, 447, 449, 451, 454, 457, 460, 463, 466, 469, + 473, 478, 482, 486, 487, 494, 496, 498, 500, 504, + 507, 509, 513, 515, 518, 520, 523, 525, 529, 535, + 539, 544, 546, 548, 551, 553, 557, 561, 567, 571, + 575, 580, 586, 589, 591, 593, 595, 597, 600, 603, + 606, 609, 612, 616, 621, 623, 625, 627, 630, 633, + 636, 639, 642, 646, 651, 659, 663, 665, 668, 671, + 674, 677, 680, 684, 689, 697, 699, 701, 704, 706, + 708, 710, 713, 718, 720, 722, 725, 727, 729, 731, + 734, 739, 742, 744, 746, 749, 752, 755, 758, 762, + 763, 769, 770, 778, 780, 782, 785, 789, 792, 795, + 798, 802, 806, 810, 814, 818, 822, 827, 832, 835, + 839, 841, 843, 845, 847, 851, 857, 859, 862, 867, + 869, 871, 873, 875, 876, 883, 888, 891, 895, 897, + 899, 901, 903, 905, 907, 909, 911, 913, 915, 917, + 919, 921, 923, 926, 929, 932, 935, 937, 940, 942, + 946, 949, 951, 952, 955, 957, 960, 962, 964, 966, + 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, + 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, + 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, + 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, + 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, + 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, + 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, + 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, + 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, + 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, + 1168, 1170, 1174, 1176, 1178, 1180, 1182, 1184, 1188, 1190, + 1195, 1203, 1211, 1216, 1219, 1222, 1225, 1228, 1231, 1235, + 1239, 1243, 1247, 1251, 1255, 1259, 1263, 1267, 1271, 1275, + 1279, 1283, 1287, 1291, 1295, 1301, 1306, 1311, 1315, 1319, + 1323, 1327, 1329, 1334, 1342, 1350, 1355, 1360, 1365, 1370, + 1375, 1380, 1385, 1390, 1395, 1400, 1405, 1410, 1415, 1420, + 1423, 1429, 1432, 1435, 1438, 1441, 1444, 1448, 1452, 1456, + 1460, 1464, 1468, 1472, 1476, 1480, 1484, 1488, 1492, 1496, + 1500, 1504, 1508, 1512, 1516, 1522, 1527, 1532, 1536, 1540, + 1544, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564, + 1569, 1577, 1585, 1590, 1593, 1599, 1602, 1605, 1608, 1611, + 1615, 1619, 1623, 1627, 1631, 1635, 1639, 1643, 1647, 1651, + 1655, 1659, 1663, 1667, 1671, 1675, 1679, 1683, 1689, 1694, + 1699, 1703, 1707, 1711, 1715, 1717, 1719, 1721, 1723, 1725, + 1727, 1729, 1732, 1735, 1737, 1739, 1741, 1744 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 132, 0, -1, 104, 133, -1, 105, 216, -1, 106, - 186, -1, 223, -1, 133, 109, -1, 133, 138, -1, - 135, -1, 134, 108, 135, -1, 221, 125, 213, 127, - -1, -1, 141, 107, 137, 133, 128, -1, 142, -1, - 164, -1, 136, -1, 201, -1, 203, -1, 139, -1, - 94, 148, -1, 43, -1, 56, -1, 61, 110, -1, - 81, 110, -1, 80, 110, -1, 79, 110, -1, 72, - 125, 8, 108, 8, 127, 109, -1, 72, 125, 8, - 108, 8, 108, 8, 127, 109, -1, 73, 125, 221, - 108, 221, 108, 221, 127, 109, -1, -1, 64, 140, - 138, -1, 223, -1, 141, 59, -1, 141, 59, 222, - -1, 141, 87, -1, 141, 68, -1, 141, 99, -1, - 141, 60, -1, 141, 101, -1, 141, 74, -1, 141, - 82, -1, 141, 44, -1, 141, 58, -1, 143, -1, - 141, 184, 109, -1, 141, 153, 176, -1, -1, 141, - 184, 144, 146, -1, -1, 141, 51, 183, 145, 147, - -1, 170, 176, -1, 170, 175, 108, 146, -1, 170, - 176, -1, 170, 175, 108, 147, -1, -1, 141, 184, - 149, 151, -1, -1, 141, 51, 183, 150, 152, -1, - 141, 153, 176, -1, 170, 176, -1, 170, 175, 108, - 151, -1, 170, 176, -1, 170, 175, 108, 152, -1, - -1, 8, 125, 154, 172, 127, 161, -1, -1, 9, - 125, 155, 172, 127, 161, -1, -1, 123, 221, 125, - 156, 172, 127, 161, -1, -1, 9, 125, 120, 170, - 127, 125, 157, 172, 127, 161, -1, -1, 9, 125, - 10, 120, 170, 127, 125, 158, 172, 127, 161, -1, - -1, 78, 183, 180, 125, 159, 172, 127, 161, -1, - -1, 78, 51, 183, 180, 125, 160, 172, 127, 161, - -1, 8, -1, 223, -1, 51, -1, 161, 77, -1, - 161, 91, 125, 127, -1, 161, 91, 125, 221, 127, - -1, 129, -1, 123, -1, 120, -1, 121, -1, 122, - -1, 118, -1, 119, -1, 113, -1, 115, -1, 114, - -1, 13, -1, 14, -1, 15, -1, 16, -1, 17, - -1, 18, -1, 116, -1, 117, -1, 19, -1, 20, - -1, 111, -1, 108, -1, 31, -1, 32, -1, 33, - -1, 34, -1, 35, -1, 36, -1, 37, -1, 38, - -1, 39, -1, 40, -1, 41, -1, 42, -1, 29, - -1, 126, 130, -1, 125, 127, -1, 76, -1, 52, - -1, 142, -1, 164, -1, -1, 90, 165, 116, 166, - 117, 163, -1, 90, 142, -1, 223, -1, 167, -1, - 168, -1, 167, 108, 168, -1, 50, 221, -1, 50, - 221, 111, 186, -1, 95, 221, -1, 95, 221, 111, - 186, -1, 169, 181, 174, -1, 51, 169, 181, 174, - -1, 204, -1, 8, -1, 9, -1, 221, -1, 78, - 162, -1, 51, 170, -1, 101, 170, -1, 120, 170, - -1, 115, 170, -1, 14, 170, -1, 10, 120, 170, - -1, 170, 126, 212, 130, -1, 170, 110, 4, -1, - 125, 170, 127, -1, -1, 170, 125, 171, 172, 127, - 161, -1, 223, -1, 12, -1, 173, -1, 173, 108, - 12, -1, 173, 12, -1, 179, -1, 173, 108, 179, - -1, 223, -1, 111, 215, -1, 223, -1, 111, 216, - -1, 109, -1, 107, 208, 128, -1, 110, 134, 107, - 208, 128, -1, 111, 216, 109, -1, 111, 107, 177, - 128, -1, 223, -1, 178, -1, 178, 108, -1, 216, - -1, 107, 177, 128, -1, 178, 108, 216, -1, 178, - 108, 107, 177, 128, -1, 183, 181, 175, -1, 8, - 181, 175, -1, 51, 183, 181, 175, -1, 51, 82, - 183, 181, 175, -1, 82, 179, -1, 218, -1, 223, - -1, 8, -1, 9, -1, 51, 180, -1, 101, 180, - -1, 120, 180, -1, 115, 180, -1, 14, 180, -1, - 10, 120, 180, -1, 180, 126, 212, 130, -1, 223, - -1, 8, -1, 9, -1, 51, 181, -1, 101, 181, - -1, 120, 181, -1, 115, 181, -1, 14, 181, -1, - 10, 120, 181, -1, 181, 126, 212, 130, -1, 125, - 181, 127, 125, 172, 127, 161, -1, 125, 181, 127, - -1, 223, -1, 51, 182, -1, 101, 182, -1, 120, - 182, -1, 115, 182, -1, 14, 182, -1, 10, 120, - 182, -1, 182, 126, 212, 130, -1, 125, 182, 127, - 125, 172, 127, 161, -1, 204, -1, 9, -1, 95, - 221, -1, 187, -1, 189, -1, 194, -1, 200, 221, - -1, 199, 221, 110, 196, -1, 204, -1, 9, -1, - 95, 221, -1, 187, -1, 189, -1, 194, -1, 200, - 221, -1, 199, 221, 110, 196, -1, 199, 221, -1, - 204, -1, 9, -1, 95, 221, -1, 200, 221, -1, - 199, 221, -1, 183, 182, -1, 51, 183, 182, -1, - -1, 200, 107, 188, 133, 128, -1, -1, 200, 221, - 190, 191, 107, 133, 128, -1, 223, -1, 192, -1, - 110, 193, -1, 192, 108, 193, -1, 81, 220, -1, - 80, 220, -1, 79, 220, -1, 99, 81, 220, -1, - 99, 80, 220, -1, 99, 79, 220, -1, 81, 99, - 220, -1, 80, 99, 220, -1, 79, 99, 220, -1, - 195, 107, 198, 128, -1, 199, 221, 110, 196, -1, - 199, 221, -1, 199, 110, 196, -1, 199, -1, 205, - -1, 9, -1, 223, -1, 197, 221, 108, -1, 197, - 221, 111, 216, 108, -1, 197, -1, 197, 221, -1, - 197, 221, 111, 216, -1, 57, -1, 50, -1, 89, - -1, 96, -1, -1, 75, 221, 107, 202, 133, 128, - -1, 75, 107, 133, 128, -1, 98, 221, -1, 98, - 75, 221, -1, 205, -1, 206, -1, 207, -1, 45, - -1, 47, -1, 102, -1, 48, -1, 49, -1, 84, - -1, 70, -1, 71, -1, 97, -1, 85, -1, 69, - -1, 84, 205, -1, 70, 205, -1, 97, 205, -1, - 85, 205, -1, 63, -1, 70, 63, -1, 53, -1, - 70, 70, 63, -1, 70, 53, -1, 100, -1, -1, - 209, 210, -1, 223, -1, 210, 211, -1, 3, -1, - 4, -1, 6, -1, 5, -1, 8, -1, 9, -1, - 10, -1, 7, -1, 12, -1, 13, -1, 14, -1, - 15, -1, 16, -1, 17, -1, 18, -1, 19, -1, - 20, -1, 21, -1, 22, -1, 29, -1, 30, -1, - 31, -1, 32, -1, 33, -1, 34, -1, 35, -1, - 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, - 41, -1, 42, -1, 45, -1, 46, -1, 47, -1, - 48, -1, 49, -1, 102, -1, 50, -1, 51, -1, - 52, -1, 53, -1, 54, -1, 55, -1, 57, -1, - 59, -1, 60, -1, 62, -1, 63, -1, 64, -1, - 65, -1, 66, -1, 67, -1, 68, -1, 69, -1, - 70, -1, 74, -1, 76, -1, 79, -1, 80, -1, - 81, -1, 61, -1, 82, -1, 83, -1, 84, -1, - 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, - 91, -1, 92, -1, 93, -1, 94, -1, 95, -1, - 96, -1, 97, -1, 99, -1, 100, -1, 101, -1, - 103, -1, 78, -1, 118, -1, 119, -1, 120, -1, - 121, -1, 115, -1, 113, -1, 114, -1, 129, -1, - 123, -1, 111, -1, 122, -1, 116, -1, 117, -1, - 125, -1, 127, -1, 124, -1, 108, -1, 109, -1, - 110, -1, 126, -1, 130, -1, 112, -1, 107, 210, - 128, -1, 223, -1, 216, -1, 223, -1, 214, -1, - 216, -1, 214, 108, 216, -1, 217, -1, 125, 186, - 127, 215, -1, 88, 116, 186, 117, 125, 214, 127, - -1, 54, 116, 186, 117, 125, 214, 127, -1, 86, - 125, 186, 127, -1, 129, 215, -1, 123, 215, -1, - 119, 215, -1, 120, 215, -1, 115, 215, -1, 215, - 120, 215, -1, 215, 121, 215, -1, 215, 122, 215, - -1, 215, 118, 215, -1, 215, 119, 215, -1, 215, - 113, 215, -1, 215, 114, 215, -1, 215, 115, 215, - -1, 215, 13, 215, -1, 215, 14, 215, -1, 215, - 15, 215, -1, 215, 16, 215, -1, 215, 17, 215, - -1, 215, 18, 215, -1, 215, 19, 215, -1, 215, - 20, 215, -1, 215, 112, 215, 110, 215, -1, 215, - 126, 216, 130, -1, 215, 125, 214, 127, -1, 215, - 125, 127, -1, 215, 124, 215, -1, 215, 29, 215, - -1, 125, 214, 127, -1, 217, -1, 125, 186, 127, - 216, -1, 88, 116, 186, 117, 125, 214, 127, -1, - 54, 116, 186, 117, 125, 214, 127, -1, 9, 125, - 213, 127, -1, 69, 125, 213, 127, -1, 47, 125, - 213, 127, -1, 102, 125, 213, 127, -1, 48, 125, - 213, 127, -1, 49, 125, 213, 127, -1, 45, 125, - 213, 127, -1, 84, 125, 213, 127, -1, 70, 125, - 213, 127, -1, 97, 125, 213, 127, -1, 85, 125, - 213, 127, -1, 63, 125, 213, 127, -1, 53, 125, - 213, 127, -1, 86, 125, 186, 127, -1, 76, 185, - -1, 76, 185, 125, 213, 127, -1, 129, 216, -1, - 123, 216, -1, 119, 216, -1, 120, 216, -1, 115, - 216, -1, 216, 120, 216, -1, 216, 121, 216, -1, - 216, 122, 216, -1, 216, 118, 216, -1, 216, 119, - 216, -1, 216, 113, 216, -1, 216, 114, 216, -1, - 216, 115, 216, -1, 216, 13, 216, -1, 216, 14, - 216, -1, 216, 15, 216, -1, 216, 16, 216, -1, - 216, 17, 216, -1, 216, 18, 216, -1, 216, 116, - 216, -1, 216, 117, 216, -1, 216, 19, 216, -1, - 216, 20, 216, -1, 216, 112, 216, 110, 216, -1, - 216, 126, 216, 130, -1, 216, 125, 214, 127, -1, - 216, 125, 127, -1, 216, 124, 216, -1, 216, 29, - 216, -1, 125, 214, 127, -1, 4, -1, 92, -1, - 62, -1, 5, -1, 3, -1, 222, -1, 8, -1, - 219, -1, 125, 186, 127, 216, -1, 88, 116, 186, - 117, 125, 214, 127, -1, 54, 116, 186, 117, 125, - 214, 127, -1, 86, 125, 186, 127, -1, 76, 185, - -1, 76, 185, 125, 213, 127, -1, 129, 216, -1, - 123, 216, -1, 119, 216, -1, 115, 216, -1, 218, - 120, 216, -1, 218, 121, 216, -1, 218, 122, 216, - -1, 218, 118, 216, -1, 218, 119, 216, -1, 218, - 113, 216, -1, 218, 114, 216, -1, 218, 115, 216, - -1, 218, 13, 216, -1, 218, 14, 216, -1, 218, - 15, 216, -1, 218, 16, 216, -1, 218, 17, 216, - -1, 218, 18, 216, -1, 218, 116, 216, -1, 218, - 117, 216, -1, 218, 19, 216, -1, 218, 20, 216, - -1, 218, 112, 216, 110, 216, -1, 218, 126, 216, - 130, -1, 218, 125, 214, 127, -1, 218, 125, 127, - -1, 218, 124, 216, -1, 218, 29, 216, -1, 125, - 214, 127, -1, 4, -1, 92, -1, 62, -1, 5, - -1, 3, -1, 222, -1, 221, -1, 200, 221, -1, - 95, 221, -1, 8, -1, 9, -1, 6, -1, 222, - 6, -1, -1 + 133, 0, -1, 105, 134, -1, 106, 217, -1, 107, + 187, -1, 224, -1, 134, 110, -1, 134, 139, -1, + 136, -1, 135, 109, 136, -1, 222, 126, 214, 128, + -1, -1, 142, 108, 138, 134, 129, -1, 143, -1, + 165, -1, 137, -1, 202, -1, 204, -1, 140, -1, + 95, 149, -1, 43, -1, 56, -1, 61, 111, -1, + 81, 111, -1, 80, 111, -1, 79, 111, -1, 72, + 126, 8, 109, 8, 128, 110, -1, 72, 126, 8, + 109, 8, 109, 8, 128, 110, -1, 73, 126, 222, + 109, 222, 109, 222, 128, 110, -1, 88, 126, 217, + 109, 223, 128, -1, 88, 126, 217, 128, -1, -1, + 64, 141, 139, -1, 224, -1, 142, 59, -1, 142, + 59, 223, -1, 142, 87, -1, 142, 68, -1, 142, + 100, -1, 142, 60, -1, 142, 102, -1, 142, 74, + -1, 142, 82, -1, 142, 44, -1, 142, 58, -1, + 144, -1, 142, 185, 110, -1, 142, 154, 177, -1, + -1, 142, 185, 145, 147, -1, -1, 142, 51, 184, + 146, 148, -1, 171, 177, -1, 171, 176, 109, 147, + -1, 171, 177, -1, 171, 176, 109, 148, -1, -1, + 142, 185, 150, 152, -1, -1, 142, 51, 184, 151, + 153, -1, 142, 154, 177, -1, 171, 177, -1, 171, + 176, 109, 152, -1, 171, 177, -1, 171, 176, 109, + 153, -1, -1, 8, 126, 155, 173, 128, 162, -1, + -1, 9, 126, 156, 173, 128, 162, -1, -1, 124, + 222, 126, 157, 173, 128, 162, -1, -1, 9, 126, + 121, 171, 128, 126, 158, 173, 128, 162, -1, -1, + 9, 126, 10, 121, 171, 128, 126, 159, 173, 128, + 162, -1, -1, 78, 184, 181, 126, 160, 173, 128, + 162, -1, -1, 78, 51, 184, 181, 126, 161, 173, + 128, 162, -1, 8, -1, 224, -1, 51, -1, 162, + 77, -1, 162, 92, 126, 128, -1, 162, 92, 126, + 222, 128, -1, 130, -1, 124, -1, 121, -1, 122, + -1, 123, -1, 119, -1, 120, -1, 114, -1, 116, + -1, 115, -1, 13, -1, 14, -1, 15, -1, 16, + -1, 17, -1, 18, -1, 117, -1, 118, -1, 19, + -1, 20, -1, 112, -1, 109, -1, 31, -1, 32, + -1, 33, -1, 34, -1, 35, -1, 36, -1, 37, + -1, 38, -1, 39, -1, 40, -1, 41, -1, 42, + -1, 29, -1, 127, 131, -1, 126, 128, -1, 76, + -1, 52, -1, 143, -1, 165, -1, -1, 91, 166, + 117, 167, 118, 164, -1, 91, 143, -1, 224, -1, + 168, -1, 169, -1, 168, 109, 169, -1, 50, 222, + -1, 50, 222, 112, 187, -1, 96, 222, -1, 96, + 222, 112, 187, -1, 170, 182, 175, -1, 51, 170, + 182, 175, -1, 205, -1, 8, -1, 9, -1, 222, + -1, 78, 163, -1, 51, 171, -1, 102, 171, -1, + 121, 171, -1, 116, 171, -1, 14, 171, -1, 10, + 121, 171, -1, 171, 127, 213, 131, -1, 171, 111, + 4, -1, 126, 171, 128, -1, -1, 171, 126, 172, + 173, 128, 162, -1, 224, -1, 12, -1, 174, -1, + 174, 109, 12, -1, 174, 12, -1, 180, -1, 174, + 109, 180, -1, 224, -1, 112, 216, -1, 224, -1, + 112, 217, -1, 110, -1, 108, 209, 129, -1, 111, + 135, 108, 209, 129, -1, 112, 217, 110, -1, 112, + 108, 178, 129, -1, 224, -1, 179, -1, 179, 109, + -1, 217, -1, 108, 178, 129, -1, 179, 109, 217, + -1, 179, 109, 108, 178, 129, -1, 184, 182, 176, + -1, 8, 182, 176, -1, 51, 184, 182, 176, -1, + 51, 82, 184, 182, 176, -1, 82, 180, -1, 219, + -1, 224, -1, 8, -1, 9, -1, 51, 181, -1, + 102, 181, -1, 121, 181, -1, 116, 181, -1, 14, + 181, -1, 10, 121, 181, -1, 181, 127, 213, 131, + -1, 224, -1, 8, -1, 9, -1, 51, 182, -1, + 102, 182, -1, 121, 182, -1, 116, 182, -1, 14, + 182, -1, 10, 121, 182, -1, 182, 127, 213, 131, + -1, 126, 182, 128, 126, 173, 128, 162, -1, 126, + 182, 128, -1, 224, -1, 51, 183, -1, 102, 183, + -1, 121, 183, -1, 116, 183, -1, 14, 183, -1, + 10, 121, 183, -1, 183, 127, 213, 131, -1, 126, + 183, 128, 126, 173, 128, 162, -1, 205, -1, 9, + -1, 96, 222, -1, 188, -1, 190, -1, 195, -1, + 201, 222, -1, 200, 222, 111, 197, -1, 205, -1, + 9, -1, 96, 222, -1, 188, -1, 190, -1, 195, + -1, 201, 222, -1, 200, 222, 111, 197, -1, 200, + 222, -1, 205, -1, 9, -1, 96, 222, -1, 201, + 222, -1, 200, 222, -1, 184, 183, -1, 51, 184, + 183, -1, -1, 201, 108, 189, 134, 129, -1, -1, + 201, 222, 191, 192, 108, 134, 129, -1, 224, -1, + 193, -1, 111, 194, -1, 193, 109, 194, -1, 81, + 221, -1, 80, 221, -1, 79, 221, -1, 100, 81, + 221, -1, 100, 80, 221, -1, 100, 79, 221, -1, + 81, 100, 221, -1, 80, 100, 221, -1, 79, 100, + 221, -1, 196, 108, 199, 129, -1, 200, 222, 111, + 197, -1, 200, 222, -1, 200, 111, 197, -1, 200, + -1, 206, -1, 9, -1, 224, -1, 198, 222, 109, + -1, 198, 222, 112, 217, 109, -1, 198, -1, 198, + 222, -1, 198, 222, 112, 217, -1, 57, -1, 50, + -1, 90, -1, 97, -1, -1, 75, 222, 108, 203, + 134, 129, -1, 75, 108, 134, 129, -1, 99, 222, + -1, 99, 75, 222, -1, 206, -1, 207, -1, 208, + -1, 45, -1, 47, -1, 103, -1, 48, -1, 49, + -1, 84, -1, 70, -1, 71, -1, 98, -1, 85, + -1, 69, -1, 84, 206, -1, 70, 206, -1, 98, + 206, -1, 85, 206, -1, 63, -1, 70, 63, -1, + 53, -1, 70, 70, 63, -1, 70, 53, -1, 101, + -1, -1, 210, 211, -1, 224, -1, 211, 212, -1, + 3, -1, 4, -1, 6, -1, 5, -1, 8, -1, + 9, -1, 10, -1, 7, -1, 12, -1, 13, -1, + 14, -1, 15, -1, 16, -1, 17, -1, 18, -1, + 19, -1, 20, -1, 21, -1, 22, -1, 29, -1, + 30, -1, 31, -1, 32, -1, 33, -1, 34, -1, + 35, -1, 36, -1, 37, -1, 38, -1, 39, -1, + 40, -1, 41, -1, 42, -1, 45, -1, 46, -1, + 47, -1, 48, -1, 49, -1, 103, -1, 50, -1, + 51, -1, 52, -1, 53, -1, 54, -1, 55, -1, + 57, -1, 59, -1, 60, -1, 62, -1, 63, -1, + 64, -1, 65, -1, 66, -1, 67, -1, 68, -1, + 69, -1, 70, -1, 74, -1, 76, -1, 79, -1, + 80, -1, 81, -1, 61, -1, 82, -1, 83, -1, + 84, -1, 85, -1, 86, -1, 87, -1, 89, -1, + 90, -1, 92, -1, 93, -1, 94, -1, 95, -1, + 96, -1, 97, -1, 98, -1, 100, -1, 101, -1, + 102, -1, 104, -1, 78, -1, 119, -1, 120, -1, + 121, -1, 122, -1, 116, -1, 114, -1, 115, -1, + 130, -1, 124, -1, 112, -1, 123, -1, 117, -1, + 118, -1, 126, -1, 128, -1, 125, -1, 109, -1, + 110, -1, 111, -1, 127, -1, 131, -1, 113, -1, + 108, 211, 129, -1, 224, -1, 217, -1, 224, -1, + 215, -1, 217, -1, 215, 109, 217, -1, 218, -1, + 126, 187, 128, 216, -1, 89, 117, 187, 118, 126, + 215, 128, -1, 54, 117, 187, 118, 126, 215, 128, + -1, 86, 126, 187, 128, -1, 130, 216, -1, 124, + 216, -1, 120, 216, -1, 121, 216, -1, 116, 216, + -1, 216, 121, 216, -1, 216, 122, 216, -1, 216, + 123, 216, -1, 216, 119, 216, -1, 216, 120, 216, + -1, 216, 114, 216, -1, 216, 115, 216, -1, 216, + 116, 216, -1, 216, 13, 216, -1, 216, 14, 216, + -1, 216, 15, 216, -1, 216, 16, 216, -1, 216, + 17, 216, -1, 216, 18, 216, -1, 216, 19, 216, + -1, 216, 20, 216, -1, 216, 113, 216, 111, 216, + -1, 216, 127, 217, 131, -1, 216, 126, 215, 128, + -1, 216, 126, 128, -1, 216, 125, 216, -1, 216, + 29, 216, -1, 126, 215, 128, -1, 218, -1, 126, + 187, 128, 217, -1, 89, 117, 187, 118, 126, 215, + 128, -1, 54, 117, 187, 118, 126, 215, 128, -1, + 9, 126, 214, 128, -1, 69, 126, 214, 128, -1, + 47, 126, 214, 128, -1, 103, 126, 214, 128, -1, + 48, 126, 214, 128, -1, 49, 126, 214, 128, -1, + 45, 126, 214, 128, -1, 84, 126, 214, 128, -1, + 70, 126, 214, 128, -1, 98, 126, 214, 128, -1, + 85, 126, 214, 128, -1, 63, 126, 214, 128, -1, + 53, 126, 214, 128, -1, 86, 126, 187, 128, -1, + 76, 186, -1, 76, 186, 126, 214, 128, -1, 130, + 217, -1, 124, 217, -1, 120, 217, -1, 121, 217, + -1, 116, 217, -1, 217, 121, 217, -1, 217, 122, + 217, -1, 217, 123, 217, -1, 217, 119, 217, -1, + 217, 120, 217, -1, 217, 114, 217, -1, 217, 115, + 217, -1, 217, 116, 217, -1, 217, 13, 217, -1, + 217, 14, 217, -1, 217, 15, 217, -1, 217, 16, + 217, -1, 217, 17, 217, -1, 217, 18, 217, -1, + 217, 117, 217, -1, 217, 118, 217, -1, 217, 19, + 217, -1, 217, 20, 217, -1, 217, 113, 217, 111, + 217, -1, 217, 127, 217, 131, -1, 217, 126, 215, + 128, -1, 217, 126, 128, -1, 217, 125, 217, -1, + 217, 29, 217, -1, 126, 215, 128, -1, 4, -1, + 93, -1, 62, -1, 5, -1, 3, -1, 223, -1, + 8, -1, 220, -1, 126, 187, 128, 217, -1, 89, + 117, 187, 118, 126, 215, 128, -1, 54, 117, 187, + 118, 126, 215, 128, -1, 86, 126, 187, 128, -1, + 76, 186, -1, 76, 186, 126, 214, 128, -1, 130, + 217, -1, 124, 217, -1, 120, 217, -1, 116, 217, + -1, 219, 121, 217, -1, 219, 122, 217, -1, 219, + 123, 217, -1, 219, 119, 217, -1, 219, 120, 217, + -1, 219, 114, 217, -1, 219, 115, 217, -1, 219, + 116, 217, -1, 219, 13, 217, -1, 219, 14, 217, + -1, 219, 15, 217, -1, 219, 16, 217, -1, 219, + 17, 217, -1, 219, 18, 217, -1, 219, 117, 217, + -1, 219, 118, 217, -1, 219, 19, 217, -1, 219, + 20, 217, -1, 219, 113, 217, 111, 217, -1, 219, + 127, 217, 131, -1, 219, 126, 215, 128, -1, 219, + 126, 128, -1, 219, 125, 217, -1, 219, 29, 217, + -1, 126, 215, 128, -1, 4, -1, 93, -1, 62, + -1, 5, -1, 3, -1, 223, -1, 222, -1, 201, + 222, -1, 96, 222, -1, 8, -1, 9, -1, 6, + -1, 223, 6, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 397, 397, 398, 402, 409, 410, 411, 415, 416, - 420, 433, 432, 444, 445, 446, 447, 448, 449, 450, - 451, 464, 473, 477, 485, 489, 493, 504, 525, 534, - 533, 548, 552, 556, 567, 571, 575, 579, 583, 587, - 591, 595, 599, 606, 610, 619, 631, 630, 646, 645, - 663, 671, 682, 691, 705, 704, 720, 719, 730, 745, - 751, 760, 767, 780, 779, 802, 801, 826, 825, 856, - 855, 871, 870, 888, 887, 919, 918, 944, 957, 961, - 965, 969, 973, 980, 984, 988, 992, 996, 1000, 1004, - 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, - 1048, 1052, 1056, 1060, 1064, 1068, 1072, 1076, 1080, 1084, - 1088, 1092, 1096, 1100, 1104, 1108, 1112, 1116, 1120, 1124, - 1128, 1132, 1139, 1140, 1145, 1144, 1152, 1156, 1157, 1161, - 1167, 1176, 1180, 1184, 1188, 1192, 1198, 1208, 1212, 1217, - 1226, 1230, 1244, 1249, 1254, 1259, 1264, 1269, 1274, 1279, - 1284, 1290, 1289, 1311, 1315, 1320, 1324, 1329, 1337, 1342, - 1350, 1354, 1361, 1365, 1372, 1376, 1380, 1384, 1388, 1395, - 1396, 1397, 1401, 1404, 1405, 1406, 1410, 1415, 1423, 1429, - 1435, 1439, 1449, 1453, 1457, 1461, 1466, 1471, 1476, 1481, - 1486, 1491, 1499, 1503, 1507, 1511, 1516, 1521, 1526, 1531, - 1536, 1541, 1546, 1552, 1560, 1564, 1569, 1574, 1579, 1584, - 1589, 1594, 1599, 1608, 1612, 1617, 1621, 1625, 1629, 1633, - 1649, 1668, 1672, 1677, 1681, 1685, 1689, 1693, 1709, 1725, - 1746, 1750, 1755, 1759, 1775, 1794, 1800, 1811, 1810, 1835, - 1834, 1864, 1865, 1869, 1870, 1874, 1878, 1882, 1886, 1890, - 1894, 1898, 1902, 1906, 1913, 1921, 1925, 1929, 1933, 1940, - 1944, 1951, 1952, 1958, 1966, 1967, 1973, 1982, 1989, 1993, - 1997, 2005, 2004, 2026, 2030, 2036, 2045, 2046, 2047, 2051, - 2055, 2059, 2063, 2067, 2071, 2076, 2081, 2086, 2091, 2096, - 2100, 2105, 2114, 2119, 2127, 2131, 2136, 2140, 2145, 2153, - 2163, 2163, 2173, 2174, 2178, 2181, 2184, 2187, 2190, 2193, - 2196, 2199, 2202, 2202, 2202, 2203, 2203, 2203, 2203, 2204, - 2204, 2204, 2204, 2204, 2205, 2205, 2205, 2206, 2206, 2206, - 2206, 2206, 2207, 2207, 2207, 2207, 2207, 2208, 2208, 2208, - 2208, 2208, 2209, 2209, 2209, 2210, 2210, 2210, 2210, 2210, - 2211, 2211, 2211, 2212, 2212, 2212, 2212, 2213, 2213, 2213, - 2214, 2214, 2214, 2214, 2214, 2215, 2215, 2215, 2215, 2216, - 2216, 2216, 2216, 2216, 2217, 2217, 2217, 2217, 2217, 2217, - 2218, 2218, 2218, 2218, 2218, 2219, 2220, 2223, 2223, 2223, - 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2224, 2224, - 2224, 2224, 2224, 2224, 2224, 2224, 2224, 2224, 2225, 2225, - 2229, 2233, 2240, 2244, 2251, 2255, 2262, 2266, 2270, 2274, - 2278, 2282, 2286, 2290, 2302, 2306, 2310, 2314, 2318, 2322, - 2326, 2330, 2334, 2338, 2342, 2346, 2350, 2354, 2358, 2362, - 2366, 2370, 2374, 2378, 2382, 2386, 2390, 2394, 2398, 2406, - 2410, 2414, 2418, 2422, 2429, 2435, 2441, 2447, 2453, 2459, - 2465, 2472, 2479, 2486, 2493, 2499, 2505, 2509, 2513, 2517, - 2521, 2525, 2537, 2541, 2545, 2549, 2553, 2557, 2561, 2565, - 2569, 2573, 2577, 2581, 2585, 2589, 2593, 2597, 2601, 2605, - 2609, 2613, 2617, 2621, 2625, 2629, 2633, 2637, 2641, 2648, - 2652, 2656, 2660, 2664, 2668, 2672, 2686, 2690, 2694, 2698, - 2702, 2706, 2710, 2714, 2718, 2722, 2734, 2738, 2742, 2746, - 2750, 2754, 2758, 2762, 2766, 2770, 2774, 2778, 2782, 2786, - 2790, 2794, 2798, 2802, 2806, 2810, 2814, 2818, 2822, 2826, - 2830, 2834, 2841, 2845, 2849, 2853, 2857, 2861, 2868, 2876, - 2884, 2907, 2911, 2918, 2922, 2928 + 0, 396, 396, 397, 401, 408, 409, 410, 414, 415, + 419, 432, 431, 443, 444, 445, 446, 447, 448, 449, + 450, 463, 472, 476, 484, 488, 492, 503, 524, 529, + 538, 552, 551, 566, 570, 574, 585, 589, 593, 597, + 601, 605, 609, 613, 617, 624, 628, 637, 649, 648, + 664, 663, 681, 689, 700, 709, 723, 722, 738, 737, + 748, 763, 769, 778, 785, 798, 797, 820, 819, 844, + 843, 874, 873, 892, 891, 912, 911, 943, 942, 968, + 981, 985, 989, 993, 997, 1004, 1008, 1012, 1016, 1020, + 1024, 1028, 1032, 1036, 1040, 1044, 1048, 1052, 1056, 1060, + 1064, 1068, 1072, 1076, 1080, 1084, 1088, 1092, 1096, 1100, + 1104, 1108, 1112, 1116, 1120, 1124, 1128, 1132, 1136, 1140, + 1144, 1148, 1152, 1156, 1163, 1164, 1169, 1168, 1176, 1180, + 1181, 1185, 1191, 1200, 1204, 1208, 1212, 1216, 1222, 1232, + 1236, 1241, 1253, 1257, 1271, 1276, 1281, 1286, 1291, 1296, + 1301, 1306, 1311, 1317, 1316, 1338, 1342, 1347, 1351, 1356, + 1364, 1369, 1377, 1381, 1388, 1392, 1399, 1403, 1407, 1411, + 1415, 1422, 1423, 1424, 1428, 1431, 1432, 1433, 1437, 1442, + 1450, 1456, 1462, 1466, 1476, 1480, 1484, 1488, 1493, 1498, + 1503, 1508, 1513, 1518, 1526, 1530, 1534, 1538, 1543, 1548, + 1553, 1558, 1563, 1568, 1573, 1579, 1587, 1591, 1596, 1601, + 1606, 1611, 1616, 1621, 1626, 1635, 1639, 1647, 1651, 1655, + 1659, 1663, 1679, 1698, 1702, 1710, 1714, 1718, 1722, 1726, + 1742, 1758, 1779, 1783, 1791, 1795, 1811, 1830, 1836, 1847, + 1846, 1871, 1870, 1900, 1901, 1905, 1906, 1910, 1914, 1918, + 1922, 1926, 1930, 1934, 1938, 1942, 1949, 1957, 1961, 1965, + 1969, 1976, 1980, 1987, 1988, 1994, 2002, 2003, 2009, 2018, + 2025, 2029, 2033, 2041, 2040, 2062, 2066, 2072, 2081, 2082, + 2083, 2087, 2091, 2095, 2099, 2103, 2107, 2112, 2117, 2122, + 2127, 2132, 2136, 2141, 2150, 2155, 2163, 2167, 2172, 2176, + 2181, 2189, 2199, 2199, 2209, 2210, 2214, 2217, 2220, 2223, + 2226, 2229, 2232, 2235, 2238, 2238, 2238, 2239, 2239, 2239, + 2239, 2240, 2240, 2240, 2240, 2240, 2241, 2241, 2241, 2242, + 2242, 2242, 2242, 2242, 2243, 2243, 2243, 2243, 2243, 2244, + 2244, 2244, 2244, 2244, 2245, 2245, 2245, 2246, 2246, 2246, + 2246, 2246, 2247, 2247, 2247, 2248, 2248, 2248, 2248, 2249, + 2249, 2249, 2250, 2250, 2250, 2250, 2250, 2251, 2251, 2251, + 2251, 2252, 2252, 2252, 2252, 2252, 2253, 2253, 2253, 2253, + 2253, 2253, 2254, 2254, 2254, 2254, 2254, 2255, 2256, 2259, + 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, + 2261, 2261, 2265, 2269, 2276, 2280, 2287, 2291, 2298, 2302, + 2306, 2310, 2314, 2318, 2322, 2326, 2338, 2342, 2346, 2350, + 2354, 2358, 2362, 2366, 2370, 2374, 2378, 2382, 2386, 2390, + 2394, 2398, 2402, 2406, 2410, 2414, 2418, 2422, 2426, 2430, + 2434, 2442, 2446, 2450, 2454, 2458, 2468, 2474, 2480, 2486, + 2492, 2498, 2504, 2511, 2518, 2525, 2532, 2538, 2544, 2548, + 2552, 2556, 2560, 2564, 2576, 2580, 2584, 2588, 2592, 2596, + 2600, 2604, 2608, 2612, 2616, 2620, 2624, 2628, 2632, 2636, + 2640, 2644, 2648, 2652, 2656, 2660, 2664, 2668, 2672, 2676, + 2680, 2687, 2691, 2695, 2699, 2703, 2707, 2711, 2725, 2729, + 2733, 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2773, 2777, + 2781, 2785, 2789, 2793, 2797, 2801, 2805, 2809, 2813, 2817, + 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849, 2853, 2857, + 2861, 2865, 2869, 2873, 2880, 2884, 2888, 2892, 2896, 2900, + 2907, 2915, 2923, 2949, 2953, 2960, 2964, 2970 }; #endif @@ -1162,14 +1165,14 @@ static const char *const yytname[] = "KW_INT", "KW_LONG", "KW_LONGLONG", "KW_MAKE_PROPERTY", "KW_MAKE_SEQ", "KW_MUTABLE", "KW_NAMESPACE", "KW_NEW", "KW_NOEXCEPT", "KW_OPERATOR", "KW_PRIVATE", "KW_PROTECTED", "KW_PUBLIC", "KW_REGISTER", "KW_RETURN", - "KW_SHORT", "KW_SIGNED", "KW_SIZEOF", "KW_STATIC", "KW_STATIC_CAST", - "KW_STRUCT", "KW_TEMPLATE", "KW_THROW", "KW_TRUE", "KW_TRY", - "KW_TYPEDEF", "KW_TYPENAME", "KW_UNION", "KW_UNSIGNED", "KW_USING", - "KW_VIRTUAL", "KW_VOID", "KW_VOLATILE", "KW_WCHAR_T", "KW_WHILE", - "START_CPP", "START_CONST_EXPR", "START_TYPE", "'{'", "','", "';'", - "':'", "'='", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", "'-'", - "'*'", "'/'", "'%'", "'~'", "'.'", "'('", "'['", "')'", "'}'", "'!'", - "']'", "$accept", "grammar", "cpp", "constructor_inits", + "KW_SHORT", "KW_SIGNED", "KW_SIZEOF", "KW_STATIC", "KW_STATIC_ASSERT", + "KW_STATIC_CAST", "KW_STRUCT", "KW_TEMPLATE", "KW_THROW", "KW_TRUE", + "KW_TRY", "KW_TYPEDEF", "KW_TYPENAME", "KW_UNION", "KW_UNSIGNED", + "KW_USING", "KW_VIRTUAL", "KW_VOID", "KW_VOLATILE", "KW_WCHAR_T", + "KW_WHILE", "START_CPP", "START_CONST_EXPR", "START_TYPE", "'{'", "','", + "';'", "':'", "'='", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", + "'-'", "'*'", "'/'", "'%'", "'~'", "'.'", "'('", "'['", "')'", "'}'", + "'!'", "']'", "$accept", "grammar", "cpp", "constructor_inits", "constructor_init", "extern_c", "$@1", "declaration", "friend_declaration", "$@2", "storage_class", "type_like_declaration", "multiple_var_declaration", "$@3", "$@4", @@ -1215,72 +1218,72 @@ static const yytype_uint16 yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 123, 44, 59, - 58, 61, 63, 124, 94, 38, 60, 62, 43, 45, - 42, 47, 37, 126, 46, 40, 91, 41, 125, 33, - 93 + 355, 356, 357, 358, 359, 360, 361, 362, 123, 44, + 59, 58, 61, 63, 124, 94, 38, 60, 62, 43, + 45, 42, 47, 37, 126, 46, 40, 91, 41, 125, + 33, 93 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 131, 132, 132, 132, 133, 133, 133, 134, 134, - 135, 137, 136, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 140, - 139, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 142, 142, 142, 144, 143, 145, 143, - 146, 146, 147, 147, 149, 148, 150, 148, 148, 151, - 151, 152, 152, 154, 153, 155, 153, 156, 153, 157, - 153, 158, 153, 159, 153, 160, 153, 153, 161, 161, - 161, 161, 161, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 163, 165, 164, 164, 166, 166, 167, - 167, 168, 168, 168, 168, 168, 168, 169, 169, 169, - 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, - 170, 171, 170, 172, 172, 172, 172, 172, 173, 173, - 174, 174, 175, 175, 176, 176, 176, 176, 176, 177, - 177, 177, 178, 178, 178, 178, 179, 179, 179, 179, - 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 181, 181, 181, 181, 181, 181, 181, 181, + 0, 132, 133, 133, 133, 134, 134, 134, 135, 135, + 136, 138, 137, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 141, 140, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 143, 143, 143, 145, 144, + 146, 144, 147, 147, 148, 148, 150, 149, 151, 149, + 149, 152, 152, 153, 153, 155, 154, 156, 154, 157, + 154, 158, 154, 159, 154, 160, 154, 161, 154, 154, + 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 164, 164, 166, 165, 165, 167, + 167, 168, 168, 169, 169, 169, 169, 169, 169, 170, + 170, 170, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 172, 171, 173, 173, 173, 173, 173, + 174, 174, 175, 175, 176, 176, 177, 177, 177, 177, + 177, 178, 178, 178, 179, 179, 179, 179, 180, 180, + 180, 180, 180, 180, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 183, 183, 183, 183, 183, 183, 183, - 183, 184, 184, 184, 184, 184, 184, 184, 184, 184, - 185, 185, 185, 185, 185, 186, 186, 188, 187, 190, - 189, 191, 191, 192, 192, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 194, 195, 195, 195, 195, 196, - 196, 197, 197, 197, 198, 198, 198, 199, 200, 200, - 200, 202, 201, 201, 203, 203, 204, 204, 204, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 206, 206, 206, 206, 206, 207, - 209, 208, 210, 210, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 212, 212, 213, 213, 214, 214, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, + 182, 182, 182, 182, 182, 182, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 184, 184, 184, 184, 184, + 184, 184, 184, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 186, 186, 186, 186, 186, 187, 187, 189, + 188, 191, 190, 192, 192, 193, 193, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 195, 196, 196, 196, + 196, 197, 197, 198, 198, 198, 199, 199, 199, 200, + 201, 201, 201, 203, 202, 202, 204, 204, 205, 205, + 205, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 207, 207, 207, 207, + 207, 208, 210, 209, 211, 211, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 213, 213, 214, 214, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 217, - 217, 217, 217, 217, 217, 217, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 219, 219, 219, 219, 219, 219, 220, 220, - 220, 221, 221, 222, 222, 223 + 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 218, 218, 218, 218, 218, 218, 218, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 220, 220, 220, 220, 220, 220, + 221, 221, 221, 222, 222, 223, 223, 224 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1288,35 +1291,35 @@ static const yytype_uint8 yyr2[] = { 0, 2, 2, 2, 2, 1, 2, 2, 1, 3, 4, 0, 5, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 2, 2, 2, 2, 7, 9, 9, 0, - 3, 1, 2, 3, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 1, 3, 3, 0, 4, 0, 5, - 2, 4, 2, 4, 0, 4, 0, 5, 3, 2, - 4, 2, 4, 0, 6, 0, 6, 0, 7, 0, - 10, 0, 11, 0, 8, 0, 9, 1, 1, 1, - 2, 4, 5, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 7, 9, 9, 6, + 4, 0, 3, 1, 2, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 3, 3, 0, 4, + 0, 5, 2, 4, 2, 4, 0, 4, 0, 5, + 3, 2, 4, 2, 4, 0, 6, 0, 6, 0, + 7, 0, 10, 0, 11, 0, 8, 0, 9, 1, + 1, 1, 2, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 1, 1, 1, 1, 0, 6, 2, 1, 1, 1, - 3, 2, 4, 2, 4, 3, 4, 1, 1, 1, - 1, 2, 2, 2, 2, 2, 2, 3, 4, 3, - 3, 0, 6, 1, 1, 1, 3, 2, 1, 3, - 1, 2, 1, 2, 1, 3, 5, 3, 4, 1, - 1, 2, 1, 3, 3, 5, 3, 3, 4, 5, - 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, - 3, 4, 1, 1, 1, 2, 2, 2, 2, 2, - 3, 4, 7, 3, 1, 2, 2, 2, 2, 2, - 3, 4, 7, 1, 1, 2, 1, 1, 1, 2, - 4, 1, 1, 2, 1, 1, 1, 2, 4, 2, - 1, 1, 2, 2, 2, 2, 3, 0, 5, 0, - 7, 1, 1, 2, 3, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 4, 4, 2, 3, 1, 1, - 1, 1, 3, 5, 1, 2, 4, 1, 1, 1, - 1, 0, 6, 4, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 1, 2, 1, 3, 2, 1, - 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, + 2, 2, 1, 1, 1, 1, 0, 6, 2, 1, + 1, 1, 3, 2, 4, 2, 4, 3, 4, 1, + 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, + 4, 3, 3, 0, 6, 1, 1, 1, 3, 2, + 1, 3, 1, 2, 1, 2, 1, 3, 5, 3, + 4, 1, 1, 2, 1, 3, 3, 5, 3, 3, + 4, 5, 2, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 3, 4, 1, 1, 1, 2, 2, 2, + 2, 2, 3, 4, 7, 3, 1, 2, 2, 2, + 2, 2, 3, 4, 7, 1, 1, 2, 1, 1, + 1, 2, 4, 1, 1, 2, 1, 1, 1, 2, + 4, 2, 1, 1, 2, 2, 2, 2, 3, 0, + 5, 0, 7, 1, 1, 2, 3, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 4, 4, 2, 3, + 1, 1, 1, 1, 3, 5, 1, 2, 4, 1, + 1, 1, 1, 0, 6, 4, 2, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 1, 2, 1, 3, + 2, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1326,22 +1329,22 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 1, 4, 7, 7, - 4, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 1, 4, + 7, 7, 4, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, - 4, 7, 7, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 2, 5, 2, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, + 3, 1, 4, 7, 7, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, + 5, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, - 4, 2, 5, 2, 2, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 7, 7, 4, 2, 5, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 2, 0 + 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 1, 1, 1, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1349,1142 +1352,1143 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 555, 0, 0, 0, 555, 5, 503, 499, 502, - 553, 505, 0, 0, 0, 0, 0, 0, 0, 501, - 0, 0, 0, 0, 0, 0, 0, 0, 500, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 449, 504, - 214, 279, 280, 282, 283, 268, 0, 296, 267, 294, - 289, 285, 286, 284, 288, 269, 0, 270, 287, 299, - 281, 555, 4, 216, 217, 218, 0, 258, 0, 213, - 276, 277, 278, 1, 20, 21, 0, 29, 0, 0, - 0, 0, 0, 0, 555, 555, 0, 6, 15, 7, - 18, 0, 13, 43, 14, 16, 17, 31, 555, 555, - 555, 555, 555, 555, 0, 555, 555, 555, 231, 0, - 467, 0, 0, 230, 555, 555, 0, 0, 555, 555, - 473, 471, 472, 470, 214, 279, 280, 282, 283, 296, - 294, 289, 285, 284, 288, 287, 281, 0, 0, 414, - 469, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 557, 0, 0, 0, 557, 5, 505, 501, 504, + 555, 507, 0, 0, 0, 0, 0, 0, 0, 503, + 0, 0, 0, 0, 0, 0, 0, 0, 502, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 451, 506, + 216, 281, 282, 284, 285, 270, 0, 298, 269, 296, + 291, 287, 288, 286, 290, 271, 0, 272, 289, 301, + 283, 557, 4, 218, 219, 220, 0, 260, 0, 215, + 278, 279, 280, 1, 20, 21, 0, 31, 0, 0, + 0, 0, 0, 0, 0, 557, 557, 0, 6, 15, + 7, 18, 0, 13, 45, 14, 16, 17, 33, 557, + 557, 557, 557, 557, 557, 0, 557, 557, 557, 233, + 0, 469, 0, 0, 232, 557, 557, 0, 0, 557, + 557, 475, 473, 474, 472, 216, 281, 282, 284, 285, + 298, 296, 291, 287, 286, 290, 289, 283, 0, 0, + 416, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 554, 555, 298, 295, 285, 291, - 285, 290, 293, 551, 552, 215, 292, 0, 555, 555, - 555, 555, 555, 555, 235, 204, 555, 0, 256, 237, - 219, 22, 555, 0, 0, 555, 0, 25, 24, 23, - 0, 126, 0, 0, 19, 0, 274, 77, 222, 41, - 0, 42, 32, 37, 35, 39, 0, 40, 34, 0, - 36, 38, 11, 0, 0, 46, 224, 225, 226, 258, - 0, 221, 0, 413, 412, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 232, 555, 234, 233, 0, 0, - 0, 0, 0, 0, 0, 0, 498, 482, 483, 484, - 485, 486, 487, 490, 491, 497, 0, 479, 480, 481, - 488, 489, 477, 478, 474, 475, 476, 496, 495, 0, - 0, 236, 297, 555, 209, 205, 206, 208, 207, 0, - 555, 264, 0, 261, 260, 257, 259, 0, 555, 555, - 30, 0, 0, 555, 271, 555, 0, 0, 54, 275, - 63, 65, 48, 33, 0, 555, 223, 555, 0, 300, - 164, 0, 0, 45, 44, 0, 229, 227, 453, 459, - 455, 457, 458, 465, 0, 464, 454, 461, 0, 460, - 463, 466, 0, 462, 456, 450, 415, 0, 494, 493, - 210, 0, 0, 411, 410, 265, 254, 220, 555, 0, - 0, 242, 241, 0, 0, 273, 555, 138, 139, 0, - 0, 0, 0, 128, 129, 555, 137, 127, 56, 58, - 0, 555, 0, 0, 555, 0, 555, 183, 184, 0, - 555, 555, 555, 555, 555, 0, 182, 555, 67, 0, - 555, 0, 8, 0, 555, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 555, 140, 0, 0, 468, - 0, 492, 555, 211, 262, 0, 238, 0, 0, 0, - 0, 243, 555, 0, 0, 0, 555, 131, 555, 133, - 555, 0, 193, 194, 0, 555, 555, 555, 555, 555, - 555, 555, 192, 0, 55, 555, 546, 542, 545, 555, - 154, 0, 0, 544, 0, 0, 0, 0, 543, 0, - 0, 0, 0, 0, 0, 155, 158, 555, 181, 506, - 547, 153, 0, 0, 0, 49, 555, 0, 555, 189, - 185, 186, 188, 187, 73, 555, 12, 555, 165, 301, - 302, 300, 0, 555, 555, 0, 170, 172, 169, 167, - 0, 146, 142, 93, 94, 95, 96, 97, 98, 101, - 102, 117, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 121, 120, 104, 103, 90, 92, - 91, 99, 100, 88, 89, 85, 86, 87, 84, 0, - 0, 83, 141, 143, 145, 144, 0, 0, 0, 151, - 555, 0, 50, 162, 228, 0, 0, 0, 266, 0, - 0, 0, 247, 548, 0, 246, 0, 245, 0, 0, - 0, 555, 244, 0, 0, 0, 272, 0, 555, 0, - 122, 125, 123, 130, 555, 199, 195, 196, 198, 197, - 0, 0, 555, 135, 160, 57, 555, 0, 59, 555, - 0, 555, 0, 511, 180, 0, 0, 516, 515, 514, - 0, 0, 513, 555, 157, 0, 555, 0, 0, 0, + 0, 0, 0, 0, 0, 556, 557, 300, 297, 287, + 293, 287, 292, 295, 553, 554, 217, 294, 0, 557, + 557, 557, 557, 557, 557, 237, 206, 557, 0, 258, + 239, 221, 22, 557, 0, 0, 557, 0, 25, 24, + 23, 0, 0, 128, 0, 0, 19, 0, 276, 79, + 224, 43, 0, 44, 34, 39, 37, 41, 0, 42, + 36, 0, 38, 40, 11, 0, 0, 48, 226, 227, + 228, 260, 0, 223, 0, 415, 414, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 234, 557, 236, 235, + 0, 0, 0, 0, 0, 0, 0, 0, 500, 484, + 485, 486, 487, 488, 489, 492, 493, 499, 0, 481, + 482, 483, 490, 491, 479, 480, 476, 477, 478, 498, + 497, 0, 0, 238, 299, 557, 211, 207, 208, 210, + 209, 0, 557, 266, 0, 263, 262, 259, 261, 0, + 557, 557, 32, 0, 0, 557, 273, 0, 557, 0, + 0, 56, 277, 65, 67, 50, 35, 0, 557, 225, + 557, 0, 302, 166, 0, 0, 47, 46, 0, 231, + 229, 455, 461, 457, 459, 460, 467, 0, 466, 456, + 463, 0, 462, 465, 468, 0, 464, 458, 452, 417, + 0, 496, 495, 212, 0, 0, 413, 412, 267, 256, + 222, 557, 0, 0, 244, 243, 0, 0, 275, 557, + 0, 30, 140, 141, 0, 0, 0, 0, 130, 131, + 557, 139, 129, 58, 60, 0, 557, 0, 0, 557, + 0, 557, 185, 186, 0, 557, 557, 557, 557, 557, + 0, 184, 557, 69, 0, 557, 0, 8, 0, 557, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, + 557, 142, 0, 0, 470, 0, 494, 557, 213, 264, + 0, 240, 0, 0, 0, 0, 245, 557, 0, 0, + 0, 557, 0, 133, 557, 135, 557, 0, 195, 196, + 0, 557, 557, 557, 557, 557, 557, 557, 194, 0, + 57, 557, 548, 544, 547, 557, 156, 0, 0, 546, + 0, 0, 0, 0, 545, 0, 0, 0, 0, 0, + 0, 157, 160, 557, 183, 508, 549, 155, 0, 0, + 0, 51, 557, 0, 557, 191, 187, 188, 190, 189, + 75, 557, 12, 557, 167, 303, 304, 302, 0, 557, + 557, 0, 172, 174, 171, 169, 0, 148, 144, 95, + 96, 97, 98, 99, 100, 103, 104, 119, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 123, 122, 106, 105, 92, 94, 93, 101, 102, 90, + 91, 87, 88, 89, 86, 0, 0, 85, 143, 145, + 147, 146, 0, 0, 0, 153, 557, 0, 52, 164, + 230, 0, 0, 0, 268, 0, 0, 0, 249, 550, + 0, 248, 0, 247, 0, 0, 0, 557, 246, 0, + 0, 0, 274, 29, 0, 557, 0, 124, 127, 125, + 132, 557, 201, 197, 198, 200, 199, 0, 0, 557, + 137, 162, 59, 557, 0, 61, 557, 0, 557, 0, + 513, 182, 0, 0, 518, 517, 516, 0, 0, 515, + 557, 159, 0, 557, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 555, 0, 52, 75, 190, 555, 0, - 0, 304, 305, 307, 306, 311, 308, 309, 310, 312, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 343, - 344, 345, 346, 347, 348, 349, 350, 351, 366, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 386, 363, 364, 365, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, - 383, 384, 342, 385, 555, 403, 404, 405, 396, 408, - 392, 393, 391, 398, 399, 387, 388, 389, 390, 397, - 395, 402, 400, 406, 401, 394, 407, 303, 0, 9, - 0, 0, 168, 171, 147, 119, 118, 150, 149, 163, - 555, 0, 0, 452, 451, 555, 263, 550, 253, 549, - 252, 251, 250, 249, 248, 240, 0, 26, 0, 132, - 136, 134, 200, 203, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 161, 416, 0, 0, 61, 0, 0, - 177, 555, 555, 0, 555, 0, 0, 0, 541, 79, - 64, 78, 156, 159, 176, 525, 526, 527, 528, 529, - 530, 533, 534, 540, 0, 522, 523, 524, 531, 532, - 520, 521, 517, 518, 519, 539, 538, 0, 0, 0, - 69, 66, 0, 555, 0, 191, 555, 0, 166, 10, - 173, 555, 174, 0, 148, 51, 212, 0, 0, 555, - 0, 0, 0, 425, 423, 424, 422, 0, 0, 421, + 557, 0, 54, 77, 192, 557, 0, 0, 306, 307, + 309, 308, 313, 310, 311, 312, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 368, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 388, 365, 366, + 367, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 344, + 387, 557, 405, 406, 407, 398, 410, 394, 395, 393, + 400, 401, 389, 390, 391, 392, 399, 397, 404, 402, + 408, 403, 396, 409, 305, 0, 9, 0, 0, 170, + 173, 149, 121, 120, 152, 151, 165, 557, 0, 0, + 454, 453, 557, 265, 552, 255, 551, 254, 253, 252, + 251, 250, 242, 0, 26, 0, 134, 138, 136, 202, + 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 163, 418, 0, 0, 63, 0, 0, 179, 557, 557, + 0, 557, 0, 0, 0, 543, 81, 66, 80, 158, + 161, 178, 527, 528, 529, 530, 531, 532, 535, 536, + 542, 0, 524, 525, 526, 533, 534, 522, 523, 519, + 520, 521, 541, 540, 0, 0, 0, 71, 68, 0, + 557, 0, 193, 557, 0, 168, 10, 175, 557, 176, + 0, 150, 53, 214, 0, 0, 557, 0, 0, 0, + 427, 425, 426, 424, 0, 0, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 201, 0, 60, 163, 555, 178, 0, 0, 510, - 0, 507, 80, 0, 0, 537, 536, 71, 555, 53, - 0, 555, 68, 409, 0, 555, 27, 28, 0, 0, - 0, 0, 0, 448, 434, 435, 436, 437, 438, 439, - 440, 441, 447, 0, 431, 432, 433, 429, 430, 426, - 427, 428, 446, 445, 0, 0, 62, 179, 0, 512, - 0, 0, 535, 555, 0, 555, 74, 175, 152, 555, - 0, 420, 0, 417, 0, 444, 443, 0, 0, 81, - 0, 0, 555, 76, 202, 0, 0, 442, 509, 508, - 82, 555, 70, 0, 0, 72, 419, 418 + 0, 0, 0, 0, 0, 0, 0, 0, 203, 0, + 62, 165, 557, 180, 0, 0, 512, 0, 509, 82, + 0, 0, 539, 538, 73, 557, 55, 0, 557, 70, + 411, 0, 557, 27, 28, 0, 0, 0, 0, 0, + 450, 436, 437, 438, 439, 440, 441, 442, 443, 449, + 0, 433, 434, 435, 431, 432, 428, 429, 430, 448, + 447, 0, 0, 64, 181, 0, 514, 0, 0, 537, + 557, 0, 557, 76, 177, 154, 557, 0, 422, 0, + 419, 0, 446, 445, 0, 0, 83, 0, 0, 557, + 78, 204, 0, 0, 444, 511, 510, 84, 557, 72, + 0, 0, 74, 421, 420 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 401, 402, 88, 317, 89, 90, 192, - 91, 92, 93, 325, 385, 414, 485, 204, 380, 453, - 454, 605, 224, 381, 384, 497, 928, 973, 658, 863, - 830, 552, 591, 94, 202, 372, 373, 374, 375, 415, - 780, 474, 475, 603, 561, 323, 505, 506, 476, 395, - 451, 184, 61, 225, 110, 62, 63, 298, 64, 299, - 360, 361, 431, 65, 66, 295, 291, 292, 67, 68, - 95, 366, 96, 69, 70, 71, 72, 399, 400, 499, - 767, 352, 232, 233, 813, 139, 38, 478, 479, 572, - 416, 39, 234 + -1, 4, 5, 406, 407, 89, 320, 90, 91, 193, + 92, 93, 94, 328, 390, 419, 491, 206, 385, 459, + 460, 612, 226, 386, 389, 503, 935, 980, 665, 870, + 837, 558, 598, 95, 204, 377, 378, 379, 380, 420, + 787, 480, 481, 610, 567, 326, 511, 512, 482, 400, + 457, 185, 61, 227, 111, 62, 63, 300, 64, 301, + 363, 364, 436, 65, 66, 297, 293, 294, 67, 68, + 96, 369, 97, 69, 70, 71, 72, 404, 405, 505, + 774, 355, 234, 235, 820, 140, 38, 484, 485, 578, + 421, 39, 236 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -646 +#define YYPACT_NINF -508 static const yytype_int16 yypact[] = { - 21, -646, 2272, 3337, 36, 3218, -646, -646, -646, -646, - -646, -646, -96, -63, -33, -9, 16, 18, -71, -646, - 24, 33, 40, 3505, 42, 47, 65, 79, -646, 80, - 82, 2272, 2272, 2272, 2272, 1532, 2272, 2813, -646, 99, - -646, -646, -646, -646, -646, -646, 3561, -646, -646, -646, - -646, 1793, -646, 1503, 1503, -646, 234, -646, 1503, -646, - -646, 318, -646, -646, -646, -646, 106, 29, 77, -646, - -646, -646, -646, -646, -646, -646, 44, -646, 100, 110, - 86, 140, 156, 178, 169, -646, 49, -646, -646, -646, - -646, 2508, -646, -646, -646, -646, -646, -646, 2272, 2272, - 2272, 2272, 2272, 2272, 3337, 2272, 2272, 2272, -646, 234, - 171, 234, 234, -646, 2272, 2272, 3337, 3337, 2272, 2272, - 122, 122, 122, 122, -96, -63, -33, -9, 16, 18, - 24, 33, 2243, 3438, 3550, 3727, 82, 182, -62, 2813, - 122, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, - 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, - 2272, 2272, 1732, 2272, -646, 318, -646, -646, 1883, -646, - 1503, -646, -646, -646, -646, -646, -646, 193, 318, 318, - 318, 318, 318, 318, 191, -646, -646, 2341, 210, -646, - 126, -646, 3759, 316, 234, -646, 222, -646, -646, -646, - 2575, -646, 223, 2642, -646, 234, -646, 219, 221, -646, - 3561, -646, 343, -646, -646, -646, 3393, -646, -646, 234, - -646, -646, -646, 234, 196, 255, -646, -646, -646, 29, - 77, -646, 240, 270, -646, 248, 259, 261, 274, 275, - 280, 277, 279, 285, -646, 2272, -646, -646, 288, 290, - 291, 312, 305, 309, 2272, 2272, -646, 1549, 2991, 715, - 715, 668, 668, 347, 347, -646, 2665, 837, 3006, 3039, - 668, 668, 201, 201, 122, 122, 122, -646, -646, -49, - 1107, 191, -646, 318, 191, 191, 191, 191, 191, 131, - 2272, 234, 313, -646, -646, -646, -646, 2341, -646, 297, - -646, 332, 334, 3132, -646, 3272, 3561, 196, -646, -646, - -646, 11, -646, 99, 3561, 218, -646, -646, 326, -646, - -646, 234, 1822, -646, -646, 230, 177, 126, -646, -646, - -646, -646, -646, -646, 330, -646, -646, -646, 336, -646, - -646, -646, 345, -646, -646, 122, 2813, 2272, -646, -646, - 191, 356, 359, 2813, -646, 166, -646, 350, 3598, 38, - 379, 382, -646, 483, 234, -646, -646, -646, -646, 234, - 3328, 234, 375, 387, -646, 136, -646, -646, -646, -646, - 230, 984, 378, 230, 984, 230, 218, -646, -646, 380, - 218, 218, 218, 218, 218, 175, -646, 3625, -646, 369, - -646, 253, -646, 374, 1912, 2732, 381, 230, 230, 2415, - 230, 230, 230, 230, -646, 438, -646, 2341, 2272, -646, - 2272, 2813, 984, -646, -646, 2272, -646, 327, 466, 642, - 272, -646, -646, 38, -40, 394, 3652, 395, 136, 400, - 415, 3272, -646, -646, 393, 136, 136, 136, 136, 136, - 136, -50, -646, 230, -646, 438, -646, -646, -646, 136, - -646, 3449, 399, -646, 3505, 1632, 392, 423, -646, 2272, - 2272, 2272, 1532, 2272, 414, 1, -646, 136, 2846, -646, - 99, -646, 230, 153, 424, -646, 438, 216, 218, 426, - 426, 426, 426, 426, -646, 2272, -646, 984, -646, 1404, - -646, -646, 234, 2272, 1912, 422, 446, 2813, -646, -646, - 230, 245, 245, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, 429, - 427, -646, -646, 245, 245, 245, 185, 267, 1822, -646, - 2272, 450, -646, -646, 350, -31, -26, 433, 2779, 234, - 871, 234, -646, -646, 871, -646, 871, -646, 871, 871, - 871, 3679, -646, 558, 459, 234, -646, 3337, -50, 3337, - -646, -646, -646, -646, 136, 447, 447, 447, 447, 447, - 268, 586, 2272, -646, -646, -646, 438, 467, -646, -36, - 3561, 136, 3337, 452, -646, 3337, 3337, 122, 122, 122, - 451, -19, 122, 530, -646, 1084, -36, 2272, 2272, 2272, - 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, - 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2272, 2002, 2272, - 383, 579, 460, 530, 478, -646, -646, 426, 984, 458, - 468, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, -646, -646, 469, -646, - 473, 476, -646, 2092, 245, -646, -646, -646, -646, 2732, - 984, 477, 230, -646, -646, 530, -646, -646, -646, -646, - -646, -646, -646, -646, -646, -646, 479, -646, 482, -646, - -646, -646, 447, 471, 496, 488, 498, 586, 586, 586, - 586, 1532, 586, 2960, -646, 485, 508, -646, 230, 2272, - -646, 136, -36, 501, 2272, 492, 503, 2272, -646, -646, - 2, -646, -646, -646, -646, 1549, 2991, 715, 715, 668, - 668, 347, 347, -646, 2796, 837, 3006, 3039, 668, 668, - 201, 201, 122, 122, 122, -646, -646, -6, 2364, 499, - -646, 2, 230, 984, 494, -646, 530, 1276, -646, -646, - -646, 1912, 2813, 500, -646, -646, 2, 514, 520, 984, - 3337, 3337, 3337, 167, 167, 167, 167, 506, 20, 167, - 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, - 586, 586, 586, 586, 586, 586, 586, 586, 586, 2182, - 2272, -646, 230, -646, 2813, -36, -646, 505, 507, -646, - 519, 122, -646, 521, 2272, -646, -646, -646, 984, -646, - 522, 530, 2, -646, 525, 530, -646, -646, 527, 509, - 528, 539, 586, -646, 2976, 798, 1145, 1145, 1120, 1120, - 517, 517, -646, 2927, 3118, 3133, 3151, 358, 358, 167, - 167, 167, -646, -646, 93, 2389, -646, -646, 2272, -646, - 2272, 26, 2813, 984, 531, 530, 2, -646, 2, 530, - 534, -646, 535, 167, 586, -646, -646, 133, 137, -646, - 536, 537, 530, 2, 2, 2272, 2272, 2960, -646, -646, - -646, 530, 2, 141, 145, 2, -646, -646 + 84, -508, 2205, 3287, 35, 3159, -508, -508, -508, -508, + -508, -508, -77, -64, -48, -46, -40, -30, -86, -508, + -28, 1, 3, 3458, 29, 34, 73, 94, -508, 113, + 115, 2205, 2205, 2205, 2205, 1580, 2205, 2865, -508, 132, + -508, -508, -508, -508, -508, -508, 3515, -508, -508, -508, + -508, 3447, -508, 3712, 3712, -508, 105, -508, 3712, -508, + -508, 230, -508, -508, -508, -508, 43, 91, 33, -508, + -508, -508, -508, -508, -508, -508, 138, -508, 129, 156, + 58, 181, 192, 194, 184, 211, -508, 110, -508, -508, + -508, -508, 2556, -508, -508, -508, -508, -508, -508, 2205, + 2205, 2205, 2205, 2205, 2205, 3287, 2205, 2205, 2205, -508, + 105, 190, 105, 105, -508, 2205, 2205, 3287, 3287, 2205, + 2205, 50, 50, 50, 50, -77, -64, -48, -46, -40, + -30, -28, 1, 2103, 1367, 3158, 3333, 115, 201, -27, + 2865, 50, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, + 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, + 2205, 2205, 2205, 1782, 2205, -508, 230, -508, -508, 3504, + -508, 3712, -508, -508, -508, -508, -508, -508, 215, 230, + 230, 230, 230, 230, 230, 210, -508, -508, 1771, 228, + -508, 14, -508, 3744, 335, 105, -508, 236, -508, -508, + -508, 2205, 2624, -508, 232, 2692, -508, 105, -508, 221, + 224, -508, 3515, -508, 346, -508, -508, -508, 3344, -508, + -508, 105, -508, -508, -508, 105, 336, 243, -508, -508, + -508, 91, 33, -508, 227, 248, -508, 233, 234, 235, + 237, 244, 240, 247, 250, 252, -508, 2205, -508, -508, + 254, 256, 258, 269, 261, 265, 2205, 2205, -508, 895, + 1597, 977, 977, 1572, 1572, 312, 312, -508, 2715, 2268, + 2913, 3026, 1572, 1572, 352, 352, 50, 50, 50, -508, + -508, -26, 2298, 210, -508, 230, 210, 210, 210, 210, + 210, 87, 2205, 105, 271, -508, -508, -508, -508, 1771, + -508, 291, -508, 267, 297, 3553, -508, 2417, 3228, 3515, + 336, -508, -508, -508, 24, -508, 132, 3515, 238, -508, + -508, 283, -508, -508, 105, 1873, -508, -508, 199, 53, + 14, -508, -508, -508, -508, -508, -508, 284, -508, -508, + -508, 285, -508, -508, -508, 290, -508, -508, 50, 2865, + 2205, -508, -508, 210, 292, 280, 2865, -508, 11, -508, + 309, 3581, 36, 313, 316, -508, 414, 105, -508, -508, + 346, -508, -508, -508, 105, 736, 105, 323, 333, -508, + 520, -508, -508, -508, -508, 199, 1378, 328, 199, 1378, + 199, 238, -508, -508, 340, 238, 238, 238, 238, 238, + 145, -508, 3614, -508, 339, -508, 200, -508, 331, 1884, + 2783, 348, 199, 199, 2472, 199, 199, 199, 199, -508, + 185, -508, 1771, 2205, -508, 2205, 2865, 1378, -508, -508, + 2205, -508, 537, 697, 802, 124, -508, -508, 36, 12, + 361, 3642, 16, 359, 520, 368, 401, 3228, -508, -508, + 373, 520, 520, 520, 520, 520, 520, -54, -508, 199, + -508, 185, -508, -508, -508, 520, -508, 3401, 384, -508, + 3458, 1681, 377, 389, -508, 2205, 2205, 2205, 1580, 2205, + 385, 25, -508, 520, 2898, -508, 132, -508, 199, 207, + 386, -508, 185, 187, 238, 388, 388, 388, 388, 388, + -508, 2205, -508, 1378, -508, 1249, -508, -508, 105, 2205, + 1884, 390, 408, 2865, -508, -508, 199, 195, 195, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, 393, 387, -508, -508, 195, + 195, 195, 370, 154, 1873, -508, 2205, 416, -508, -508, + 309, 21, 22, 398, 2830, 105, 277, 105, -508, -508, + 277, -508, 277, -508, 277, 277, 277, 3675, -508, 519, + 421, 105, -508, -508, 3287, -54, 3287, -508, -508, -508, + -508, 520, 413, 413, 413, 413, 413, 196, 2216, 2205, + -508, -508, -508, 185, 426, -508, -23, 3515, 520, 3287, + 415, -508, 3287, 3287, 50, 50, 50, 419, 142, 50, + 493, -508, 1479, -23, 2205, 2205, 2205, 2205, 2205, 2205, + 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, + 2205, 2205, 2205, 2205, 2205, 2012, 2205, 411, 544, 428, + 493, 443, -508, -508, 388, 1378, 424, 430, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, -508, -508, 427, -508, 431, 432, -508, + 2023, 195, -508, -508, -508, -508, 2783, 1378, 433, 199, + -508, -508, 493, -508, -508, -508, -508, -508, -508, -508, + -508, -508, -508, 434, -508, 435, -508, -508, -508, 413, + 441, 453, 448, 460, 2216, 2216, 2216, 2216, 1580, 2216, + 930, -508, 452, 470, -508, 199, 2205, -508, 520, -23, + 467, 2205, 461, 472, 2205, -508, -508, 32, -508, -508, + -508, -508, 895, 1597, 977, 977, 1572, 1572, 312, 312, + -508, 2847, 2268, 2913, 3026, 1572, 1572, 352, 352, 50, + 50, 50, -508, -508, 148, 2334, 465, -508, 32, 199, + 1378, 464, -508, 493, 1120, -508, -508, -508, 1884, 2865, + 478, -508, -508, 32, 483, 494, 1378, 3287, 3287, 3287, + 141, 141, 141, 141, 479, 150, 141, 2216, 2216, 2216, + 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, + 2216, 2216, 2216, 2216, 2216, 2216, 2114, 2205, -508, 199, + -508, 2865, -23, -508, 484, 481, -508, 485, 50, -508, + 487, 2205, -508, -508, -508, 1378, -508, 486, 493, 32, + -508, 489, 493, -508, -508, 488, 501, 492, 505, 2216, + -508, 1391, 2978, 3167, 3167, 1921, 1921, 476, 476, -508, + 847, 3041, 3056, 3091, 363, 363, 141, 141, 141, -508, + -508, 152, 2353, -508, -508, 2205, -508, 2205, 31, 2865, + 1378, 497, 493, 32, -508, 32, 493, 502, -508, 504, + 141, 2216, -508, -508, 160, 170, -508, 503, 511, 493, + 32, 32, 2205, 2205, 930, -508, -508, -508, 493, 32, + 174, 178, 32, -508, -508 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -646, -646, -162, -646, 160, -646, -646, 455, -646, -646, - -82, -77, -646, -646, -646, -116, -187, -646, -646, -646, - -142, -235, 480, -646, -646, -646, -646, -646, -646, -646, - -645, -646, -646, 239, -646, -646, -646, 241, 310, -251, - -646, -375, -646, 96, -438, -252, -503, -646, -459, -279, - -396, -109, -41, 487, 232, -13, -80, -646, -27, -646, - -646, -646, 265, 19, -646, -287, -646, -646, -3, 115, - -646, -646, -646, -11, -35, -646, -646, 202, -646, -58, - -646, -454, -75, -20, 0, 377, -139, -646, -646, -362, - 143, -198, -1 + -508, -508, -163, -508, 134, -508, -508, 450, -508, -508, + -69, -55, -508, -508, -508, -145, -224, -508, -508, -508, + -178, -271, 445, -508, -508, -508, -508, -508, -508, -508, + -466, -508, -508, 209, -508, -508, -508, 213, 281, -362, + -508, -375, -508, 62, -460, -249, -507, -508, -444, -327, + -408, -89, -44, 457, 188, 30, -63, -508, -33, -508, + -508, -508, 223, -18, -508, -289, -508, -508, -5, -4, + -508, -508, -508, 40, 643, -508, -508, 158, -508, -85, + -508, -463, -95, -20, 173, 74, -141, -508, -508, -322, + 456, -133, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -257 +#define YYTABLE_NINF -259 static const yytype_int16 yytable[] = { - 6, 771, 200, 203, 97, 165, 614, 201, 861, 484, - 357, 226, 113, 624, 313, 138, 169, 607, 171, 172, - 111, 382, 137, 176, 235, 236, 237, 238, 239, 98, - 241, 242, 243, 303, 173, 174, 73, 173, 174, 248, - 249, 659, 588, 252, 253, 104, 255, 567, 654, 595, - 596, 597, 598, 599, 600, 379, 281, 173, 174, 255, - 185, 601, 99, 609, 227, 256, 575, 577, 583, 284, - 285, 286, 287, 288, 289, 819, 602, 255, 348, 922, - 231, 626, 255, 97, 97, 173, 174, 584, 229, 255, - 602, 240, 100, 923, 173, 174, 783, 169, 171, 172, - 176, 784, 255, 250, 251, 164, 781, 487, 828, 625, - 228, 489, 490, 491, 492, 493, 101, 427, 428, 429, - 226, 925, 660, 226, 205, 1, 2, 3, 255, 455, - 564, 383, 483, 169, 486, 169, 358, 430, 112, 187, - 876, 102, 279, 103, 442, 443, 444, 943, 815, 105, - 445, 149, 296, 989, 191, 397, 511, 512, 106, 553, - 554, 555, 556, 562, 185, 107, 833, 114, 816, 312, - 338, 820, 115, 227, 350, 315, 227, 185, 185, 185, - 185, 185, 185, 480, 189, 293, 480, 446, 834, 231, - 116, 97, 231, 195, 6, 117, 898, 229, 802, 175, - 229, 255, 606, 608, 436, 118, 230, 119, 788, 657, - 188, 190, 790, 186, 791, 822, 792, 793, 794, 228, - 985, 932, 228, 196, 480, 193, 387, 388, 389, 206, - 149, 650, 390, -239, 655, 194, -239, 447, 173, 174, - 406, 255, 173, 174, 407, 255, 161, 162, 163, 255, - 197, 448, 244, 255, 246, 247, 449, 290, 351, 774, - 998, 450, 296, 651, 999, 378, 198, 480, 1006, 391, - 581, 778, 1007, 386, 424, 173, 174, 425, 559, 560, - 652, 408, 185, 864, -256, -124, 976, 417, 199, 354, - 978, 908, 909, 910, 376, 651, 245, 6, 362, 480, - 494, 495, 97, 319, 377, 320, 321, 322, 409, 254, - 559, 560, 777, 283, 396, 230, 6, 290, 230, 392, - 297, 158, 159, 160, 301, 161, 162, 163, 177, 304, - 993, 410, 178, 393, 994, 173, 174, 302, 394, 305, - 477, 656, 495, 477, 310, 411, 311, 1002, 309, 10, - 412, 578, 579, 580, 817, 413, 1005, 97, 200, 376, - 501, 502, 316, 590, 324, 6, 318, 328, 934, 179, - 559, 560, 326, 327, 452, 329, 149, 45, 255, 37, - 481, 477, 296, 481, 916, 396, 330, 898, 331, 396, - 396, 396, 396, 396, 602, 803, 97, 334, 565, 500, - 566, 332, 333, 508, 335, 873, 336, 359, 120, 121, - 122, 123, 337, 140, 563, 339, 55, 340, 341, 180, - 611, 481, 569, 57, 477, 915, 570, 480, 770, 342, - 376, 6, 343, 181, 355, 97, 344, 452, 182, 97, - 363, 356, 364, 183, 452, 452, 452, 452, 452, 452, - 604, 398, 621, 113, 563, 418, 477, -255, 452, 620, - 480, 111, 814, 419, 403, 156, 157, 158, 159, 160, - 420, 161, 162, 163, 173, 174, 452, 967, 905, 906, - 907, 422, 908, 909, 910, 563, 432, 396, 930, 423, - 433, 434, 440, 651, 354, 441, 481, 498, 482, 503, - 488, 510, 585, 508, 938, 84, 587, 435, 559, 560, - 859, 589, 437, 594, 439, 612, 45, 615, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 616, - 280, 623, 571, 571, 571, 319, 898, 320, 557, 558, - 772, 653, 495, 974, 773, 55, 775, 776, 782, 354, - 785, 569, 57, 559, 560, 574, 796, 455, 797, 821, - 573, 573, 573, 602, 799, 818, 801, 824, 827, 112, - 97, 829, 480, 778, 477, 860, 862, 604, 865, 7, - 8, 9, 10, 452, 11, 866, 879, 868, 991, 823, - 869, 354, 825, 826, 870, 563, 877, 874, 563, 878, - 452, 486, 880, 881, 882, 911, 912, 477, 917, 919, - 920, 931, 831, 936, 927, 563, 980, 935, 857, 937, - 968, 345, 346, 942, 969, 903, 904, 905, 906, 907, - 804, 908, 909, 910, 970, 403, 971, 300, 19, 975, - 173, 174, 831, 977, 979, 981, 982, 481, 992, 995, - 996, 606, 769, 1000, 1001, 480, 875, 353, 814, 814, - 814, 814, 805, 814, 806, 929, 913, 966, 28, 592, - 438, 480, 593, 307, 800, 571, 867, 147, 148, 571, - 308, 571, 45, 571, 571, 571, 613, 149, 582, 405, - 403, 807, 0, 768, 0, 808, 809, 0, 0, 810, - 0, 811, 787, 573, 789, 812, 0, 573, 0, 573, - 0, 573, 573, 573, 421, 0, 0, 0, 798, 0, - 480, 55, 145, 146, 147, 148, 0, 569, 57, 477, - 0, 576, 0, 500, 149, 0, 0, 0, 0, 918, - 0, 814, 814, 814, 814, 814, 814, 814, 814, 814, - 814, 814, 814, 814, 814, 814, 814, 814, 814, 814, - 0, 0, 0, 0, 0, 480, 0, 0, 0, 481, - 0, 507, 0, 0, 831, 0, 156, 157, 158, 159, - 160, 888, 161, 162, 163, 0, 0, 0, 887, 0, - 0, 0, 568, 814, 0, 0, 0, 883, 884, 885, - 886, 0, 889, 892, 893, 894, 895, 896, 897, 0, - 452, 563, 477, 0, 0, 0, 0, 898, 0, 0, - 0, 154, 155, 156, 157, 158, 159, 160, 477, 161, - 162, 163, 0, 0, 0, 814, 617, 618, 619, 0, - 622, 0, 143, 144, 145, 146, 147, 148, 0, 0, - 0, 0, 481, 0, 0, 831, 149, 939, 940, 941, - 508, 0, 353, 0, 0, 0, 0, 0, 481, 173, - 174, 507, 0, 0, 0, 0, 0, 477, 0, 964, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, - 954, 955, 956, 957, 958, 959, 960, 961, 962, 0, - 0, 900, 901, 902, 563, 0, 903, 904, 905, 906, - 907, 45, 908, 909, 910, 0, 0, 481, 0, 0, - 831, 0, 477, 0, 831, 779, 0, 353, 0, 0, - 0, 0, 983, 0, 0, 0, 0, 0, 987, 0, - 988, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 55, 161, 162, 163, 0, 0, 569, 57, 0, 0, - 0, 0, 481, 0, 831, 1003, 1004, 0, 831, 353, - 0, 0, 0, 0, 997, 0, 0, 456, 457, 458, - 10, 831, 459, 40, 0, 0, 460, 0, 0, 0, - 831, 0, 0, 0, 835, 836, 837, 838, 839, 840, - 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, - 851, 852, 853, 854, 855, 0, 858, 0, 0, 41, - 0, 42, 43, 44, 45, 461, 0, 47, 462, 0, - 0, 48, 0, 0, 0, 0, 463, 49, 0, 0, - 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, - 464, 0, 0, 0, 0, 0, 465, 0, 53, 54, - 466, 0, 467, 55, 0, 0, 468, 0, 0, 56, - 57, 58, 0, 0, 59, 0, 60, 456, 457, 458, - 10, 0, 459, 40, 0, 0, 832, 0, 0, 469, - 0, 0, 0, 470, 0, 0, 0, 471, 0, 472, - 0, 0, 0, 473, 990, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 41, - 0, 42, 43, 44, 45, 461, 149, 47, 462, 896, - 897, 48, 0, 0, 0, 0, 463, 49, 0, 898, - 872, 0, 0, 50, 51, 52, 0, 0, 0, 0, - 464, 0, 894, 895, 896, 897, 465, 0, 53, 54, - 466, 0, 467, 55, 898, 0, 468, 0, 0, 56, - 57, 58, 0, 0, 59, 0, 60, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 914, 0, 0, 469, - 0, 0, 0, 470, 921, 0, 0, 471, 0, 472, - 0, 0, 0, 473, 0, 0, 0, 0, 0, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 0, 161, 162, 163, 0, 0, 0, 349, 903, 904, - 905, 906, 907, 0, 908, 909, 910, 0, 507, 0, + 6, 614, 166, 778, 98, 237, 238, 239, 240, 241, + 360, 243, 244, 245, 490, 139, 202, 205, 112, 113, + 250, 251, 165, 461, 254, 255, 489, 621, 492, 228, + 203, 105, 661, 305, 387, 73, 595, 631, 666, 174, + 175, 174, 175, 602, 603, 604, 605, 606, 607, 99, + 517, 518, 573, 559, 560, 561, 562, 616, 608, 229, + 186, 384, 100, 114, 493, 138, 174, 175, 495, 496, + 497, 498, 499, 609, 230, 633, 37, 283, 101, 150, + 102, 316, 257, 257, 98, 98, 103, 231, 232, 826, + 286, 287, 288, 289, 290, 291, 104, 613, 106, 174, + 175, 258, 351, 788, 609, 121, 122, 123, 124, 929, + 141, 581, 583, 174, 175, 432, 433, 434, 174, 175, + 429, 589, -241, 430, 930, -241, 657, 107, 667, 108, + 257, 257, 233, 570, 632, 242, 435, 361, 165, 228, + 590, 190, 228, 281, 593, 388, 822, 252, 253, 790, + 791, 187, 341, 823, 781, 115, 827, 402, 785, 996, + 116, -258, 174, 175, 422, 186, 196, 664, 315, 229, + 905, 568, 229, 841, 318, 162, 163, 164, 186, 186, + 186, 186, 186, 186, 230, 207, 295, 230, 840, 1, + 2, 3, 98, 809, 868, 6, 353, 231, 232, 117, + 231, 232, 188, 584, 585, 586, 441, 174, 175, 411, + 829, 118, 615, 412, 292, 354, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 442, 282, 119, + 178, 120, 233, 662, 179, 233, 392, 393, 394, 192, + 413, 257, 395, 486, 795, 194, 486, 257, 797, 257, + 798, 257, 799, 800, 801, 383, 915, 916, 917, 257, + 835, 500, 501, 391, 587, 307, 932, 414, 950, 257, + 992, 180, 195, 257, 186, 174, 175, 257, 1005, 396, + 871, 357, 198, 322, 486, 323, 563, 564, 1006, 6, + 365, 415, 1013, 199, 98, 200, 1014, 382, 507, 508, + 201, 565, 566, 663, 501, 416, 247, 401, 658, 6, + 417, 565, 566, 609, 810, 418, 883, 45, -126, 256, + 348, 349, 181, 565, 566, 659, 285, 292, 486, 299, + 397, 150, 483, 303, 306, 483, 182, 313, 381, 308, + 314, 183, 10, 327, 398, 331, 184, 257, 337, 399, + 98, 332, 333, 334, 824, 335, 356, 55, 6, 923, + 486, 941, 336, 575, 57, 338, 366, 202, 339, 458, + 340, 150, 342, 483, 343, 487, 344, 345, 487, 346, + 401, 597, 905, 347, 401, 401, 401, 401, 401, 410, + 359, 98, 362, 571, 506, 572, 367, 939, 514, 403, + 423, 428, 880, 424, 777, 381, 425, -257, 427, 569, + 922, 437, 439, 618, 426, 438, 487, 483, 577, 577, + 577, 157, 158, 159, 160, 161, 6, 162, 163, 164, + 98, 446, 447, 458, 322, 98, 323, 324, 325, 488, + 458, 458, 458, 458, 458, 458, 611, 509, 628, 483, + 569, 494, 974, 461, 458, 112, 113, 821, 504, 516, + 591, 594, 983, 159, 160, 161, 985, 162, 163, 164, + 596, 658, 458, 513, 912, 913, 914, 381, 915, 916, + 917, 569, 85, 401, 601, 937, 565, 566, 784, 486, + 357, 619, 487, 622, 574, 905, 623, 492, 627, 514, + 114, 945, 176, 630, 660, 501, 1000, 780, 783, 779, + 1001, 782, 658, 189, 191, 789, 792, 803, 448, 449, + 450, 804, 486, 1009, 451, 825, 197, 565, 566, 866, + 609, 831, 1012, 208, 836, 174, 175, 834, 785, 624, + 625, 626, 869, 629, 867, 872, 875, 613, 873, 876, + 981, 877, 884, 885, 881, 357, 246, 886, 248, 249, + 887, 452, 577, 828, 888, 356, 577, 889, 577, 919, + 577, 577, 577, 918, 513, 924, 98, 45, 483, 926, + 927, 934, 938, 943, 611, 910, 911, 912, 913, 914, + 458, 915, 916, 917, 944, 998, 942, 949, 357, 976, + 975, 977, 569, 978, 982, 569, 986, 458, 984, 987, + 988, 483, 453, 989, 806, 999, 808, 55, 1002, 838, + 1003, 1007, 569, 575, 57, 864, 454, 576, 786, 1008, + 356, 455, 776, 302, 882, 936, 456, 920, 973, 830, + 310, 304, 832, 833, 486, 599, 444, 807, 620, 838, + 600, 588, 311, 312, 487, 775, 874, 0, 0, 0, + 0, 0, 0, 821, 821, 821, 821, 319, 821, 0, + 0, 321, 0, 356, 0, 0, 0, 329, 330, 0, + 0, 0, 0, 0, 170, 0, 172, 173, 0, 0, + 0, 177, 0, 0, 0, 174, 175, 0, 842, 843, + 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, + 854, 855, 856, 857, 858, 859, 860, 861, 862, 0, + 865, 0, 0, 0, 0, 0, 925, 486, 0, 0, + 0, 0, 0, 483, 372, 373, 0, 45, 0, 358, + 506, 0, 0, 486, 0, 0, 821, 821, 821, 821, + 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, + 821, 821, 821, 821, 821, 0, 170, 172, 173, 177, + 408, 41, 0, 42, 43, 44, 487, 55, 0, 47, + 0, 838, 0, 575, 57, 0, 0, 580, 895, 49, + 0, 0, 486, 0, 0, 50, 51, 52, 821, 0, + 174, 175, 170, 0, 170, 0, 0, 0, 0, 0, + 53, 54, 0, 440, 0, 0, 483, 458, 569, 0, + 443, 298, 445, 0, 58, 0, 0, 59, 0, 60, + 0, 0, 483, 0, 0, 0, 0, 486, 894, 0, + 821, 0, 45, 0, 879, 0, 0, 0, 0, 0, + 897, 898, 899, 900, 901, 902, 903, 904, 0, 487, + 0, 0, 838, 0, 0, 0, 905, 514, 0, 0, + 0, 0, 0, 0, 0, 487, 0, 0, 579, 579, + 579, 483, 55, 0, 0, 0, 971, 0, 575, 57, + 921, 0, 582, 0, 0, 0, 0, 0, 928, 143, + 144, 145, 146, 147, 148, 149, 0, 946, 947, 948, + 0, 569, 0, 0, 150, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 487, 0, 483, 838, 0, 0, + 0, 838, 298, 897, 898, 899, 900, 901, 902, 903, + 904, 0, 513, 0, 0, 994, 0, 995, 991, 905, + 906, 907, 908, 909, 408, 0, 910, 911, 912, 913, + 914, 0, 915, 916, 917, 0, 0, 0, 0, 487, + 0, 838, 1010, 1011, 0, 838, 0, 890, 891, 892, + 893, 972, 896, 0, 146, 147, 148, 149, 838, 0, + 0, 0, 0, 0, 0, 979, 150, 838, 0, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 408, + 162, 163, 164, 0, 0, 0, 0, 0, 0, 0, + 0, 794, 579, 796, 0, 0, 579, 0, 579, 0, + 579, 579, 579, 906, 907, 908, 909, 805, 0, 910, + 911, 912, 913, 914, 0, 915, 916, 917, 0, 0, + 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, + 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, + 961, 962, 963, 964, 965, 966, 967, 968, 969, 0, + 0, 0, 0, 0, 155, 156, 157, 158, 159, 160, + 161, 0, 162, 163, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 903, 904, 905, 906, 907, 0, 908, - 909, 910, 0, 0, 0, 0, 0, 0, 0, 661, - 662, 663, 664, 665, 666, 667, 668, 965, 669, 670, - 671, 672, 673, 674, 675, 676, 677, 678, 679, 0, - 0, 972, 0, 0, 0, 680, 681, 682, 683, 684, - 685, 686, 687, 688, 689, 690, 691, 692, 693, 0, - 0, 694, 695, 696, 697, 698, 699, 700, 701, 702, - 703, 704, 0, 705, 0, 706, 707, 708, 709, 710, - 711, 712, 713, 714, 715, 716, 717, 0, 0, 0, - 718, 0, 719, 0, 720, 721, 722, 723, 724, 725, - 726, 727, 728, 729, 730, 731, 0, 732, 733, 734, - 735, 736, 737, 738, 0, 739, 740, 741, 742, 743, - 0, 0, 0, 744, 745, 746, 747, 748, 749, 750, - 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, - 761, 762, 763, 764, 933, 765, 766, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 669, 670, 671, 672, - 673, 674, 675, 676, 677, 678, 679, 0, 0, 0, - 0, 0, 0, 680, 681, 682, 683, 684, 685, 686, - 687, 688, 689, 690, 691, 692, 693, 0, 0, 694, - 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, - 0, 705, 0, 706, 707, 708, 709, 710, 711, 712, - 713, 714, 715, 716, 717, 0, 0, 0, 718, 0, - 719, 0, 720, 721, 722, 723, 724, 725, 726, 727, - 728, 729, 730, 731, 0, 732, 733, 734, 735, 736, - 737, 738, 0, 739, 740, 741, 742, 743, 0, 0, - 0, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 0, 0, 990, 668, 669, 670, 671, 672, 673, 674, + 675, 0, 676, 677, 678, 679, 680, 681, 682, 683, + 684, 685, 686, 0, 0, 0, 0, 0, 0, 687, + 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, + 698, 699, 700, 0, 1004, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 0, 712, 0, 713, + 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, + 724, 0, 0, 0, 725, 0, 726, 0, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 0, 737, + 738, 0, 739, 740, 741, 742, 743, 744, 745, 0, + 746, 747, 748, 749, 750, 0, 0, 0, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 763, 764, 0, 765, 766, 7, 8, 9, 10, 0, - 11, 124, 0, 0, 0, 0, 0, 0, 41, 0, - 42, 43, 44, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, - 0, 0, 50, 170, 52, 0, 0, 125, 149, 126, - 127, 128, 45, 46, 0, 129, 18, 53, 54, 48, - 0, 0, 0, 0, 19, 130, 0, 0, 0, 0, - 58, 131, 132, 52, 0, 60, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 133, 134, 26, 0, - 27, 55, 0, 0, 28, 0, 0, 56, 57, 135, - 0, 0, 59, 0, 136, 456, 457, 458, 10, 0, - 459, 40, 0, 0, 0, 0, 0, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, - 0, 36, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 0, 161, 162, 163, 0, 41, 0, 42, - 43, 44, 45, 461, 0, 47, 462, 0, 0, 48, - 0, 0, 0, 0, 463, 49, 0, 0, 0, 0, - 0, 50, 51, 52, 0, 0, 0, 0, 464, 0, - 0, 0, 0, 0, 465, 0, 53, 54, 466, 0, - 467, 55, 0, 0, 468, 0, 0, 56, 57, 58, - 0, 0, 59, 0, 60, 7, 8, 9, 10, 0, - 11, 12, 0, 0, 0, 0, 0, 469, 0, 0, - 0, 470, 0, 0, 0, 471, 0, 472, 0, 0, - 0, 473, 0, 0, 0, 0, 0, 0, 0, 0, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 940, + 772, 773, 668, 669, 670, 671, 672, 673, 674, 675, + 0, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 0, 0, 0, 0, 0, 0, 687, 688, + 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 0, 0, 701, 702, 703, 704, 705, 706, + 707, 708, 709, 710, 711, 0, 712, 0, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, + 0, 0, 0, 725, 0, 726, 0, 727, 728, 729, + 730, 731, 732, 733, 734, 735, 736, 0, 737, 738, + 0, 739, 740, 741, 742, 743, 744, 745, 0, 746, + 747, 748, 749, 750, 0, 0, 0, 751, 752, 753, + 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, + 764, 765, 766, 767, 768, 769, 770, 771, 0, 772, + 773, 462, 463, 464, 10, 0, 465, 40, 0, 0, + 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 898, 899, 900, 901, 902, + 903, 904, 41, 0, 42, 43, 44, 0, 0, 0, + 905, 0, 0, 41, 0, 42, 43, 44, 45, 467, + 0, 47, 468, 0, 997, 48, 50, 171, 52, 0, + 469, 49, 0, 0, 0, 0, 0, 50, 51, 52, + 0, 53, 54, 0, 470, 0, 0, 0, 0, 0, + 471, 0, 53, 54, 472, 58, 0, 473, 55, 0, + 60, 474, 0, 0, 56, 57, 58, 0, 0, 59, + 0, 60, 462, 463, 464, 10, 0, 465, 40, 0, + 0, 839, 0, 115, 475, 0, 0, 0, 476, 0, + 0, 0, 477, 0, 478, 907, 908, 909, 479, 0, + 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, + 0, 0, 0, 0, 41, 0, 42, 43, 44, 45, + 467, 0, 47, 468, 0, 0, 48, 0, 0, 0, + 0, 469, 49, 0, 0, 0, 0, 0, 50, 51, + 52, 0, 0, 0, 0, 470, 0, 0, 0, 0, + 0, 471, 0, 53, 54, 472, 0, 0, 473, 55, + 0, 0, 474, 0, 0, 56, 57, 58, 0, 0, + 59, 0, 60, 7, 8, 9, 10, 0, 11, 125, + 0, 148, 149, 0, 0, 475, 0, 0, 0, 476, + 0, 150, 0, 477, 0, 478, 0, 0, 0, 479, + 0, 0, 144, 145, 146, 147, 148, 149, 0, 0, + 0, 0, 0, 0, 0, 126, 150, 127, 128, 129, + 45, 46, 0, 130, 18, 0, 0, 48, 0, 0, + 0, 0, 19, 131, 0, 0, 0, 0, 0, 132, + 133, 52, 0, 0, 0, 0, 23, 0, 0, 0, + 0, 0, 0, 0, 134, 135, 26, 0, 0, 27, + 55, 0, 0, 28, 0, 0, 56, 57, 136, 0, + 0, 59, 0, 137, 462, 463, 464, 10, 0, 465, + 40, 157, 158, 159, 160, 161, 31, 162, 163, 164, + 32, 33, 0, 0, 34, 0, 35, 0, 0, 0, + 36, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 0, 162, 163, 164, 0, 41, 0, 42, 43, + 44, 45, 467, 0, 47, 468, 0, 0, 48, 0, + 0, 0, 0, 469, 49, 0, 0, 0, 0, 0, + 50, 51, 52, 0, 0, 0, 0, 470, 0, 0, + 0, 0, 0, 471, 0, 53, 54, 472, 0, 0, + 473, 55, 0, 0, 474, 0, 0, 56, 57, 58, + 296, 0, 59, 0, 60, 7, 8, 9, 10, 0, + 11, 12, 0, 0, 0, 0, 0, 475, 0, 0, + 0, 476, 0, 0, 0, 477, 0, 478, 0, 0, + 0, 479, 0, 0, 0, 0, 41, 0, 42, 43, + 44, 0, 0, 0, 0, 0, 0, 13, 0, 14, + 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, + 50, 171, 52, 0, 19, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 0, 53, 54, 0, 23, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 58, + 0, 27, 0, 0, 60, 28, 7, 8, 9, 10, + 29, 11, 12, 0, 0, 30, 0, 7, 8, 9, + 10, 0, 11, 12, 0, 0, 0, 0, 31, 0, + 0, 0, 32, 33, 0, 0, 34, 0, 35, 0, + 280, 0, 36, 0, 0, 0, 0, 0, 13, 0, + 14, 15, 16, 0, 0, 0, 17, 18, 0, 13, + 0, 14, 15, 16, 0, 19, 20, 17, 18, 0, + 903, 904, 21, 22, 0, 0, 19, 20, 0, 23, + 905, 0, 0, 21, 22, 0, 0, 24, 25, 26, + 23, 0, 27, 0, 0, 0, 28, 0, 24, 25, + 26, 29, 0, 27, 0, 0, 30, 28, 0, 0, + 0, 409, 29, 0, 0, 0, 0, 30, 0, 31, + 0, 0, 510, 32, 33, 0, 0, 34, 0, 35, + 31, 0, 0, 36, 32, 33, 0, 0, 34, 0, + 35, 0, 0, 0, 36, 7, 8, 9, 10, 0, + 11, 12, 0, 0, 0, 0, 7, 8, 9, 10, + 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, + 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 41, 0, - 42, 43, 44, 0, 0, 0, 166, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 167, 35, 0, 278, - 0, 36, 50, 168, 52, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 41, 404, - 42, 43, 44, 0, 0, 0, 0, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 282, 35, 0, 0, - 0, 36, 50, 170, 52, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 0, 504, - 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 0, 35, 0, 856, - 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 0, 871, - 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 0, 35, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 0, 21, 22, 0, 0, 0, 0, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 7, 8, 9, 10, 29, - 11, 12, 0, 0, 30, 0, 0, 0, 41, 0, - 42, 43, 44, 0, 0, 0, 166, 31, 0, 0, - 0, 32, 33, 0, 0, 34, 167, 35, 0, 963, - 0, 36, 50, 168, 52, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 53, 54, 0, - 0, 0, 0, 0, 19, 20, 0, 0, 0, 0, - 58, 21, 22, 0, 0, 60, 0, 0, 23, 0, - 294, 0, 0, 0, 0, 0, 24, 25, 26, 0, - 27, 0, 0, 0, 28, 0, 0, 0, 107, 29, - 0, 0, 0, 0, 30, 0, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 0, 41, 31, 42, 43, - 44, 32, 33, 149, 0, 34, 0, 35, 0, 0, - 0, 36, 141, 142, 143, 144, 145, 146, 147, 148, - 50, 170, 52, 0, 0, 0, 0, 0, 149, 0, - 0, 0, 0, 0, 0, 53, 54, 0, 513, 514, - 515, 516, 517, 518, 519, 520, 0, 0, 58, 0, - 0, 0, 0, 60, 521, 0, 522, 523, 524, 525, - 526, 527, 528, 529, 530, 531, 532, 533, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 534, 0, 0, + 15, 16, 0, 0, 0, 17, 18, 0, 13, 0, + 14, 15, 16, 0, 19, 20, 17, 18, 0, 0, + 0, 21, 22, 0, 0, 19, 20, 0, 23, 0, + 0, 0, 21, 22, 0, 0, 24, 25, 26, 23, + 0, 27, 0, 0, 0, 28, 0, 24, 25, 26, + 29, 0, 27, 0, 0, 30, 28, 7, 8, 9, + 10, 29, 11, 12, 0, 0, 30, 0, 31, 0, + 0, 878, 32, 33, 0, 0, 34, 0, 35, 31, + 863, 0, 36, 32, 33, 0, 0, 34, 41, 35, + 42, 43, 44, 36, 0, 0, 167, 0, 0, 13, + 0, 14, 15, 16, 0, 0, 168, 17, 18, 0, + 0, 0, 50, 169, 52, 0, 19, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 0, 53, 54, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 58, 0, 27, 0, 0, 60, 28, 7, 8, + 9, 10, 29, 11, 12, 0, 0, 30, 0, 7, + 8, 9, 10, 0, 11, 0, 0, 0, 0, 108, + 31, 0, 0, 0, 32, 33, 0, 0, 34, 0, + 35, 0, 970, 0, 36, 0, 0, 0, 0, 0, + 13, 0, 14, 15, 16, 0, 0, 0, 17, 18, + 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, + 811, 0, 0, 0, 21, 22, 0, 0, 19, 0, + 0, 23, 0, 144, 145, 146, 147, 148, 149, 24, + 25, 26, 0, 0, 27, 0, 0, 150, 28, 0, + 0, 0, 812, 29, 0, 813, 0, 0, 30, 28, + 0, 142, 143, 144, 145, 146, 147, 148, 149, 0, + 0, 31, 0, 0, 0, 32, 33, 150, 0, 34, + 0, 35, 814, 0, 0, 36, 815, 816, 0, 0, + 817, 0, 818, 0, 0, 0, 819, 142, 143, 144, + 145, 146, 147, 148, 149, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 0, 0, 142, 143, 144, 145, + 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 0, 162, 163, 164, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 0, 162, 163, 164, 0, 0, 0, 352, + 142, 143, 144, 145, 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 0, 161, 162, - 163, 535, 0, 0, 926, 0, 0, 0, 0, 0, - 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 0, 161, 162, 163, 207, 208, 0, 986, - 0, 0, 0, 536, 0, 0, 537, 0, 538, 539, - 540, 541, 542, 543, 544, 545, 546, 547, 548, 0, - 549, 550, 0, 0, 551, 0, 0, 0, 0, 0, - 0, 0, 209, 41, 0, 42, 43, 44, 45, 210, - 0, 47, 0, 0, 0, 48, 211, 212, 213, 0, - 0, 49, 0, 0, 0, 0, 214, 50, 51, 52, - 0, 0, 215, 207, 208, 0, 216, 0, 0, 0, - 217, 0, 53, 54, 0, 218, 0, 55, 0, 0, - 0, 0, 0, 219, 57, 58, 0, 220, 59, 221, - 60, 0, 0, 0, 0, 222, 0, 0, 0, 209, - 41, 0, 42, 43, 44, 45, 210, 0, 47, 0, - 0, 223, 48, 211, 212, 213, 0, 0, 49, 0, - 0, 0, 0, 214, 50, 51, 52, 0, 0, 215, - 207, 208, 0, 216, 0, 0, 0, 217, 0, 53, - 54, 0, 218, 0, 55, 0, 0, 0, 0, 0, - 219, 57, 58, 0, 220, 59, 221, 60, 141, 142, - 143, 144, 145, 146, 147, 148, 209, 41, 0, 42, - 43, 44, 45, 306, 149, 47, 0, 0, 223, 48, - 211, 212, 213, 0, 0, 49, 0, 0, 0, 0, - 214, 50, 51, 52, 0, 0, 215, 0, 0, 0, - 216, 0, 0, 0, 217, 0, 53, 54, 0, 218, - 0, 55, 0, 0, 0, 0, 0, 219, 57, 58, - 0, 220, 59, 221, 60, 141, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, - 0, 149, 0, 0, 0, 223, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 347, 0, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 0, 161, - 162, 163, 141, 142, 143, 144, 145, 146, 147, 148, - 0, 0, 0, 0, 0, 0, 0, 0, 149, 141, - 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, - 0, 0, 0, 0, 0, 149, 141, 142, 143, 144, - 145, 146, 147, 148, 0, 0, 0, 0, 0, 0, - 0, 509, 149, 0, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 0, 161, 162, 163, 627, - 628, 629, 630, 631, 632, 633, 634, 0, 0, 0, - 0, 0, 0, 0, 0, 635, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, - 0, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 0, 161, 162, 163, 924, 0, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 0, 0, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 0, 161, 162, 163, - 890, 891, 892, 893, 894, 895, 896, 897, 0, 0, - 0, 0, 0, 0, 0, 0, 898, 0, 636, 637, - 638, 639, 640, 641, 642, 643, 644, 645, 646, 0, - 647, 648, 649, 890, 891, 892, 893, 894, 895, 896, - 897, 0, 0, 0, 0, 0, 0, 0, 0, 898, - 891, 892, 893, 894, 895, 896, 897, 0, 0, 0, - 0, 0, 0, 0, 0, 898, 143, 144, 145, 146, - 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, - 149, 143, 144, 145, 146, 147, 148, 0, 0, 0, - 0, 0, 0, 0, 0, 149, 0, 984, 0, 899, - 900, 901, 902, 0, 0, 903, 904, 905, 906, 907, - 0, 908, 909, 910, 143, 144, 145, 146, 147, 148, - 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, - 0, 0, 899, 900, 901, 902, 0, 0, 903, 904, - 905, 906, 907, 0, 908, 909, 910, 0, 0, 900, - 901, 902, 0, 0, 903, 904, 905, 906, 907, 0, - 908, 909, 910, 0, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 0, 161, 162, 163, 0, 0, - 0, 153, 154, 155, 156, 157, 158, 159, 160, 0, - 161, 162, 163, 892, 893, 894, 895, 896, 897, 0, - 0, 0, 0, 0, 0, 0, 0, 898, 892, 893, - 894, 895, 896, 897, 0, 154, 155, 156, 157, 158, - 159, 160, 898, 161, 162, 163, 892, 893, 894, 895, - 896, 897, 0, 0, 0, 74, 0, 0, 0, 0, - 898, 0, 0, 0, 0, 0, 0, 0, 75, 0, - 0, 0, 0, 76, 0, 0, 77, 0, 0, 0, - 0, 0, 0, 0, 78, 79, 0, 80, 0, 0, - 0, 81, 82, 83, 0, 0, 0, 0, -2, 0, - 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, - 86, 0, 901, 902, 0, 0, 903, 904, 905, 906, - 907, 87, 908, 909, 910, 0, 0, 0, 902, 0, - 0, 903, 904, 905, 906, 907, 0, 908, 909, 910, - 365, 74, 0, 0, 0, 0, 0, 0, 0, 903, - 904, 905, 906, 907, 75, 908, 909, 910, 0, 76, - 367, 368, 77, 0, 0, 0, 0, 0, 0, 0, - 78, 79, 0, 80, 0, 0, 0, 81, 82, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, - 0, 0, 85, 0, 0, 0, 86, 41, 0, 42, - 43, 44, 369, 370, 0, 47, 0, 87, 0, 0, - 0, 0, 0, 0, 0, 49, 367, 368, 0, 0, - 0, 50, 51, 52, 0, 0, 40, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 371, 0, 58, - 0, 0, 59, 41, 60, 42, 43, 44, 0, 0, - 0, 47, 41, 0, 42, 43, 44, 45, 46, 0, - 47, 49, 0, 0, 48, 0, 0, 50, 51, 52, - 49, 0, 40, 0, 0, 0, 50, 51, 52, 0, + 154, 155, 156, 157, 158, 159, 160, 161, 0, 162, + 163, 164, 0, 0, 0, 933, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, + 164, 0, 0, 0, 993, 519, 520, 521, 522, 523, + 524, 525, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 527, 0, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 540, 0, 370, 0, 0, 0, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 0, 162, 163, 164, 371, 0, 0, 541, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 209, 210, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 542, 0, 0, 543, 0, 544, 545, 546, 547, + 548, 549, 550, 551, 552, 553, 554, 0, 555, 556, + 211, 41, 557, 42, 43, 44, 45, 212, 0, 47, + 0, 0, 0, 48, 213, 214, 215, 0, 0, 49, + 0, 0, 0, 0, 216, 50, 51, 52, 0, 0, + 217, 0, 209, 210, 218, 0, 0, 0, 219, 0, + 53, 54, 0, 220, 0, 0, 55, 0, 0, 0, + 0, 0, 221, 57, 58, 0, 222, 59, 223, 60, + 0, 0, 0, 0, 224, 0, 0, 0, 211, 41, + 0, 42, 43, 44, 45, 212, 0, 47, 0, 0, + 225, 48, 213, 214, 215, 0, 0, 49, 0, 0, + 0, 0, 216, 50, 51, 52, 0, 0, 217, 0, + 209, 210, 218, 0, 0, 0, 219, 0, 53, 54, + 0, 220, 0, 0, 55, 0, 0, 0, 0, 0, + 221, 57, 58, 0, 222, 59, 223, 60, 142, 143, + 144, 145, 146, 147, 148, 149, 211, 41, 0, 42, + 43, 44, 45, 309, 150, 47, 0, 0, 225, 48, + 213, 214, 215, 0, 0, 49, 0, 0, 0, 0, + 216, 50, 51, 52, 0, 0, 217, 0, 0, 0, + 218, 0, 0, 0, 219, 0, 53, 54, 0, 220, + 0, 0, 55, 0, 0, 0, 0, 0, 221, 57, + 58, 0, 222, 59, 223, 60, 142, 143, 144, 145, + 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 0, 0, 0, 225, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 350, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 0, + 162, 163, 164, 142, 143, 144, 145, 146, 147, 148, + 149, 0, 0, 0, 0, 0, 0, 0, 0, 150, + 142, 143, 144, 145, 146, 147, 148, 149, 0, 0, + 0, 0, 0, 0, 0, 0, 150, 0, 142, 143, + 144, 145, 146, 147, 148, 149, 0, 0, 0, 0, + 0, 0, 0, 515, 150, 0, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, + 164, 634, 635, 636, 637, 638, 639, 640, 641, 0, + 0, 0, 0, 0, 0, 0, 0, 642, 144, 145, + 146, 147, 148, 149, 0, 0, 0, 0, 0, 793, + 0, 0, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 0, 162, 163, 164, 931, 0, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 0, 162, 163, 164, 0, 0, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 0, + 162, 163, 164, 899, 900, 901, 902, 903, 904, 0, + 0, 0, 0, 0, 0, 0, 0, 905, 0, 0, + 0, 643, 644, 645, 646, 647, 648, 649, 650, 651, + 652, 653, 0, 654, 655, 656, 0, 0, 0, 154, + 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, + 164, 144, 145, 146, 147, 148, 149, 0, 0, 0, + 0, 0, 0, 0, 0, 150, 899, 900, 901, 902, + 903, 904, 0, 0, 0, 0, 0, 0, 0, 0, + 905, 899, 900, 901, 902, 903, 904, 0, 0, 0, + 0, 0, 0, 0, 0, 905, 0, 0, 0, 0, + 0, 0, 907, 908, 909, 0, 0, 910, 911, 912, + 913, 914, 0, 915, 916, 917, 899, 900, 901, 902, + 903, 904, 0, 0, 0, 0, 0, 0, 0, 0, + 905, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 155, 156, 157, 158, 159, 160, 161, + 0, 162, 163, 164, 0, 0, 908, 909, 0, -2, + 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, + 0, 0, 909, 0, 0, 910, 911, 912, 913, 914, + 0, 915, 916, 917, 901, 902, 903, 904, 0, 0, + 0, 0, 0, 0, 0, 0, 905, 0, 0, 0, + 0, 0, 74, 41, 0, 42, 43, 44, 0, 0, + 910, 911, 912, 913, 914, 75, 915, 916, 917, 0, + 76, 0, 0, 77, 0, 0, 0, 50, 171, 52, + 0, 78, 79, 0, 80, 0, 372, 373, 81, 82, + 83, 0, 53, 54, 0, 0, 0, 84, 0, 0, + 85, 0, 0, 0, 86, 0, 58, 0, 87, 0, + 0, 60, 0, 0, 0, 0, 0, 0, 0, 88, + 0, 0, 0, 41, 0, 42, 43, 44, 374, 375, + 0, 47, 0, 0, 116, 0, 910, 911, 912, 913, + 914, 49, 915, 916, 917, 0, 40, 50, 51, 52, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, - 0, 53, 54, 0, 0, 58, 55, 0, 59, 0, - 60, 0, 56, 57, 58, 0, 0, 59, 41, 60, - 42, 43, 44, 45, 314, 0, 47, 0, 0, 0, - 48, 0, 0, 0, 0, 0, 49, 0, 40, 0, - 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, - 0, 0, 55, 41, 0, 42, 43, 44, 56, 57, - 58, 0, 0, 59, 41, 60, 42, 43, 44, 45, - 0, 0, 47, 0, 0, 0, 48, 50, 170, 52, - 0, 0, 49, 0, 108, 0, 0, 0, 50, 51, - 52, 0, 53, 54, 0, 0, 0, 0, 0, 0, - 0, 610, 0, 53, 54, 58, 0, 0, 55, 0, - 60, 0, 0, 0, 56, 57, 58, 0, 0, 59, - 41, 60, 42, 43, 44, 45, 0, 0, 47, 0, - 0, 0, 48, 114, 0, 0, 0, 0, 49, 0, - 40, 0, 0, 0, 50, 51, 52, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 54, 0, 0, 0, 55, 41, 0, 42, 43, 44, - 109, 57, 58, 0, 0, 59, 41, 60, 42, 43, - 44, 45, 0, 0, 47, 0, 0, 0, 48, 50, - 170, 52, 0, 0, 49, 0, 0, 0, 0, 0, - 50, 51, 52, 0, 53, 54, 0, 0, 0, 0, - 0, 74, 0, 0, 0, 53, 54, 58, 0, 0, - 55, 0, 60, 0, 75, 0, 56, 57, 58, 76, - 0, 59, 77, 60, 0, 0, 0, 0, 74, 0, - 78, 79, 0, 80, 0, 115, 0, 81, 82, 83, - 0, 75, 0, 0, 0, 0, 76, 0, 84, 77, - 0, 0, 85, 0, 0, 74, 86, 78, 79, 0, - 80, 0, 0, 0, 81, 82, 83, 87, 75, 0, - 0, 0, 0, 76, 0, 84, 77, 0, 0, 85, - 0, 0, 74, 86, 78, 79, 426, 80, 0, 0, - 0, 81, 82, 83, 87, 75, 0, 0, 0, 0, - 76, 0, 84, 77, 0, 0, 85, 0, 0, 0, - 86, 78, 79, 496, 80, 0, 0, 0, 81, 82, - 83, 87, 0, 0, 0, 0, 0, 0, 0, 84, - 0, 0, 41, 85, 42, 43, 44, 86, 0, 0, - 586, 0, 0, 0, 0, 0, 0, 0, 87, 0, - 0, 0, 0, 0, 0, 0, 50, 170, 52, 0, - 0, 0, 74, 0, 0, 0, 0, 795, 0, 0, - 0, 53, 54, 0, 0, 75, 0, 0, 0, 0, - 76, 0, 0, 77, 58, 0, 0, 0, 0, 60, - 0, 78, 79, 0, 80, 0, 0, 0, 81, 82, - 83, 0, 0, 0, 0, 0, 0, 0, 0, 84, - 0, 0, 118, 85, 0, 0, 0, 86 + 0, 0, 0, 0, 376, 0, 58, 0, 0, 59, + 0, 60, 41, 0, 42, 43, 44, 45, 46, 0, + 47, 0, 0, 0, 48, 0, 0, 0, 0, 0, + 49, 0, 0, 40, 0, 0, 50, 51, 52, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 53, 54, 0, 0, 0, 0, 55, 41, 0, + 42, 43, 44, 56, 57, 58, 0, 0, 59, 41, + 60, 42, 43, 44, 45, 317, 0, 47, 0, 0, + 0, 48, 50, 171, 52, 0, 0, 49, 0, 0, + 40, 0, 0, 50, 51, 52, 0, 53, 54, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, + 0, 58, 0, 0, 55, 0, 60, 0, 0, 0, + 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, + 44, 45, 0, 0, 47, 0, 0, 0, 48, 119, + 0, 0, 0, 0, 49, 0, 0, 109, 0, 0, + 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 617, 0, 53, 54, 0, 0, 0, + 0, 55, 41, 0, 42, 43, 44, 56, 57, 58, + 167, 0, 59, 41, 60, 42, 43, 44, 45, 0, + 168, 47, 0, 0, 0, 48, 50, 169, 52, 0, + 0, 49, 0, 0, 40, 0, 0, 50, 51, 52, + 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 53, 54, 0, 58, 0, 0, 55, 41, + 60, 42, 43, 44, 110, 57, 58, 0, 0, 59, + 41, 60, 42, 43, 44, 45, 0, 284, 47, 0, + 0, 0, 48, 50, 171, 52, 0, 0, 49, 0, + 0, 0, 0, 0, 50, 51, 52, 0, 53, 54, + 0, 0, 0, 0, 0, 0, 74, 0, 0, 53, + 54, 0, 58, 0, 0, 55, 0, 60, 0, 75, + 0, 56, 57, 58, 76, 0, 59, 77, 60, 0, + 0, 0, 0, 0, 74, 78, 79, 0, 80, 0, + 0, 0, 81, 82, 83, 0, 0, 75, 0, 0, + 0, 84, 76, 0, 85, 77, 0, 0, 86, 0, + 0, 0, 87, 78, 79, 0, 80, 74, 0, 0, + 81, 82, 83, 88, 0, 0, 0, 0, 0, 84, + 75, 0, 85, 0, 0, 76, 86, 0, 77, 0, + 87, 0, 368, 0, 0, 74, 78, 79, 0, 80, + 0, 88, 0, 81, 82, 83, 0, 0, 75, 0, + 0, 0, 84, 76, 0, 85, 77, 0, 0, 86, + 431, 0, 0, 87, 78, 79, 0, 80, 74, 0, + 0, 81, 82, 83, 88, 0, 0, 0, 0, 0, + 84, 75, 0, 85, 0, 0, 76, 86, 0, 77, + 0, 87, 0, 502, 0, 0, 0, 78, 79, 0, + 80, 0, 88, 0, 81, 82, 83, 41, 0, 42, + 43, 44, 0, 84, 0, 0, 85, 0, 0, 0, + 86, 592, 0, 0, 87, 0, 0, 0, 0, 0, + 0, 50, 171, 52, 0, 88, 0, 74, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, + 75, 0, 0, 0, 802, 76, 0, 0, 77, 0, + 58, 0, 0, 0, 0, 60, 78, 79, 0, 80, + 0, 0, 0, 81, 82, 83, 0, 0, 0, 0, + 0, 0, 84, 0, 0, 85, 0, 0, 0, 86, + 0, 0, 0, 87 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-646))) + (!!((Yystate) == (-508))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 504, 84, 85, 5, 46, 465, 84, 653, 384, - 297, 91, 23, 12, 212, 35, 51, 455, 53, 54, - 23, 10, 35, 58, 99, 100, 101, 102, 103, 125, - 105, 106, 107, 195, 8, 9, 0, 8, 9, 114, - 115, 495, 438, 118, 119, 116, 108, 422, 486, 445, - 446, 447, 448, 449, 450, 307, 165, 8, 9, 108, - 61, 111, 125, 459, 91, 127, 428, 429, 108, 178, - 179, 180, 181, 182, 183, 111, 126, 108, 127, 77, - 91, 477, 108, 84, 85, 8, 9, 127, 91, 108, - 126, 104, 125, 91, 8, 9, 127, 132, 133, 134, - 135, 127, 108, 116, 117, 6, 560, 386, 127, 108, - 91, 390, 391, 392, 393, 394, 125, 79, 80, 81, - 200, 127, 497, 203, 75, 104, 105, 106, 108, 380, - 417, 120, 383, 168, 385, 170, 298, 99, 23, 110, - 785, 125, 162, 125, 8, 9, 10, 127, 602, 125, - 14, 29, 187, 127, 110, 317, 407, 408, 125, 410, - 411, 412, 413, 415, 165, 125, 625, 125, 606, 210, - 245, 609, 125, 200, 283, 216, 203, 178, 179, 180, - 181, 182, 183, 381, 107, 186, 384, 51, 626, 200, - 125, 192, 203, 107, 195, 116, 29, 200, 594, 56, - 203, 108, 453, 455, 366, 125, 91, 125, 570, 488, - 67, 68, 574, 107, 576, 611, 578, 579, 580, 200, - 127, 866, 203, 80, 422, 125, 8, 9, 10, 86, - 29, 482, 14, 107, 486, 125, 110, 101, 8, 9, - 10, 108, 8, 9, 14, 108, 124, 125, 126, 108, - 110, 115, 109, 108, 111, 112, 120, 126, 127, 510, - 127, 125, 297, 110, 127, 306, 110, 465, 127, 51, - 432, 4, 127, 314, 108, 8, 9, 111, 125, 126, - 127, 51, 283, 658, 107, 116, 931, 110, 110, 290, - 935, 124, 125, 126, 305, 110, 125, 298, 299, 497, - 125, 126, 303, 107, 305, 109, 110, 111, 78, 127, - 125, 126, 127, 120, 315, 200, 317, 126, 203, 101, - 110, 120, 121, 122, 8, 124, 125, 126, 10, 107, - 975, 101, 14, 115, 979, 8, 9, 194, 120, 116, - 381, 125, 126, 384, 125, 115, 125, 992, 205, 6, - 120, 79, 80, 81, 606, 125, 1001, 358, 440, 370, - 107, 108, 219, 440, 109, 366, 223, 127, 871, 51, - 125, 126, 229, 230, 375, 127, 29, 50, 108, 2, - 381, 422, 417, 384, 822, 386, 127, 29, 127, 390, - 391, 392, 393, 394, 126, 127, 397, 117, 418, 400, - 420, 127, 127, 404, 127, 780, 127, 110, 31, 32, - 33, 34, 127, 36, 415, 127, 89, 127, 127, 101, - 461, 422, 95, 96, 465, 821, 99, 625, 503, 117, - 441, 432, 127, 115, 291, 436, 127, 438, 120, 440, - 108, 128, 108, 125, 445, 446, 447, 448, 449, 450, - 451, 125, 472, 464, 455, 125, 497, 107, 459, 472, - 658, 464, 601, 127, 321, 118, 119, 120, 121, 122, - 125, 124, 125, 126, 8, 9, 477, 915, 120, 121, - 122, 125, 124, 125, 126, 486, 107, 488, 863, 130, - 108, 8, 117, 110, 495, 108, 497, 128, 120, 125, - 120, 120, 108, 504, 879, 90, 111, 364, 125, 126, - 127, 111, 369, 120, 371, 116, 50, 125, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 116, - 163, 127, 427, 428, 429, 107, 29, 109, 110, 111, - 128, 127, 126, 928, 108, 89, 127, 130, 108, 560, - 127, 95, 96, 125, 126, 99, 8, 818, 109, 610, - 427, 428, 429, 126, 587, 108, 589, 125, 127, 464, - 581, 51, 780, 4, 625, 125, 108, 588, 130, 3, - 4, 5, 6, 594, 8, 127, 125, 128, 973, 612, - 127, 602, 615, 616, 128, 606, 127, 130, 609, 127, - 611, 862, 116, 125, 116, 130, 108, 658, 117, 127, - 117, 127, 623, 109, 125, 626, 117, 127, 648, 109, - 125, 254, 255, 127, 127, 118, 119, 120, 121, 122, - 54, 124, 125, 126, 125, 502, 125, 192, 62, 127, - 8, 9, 653, 128, 127, 127, 117, 658, 127, 125, - 125, 912, 502, 127, 127, 863, 782, 290, 807, 808, - 809, 810, 86, 812, 88, 862, 818, 912, 92, 440, - 370, 879, 441, 203, 588, 570, 744, 19, 20, 574, - 203, 576, 50, 578, 579, 580, 464, 29, 433, 322, - 557, 115, -1, 501, -1, 119, 120, -1, -1, 123, - -1, 125, 569, 570, 571, 129, -1, 574, -1, 576, - -1, 578, 579, 580, 347, -1, -1, -1, 585, -1, - 928, 89, 17, 18, 19, 20, -1, 95, 96, 780, - -1, 99, -1, 744, 29, -1, -1, -1, -1, 824, - -1, 890, 891, 892, 893, 894, 895, 896, 897, 898, - 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, - -1, -1, -1, -1, -1, 973, -1, -1, -1, 780, - -1, 404, -1, -1, 785, -1, 118, 119, 120, 121, - 122, 811, 124, 125, 126, -1, -1, -1, 811, -1, - -1, -1, 425, 942, -1, -1, -1, 807, 808, 809, - 810, -1, 812, 15, 16, 17, 18, 19, 20, -1, - 821, 822, 863, -1, -1, -1, -1, 29, -1, -1, - -1, 116, 117, 118, 119, 120, 121, 122, 879, 124, - 125, 126, -1, -1, -1, 984, 469, 470, 471, -1, - 473, -1, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, 863, -1, -1, 866, 29, 880, 881, 882, - 871, -1, 495, -1, -1, -1, -1, -1, 879, 8, - 9, 504, -1, -1, -1, -1, -1, 928, -1, 909, - 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, - 900, 901, 902, 903, 904, 905, 906, 907, 908, -1, - -1, 113, 114, 115, 915, -1, 118, 119, 120, 121, - 122, 50, 124, 125, 126, -1, -1, 928, -1, -1, - 931, -1, 973, -1, 935, 558, -1, 560, -1, -1, - -1, -1, 942, -1, -1, -1, -1, -1, 968, -1, - 970, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 89, 124, 125, 126, -1, -1, 95, 96, -1, -1, - -1, -1, 973, -1, 975, 995, 996, -1, 979, 602, - -1, -1, -1, -1, 984, -1, -1, 3, 4, 5, - 6, 992, 8, 9, -1, -1, 12, -1, -1, -1, - 1001, -1, -1, -1, 627, 628, 629, 630, 631, 632, - 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, - 643, 644, 645, 646, 647, -1, 649, -1, -1, 45, - -1, 47, 48, 49, 50, 51, -1, 53, 54, -1, - -1, 57, -1, -1, -1, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, 71, -1, -1, -1, -1, - 76, -1, -1, -1, -1, -1, 82, -1, 84, 85, - 86, -1, 88, 89, -1, -1, 92, -1, -1, 95, - 96, 97, -1, -1, 100, -1, 102, 3, 4, 5, - 6, -1, 8, 9, -1, -1, 12, -1, -1, 115, - -1, -1, -1, 119, -1, -1, -1, 123, -1, 125, - -1, -1, -1, 129, 971, -1, -1, -1, -1, -1, - 13, 14, 15, 16, 17, 18, 19, 20, -1, 45, - -1, 47, 48, 49, 50, 51, 29, 53, 54, 19, - 20, 57, -1, -1, -1, -1, 62, 63, -1, 29, - 773, -1, -1, 69, 70, 71, -1, -1, -1, -1, - 76, -1, 17, 18, 19, 20, 82, -1, 84, 85, - 86, -1, 88, 89, 29, -1, 92, -1, -1, 95, - 96, 97, -1, -1, 100, -1, 102, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 819, -1, -1, 115, - -1, -1, -1, 119, 827, -1, -1, 123, -1, 125, - -1, -1, -1, 129, -1, -1, -1, -1, -1, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - -1, 124, 125, 126, -1, -1, -1, 130, 118, 119, - 120, 121, 122, -1, 124, 125, 126, -1, 871, -1, + 1, 461, 46, 510, 5, 100, 101, 102, 103, 104, + 299, 106, 107, 108, 389, 35, 85, 86, 23, 23, + 115, 116, 6, 385, 119, 120, 388, 471, 390, 92, + 85, 117, 492, 196, 10, 0, 444, 12, 501, 8, + 9, 8, 9, 451, 452, 453, 454, 455, 456, 126, + 412, 413, 427, 415, 416, 417, 418, 465, 112, 92, + 61, 310, 126, 23, 391, 35, 8, 9, 395, 396, + 397, 398, 399, 127, 92, 483, 2, 166, 126, 29, + 126, 214, 109, 109, 85, 86, 126, 92, 92, 112, + 179, 180, 181, 182, 183, 184, 126, 459, 126, 8, + 9, 128, 128, 566, 127, 31, 32, 33, 34, 77, + 36, 433, 434, 8, 9, 79, 80, 81, 8, 9, + 109, 109, 108, 112, 92, 111, 488, 126, 503, 126, + 109, 109, 92, 422, 109, 105, 100, 300, 6, 202, + 128, 108, 205, 163, 128, 121, 609, 117, 118, 128, + 128, 108, 247, 613, 516, 126, 616, 320, 4, 128, + 126, 108, 8, 9, 111, 166, 108, 494, 212, 202, + 29, 420, 205, 633, 218, 125, 126, 127, 179, 180, + 181, 182, 183, 184, 202, 75, 187, 205, 632, 105, + 106, 107, 193, 601, 660, 196, 285, 202, 202, 126, + 205, 205, 111, 79, 80, 81, 369, 8, 9, 10, + 618, 117, 461, 14, 127, 128, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 370, 164, 126, + 10, 126, 202, 492, 14, 205, 8, 9, 10, 111, + 51, 109, 14, 386, 576, 126, 389, 109, 580, 109, + 582, 109, 584, 585, 586, 309, 125, 126, 127, 109, + 128, 126, 127, 317, 437, 201, 128, 78, 128, 109, + 128, 51, 126, 109, 285, 8, 9, 109, 128, 51, + 665, 292, 111, 108, 427, 110, 111, 112, 128, 300, + 301, 102, 128, 111, 305, 111, 128, 308, 108, 109, + 126, 126, 127, 126, 127, 116, 126, 318, 111, 320, + 121, 126, 127, 127, 128, 126, 792, 50, 117, 128, + 256, 257, 102, 126, 127, 128, 121, 127, 471, 111, + 102, 29, 386, 8, 108, 389, 116, 126, 308, 117, + 126, 121, 6, 110, 116, 128, 126, 109, 118, 121, + 361, 128, 128, 128, 613, 128, 292, 90, 369, 829, + 503, 878, 128, 96, 97, 128, 109, 446, 128, 380, + 128, 29, 128, 427, 128, 386, 128, 118, 389, 128, + 391, 446, 29, 128, 395, 396, 397, 398, 399, 325, + 129, 402, 111, 423, 405, 425, 109, 873, 409, 126, + 126, 131, 787, 128, 509, 375, 126, 108, 126, 420, + 828, 108, 8, 467, 350, 109, 427, 471, 432, 433, + 434, 119, 120, 121, 122, 123, 437, 125, 126, 127, + 441, 118, 109, 444, 108, 446, 110, 111, 112, 121, + 451, 452, 453, 454, 455, 456, 457, 126, 478, 503, + 461, 121, 922, 825, 465, 470, 470, 608, 129, 121, + 109, 112, 938, 121, 122, 123, 942, 125, 126, 127, + 112, 111, 483, 409, 121, 122, 123, 447, 125, 126, + 127, 492, 91, 494, 121, 870, 126, 127, 128, 632, + 501, 117, 503, 126, 430, 29, 117, 869, 478, 510, + 470, 886, 56, 128, 128, 127, 982, 109, 131, 129, + 986, 128, 111, 67, 68, 109, 128, 8, 8, 9, + 10, 110, 665, 999, 14, 109, 80, 126, 127, 128, + 127, 126, 1008, 87, 51, 8, 9, 128, 4, 475, + 476, 477, 109, 479, 126, 131, 129, 919, 128, 128, + 935, 129, 128, 128, 131, 566, 110, 126, 112, 113, + 117, 51, 576, 617, 126, 501, 580, 117, 582, 109, + 584, 585, 586, 131, 510, 118, 587, 50, 632, 128, + 118, 126, 128, 110, 595, 119, 120, 121, 122, 123, + 601, 125, 126, 127, 110, 980, 128, 128, 609, 128, + 126, 126, 613, 126, 128, 616, 128, 618, 129, 118, + 128, 665, 102, 118, 594, 128, 596, 90, 126, 630, + 126, 128, 633, 96, 97, 655, 116, 100, 564, 128, + 566, 121, 508, 193, 789, 869, 126, 825, 919, 619, + 205, 195, 622, 623, 787, 446, 375, 595, 470, 660, + 447, 438, 205, 207, 665, 507, 751, -1, -1, -1, + -1, -1, -1, 814, 815, 816, 817, 221, 819, -1, + -1, 225, -1, 609, -1, -1, -1, 231, 232, -1, + -1, -1, -1, -1, 51, -1, 53, 54, -1, -1, + -1, 58, -1, -1, -1, 8, 9, -1, 634, 635, + 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, + 646, 647, 648, 649, 650, 651, 652, 653, 654, -1, + 656, -1, -1, -1, -1, -1, 831, 870, -1, -1, + -1, -1, -1, 787, 8, 9, -1, 50, -1, 293, + 751, -1, -1, 886, -1, -1, 897, 898, 899, 900, + 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, + 911, 912, 913, 914, 915, -1, 133, 134, 135, 136, + 324, 45, -1, 47, 48, 49, 787, 90, -1, 53, + -1, 792, -1, 96, 97, -1, -1, 100, 818, 63, + -1, -1, 935, -1, -1, 69, 70, 71, 949, -1, + 8, 9, 169, -1, 171, -1, -1, -1, -1, -1, + 84, 85, -1, 367, -1, -1, 870, 828, 829, -1, + 374, 188, 376, -1, 98, -1, -1, 101, -1, 103, + -1, -1, 886, -1, -1, -1, -1, 980, 818, -1, + 991, -1, 50, -1, 780, -1, -1, -1, -1, -1, + 13, 14, 15, 16, 17, 18, 19, 20, -1, 870, + -1, -1, 873, -1, -1, -1, 29, 878, -1, -1, + -1, -1, -1, -1, -1, 886, -1, -1, 432, 433, + 434, 935, 90, -1, -1, -1, 916, -1, 96, 97, + 826, -1, 100, -1, -1, -1, -1, -1, 834, 14, + 15, 16, 17, 18, 19, 20, -1, 887, 888, 889, + -1, 922, -1, -1, 29, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 935, -1, 980, 938, -1, -1, + -1, 942, 299, 13, 14, 15, 16, 17, 18, 19, + 20, -1, 878, -1, -1, 975, -1, 977, 111, 29, + 113, 114, 115, 116, 508, -1, 119, 120, 121, 122, + 123, -1, 125, 126, 127, -1, -1, -1, -1, 980, + -1, 982, 1002, 1003, -1, 986, -1, 814, 815, 816, + 817, 917, 819, -1, 17, 18, 19, 20, 999, -1, + -1, -1, -1, -1, -1, 931, 29, 1008, -1, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 563, + 125, 126, 127, -1, -1, -1, -1, -1, -1, -1, + -1, 575, 576, 577, -1, -1, 580, -1, 582, -1, + 584, 585, 586, 113, 114, 115, 116, 591, -1, 119, + 120, 121, 122, 123, -1, 125, 126, 127, -1, -1, + -1, -1, -1, -1, -1, 422, -1, -1, -1, -1, + 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, + 907, 908, 909, 910, 911, 912, 913, 914, 915, -1, + -1, -1, -1, -1, 117, 118, 119, 120, 121, 122, + 123, -1, 125, 126, 127, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 118, 119, 120, 121, 122, -1, 124, - 125, 126, -1, -1, -1, -1, -1, -1, -1, 3, - 4, 5, 6, 7, 8, 9, 10, 910, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, - -1, 924, -1, -1, -1, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, - -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, -1, 57, -1, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, - 74, -1, 76, -1, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, -1, 91, 92, 93, - 94, 95, 96, 97, -1, 99, 100, 101, 102, 103, - -1, -1, -1, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 3, 4, 5, - 6, 7, 8, 9, 10, -1, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, -1, -1, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - -1, 57, -1, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, -1, -1, -1, 74, -1, - 76, -1, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, - 96, 97, -1, 99, 100, 101, 102, 103, -1, -1, - -1, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, -1, 129, 130, 3, 4, 5, 6, -1, - 8, 9, -1, -1, -1, -1, -1, -1, 45, -1, - 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, - -1, -1, 69, 70, 71, -1, -1, 45, 29, 47, - 48, 49, 50, 51, -1, 53, 54, 84, 85, 57, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - 97, 69, 70, 71, -1, 102, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, 89, -1, -1, 92, -1, -1, 95, 96, 97, - -1, -1, 100, -1, 102, 3, 4, 5, 6, -1, - 8, 9, -1, -1, -1, -1, -1, 115, -1, -1, - -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, - -1, 129, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, -1, 45, -1, 47, - 48, 49, 50, 51, -1, 53, 54, -1, -1, 57, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, 71, -1, -1, -1, -1, 76, -1, - -1, -1, -1, -1, 82, -1, 84, 85, 86, -1, - 88, 89, -1, -1, 92, -1, -1, 95, 96, 97, - -1, -1, 100, -1, 102, 3, 4, 5, 6, -1, - 8, 9, -1, -1, -1, -1, -1, 115, -1, -1, - -1, 119, -1, -1, -1, 123, -1, 125, -1, -1, - -1, 129, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 949, 3, 4, 5, 6, 7, 8, 9, + 10, -1, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, -1, 991, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, -1, -1, -1, 74, -1, 76, -1, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, + 90, -1, 92, 93, 94, 95, 96, 97, 98, -1, + 100, 101, 102, 103, 104, -1, -1, -1, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 3, 4, 5, 6, 7, 8, 9, 10, + -1, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, 57, -1, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, -1, -1, 74, -1, 76, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, + -1, 92, 93, 94, 95, 96, 97, 98, -1, 100, + 101, 102, 103, 104, -1, -1, -1, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, -1, 130, + 131, 3, 4, 5, 6, -1, 8, 9, -1, -1, + 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 14, 15, 16, 17, 18, + 19, 20, 45, -1, 47, 48, 49, -1, -1, -1, + 29, -1, -1, 45, -1, 47, 48, 49, 50, 51, + -1, 53, 54, -1, 978, 57, 69, 70, 71, -1, + 62, 63, -1, -1, -1, -1, -1, 69, 70, 71, + -1, 84, 85, -1, 76, -1, -1, -1, -1, -1, + 82, -1, 84, 85, 86, 98, -1, 89, 90, -1, + 103, 93, -1, -1, 96, 97, 98, -1, -1, 101, + -1, 103, 3, 4, 5, 6, -1, 8, 9, -1, + -1, 12, -1, 126, 116, -1, -1, -1, 120, -1, + -1, -1, 124, -1, 126, 114, 115, 116, 130, -1, + 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, + -1, -1, -1, -1, 45, -1, 47, 48, 49, 50, + 51, -1, 53, 54, -1, -1, 57, -1, -1, -1, + -1, 62, 63, -1, -1, -1, -1, -1, 69, 70, + 71, -1, -1, -1, -1, 76, -1, -1, -1, -1, + -1, 82, -1, 84, 85, 86, -1, -1, 89, 90, + -1, -1, 93, -1, -1, 96, 97, 98, -1, -1, + 101, -1, 103, 3, 4, 5, 6, -1, 8, 9, + -1, 19, 20, -1, -1, 116, -1, -1, -1, 120, + -1, 29, -1, 124, -1, 126, -1, -1, -1, 130, + -1, -1, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, 45, 29, 47, 48, 49, + 50, 51, -1, 53, 54, -1, -1, 57, -1, -1, + -1, -1, 62, 63, -1, -1, -1, -1, -1, 69, + 70, 71, -1, -1, -1, -1, 76, -1, -1, -1, + -1, -1, -1, -1, 84, 85, 86, -1, -1, 89, + 90, -1, -1, 93, -1, -1, 96, 97, 98, -1, + -1, 101, -1, 103, 3, 4, 5, 6, -1, 8, + 9, 119, 120, 121, 122, 123, 116, 125, 126, 127, + 120, 121, -1, -1, 124, -1, 126, -1, -1, -1, + 130, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, -1, 125, 126, 127, -1, 45, -1, 47, 48, + 49, 50, 51, -1, 53, 54, -1, -1, 57, -1, + -1, -1, -1, 62, 63, -1, -1, -1, -1, -1, + 69, 70, 71, -1, -1, -1, -1, 76, -1, -1, + -1, -1, -1, 82, -1, 84, 85, 86, -1, -1, + 89, 90, -1, -1, 93, -1, -1, 96, 97, 98, + 9, -1, 101, -1, 103, 3, 4, 5, 6, -1, + 8, 9, -1, -1, -1, -1, -1, 116, -1, -1, + -1, 120, -1, -1, -1, 124, -1, 126, -1, -1, + -1, 130, -1, -1, -1, -1, 45, -1, 47, 48, + 49, -1, -1, -1, -1, -1, -1, 45, -1, 47, + 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, + 69, 70, 71, -1, 62, 63, -1, -1, -1, -1, + -1, 69, 70, -1, -1, 84, 85, -1, 76, -1, + -1, -1, -1, -1, -1, -1, 84, 85, 86, 98, + -1, 89, -1, -1, 103, 93, 3, 4, 5, 6, + 98, 8, 9, -1, -1, 103, -1, 3, 4, 5, + 6, -1, 8, 9, -1, -1, -1, -1, 116, -1, + -1, -1, 120, 121, -1, -1, 124, -1, 126, -1, + 128, -1, 130, -1, -1, -1, -1, -1, 45, -1, + 47, 48, 49, -1, -1, -1, 53, 54, -1, 45, + -1, 47, 48, 49, -1, 62, 63, 53, 54, -1, + 19, 20, 69, 70, -1, -1, 62, 63, -1, 76, + 29, -1, -1, 69, 70, -1, -1, 84, 85, 86, + 76, -1, 89, -1, -1, -1, 93, -1, 84, 85, + 86, 98, -1, 89, -1, -1, 103, 93, -1, -1, + -1, 108, 98, -1, -1, -1, -1, 103, -1, 116, + -1, -1, 108, 120, 121, -1, -1, 124, -1, 126, + 116, -1, -1, 130, 120, 121, -1, -1, 124, -1, + 126, -1, -1, -1, 130, 3, 4, 5, 6, -1, + 8, 9, -1, -1, -1, -1, 3, 4, 5, 6, + -1, 8, 9, -1, -1, -1, -1, -1, -1, -1, + 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, 45, -1, - 47, 48, 49, -1, -1, -1, 53, 115, -1, -1, - -1, 119, 120, -1, -1, 123, 63, 125, -1, 127, - -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, 45, 107, - 47, 48, 49, -1, -1, -1, -1, 115, -1, -1, - -1, 119, 120, -1, -1, 123, 63, 125, -1, -1, - -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, -1, 107, - -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, - -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, - -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, - -1, 119, 120, -1, -1, 123, -1, 125, -1, 127, - -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, -1, 107, - -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, - -1, 119, 120, -1, -1, 123, -1, 125, -1, -1, - -1, 129, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, -1, -1, -1, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, 3, 4, 5, 6, 97, - 8, 9, -1, -1, 102, -1, -1, -1, 45, -1, - 47, 48, 49, -1, -1, -1, 53, 115, -1, -1, - -1, 119, 120, -1, -1, 123, 63, 125, -1, 127, - -1, 129, 69, 70, 71, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, 84, 85, -1, - -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, - 97, 69, 70, -1, -1, 102, -1, -1, 76, -1, - 9, -1, -1, -1, -1, -1, 84, 85, 86, -1, - 88, -1, -1, -1, 92, -1, -1, -1, 125, 97, - -1, -1, -1, -1, 102, -1, -1, 13, 14, 15, - 16, 17, 18, 19, 20, -1, 45, 115, 47, 48, - 49, 119, 120, 29, -1, 123, -1, 125, -1, -1, - -1, 129, 13, 14, 15, 16, 17, 18, 19, 20, - 69, 70, 71, -1, -1, -1, -1, -1, 29, -1, - -1, -1, -1, -1, -1, 84, 85, -1, 13, 14, - 15, 16, 17, 18, 19, 20, -1, -1, 97, -1, - -1, -1, -1, 102, 29, -1, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, - -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, -1, 124, 125, - 126, 76, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, 8, 9, -1, 130, - -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, - 125, 126, -1, -1, 129, -1, -1, -1, -1, -1, - -1, -1, 44, 45, -1, 47, 48, 49, 50, 51, - -1, 53, -1, -1, -1, 57, 58, 59, 60, -1, - -1, 63, -1, -1, -1, -1, 68, 69, 70, 71, - -1, -1, 74, 8, 9, -1, 78, -1, -1, -1, - 82, -1, 84, 85, -1, 87, -1, 89, -1, -1, - -1, -1, -1, 95, 96, 97, -1, 99, 100, 101, - 102, -1, -1, -1, -1, 107, -1, -1, -1, 44, - 45, -1, 47, 48, 49, 50, 51, -1, 53, -1, - -1, 123, 57, 58, 59, 60, -1, -1, 63, -1, - -1, -1, -1, 68, 69, 70, 71, -1, -1, 74, - 8, 9, -1, 78, -1, -1, -1, 82, -1, 84, - 85, -1, 87, -1, 89, -1, -1, -1, -1, -1, - 95, 96, 97, -1, 99, 100, 101, 102, 13, 14, + 48, 49, -1, -1, -1, 53, 54, -1, 45, -1, + 47, 48, 49, -1, 62, 63, 53, 54, -1, -1, + -1, 69, 70, -1, -1, 62, 63, -1, 76, -1, + -1, -1, 69, 70, -1, -1, 84, 85, 86, 76, + -1, 89, -1, -1, -1, 93, -1, 84, 85, 86, + 98, -1, 89, -1, -1, 103, 93, 3, 4, 5, + 6, 98, 8, 9, -1, -1, 103, -1, 116, -1, + -1, 108, 120, 121, -1, -1, 124, -1, 126, 116, + 128, -1, 130, 120, 121, -1, -1, 124, 45, 126, + 47, 48, 49, 130, -1, -1, 53, -1, -1, 45, + -1, 47, 48, 49, -1, -1, 63, 53, 54, -1, + -1, -1, 69, 70, 71, -1, 62, 63, -1, -1, + -1, -1, -1, 69, 70, -1, -1, 84, 85, -1, + 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, + 86, 98, -1, 89, -1, -1, 103, 93, 3, 4, + 5, 6, 98, 8, 9, -1, -1, 103, -1, 3, + 4, 5, 6, -1, 8, -1, -1, -1, -1, 126, + 116, -1, -1, -1, 120, 121, -1, -1, 124, -1, + 126, -1, 128, -1, 130, -1, -1, -1, -1, -1, + 45, -1, 47, 48, 49, -1, -1, -1, 53, 54, + -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, + 54, -1, -1, -1, 69, 70, -1, -1, 62, -1, + -1, 76, -1, 15, 16, 17, 18, 19, 20, 84, + 85, 86, -1, -1, 89, -1, -1, 29, 93, -1, + -1, -1, 86, 98, -1, 89, -1, -1, 103, 93, + -1, 13, 14, 15, 16, 17, 18, 19, 20, -1, + -1, 116, -1, -1, -1, 120, 121, 29, -1, 124, + -1, 126, 116, -1, -1, 130, 120, 121, -1, -1, + 124, -1, 126, -1, -1, -1, 130, 13, 14, 15, + 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, + -1, -1, -1, 29, -1, -1, 13, 14, 15, 16, + 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, + -1, -1, 29, 115, 116, 117, 118, 119, 120, 121, + 122, 123, -1, 125, 126, 127, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, -1, 125, 126, 127, -1, -1, -1, 131, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, 29, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, -1, 125, + 126, 127, -1, -1, -1, 131, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, + 127, -1, -1, -1, 131, 13, 14, 15, 16, 17, + 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, + -1, 29, -1, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 52, -1, 109, -1, -1, -1, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, -1, 125, 126, 127, 128, -1, -1, 76, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 8, 9, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 109, -1, -1, 112, -1, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, -1, 126, 127, + 44, 45, 130, 47, 48, 49, 50, 51, -1, 53, + -1, -1, -1, 57, 58, 59, 60, -1, -1, 63, + -1, -1, -1, -1, 68, 69, 70, 71, -1, -1, + 74, -1, 8, 9, 78, -1, -1, -1, 82, -1, + 84, 85, -1, 87, -1, -1, 90, -1, -1, -1, + -1, -1, 96, 97, 98, -1, 100, 101, 102, 103, + -1, -1, -1, -1, 108, -1, -1, -1, 44, 45, + -1, 47, 48, 49, 50, 51, -1, 53, -1, -1, + 124, 57, 58, 59, 60, -1, -1, 63, -1, -1, + -1, -1, 68, 69, 70, 71, -1, -1, 74, -1, + 8, 9, 78, -1, -1, -1, 82, -1, 84, 85, + -1, 87, -1, -1, 90, -1, -1, -1, -1, -1, + 96, 97, 98, -1, 100, 101, 102, 103, 13, 14, 15, 16, 17, 18, 19, 20, 44, 45, -1, 47, - 48, 49, 50, 51, 29, 53, -1, -1, 123, 57, + 48, 49, 50, 51, 29, 53, -1, -1, 124, 57, 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, 68, 69, 70, 71, -1, -1, 74, -1, -1, -1, 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, - -1, 89, -1, -1, -1, -1, -1, 95, 96, 97, - -1, 99, 100, 101, 102, 13, 14, 15, 16, 17, - 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, - -1, 29, -1, -1, -1, 123, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, -1, 124, - 125, 126, 13, 14, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, 13, - 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, 13, 14, 15, 16, + -1, -1, 90, -1, -1, -1, -1, -1, 96, 97, + 98, -1, 100, 101, 102, 103, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, - -1, 109, 29, -1, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, -1, 124, 125, 126, 13, - 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, - -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, 126, 110, -1, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, -1, -1, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, -1, 124, 125, 126, - 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, -1, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, 13, 14, 15, 16, 17, 18, 19, + -1, -1, 29, -1, -1, -1, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 111, -1, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, + 125, 126, 127, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, - 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, 29, -1, 13, 14, + 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, + -1, -1, -1, 110, 29, -1, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, + 127, 13, 14, 15, 16, 17, 18, 19, 20, -1, + -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, + 17, 18, 19, 20, -1, -1, -1, -1, -1, 109, + -1, -1, 29, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, -1, 125, 126, 127, 111, -1, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, -1, 125, 126, 127, -1, -1, -1, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, + 125, 126, 127, 15, 16, 17, 18, 19, 20, -1, + -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, -1, 125, 126, 127, -1, -1, -1, 116, + 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, + 127, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, 110, -1, 112, - 113, 114, 115, -1, -1, 118, 119, 120, 121, 122, - -1, 124, 125, 126, 15, 16, 17, 18, 19, 20, - -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 112, 113, 114, 115, -1, -1, 118, 119, - 120, 121, 122, -1, 124, 125, 126, -1, -1, 113, - 114, 115, -1, -1, 118, 119, 120, 121, 122, -1, - 124, 125, 126, -1, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, -1, 124, 125, 126, -1, -1, - -1, 115, 116, 117, 118, 119, 120, 121, 122, -1, - 124, 125, 126, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, - 17, 18, 19, 20, -1, 116, 117, 118, 119, 120, - 121, 122, 29, 124, 125, 126, 15, 16, 17, 18, - 19, 20, -1, -1, -1, 43, -1, -1, -1, -1, - 29, -1, -1, -1, -1, -1, -1, -1, 56, -1, - -1, -1, -1, 61, -1, -1, 64, -1, -1, -1, - -1, -1, -1, -1, 72, 73, -1, 75, -1, -1, - -1, 79, 80, 81, -1, -1, -1, -1, 0, -1, - -1, -1, 90, -1, -1, -1, 94, -1, -1, -1, - 98, -1, 114, 115, -1, -1, 118, 119, 120, 121, - 122, 109, 124, 125, 126, -1, -1, -1, 115, -1, - -1, 118, 119, 120, 121, 122, -1, 124, 125, 126, - 128, 43, -1, -1, -1, -1, -1, -1, -1, 118, - 119, 120, 121, 122, 56, 124, 125, 126, -1, 61, - 8, 9, 64, -1, -1, -1, -1, -1, -1, -1, - 72, 73, -1, 75, -1, -1, -1, 79, 80, 81, - -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, - -1, -1, 94, -1, -1, -1, 98, 45, -1, 47, - 48, 49, 50, 51, -1, 53, -1, 109, -1, -1, - -1, -1, -1, -1, -1, 63, 8, 9, -1, -1, - -1, 69, 70, 71, -1, -1, 9, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 95, -1, 97, - -1, -1, 100, 45, 102, 47, 48, 49, -1, -1, - -1, 53, 45, -1, 47, 48, 49, 50, 51, -1, - 53, 63, -1, -1, 57, -1, -1, 69, 70, 71, - 63, -1, 9, -1, -1, -1, 69, 70, 71, -1, + -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, + -1, -1, 114, 115, 116, -1, -1, 119, 120, 121, + 122, 123, -1, 125, 126, 127, 15, 16, 17, 18, + 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, 119, 120, 121, 122, 123, + -1, 125, 126, 127, -1, -1, 115, 116, -1, 0, + 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, + -1, -1, 116, -1, -1, 119, 120, 121, 122, 123, + -1, 125, 126, 127, 17, 18, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, + -1, -1, 43, 45, -1, 47, 48, 49, -1, -1, + 119, 120, 121, 122, 123, 56, 125, 126, 127, -1, + 61, -1, -1, 64, -1, -1, -1, 69, 70, 71, + -1, 72, 73, -1, 75, -1, 8, 9, 79, 80, + 81, -1, 84, 85, -1, -1, -1, 88, -1, -1, + 91, -1, -1, -1, 95, -1, 98, -1, 99, -1, + -1, 103, -1, -1, -1, -1, -1, -1, -1, 110, + -1, -1, -1, 45, -1, 47, 48, 49, 50, 51, + -1, 53, -1, -1, 126, -1, 119, 120, 121, 122, + 123, 63, 125, 126, 127, -1, 9, 69, 70, 71, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, -1, -1, -1, -1, - -1, 84, 85, -1, -1, 97, 89, -1, 100, -1, - 102, -1, 95, 96, 97, -1, -1, 100, 45, 102, - 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, - 57, -1, -1, -1, -1, -1, 63, -1, 9, -1, - -1, -1, 69, 70, 71, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, - -1, -1, 89, 45, -1, 47, 48, 49, 95, 96, - 97, -1, -1, 100, 45, 102, 47, 48, 49, 50, - -1, -1, 53, -1, -1, -1, 57, 69, 70, 71, - -1, -1, 63, -1, 9, -1, -1, -1, 69, 70, - 71, -1, 84, 85, -1, -1, -1, -1, -1, -1, - -1, 82, -1, 84, 85, 97, -1, -1, 89, -1, - 102, -1, -1, -1, 95, 96, 97, -1, -1, 100, - 45, 102, 47, 48, 49, 50, -1, -1, 53, -1, - -1, -1, 57, 125, -1, -1, -1, -1, 63, -1, - 9, -1, -1, -1, 69, 70, 71, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, - 85, -1, -1, -1, 89, 45, -1, 47, 48, 49, - 95, 96, 97, -1, -1, 100, 45, 102, 47, 48, - 49, 50, -1, -1, 53, -1, -1, -1, 57, 69, - 70, 71, -1, -1, 63, -1, -1, -1, -1, -1, - 69, 70, 71, -1, 84, 85, -1, -1, -1, -1, - -1, 43, -1, -1, -1, 84, 85, 97, -1, -1, - 89, -1, 102, -1, 56, -1, 95, 96, 97, 61, - -1, 100, 64, 102, -1, -1, -1, -1, 43, -1, - 72, 73, -1, 75, -1, 125, -1, 79, 80, 81, - -1, 56, -1, -1, -1, -1, 61, -1, 90, 64, - -1, -1, 94, -1, -1, 43, 98, 72, 73, -1, - 75, -1, -1, -1, 79, 80, 81, 109, 56, -1, - -1, -1, -1, 61, -1, 90, 64, -1, -1, 94, - -1, -1, 43, 98, 72, 73, 128, 75, -1, -1, - -1, 79, 80, 81, 109, 56, -1, -1, -1, -1, - 61, -1, 90, 64, -1, -1, 94, -1, -1, -1, - 98, 72, 73, 128, 75, -1, -1, -1, 79, 80, - 81, 109, -1, -1, -1, -1, -1, -1, -1, 90, - -1, -1, 45, 94, 47, 48, 49, 98, -1, -1, - 128, -1, -1, -1, -1, -1, -1, -1, 109, -1, - -1, -1, -1, -1, -1, -1, 69, 70, 71, -1, - -1, -1, 43, -1, -1, -1, -1, 128, -1, -1, - -1, 84, 85, -1, -1, 56, -1, -1, -1, -1, - 61, -1, -1, 64, 97, -1, -1, -1, -1, 102, - -1, 72, 73, -1, 75, -1, -1, -1, 79, 80, - 81, -1, -1, -1, -1, -1, -1, -1, -1, 90, - -1, -1, 125, 94, -1, -1, -1, 98 + -1, -1, -1, -1, 96, -1, 98, -1, -1, 101, + -1, 103, 45, -1, 47, 48, 49, 50, 51, -1, + 53, -1, -1, -1, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 9, -1, -1, 69, 70, 71, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 84, 85, -1, -1, -1, -1, 90, 45, -1, + 47, 48, 49, 96, 97, 98, -1, -1, 101, 45, + 103, 47, 48, 49, 50, 51, -1, 53, -1, -1, + -1, 57, 69, 70, 71, -1, -1, 63, -1, -1, + 9, -1, -1, 69, 70, 71, -1, 84, 85, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, + -1, 98, -1, -1, 90, -1, 103, -1, -1, -1, + 96, 97, 98, -1, -1, 101, 45, 103, 47, 48, + 49, 50, -1, -1, 53, -1, -1, -1, 57, 126, + -1, -1, -1, -1, 63, -1, -1, 9, -1, -1, + 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 82, -1, 84, 85, -1, -1, -1, + -1, 90, 45, -1, 47, 48, 49, 96, 97, 98, + 53, -1, 101, 45, 103, 47, 48, 49, 50, -1, + 63, 53, -1, -1, -1, 57, 69, 70, 71, -1, + -1, 63, -1, -1, 9, -1, -1, 69, 70, 71, + -1, 84, 85, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 84, 85, -1, 98, -1, -1, 90, 45, + 103, 47, 48, 49, 96, 97, 98, -1, -1, 101, + 45, 103, 47, 48, 49, 50, -1, 63, 53, -1, + -1, -1, 57, 69, 70, 71, -1, -1, 63, -1, + -1, -1, -1, -1, 69, 70, 71, -1, 84, 85, + -1, -1, -1, -1, -1, -1, 43, -1, -1, 84, + 85, -1, 98, -1, -1, 90, -1, 103, -1, 56, + -1, 96, 97, 98, 61, -1, 101, 64, 103, -1, + -1, -1, -1, -1, 43, 72, 73, -1, 75, -1, + -1, -1, 79, 80, 81, -1, -1, 56, -1, -1, + -1, 88, 61, -1, 91, 64, -1, -1, 95, -1, + -1, -1, 99, 72, 73, -1, 75, 43, -1, -1, + 79, 80, 81, 110, -1, -1, -1, -1, -1, 88, + 56, -1, 91, -1, -1, 61, 95, -1, 64, -1, + 99, -1, 129, -1, -1, 43, 72, 73, -1, 75, + -1, 110, -1, 79, 80, 81, -1, -1, 56, -1, + -1, -1, 88, 61, -1, 91, 64, -1, -1, 95, + 129, -1, -1, 99, 72, 73, -1, 75, 43, -1, + -1, 79, 80, 81, 110, -1, -1, -1, -1, -1, + 88, 56, -1, 91, -1, -1, 61, 95, -1, 64, + -1, 99, -1, 129, -1, -1, -1, 72, 73, -1, + 75, -1, 110, -1, 79, 80, 81, 45, -1, 47, + 48, 49, -1, 88, -1, -1, 91, -1, -1, -1, + 95, 129, -1, -1, 99, -1, -1, -1, -1, -1, + -1, 69, 70, 71, -1, 110, -1, 43, -1, -1, + -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, + 56, -1, -1, -1, 129, 61, -1, -1, 64, -1, + 98, -1, -1, -1, -1, 103, 72, 73, -1, 75, + -1, -1, -1, 79, 80, 81, -1, -1, -1, -1, + -1, -1, 88, -1, -1, 91, -1, -1, -1, 95, + -1, -1, -1, 99 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 104, 105, 106, 132, 133, 223, 3, 4, 5, + 0, 105, 106, 107, 133, 134, 224, 3, 4, 5, 6, 8, 9, 45, 47, 48, 49, 53, 54, 62, - 63, 69, 70, 76, 84, 85, 86, 88, 92, 97, - 102, 115, 119, 120, 123, 125, 129, 216, 217, 222, + 63, 69, 70, 76, 84, 85, 86, 89, 93, 98, + 103, 116, 120, 121, 124, 126, 130, 217, 218, 223, 9, 45, 47, 48, 49, 50, 51, 53, 57, 63, - 69, 70, 71, 84, 85, 89, 95, 96, 97, 100, - 102, 183, 186, 187, 189, 194, 195, 199, 200, 204, - 205, 206, 207, 0, 43, 56, 61, 64, 72, 73, - 75, 79, 80, 81, 90, 94, 98, 109, 136, 138, - 139, 141, 142, 143, 164, 201, 203, 223, 125, 125, - 125, 125, 125, 125, 116, 125, 125, 125, 9, 95, - 185, 199, 200, 204, 125, 125, 125, 116, 125, 125, - 216, 216, 216, 216, 9, 45, 47, 48, 49, 53, - 63, 69, 70, 84, 85, 97, 102, 186, 214, 216, - 216, 13, 14, 15, 16, 17, 18, 19, 20, 29, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 124, 125, 126, 6, 183, 53, 63, 70, 205, - 70, 205, 205, 8, 9, 221, 205, 10, 14, 51, - 101, 115, 120, 125, 182, 223, 107, 110, 221, 107, - 221, 110, 140, 125, 125, 107, 221, 110, 110, 110, - 141, 142, 165, 141, 148, 75, 221, 8, 9, 44, - 51, 58, 59, 60, 68, 74, 78, 82, 87, 95, - 99, 101, 107, 123, 153, 184, 187, 189, 194, 199, - 200, 204, 213, 214, 223, 213, 213, 213, 213, 213, - 186, 213, 213, 213, 221, 125, 221, 221, 213, 213, - 186, 186, 213, 213, 127, 108, 127, 216, 216, 216, + 69, 70, 71, 84, 85, 90, 96, 97, 98, 101, + 103, 184, 187, 188, 190, 195, 196, 200, 201, 205, + 206, 207, 208, 0, 43, 56, 61, 64, 72, 73, + 75, 79, 80, 81, 88, 91, 95, 99, 110, 137, + 139, 140, 142, 143, 144, 165, 202, 204, 224, 126, + 126, 126, 126, 126, 126, 117, 126, 126, 126, 9, + 96, 186, 200, 201, 205, 126, 126, 126, 117, 126, + 126, 217, 217, 217, 217, 9, 45, 47, 48, 49, + 53, 63, 69, 70, 84, 85, 98, 103, 187, 215, + 217, 217, 13, 14, 15, 16, 17, 18, 19, 20, + 29, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 125, 126, 127, 6, 184, 53, 63, 70, + 206, 70, 206, 206, 8, 9, 222, 206, 10, 14, + 51, 102, 116, 121, 126, 183, 224, 108, 111, 222, + 108, 222, 111, 141, 126, 126, 108, 222, 111, 111, + 111, 126, 142, 143, 166, 142, 149, 75, 222, 8, + 9, 44, 51, 58, 59, 60, 68, 74, 78, 82, + 87, 96, 100, 102, 108, 124, 154, 185, 188, 190, + 195, 200, 201, 205, 214, 215, 224, 214, 214, 214, + 214, 214, 187, 214, 214, 214, 222, 126, 222, 222, + 214, 214, 187, 187, 214, 214, 128, 109, 128, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 128, 215, 217, 183, 63, 121, 183, 183, 183, 183, + 183, 183, 127, 198, 199, 224, 9, 197, 206, 111, + 189, 191, 139, 8, 222, 134, 108, 217, 117, 51, + 154, 185, 222, 126, 126, 184, 223, 51, 184, 222, + 138, 222, 108, 110, 111, 112, 177, 110, 145, 222, + 222, 128, 128, 128, 128, 128, 128, 118, 128, 128, + 128, 214, 128, 128, 128, 118, 128, 128, 217, 217, + 111, 128, 131, 183, 128, 213, 217, 224, 222, 129, + 197, 134, 111, 192, 193, 224, 109, 109, 129, 203, + 109, 128, 8, 9, 50, 51, 96, 167, 168, 169, + 170, 205, 224, 184, 177, 150, 155, 10, 121, 156, + 146, 184, 8, 9, 10, 14, 51, 102, 116, 121, + 181, 224, 134, 126, 209, 210, 135, 136, 222, 108, + 217, 10, 14, 51, 78, 102, 116, 121, 126, 147, + 171, 222, 111, 126, 128, 126, 217, 126, 131, 109, + 112, 129, 79, 80, 81, 100, 194, 108, 109, 8, + 222, 134, 223, 222, 170, 222, 118, 109, 8, 9, + 10, 14, 51, 102, 116, 121, 126, 182, 224, 151, + 152, 171, 3, 4, 5, 8, 12, 51, 54, 62, + 76, 82, 86, 89, 93, 116, 120, 124, 126, 130, + 173, 174, 180, 184, 219, 220, 223, 224, 121, 171, + 173, 148, 171, 181, 121, 181, 181, 181, 181, 181, + 126, 127, 129, 157, 129, 211, 224, 108, 109, 126, + 108, 178, 179, 217, 224, 110, 121, 171, 171, 13, + 14, 15, 16, 17, 18, 19, 20, 29, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 52, 76, 109, 112, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 126, 127, 130, 163, 171, + 171, 171, 171, 111, 112, 126, 127, 176, 177, 224, + 197, 215, 215, 173, 217, 96, 100, 201, 221, 222, + 100, 221, 100, 221, 79, 80, 81, 134, 194, 109, + 128, 109, 129, 128, 112, 182, 112, 143, 164, 165, + 169, 121, 182, 182, 182, 182, 182, 182, 112, 127, + 175, 224, 153, 171, 176, 177, 182, 82, 184, 117, + 186, 180, 126, 117, 217, 217, 217, 187, 215, 217, + 128, 12, 109, 182, 13, 14, 15, 16, 17, 18, + 19, 20, 29, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 125, 126, 127, 171, 111, 128, + 128, 176, 177, 126, 181, 160, 213, 173, 3, 4, + 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 74, 76, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 89, 90, 92, + 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, + 104, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 130, 131, 212, 209, 136, 214, 178, 129, + 109, 171, 128, 131, 128, 4, 217, 172, 213, 109, + 128, 128, 128, 109, 222, 221, 222, 221, 221, 221, + 221, 221, 129, 8, 110, 222, 187, 175, 187, 182, + 128, 54, 86, 89, 116, 120, 121, 124, 126, 130, + 216, 218, 213, 176, 177, 109, 112, 176, 184, 182, + 187, 126, 187, 187, 128, 128, 51, 162, 224, 12, + 180, 176, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 128, 215, 217, 128, 126, 162, 109, + 161, 173, 131, 128, 211, 129, 128, 129, 108, 217, + 173, 131, 147, 162, 128, 128, 126, 117, 126, 117, + 216, 216, 216, 216, 187, 215, 216, 13, 14, 15, + 16, 17, 18, 19, 20, 29, 113, 114, 115, 116, + 119, 120, 121, 122, 123, 125, 126, 127, 131, 109, + 152, 217, 182, 176, 118, 214, 128, 118, 217, 77, + 92, 111, 128, 131, 126, 158, 148, 173, 128, 162, + 129, 178, 128, 110, 110, 173, 187, 187, 187, 128, + 128, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 127, 214, - 216, 182, 63, 120, 182, 182, 182, 182, 182, 182, - 126, 197, 198, 223, 9, 196, 205, 110, 188, 190, - 138, 8, 221, 133, 107, 116, 51, 153, 184, 221, - 125, 125, 183, 222, 51, 183, 221, 137, 221, 107, - 109, 110, 111, 176, 109, 144, 221, 221, 127, 127, - 127, 127, 127, 127, 117, 127, 127, 127, 213, 127, - 127, 127, 117, 127, 127, 216, 216, 110, 127, 130, - 182, 127, 212, 216, 223, 221, 128, 196, 133, 110, - 191, 192, 223, 108, 108, 128, 202, 8, 9, 50, - 51, 95, 166, 167, 168, 169, 204, 223, 183, 176, - 149, 154, 10, 120, 155, 145, 183, 8, 9, 10, - 14, 51, 101, 115, 120, 180, 223, 133, 125, 208, - 209, 134, 135, 221, 107, 216, 10, 14, 51, 78, - 101, 115, 120, 125, 146, 170, 221, 110, 125, 127, - 125, 216, 125, 130, 108, 111, 128, 79, 80, 81, - 99, 193, 107, 108, 8, 221, 133, 221, 169, 221, - 117, 108, 8, 9, 10, 14, 51, 101, 115, 120, - 125, 181, 223, 150, 151, 170, 3, 4, 5, 8, - 12, 51, 54, 62, 76, 82, 86, 88, 92, 115, - 119, 123, 125, 129, 172, 173, 179, 183, 218, 219, - 222, 223, 120, 170, 172, 147, 170, 180, 120, 180, - 180, 180, 180, 180, 125, 126, 128, 156, 128, 210, - 223, 107, 108, 125, 107, 177, 178, 216, 223, 109, - 120, 170, 170, 13, 14, 15, 16, 17, 18, 19, - 20, 29, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 52, 76, 108, 111, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, - 126, 129, 162, 170, 170, 170, 170, 110, 111, 125, - 126, 175, 176, 223, 196, 214, 214, 172, 216, 95, - 99, 200, 220, 221, 99, 220, 99, 220, 79, 80, - 81, 133, 193, 108, 127, 108, 128, 111, 181, 111, - 142, 163, 164, 168, 120, 181, 181, 181, 181, 181, - 181, 111, 126, 174, 223, 152, 170, 175, 176, 181, - 82, 183, 116, 185, 179, 125, 116, 216, 216, 216, - 186, 214, 216, 127, 12, 108, 181, 13, 14, 15, - 16, 17, 18, 19, 20, 29, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, - 170, 110, 127, 127, 175, 176, 125, 180, 159, 212, - 172, 3, 4, 5, 6, 7, 8, 9, 10, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 57, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 74, 76, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 91, 92, 93, 94, 95, 96, 97, 99, - 100, 101, 102, 103, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 129, 130, 211, 208, 135, - 213, 177, 128, 108, 170, 127, 130, 127, 4, 216, - 171, 212, 108, 127, 127, 127, 108, 221, 220, 221, - 220, 220, 220, 220, 220, 128, 8, 109, 221, 186, - 174, 186, 181, 127, 54, 86, 88, 115, 119, 120, - 123, 125, 129, 215, 217, 212, 175, 176, 108, 111, - 175, 183, 181, 186, 125, 186, 186, 127, 127, 51, - 161, 223, 12, 179, 175, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 127, 214, 216, 127, - 125, 161, 108, 160, 172, 130, 127, 210, 128, 127, - 128, 107, 216, 172, 130, 146, 161, 127, 127, 125, - 116, 125, 116, 215, 215, 215, 215, 186, 214, 215, - 13, 14, 15, 16, 17, 18, 19, 20, 29, 112, - 113, 114, 115, 118, 119, 120, 121, 122, 124, 125, - 126, 130, 108, 151, 216, 181, 175, 117, 213, 127, - 117, 216, 77, 91, 110, 127, 130, 125, 157, 147, - 172, 127, 161, 128, 177, 127, 109, 109, 172, 186, - 186, 186, 127, 127, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 127, 214, 216, 152, 175, 125, 127, - 125, 125, 216, 158, 172, 127, 161, 128, 161, 127, - 117, 127, 117, 215, 110, 127, 130, 214, 214, 127, - 221, 172, 127, 161, 161, 125, 125, 215, 127, 127, - 127, 127, 161, 214, 214, 161, 127, 127 + 128, 215, 217, 153, 176, 126, 128, 126, 126, 217, + 159, 173, 128, 162, 129, 162, 128, 118, 128, 118, + 216, 111, 128, 131, 215, 215, 128, 222, 173, 128, + 162, 162, 126, 126, 216, 128, 128, 128, 128, 162, + 215, 215, 162, 128, 128 }; #define yyerrok (yyerrstatus = 0) @@ -3407,7 +3411,7 @@ yyreduce: { case 3: /* Line 1792 of yacc.c */ -#line 399 "dtool/src/cppparser/cppBison.yxx" +#line 398 "dtool/src/cppparser/cppBison.yxx" { current_expr = (yyvsp[(2) - (2)].u.expr); } @@ -3415,7 +3419,7 @@ yyreduce: case 4: /* Line 1792 of yacc.c */ -#line 403 "dtool/src/cppparser/cppBison.yxx" +#line 402 "dtool/src/cppparser/cppBison.yxx" { current_type = (yyvsp[(2) - (2)].u.type); } @@ -3423,7 +3427,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 421 "dtool/src/cppparser/cppBison.yxx" +#line 420 "dtool/src/cppparser/cppBison.yxx" { delete (yyvsp[(3) - (4)].u.expr); } @@ -3431,7 +3435,7 @@ yyreduce: case 11: /* Line 1792 of yacc.c */ -#line 433 "dtool/src/cppparser/cppBison.yxx" +#line 432 "dtool/src/cppparser/cppBison.yxx" { push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) | ((yyvsp[(1) - (2)].u.integer) & CPPInstance::SC_c_binding)); @@ -3440,7 +3444,7 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 438 "dtool/src/cppparser/cppBison.yxx" +#line 437 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3448,7 +3452,7 @@ yyreduce: case 20: /* Line 1792 of yacc.c */ -#line 452 "dtool/src/cppparser/cppBison.yxx" +#line 451 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 0) { yyerror("Unclosed __begin_publish", publish_loc); @@ -3465,7 +3469,7 @@ yyreduce: case 21: /* Line 1792 of yacc.c */ -#line 465 "dtool/src/cppparser/cppBison.yxx" +#line 464 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 1) { yyerror("Unmatched __end_publish", (yylsp[(1) - (1)])); @@ -3478,7 +3482,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 474 "dtool/src/cppparser/cppBison.yxx" +#line 473 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_published); } @@ -3486,7 +3490,7 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 478 "dtool/src/cppparser/cppBison.yxx" +#line 477 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level > 0) { current_scope->set_current_vis(V_published); @@ -3498,7 +3502,7 @@ yyreduce: case 24: /* Line 1792 of yacc.c */ -#line 486 "dtool/src/cppparser/cppBison.yxx" +#line 485 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_protected); } @@ -3506,7 +3510,7 @@ yyreduce: case 25: /* Line 1792 of yacc.c */ -#line 490 "dtool/src/cppparser/cppBison.yxx" +#line 489 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_private); } @@ -3514,7 +3518,7 @@ yyreduce: case 26: /* Line 1792 of yacc.c */ -#line 494 "dtool/src/cppparser/cppBison.yxx" +#line 493 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (7)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -3529,7 +3533,7 @@ yyreduce: case 27: /* Line 1792 of yacc.c */ -#line 505 "dtool/src/cppparser/cppBison.yxx" +#line 504 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (9)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); if (getter == (CPPDeclaration *)NULL || getter->get_subtype() != CPPDeclaration::ST_function_group) { @@ -3554,7 +3558,7 @@ yyreduce: case 28: /* Line 1792 of yacc.c */ -#line 526 "dtool/src/cppparser/cppBison.yxx" +#line 525 "dtool/src/cppparser/cppBison.yxx" { CPPMakeSeq *make_seq = new CPPMakeSeq((yyvsp[(3) - (9)].u.identifier)->get_simple_name(), (yyvsp[(5) - (9)].u.identifier)->get_simple_name(), (yyvsp[(7) - (9)].u.identifier)->get_simple_name(), (yylsp[(1) - (9)]).file); current_scope->add_declaration(make_seq, global_scope, current_lexer, (yylsp[(1) - (9)])); @@ -3563,7 +3567,34 @@ yyreduce: case 29: /* Line 1792 of yacc.c */ -#line 534 "dtool/src/cppparser/cppBison.yxx" +#line 530 "dtool/src/cppparser/cppBison.yxx" + { + CPPExpression::Result result = (yyvsp[(3) - (6)].u.expr)->evaluate(); + if (result._type == CPPExpression::RT_error) { + yywarning("static_assert requires a constant expression", (yylsp[(3) - (6)])); + } else if (!result.as_boolean()) { + yywarning("static_assert failed: " + (yyvsp[(5) - (6)].str), (yylsp[(3) - (6)])); + } +} + break; + + case 30: +/* Line 1792 of yacc.c */ +#line 539 "dtool/src/cppparser/cppBison.yxx" + { + // This alternative version of static_assert was introduced in C++17. + CPPExpression::Result result = (yyvsp[(3) - (4)].u.expr)->evaluate(); + if (result._type == CPPExpression::RT_error) { + yywarning("static_assert requires a constant expression", (yylsp[(3) - (4)])); + } else if (!result.as_boolean()) { + yywarning("static_assert failed", (yylsp[(3) - (4)])); + } +} + break; + + case 31: +/* Line 1792 of yacc.c */ +#line 552 "dtool/src/cppparser/cppBison.yxx" { CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("temp"), V_public); @@ -3571,34 +3602,34 @@ yyreduce: } break; - case 30: + case 32: /* Line 1792 of yacc.c */ -#line 540 "dtool/src/cppparser/cppBison.yxx" +#line 558 "dtool/src/cppparser/cppBison.yxx" { delete current_scope; pop_scope(); } break; - case 31: + case 33: /* Line 1792 of yacc.c */ -#line 549 "dtool/src/cppparser/cppBison.yxx" +#line 567 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } break; - case 32: + case 34: /* Line 1792 of yacc.c */ -#line 553 "dtool/src/cppparser/cppBison.yxx" +#line 571 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extern; } break; - case 33: + case 35: /* Line 1792 of yacc.c */ -#line 557 "dtool/src/cppparser/cppBison.yxx" +#line 575 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (3)].u.integer) | (int)CPPInstance::SC_extern; if ((yyvsp[(3) - (3)].str) == "C") { @@ -3611,89 +3642,89 @@ yyreduce: } break; - case 34: + case 36: /* Line 1792 of yacc.c */ -#line 568 "dtool/src/cppparser/cppBison.yxx" +#line 586 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_static; } break; - case 35: + case 37: /* Line 1792 of yacc.c */ -#line 572 "dtool/src/cppparser/cppBison.yxx" +#line 590 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_inline; } break; - case 36: + case 38: /* Line 1792 of yacc.c */ -#line 576 "dtool/src/cppparser/cppBison.yxx" +#line 594 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_virtual; } break; - case 37: + case 39: /* Line 1792 of yacc.c */ -#line 580 "dtool/src/cppparser/cppBison.yxx" +#line 598 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_explicit; } break; - case 38: + case 40: /* Line 1792 of yacc.c */ -#line 584 "dtool/src/cppparser/cppBison.yxx" +#line 602 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_volatile; } break; - case 39: + case 41: /* Line 1792 of yacc.c */ -#line 588 "dtool/src/cppparser/cppBison.yxx" +#line 606 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_mutable; } break; - case 40: + case 42: /* Line 1792 of yacc.c */ -#line 592 "dtool/src/cppparser/cppBison.yxx" +#line 610 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_register; } break; - case 41: + case 43: /* Line 1792 of yacc.c */ -#line 596 "dtool/src/cppparser/cppBison.yxx" +#line 614 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_blocking; } break; - case 42: + case 44: /* Line 1792 of yacc.c */ -#line 600 "dtool/src/cppparser/cppBison.yxx" +#line 618 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extension; } break; - case 43: + case 45: /* Line 1792 of yacc.c */ -#line 607 "dtool/src/cppparser/cppBison.yxx" +#line 625 "dtool/src/cppparser/cppBison.yxx" { /* multiple_var_declaration adds itself to the scope. */ } break; - case 44: + case 46: /* Line 1792 of yacc.c */ -#line 611 "dtool/src/cppparser/cppBison.yxx" +#line 629 "dtool/src/cppparser/cppBison.yxx" { // We don't really care about the storage class here. In fact, it's // not actually legal to define a class or struct using a particular @@ -3704,9 +3735,9 @@ yyreduce: } break; - case 45: + case 47: /* Line 1792 of yacc.c */ -#line 620 "dtool/src/cppparser/cppBison.yxx" +#line 638 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPInstance *)NULL) { (yyvsp[(2) - (3)].u.instance)->_storage_class |= (current_storage_class | (yyvsp[(1) - (3)].u.integer)); @@ -3716,9 +3747,9 @@ yyreduce: } break; - case 46: + case 48: /* Line 1792 of yacc.c */ -#line 631 "dtool/src/cppparser/cppBison.yxx" +#line 649 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3731,28 +3762,9 @@ yyreduce: } break; - case 47: -/* Line 1792 of yacc.c */ -#line 642 "dtool/src/cppparser/cppBison.yxx" - { - pop_storage_class(); -} - break; - - case 48: -/* Line 1792 of yacc.c */ -#line 646 "dtool/src/cppparser/cppBison.yxx" - { - // We don't need to push/pop type, because we can't nest - // multiple_var_declarations. - current_type = (yyvsp[(3) - (3)].u.type); - push_storage_class((yyvsp[(1) - (3)].u.integer)); -} - break; - case 49: /* Line 1792 of yacc.c */ -#line 653 "dtool/src/cppparser/cppBison.yxx" +#line 660 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3762,31 +3774,25 @@ yyreduce: /* Line 1792 of yacc.c */ #line 664 "dtool/src/cppparser/cppBison.yxx" { - CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), - current_storage_class, - (yylsp[(1) - (2)]).file); - inst->set_initializer((yyvsp[(2) - (2)].u.expr)); - current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[(1) - (2)])); + // We don't need to push/pop type, because we can't nest + // multiple_var_declarations. + current_type = (yyvsp[(3) - (3)].u.type); + push_storage_class((yyvsp[(1) - (3)].u.integer)); } break; case 51: /* Line 1792 of yacc.c */ -#line 672 "dtool/src/cppparser/cppBison.yxx" +#line 671 "dtool/src/cppparser/cppBison.yxx" { - CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), - current_storage_class, - (yylsp[(1) - (4)]).file); - inst->set_initializer((yyvsp[(2) - (4)].u.expr)); - current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[(1) - (4)])); + pop_storage_class(); } break; case 52: /* Line 1792 of yacc.c */ -#line 683 "dtool/src/cppparser/cppBison.yxx" +#line 682 "dtool/src/cppparser/cppBison.yxx" { - (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), current_storage_class, (yylsp[(1) - (2)]).file); @@ -3797,9 +3803,8 @@ yyreduce: case 53: /* Line 1792 of yacc.c */ -#line 692 "dtool/src/cppparser/cppBison.yxx" +#line 690 "dtool/src/cppparser/cppBison.yxx" { - (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), current_storage_class, (yylsp[(1) - (4)]).file); @@ -3810,7 +3815,33 @@ yyreduce: case 54: /* Line 1792 of yacc.c */ -#line 705 "dtool/src/cppparser/cppBison.yxx" +#line 701 "dtool/src/cppparser/cppBison.yxx" + { + (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); + CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), + current_storage_class, + (yylsp[(1) - (2)]).file); + inst->set_initializer((yyvsp[(2) - (2)].u.expr)); + current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[(1) - (2)])); +} + break; + + case 55: +/* Line 1792 of yacc.c */ +#line 710 "dtool/src/cppparser/cppBison.yxx" + { + (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); + CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), + current_storage_class, + (yylsp[(1) - (4)]).file); + inst->set_initializer((yyvsp[(2) - (4)].u.expr)); + current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[(1) - (4)])); +} + break; + + case 56: +/* Line 1792 of yacc.c */ +#line 723 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3823,17 +3854,17 @@ yyreduce: } break; - case 55: + case 57: /* Line 1792 of yacc.c */ -#line 716 "dtool/src/cppparser/cppBison.yxx" +#line 734 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 56: + case 58: /* Line 1792 of yacc.c */ -#line 720 "dtool/src/cppparser/cppBison.yxx" +#line 738 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3842,17 +3873,17 @@ yyreduce: } break; - case 57: + case 59: /* Line 1792 of yacc.c */ -#line 727 "dtool/src/cppparser/cppBison.yxx" +#line 745 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 58: + case 60: /* Line 1792 of yacc.c */ -#line 731 "dtool/src/cppparser/cppBison.yxx" +#line 749 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPDeclaration *)NULL) { CPPInstance *inst = (yyvsp[(2) - (3)].u.instance)->as_instance(); @@ -3866,31 +3897,10 @@ yyreduce: } break; - case 59: -/* Line 1792 of yacc.c */ -#line 746 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *target_type = current_type; - CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); - current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (2)])); -} - break; - - case 60: -/* Line 1792 of yacc.c */ -#line 752 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *target_type = current_type; - CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); - current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (4)])); -} - break; - case 61: /* Line 1792 of yacc.c */ -#line 761 "dtool/src/cppparser/cppBison.yxx" +#line 764 "dtool/src/cppparser/cppBison.yxx" { - (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -3899,9 +3909,8 @@ yyreduce: case 62: /* Line 1792 of yacc.c */ -#line 768 "dtool/src/cppparser/cppBison.yxx" +#line 770 "dtool/src/cppparser/cppBison.yxx" { - (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (4)])); @@ -3910,37 +3919,29 @@ yyreduce: case 63: /* Line 1792 of yacc.c */ -#line 780 "dtool/src/cppparser/cppBison.yxx" +#line 779 "dtool/src/cppparser/cppBison.yxx" { - push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); + (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); + CPPType *target_type = current_type; + CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (2)])); } break; case 64: /* Line 1792 of yacc.c */ -#line 784 "dtool/src/cppparser/cppBison.yxx" +#line 786 "dtool/src/cppparser/cppBison.yxx" { - pop_scope(); - CPPType *type; - if ((yyvsp[(1) - (6)].u.identifier)->get_simple_name() == current_scope->get_simple_name()) { - // This is a constructor, and has no return. - type = new CPPSimpleType(CPPSimpleType::T_void); - } else { - // This isn't a constructor, so it has an implicit return type of - // int. - type = new CPPSimpleType(CPPSimpleType::T_int); - } - - CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[(1) - (6)].u.identifier)); - ii->add_func_modifier((yyvsp[(4) - (6)].u.param_list), (yyvsp[(6) - (6)].u.integer)); - - (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[(1) - (6)]).file); + (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); + CPPType *target_type = current_type; + CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); + current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[(1) - (4)])); } break; case 65: /* Line 1792 of yacc.c */ -#line 802 "dtool/src/cppparser/cppBison.yxx" +#line 798 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3948,7 +3949,7 @@ yyreduce: case 66: /* Line 1792 of yacc.c */ -#line 806 "dtool/src/cppparser/cppBison.yxx" +#line 802 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -3970,15 +3971,45 @@ yyreduce: case 67: /* Line 1792 of yacc.c */ -#line 826 "dtool/src/cppparser/cppBison.yxx" +#line 820 "dtool/src/cppparser/cppBison.yxx" { - push_scope((yyvsp[(2) - (3)].u.identifier)->get_scope(current_scope, global_scope)); + push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } break; case 68: /* Line 1792 of yacc.c */ -#line 830 "dtool/src/cppparser/cppBison.yxx" +#line 824 "dtool/src/cppparser/cppBison.yxx" + { + pop_scope(); + CPPType *type; + if ((yyvsp[(1) - (6)].u.identifier)->get_simple_name() == current_scope->get_simple_name()) { + // This is a constructor, and has no return. + type = new CPPSimpleType(CPPSimpleType::T_void); + } else { + // This isn't a constructor, so it has an implicit return type of + // int. + type = new CPPSimpleType(CPPSimpleType::T_int); + } + + CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[(1) - (6)].u.identifier)); + ii->add_func_modifier((yyvsp[(4) - (6)].u.param_list), (yyvsp[(6) - (6)].u.integer)); + + (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[(1) - (6)]).file); +} + break; + + case 69: +/* Line 1792 of yacc.c */ +#line 844 "dtool/src/cppparser/cppBison.yxx" + { + push_scope((yyvsp[(2) - (3)].u.identifier)->get_scope(current_scope, global_scope)); +} + break; + + case 70: +/* Line 1792 of yacc.c */ +#line 848 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); if ((yyvsp[(2) - (7)].u.identifier)->is_scoped()) { @@ -3999,20 +4030,23 @@ yyreduce: } break; - case 69: + case 71: /* Line 1792 of yacc.c */ -#line 856 "dtool/src/cppparser/cppBison.yxx" +#line 874 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(4) - (6)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 70: + case 72: /* Line 1792 of yacc.c */ -#line 860 "dtool/src/cppparser/cppBison.yxx" +#line 878 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (10)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (10)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (10)])); + } assert(type != NULL); CPPInstanceIdentifier *ii = (yyvsp[(4) - (10)].u.inst_ident); @@ -4022,20 +4056,23 @@ yyreduce: } break; - case 71: + case 73: /* Line 1792 of yacc.c */ -#line 871 "dtool/src/cppparser/cppBison.yxx" +#line 892 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(5) - (7)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 72: + case 74: /* Line 1792 of yacc.c */ -#line 875 "dtool/src/cppparser/cppBison.yxx" +#line 896 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (11)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (11)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (11)])); + } assert(type != NULL); CPPInstanceIdentifier *ii = (yyvsp[(5) - (11)].u.inst_ident); @@ -4045,9 +4082,9 @@ yyreduce: } break; - case 73: + case 75: /* Line 1792 of yacc.c */ -#line 888 "dtool/src/cppparser/cppBison.yxx" +#line 912 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (4)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (4)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4055,9 +4092,9 @@ yyreduce: } break; - case 74: + case 76: /* Line 1792 of yacc.c */ -#line 894 "dtool/src/cppparser/cppBison.yxx" +#line 918 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (8)].u.identifier) != NULL) { pop_scope(); @@ -4084,9 +4121,9 @@ yyreduce: } break; - case 75: + case 77: /* Line 1792 of yacc.c */ -#line 919 "dtool/src/cppparser/cppBison.yxx" +#line 943 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (5)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (5)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4094,9 +4131,9 @@ yyreduce: } break; - case 76: + case 78: /* Line 1792 of yacc.c */ -#line 925 "dtool/src/cppparser/cppBison.yxx" +#line 949 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (9)].u.identifier) != NULL) { pop_scope(); @@ -4114,9 +4151,9 @@ yyreduce: } break; - case 77: + case 79: /* Line 1792 of yacc.c */ -#line 945 "dtool/src/cppparser/cppBison.yxx" +#line 969 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *decl = (yyvsp[(1) - (1)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -4128,377 +4165,377 @@ yyreduce: } break; - case 78: + case 80: /* Line 1792 of yacc.c */ -#line 958 "dtool/src/cppparser/cppBison.yxx" +#line 982 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } break; - case 79: + case 81: /* Line 1792 of yacc.c */ -#line 962 "dtool/src/cppparser/cppBison.yxx" +#line 986 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_const_method; } break; - case 80: + case 82: /* Line 1792 of yacc.c */ -#line 966 "dtool/src/cppparser/cppBison.yxx" +#line 990 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_noexcept; } break; - case 81: + case 83: /* Line 1792 of yacc.c */ -#line 970 "dtool/src/cppparser/cppBison.yxx" +#line 994 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (4)].u.integer); } break; - case 82: + case 84: /* Line 1792 of yacc.c */ -#line 974 "dtool/src/cppparser/cppBison.yxx" +#line 998 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (5)].u.integer); } break; - case 83: + case 85: /* Line 1792 of yacc.c */ -#line 981 "dtool/src/cppparser/cppBison.yxx" +#line 1005 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!"; } break; - case 84: + case 86: /* Line 1792 of yacc.c */ -#line 985 "dtool/src/cppparser/cppBison.yxx" +#line 1009 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "~"; } break; - case 85: + case 87: /* Line 1792 of yacc.c */ -#line 989 "dtool/src/cppparser/cppBison.yxx" +#line 1013 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*"; } break; - case 86: + case 88: /* Line 1792 of yacc.c */ -#line 993 "dtool/src/cppparser/cppBison.yxx" +#line 1017 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/"; } break; - case 87: + case 89: /* Line 1792 of yacc.c */ -#line 997 "dtool/src/cppparser/cppBison.yxx" +#line 1021 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%"; } break; - case 88: + case 90: /* Line 1792 of yacc.c */ -#line 1001 "dtool/src/cppparser/cppBison.yxx" +#line 1025 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+"; } break; - case 89: + case 91: /* Line 1792 of yacc.c */ -#line 1005 "dtool/src/cppparser/cppBison.yxx" +#line 1029 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-"; } break; - case 90: + case 92: /* Line 1792 of yacc.c */ -#line 1009 "dtool/src/cppparser/cppBison.yxx" +#line 1033 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|"; } break; - case 91: + case 93: /* Line 1792 of yacc.c */ -#line 1013 "dtool/src/cppparser/cppBison.yxx" +#line 1037 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&"; } break; - case 92: + case 94: /* Line 1792 of yacc.c */ -#line 1017 "dtool/src/cppparser/cppBison.yxx" +#line 1041 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^"; } break; - case 93: + case 95: /* Line 1792 of yacc.c */ -#line 1021 "dtool/src/cppparser/cppBison.yxx" +#line 1045 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "||"; } break; - case 94: + case 96: /* Line 1792 of yacc.c */ -#line 1025 "dtool/src/cppparser/cppBison.yxx" +#line 1049 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&&"; } break; - case 95: + case 97: /* Line 1792 of yacc.c */ -#line 1029 "dtool/src/cppparser/cppBison.yxx" +#line 1053 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "=="; } break; - case 96: + case 98: /* Line 1792 of yacc.c */ -#line 1033 "dtool/src/cppparser/cppBison.yxx" +#line 1057 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!="; } break; - case 97: + case 99: /* Line 1792 of yacc.c */ -#line 1037 "dtool/src/cppparser/cppBison.yxx" +#line 1061 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<="; } break; - case 98: + case 100: /* Line 1792 of yacc.c */ -#line 1041 "dtool/src/cppparser/cppBison.yxx" +#line 1065 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">="; } break; - case 99: + case 101: /* Line 1792 of yacc.c */ -#line 1045 "dtool/src/cppparser/cppBison.yxx" +#line 1069 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<"; } break; - case 100: + case 102: /* Line 1792 of yacc.c */ -#line 1049 "dtool/src/cppparser/cppBison.yxx" +#line 1073 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">"; } break; - case 101: + case 103: /* Line 1792 of yacc.c */ -#line 1053 "dtool/src/cppparser/cppBison.yxx" +#line 1077 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<"; } break; - case 102: + case 104: /* Line 1792 of yacc.c */ -#line 1057 "dtool/src/cppparser/cppBison.yxx" +#line 1081 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>"; } break; - case 103: + case 105: /* Line 1792 of yacc.c */ -#line 1061 "dtool/src/cppparser/cppBison.yxx" +#line 1085 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "="; } break; - case 104: + case 106: /* Line 1792 of yacc.c */ -#line 1065 "dtool/src/cppparser/cppBison.yxx" +#line 1089 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ","; } break; - case 105: + case 107: /* Line 1792 of yacc.c */ -#line 1069 "dtool/src/cppparser/cppBison.yxx" +#line 1093 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "++"; } break; - case 106: + case 108: /* Line 1792 of yacc.c */ -#line 1073 "dtool/src/cppparser/cppBison.yxx" +#line 1097 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "--"; } break; - case 107: + case 109: /* Line 1792 of yacc.c */ -#line 1077 "dtool/src/cppparser/cppBison.yxx" +#line 1101 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*="; } break; - case 108: + case 110: /* Line 1792 of yacc.c */ -#line 1081 "dtool/src/cppparser/cppBison.yxx" +#line 1105 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/="; } break; - case 109: + case 111: /* Line 1792 of yacc.c */ -#line 1085 "dtool/src/cppparser/cppBison.yxx" +#line 1109 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%="; } break; - case 110: + case 112: /* Line 1792 of yacc.c */ -#line 1089 "dtool/src/cppparser/cppBison.yxx" +#line 1113 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+="; } break; - case 111: + case 113: /* Line 1792 of yacc.c */ -#line 1093 "dtool/src/cppparser/cppBison.yxx" +#line 1117 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-="; } break; - case 112: + case 114: /* Line 1792 of yacc.c */ -#line 1097 "dtool/src/cppparser/cppBison.yxx" +#line 1121 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|="; } break; - case 113: + case 115: /* Line 1792 of yacc.c */ -#line 1101 "dtool/src/cppparser/cppBison.yxx" +#line 1125 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&="; } break; - case 114: + case 116: /* Line 1792 of yacc.c */ -#line 1105 "dtool/src/cppparser/cppBison.yxx" +#line 1129 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^="; } break; - case 115: + case 117: /* Line 1792 of yacc.c */ -#line 1109 "dtool/src/cppparser/cppBison.yxx" +#line 1133 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<="; } break; - case 116: + case 118: /* Line 1792 of yacc.c */ -#line 1113 "dtool/src/cppparser/cppBison.yxx" +#line 1137 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>="; } break; - case 117: + case 119: /* Line 1792 of yacc.c */ -#line 1117 "dtool/src/cppparser/cppBison.yxx" +#line 1141 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "->"; } break; - case 118: + case 120: /* Line 1792 of yacc.c */ -#line 1121 "dtool/src/cppparser/cppBison.yxx" +#line 1145 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "[]"; } break; - case 119: + case 121: /* Line 1792 of yacc.c */ -#line 1125 "dtool/src/cppparser/cppBison.yxx" +#line 1149 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "()"; } break; - case 120: + case 122: /* Line 1792 of yacc.c */ -#line 1129 "dtool/src/cppparser/cppBison.yxx" +#line 1153 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "new"; } break; - case 121: + case 123: /* Line 1792 of yacc.c */ -#line 1133 "dtool/src/cppparser/cppBison.yxx" +#line 1157 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "delete"; } break; - case 124: + case 126: /* Line 1792 of yacc.c */ -#line 1145 "dtool/src/cppparser/cppBison.yxx" +#line 1169 "dtool/src/cppparser/cppBison.yxx" { push_scope(new CPPTemplateScope(current_scope)); } break; - case 125: + case 127: /* Line 1792 of yacc.c */ -#line 1149 "dtool/src/cppparser/cppBison.yxx" +#line 1173 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 129: + case 131: /* Line 1792 of yacc.c */ -#line 1162 "dtool/src/cppparser/cppBison.yxx" +#line 1186 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4506,9 +4543,9 @@ yyreduce: } break; - case 130: + case 132: /* Line 1792 of yacc.c */ -#line 1168 "dtool/src/cppparser/cppBison.yxx" +#line 1192 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4516,25 +4553,9 @@ yyreduce: } break; - case 131: -/* Line 1792 of yacc.c */ -#line 1177 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); -} - break; - - case 132: -/* Line 1792 of yacc.c */ -#line 1181 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); -} - break; - case 133: /* Line 1792 of yacc.c */ -#line 1185 "dtool/src/cppparser/cppBison.yxx" +#line 1201 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } @@ -4542,7 +4563,7 @@ yyreduce: case 134: /* Line 1792 of yacc.c */ -#line 1189 "dtool/src/cppparser/cppBison.yxx" +#line 1205 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } @@ -4550,7 +4571,23 @@ yyreduce: case 135: /* Line 1792 of yacc.c */ -#line 1193 "dtool/src/cppparser/cppBison.yxx" +#line 1209 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); +} + break; + + case 136: +/* Line 1792 of yacc.c */ +#line 1213 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); +} + break; + + case 137: +/* Line 1792 of yacc.c */ +#line 1217 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); inst->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4558,9 +4595,9 @@ yyreduce: } break; - case 136: + case 138: /* Line 1792 of yacc.c */ -#line 1199 "dtool/src/cppparser/cppBison.yxx" +#line 1223 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4569,43 +4606,46 @@ yyreduce: } break; - case 137: + case 139: /* Line 1792 of yacc.c */ -#line 1209 "dtool/src/cppparser/cppBison.yxx" +#line 1233 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 138: + case 140: /* Line 1792 of yacc.c */ -#line 1213 "dtool/src/cppparser/cppBison.yxx" +#line 1237 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } break; - case 139: + case 141: /* Line 1792 of yacc.c */ -#line 1218 "dtool/src/cppparser/cppBison.yxx" +#line 1242 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if ((yyval.u.type) == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); + } assert((yyval.u.type) != NULL); } break; - case 140: + case 142: /* Line 1792 of yacc.c */ -#line 1227 "dtool/src/cppparser/cppBison.yxx" +#line 1254 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; - case 141: + case 143: /* Line 1792 of yacc.c */ -#line 1231 "dtool/src/cppparser/cppBison.yxx" +#line 1258 "dtool/src/cppparser/cppBison.yxx" { // For an operator function. We implement this simply by building a // ficticious name for the function; in other respects it's just @@ -4621,98 +4661,98 @@ yyreduce: } break; - case 142: + case 144: /* Line 1792 of yacc.c */ -#line 1245 "dtool/src/cppparser/cppBison.yxx" +#line 1272 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 143: + case 145: /* Line 1792 of yacc.c */ -#line 1250 "dtool/src/cppparser/cppBison.yxx" +#line 1277 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 144: + case 146: /* Line 1792 of yacc.c */ -#line 1255 "dtool/src/cppparser/cppBison.yxx" +#line 1282 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 145: + case 147: /* Line 1792 of yacc.c */ -#line 1260 "dtool/src/cppparser/cppBison.yxx" +#line 1287 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 146: + case 148: /* Line 1792 of yacc.c */ -#line 1265 "dtool/src/cppparser/cppBison.yxx" +#line 1292 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 147: + case 149: /* Line 1792 of yacc.c */ -#line 1270 "dtool/src/cppparser/cppBison.yxx" +#line 1297 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 148: + case 150: /* Line 1792 of yacc.c */ -#line 1275 "dtool/src/cppparser/cppBison.yxx" +#line 1302 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 149: + case 151: /* Line 1792 of yacc.c */ -#line 1280 "dtool/src/cppparser/cppBison.yxx" +#line 1307 "dtool/src/cppparser/cppBison.yxx" { // bitfield definition. We ignore the bitfield for now. (yyval.u.inst_ident) = (yyvsp[(1) - (3)].u.inst_ident); } break; - case 150: + case 152: /* Line 1792 of yacc.c */ -#line 1285 "dtool/src/cppparser/cppBison.yxx" +#line 1312 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 151: + case 153: /* Line 1792 of yacc.c */ -#line 1290 "dtool/src/cppparser/cppBison.yxx" +#line 1317 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 152: + case 154: /* Line 1792 of yacc.c */ -#line 1294 "dtool/src/cppparser/cppBison.yxx" +#line 1321 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); (yyval.u.inst_ident) = (yyvsp[(1) - (6)].u.inst_ident); @@ -4728,86 +4768,70 @@ yyreduce: } break; - case 153: -/* Line 1792 of yacc.c */ -#line 1312 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; -} - break; - - case 154: -/* Line 1792 of yacc.c */ -#line 1316 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; - (yyval.u.param_list)->_includes_ellipsis = true; -} - break; - case 155: /* Line 1792 of yacc.c */ -#line 1321 "dtool/src/cppparser/cppBison.yxx" +#line 1339 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; } break; case 156: /* Line 1792 of yacc.c */ -#line 1325 "dtool/src/cppparser/cppBison.yxx" +#line 1343 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_includes_ellipsis = true; } break; case 157: /* Line 1792 of yacc.c */ -#line 1330 "dtool/src/cppparser/cppBison.yxx" +#line 1348 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); +} + break; + + case 158: +/* Line 1792 of yacc.c */ +#line 1352 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); + (yyval.u.param_list)->_includes_ellipsis = true; +} + break; + + case 159: +/* Line 1792 of yacc.c */ +#line 1357 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } break; - case 158: + case 160: /* Line 1792 of yacc.c */ -#line 1338 "dtool/src/cppparser/cppBison.yxx" +#line 1365 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[(1) - (1)].u.instance)); } break; - case 159: + case 161: /* Line 1792 of yacc.c */ -#line 1343 "dtool/src/cppparser/cppBison.yxx" +#line 1370 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[(3) - (3)].u.instance)); } break; - case 160: -/* Line 1792 of yacc.c */ -#line 1351 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 161: -/* Line 1792 of yacc.c */ -#line 1355 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); -} - break; - case 162: /* Line 1792 of yacc.c */ -#line 1362 "dtool/src/cppparser/cppBison.yxx" +#line 1378 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4815,7 +4839,7 @@ yyreduce: case 163: /* Line 1792 of yacc.c */ -#line 1366 "dtool/src/cppparser/cppBison.yxx" +#line 1382 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } @@ -4823,7 +4847,7 @@ yyreduce: case 164: /* Line 1792 of yacc.c */ -#line 1373 "dtool/src/cppparser/cppBison.yxx" +#line 1389 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4831,15 +4855,15 @@ yyreduce: case 165: /* Line 1792 of yacc.c */ -#line 1377 "dtool/src/cppparser/cppBison.yxx" +#line 1393 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (CPPExpression *)NULL; + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } break; case 166: /* Line 1792 of yacc.c */ -#line 1381 "dtool/src/cppparser/cppBison.yxx" +#line 1400 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4847,39 +4871,55 @@ yyreduce: case 167: /* Line 1792 of yacc.c */ -#line 1385 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 168: -/* Line 1792 of yacc.c */ -#line 1389 "dtool/src/cppparser/cppBison.yxx" +#line 1404 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 172: + case 168: /* Line 1792 of yacc.c */ -#line 1402 "dtool/src/cppparser/cppBison.yxx" +#line 1408 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 169: +/* Line 1792 of yacc.c */ +#line 1412 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 170: +/* Line 1792 of yacc.c */ +#line 1416 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 174: +/* Line 1792 of yacc.c */ +#line 1429 "dtool/src/cppparser/cppBison.yxx" { } break; - case 176: + case 178: /* Line 1792 of yacc.c */ -#line 1411 "dtool/src/cppparser/cppBison.yxx" +#line 1438 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); } break; - case 177: + case 179: /* Line 1792 of yacc.c */ -#line 1416 "dtool/src/cppparser/cppBison.yxx" +#line 1443 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (3)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (3)])); CPPType *type = @@ -4889,9 +4929,9 @@ yyreduce: } break; - case 178: + case 180: /* Line 1792 of yacc.c */ -#line 1424 "dtool/src/cppparser/cppBison.yxx" +#line 1451 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4899,9 +4939,9 @@ yyreduce: } break; - case 179: + case 181: /* Line 1792 of yacc.c */ -#line 1430 "dtool/src/cppparser/cppBison.yxx" +#line 1457 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(4) - (5)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(3) - (5)].u.type), (yyvsp[(4) - (5)].u.inst_ident), 0, (yylsp[(3) - (5)]).file); @@ -4909,17 +4949,17 @@ yyreduce: } break; - case 180: + case 182: /* Line 1792 of yacc.c */ -#line 1436 "dtool/src/cppparser/cppBison.yxx" +#line 1463 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = (yyvsp[(2) - (2)].u.instance); } break; - case 181: + case 183: /* Line 1792 of yacc.c */ -#line 1440 "dtool/src/cppparser/cppBison.yxx" +#line 1467 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter)); @@ -4928,183 +4968,183 @@ yyreduce: } break; - case 182: -/* Line 1792 of yacc.c */ -#line 1450 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 183: -/* Line 1792 of yacc.c */ -#line 1454 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - case 184: /* Line 1792 of yacc.c */ -#line 1458 "dtool/src/cppparser/cppBison.yxx" +#line 1477 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; case 185: /* Line 1792 of yacc.c */ -#line 1462 "dtool/src/cppparser/cppBison.yxx" +#line 1481 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_const); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 186: /* Line 1792 of yacc.c */ -#line 1467 "dtool/src/cppparser/cppBison.yxx" +#line 1485 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_volatile); + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; case 187: /* Line 1792 of yacc.c */ -#line 1472 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_pointer); -} - break; - - case 188: -/* Line 1792 of yacc.c */ -#line 1477 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_reference); -} - break; - - case 189: -/* Line 1792 of yacc.c */ -#line 1482 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); - (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); -} - break; - - case 190: -/* Line 1792 of yacc.c */ -#line 1487 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); - (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); -} - break; - - case 191: -/* Line 1792 of yacc.c */ -#line 1492 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); - (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); -} - break; - - case 192: -/* Line 1792 of yacc.c */ -#line 1500 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); -} - break; - - case 193: -/* Line 1792 of yacc.c */ -#line 1504 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 194: -/* Line 1792 of yacc.c */ -#line 1508 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - - case 195: -/* Line 1792 of yacc.c */ -#line 1512 "dtool/src/cppparser/cppBison.yxx" +#line 1489 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 196: + case 188: /* Line 1792 of yacc.c */ -#line 1517 "dtool/src/cppparser/cppBison.yxx" +#line 1494 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 197: + case 189: /* Line 1792 of yacc.c */ -#line 1522 "dtool/src/cppparser/cppBison.yxx" +#line 1499 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 198: + case 190: /* Line 1792 of yacc.c */ -#line 1527 "dtool/src/cppparser/cppBison.yxx" +#line 1504 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 199: + case 191: /* Line 1792 of yacc.c */ -#line 1532 "dtool/src/cppparser/cppBison.yxx" +#line 1509 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 200: + case 192: /* Line 1792 of yacc.c */ -#line 1537 "dtool/src/cppparser/cppBison.yxx" +#line 1514 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 201: + case 193: /* Line 1792 of yacc.c */ -#line 1542 "dtool/src/cppparser/cppBison.yxx" +#line 1519 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; + case 194: +/* Line 1792 of yacc.c */ +#line 1527 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); +} + break; + + case 195: +/* Line 1792 of yacc.c */ +#line 1531 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 196: +/* Line 1792 of yacc.c */ +#line 1535 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 197: +/* Line 1792 of yacc.c */ +#line 1539 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_const); +} + break; + + case 198: +/* Line 1792 of yacc.c */ +#line 1544 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_volatile); +} + break; + + case 199: +/* Line 1792 of yacc.c */ +#line 1549 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_pointer); +} + break; + + case 200: +/* Line 1792 of yacc.c */ +#line 1554 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_reference); +} + break; + + case 201: +/* Line 1792 of yacc.c */ +#line 1559 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); + (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); +} + break; + case 202: /* Line 1792 of yacc.c */ -#line 1547 "dtool/src/cppparser/cppBison.yxx" +#line 1564 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); + (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); +} + break; + + case 203: +/* Line 1792 of yacc.c */ +#line 1569 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); + (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); +} + break; + + case 204: +/* Line 1792 of yacc.c */ +#line 1574 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5112,89 +5152,89 @@ yyreduce: } break; - case 203: + case 205: /* Line 1792 of yacc.c */ -#line 1553 "dtool/src/cppparser/cppBison.yxx" +#line 1580 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 204: + case 206: /* Line 1792 of yacc.c */ -#line 1561 "dtool/src/cppparser/cppBison.yxx" +#line 1588 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 205: + case 207: /* Line 1792 of yacc.c */ -#line 1565 "dtool/src/cppparser/cppBison.yxx" +#line 1592 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 206: + case 208: /* Line 1792 of yacc.c */ -#line 1570 "dtool/src/cppparser/cppBison.yxx" +#line 1597 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 207: + case 209: /* Line 1792 of yacc.c */ -#line 1575 "dtool/src/cppparser/cppBison.yxx" +#line 1602 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 208: + case 210: /* Line 1792 of yacc.c */ -#line 1580 "dtool/src/cppparser/cppBison.yxx" +#line 1607 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 209: + case 211: /* Line 1792 of yacc.c */ -#line 1585 "dtool/src/cppparser/cppBison.yxx" +#line 1612 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 210: + case 212: /* Line 1792 of yacc.c */ -#line 1590 "dtool/src/cppparser/cppBison.yxx" +#line 1617 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 211: + case 213: /* Line 1792 of yacc.c */ -#line 1595 "dtool/src/cppparser/cppBison.yxx" +#line 1622 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 212: + case 214: /* Line 1792 of yacc.c */ -#line 1600 "dtool/src/cppparser/cppBison.yxx" +#line 1627 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5202,78 +5242,81 @@ yyreduce: } break; - case 213: + case 215: /* Line 1792 of yacc.c */ -#line 1609 "dtool/src/cppparser/cppBison.yxx" +#line 1636 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 214: -/* Line 1792 of yacc.c */ -#line 1613 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert((yyval.u.type) != NULL); -} - break; - - case 215: -/* Line 1792 of yacc.c */ -#line 1618 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - case 216: /* Line 1792 of yacc.c */ -#line 1622 "dtool/src/cppparser/cppBison.yxx" +#line 1640 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); + (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if ((yyval.u.type) == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); + } + assert((yyval.u.type) != NULL); } break; case 217: /* Line 1792 of yacc.c */ -#line 1626 "dtool/src/cppparser/cppBison.yxx" +#line 1648 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); + (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; case 218: /* Line 1792 of yacc.c */ -#line 1630 "dtool/src/cppparser/cppBison.yxx" +#line 1652 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; case 219: /* Line 1792 of yacc.c */ -#line 1634 "dtool/src/cppparser/cppBison.yxx" +#line 1656 "dtool/src/cppparser/cppBison.yxx" { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; case 220: /* Line 1792 of yacc.c */ -#line 1650 "dtool/src/cppparser/cppBison.yxx" +#line 1660 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); +} + break; + + case 221: +/* Line 1792 of yacc.c */ +#line 1664 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 222: +/* Line 1792 of yacc.c */ +#line 1680 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5291,58 +5334,61 @@ yyreduce: } break; - case 221: + case 223: /* Line 1792 of yacc.c */ -#line 1669 "dtool/src/cppparser/cppBison.yxx" +#line 1699 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 222: -/* Line 1792 of yacc.c */ -#line 1673 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert((yyval.u.decl) != NULL); -} - break; - - case 223: -/* Line 1792 of yacc.c */ -#line 1678 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - case 224: /* Line 1792 of yacc.c */ -#line 1682 "dtool/src/cppparser/cppBison.yxx" +#line 1703 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); + (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if ((yyval.u.decl) == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); + } + assert((yyval.u.decl) != NULL); } break; case 225: /* Line 1792 of yacc.c */ -#line 1686 "dtool/src/cppparser/cppBison.yxx" +#line 1711 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); + (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; case 226: /* Line 1792 of yacc.c */ -#line 1690 "dtool/src/cppparser/cppBison.yxx" +#line 1715 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; case 227: /* Line 1792 of yacc.c */ -#line 1694 "dtool/src/cppparser/cppBison.yxx" +#line 1719 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); +} + break; + + case 228: +/* Line 1792 of yacc.c */ +#line 1723 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); +} + break; + + case 229: +/* Line 1792 of yacc.c */ +#line 1727 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5360,9 +5406,9 @@ yyreduce: } break; - case 228: + case 230: /* Line 1792 of yacc.c */ -#line 1710 "dtool/src/cppparser/cppBison.yxx" +#line 1743 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5380,9 +5426,9 @@ yyreduce: } break; - case 229: + case 231: /* Line 1792 of yacc.c */ -#line 1726 "dtool/src/cppparser/cppBison.yxx" +#line 1759 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5402,54 +5448,37 @@ yyreduce: } break; - case 230: + case 232: /* Line 1792 of yacc.c */ -#line 1747 "dtool/src/cppparser/cppBison.yxx" +#line 1780 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 231: -/* Line 1792 of yacc.c */ -#line 1751 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert((yyval.u.type) != NULL); -} - break; - - case 232: -/* Line 1792 of yacc.c */ -#line 1756 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - case 233: /* Line 1792 of yacc.c */ -#line 1760 "dtool/src/cppparser/cppBison.yxx" +#line 1784 "dtool/src/cppparser/cppBison.yxx" { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; + (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if ((yyval.u.type) == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); } + assert((yyval.u.type) != NULL); } break; case 234: /* Line 1792 of yacc.c */ -#line 1776 "dtool/src/cppparser/cppBison.yxx" +#line 1792 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); +} + break; + + case 235: +/* Line 1792 of yacc.c */ +#line 1796 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5467,9 +5496,29 @@ yyreduce: } break; - case 235: + case 236: /* Line 1792 of yacc.c */ -#line 1795 "dtool/src/cppparser/cppBison.yxx" +#line 1812 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 237: +/* Line 1792 of yacc.c */ +#line 1831 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5477,9 +5526,9 @@ yyreduce: } break; - case 236: + case 238: /* Line 1792 of yacc.c */ -#line 1801 "dtool/src/cppparser/cppBison.yxx" +#line 1837 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5488,9 +5537,9 @@ yyreduce: } break; - case 237: + case 239: /* Line 1792 of yacc.c */ -#line 1811 "dtool/src/cppparser/cppBison.yxx" +#line 1847 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5506,9 +5555,9 @@ yyreduce: } break; - case 238: + case 240: /* Line 1792 of yacc.c */ -#line 1825 "dtool/src/cppparser/cppBison.yxx" +#line 1861 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5517,9 +5566,9 @@ yyreduce: } break; - case 239: + case 241: /* Line 1792 of yacc.c */ -#line 1835 "dtool/src/cppparser/cppBison.yxx" +#line 1871 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5541,9 +5590,9 @@ yyreduce: } break; - case 240: + case 242: /* Line 1792 of yacc.c */ -#line 1855 "dtool/src/cppparser/cppBison.yxx" +#line 1891 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5552,138 +5601,138 @@ yyreduce: } break; - case 245: + case 247: /* Line 1792 of yacc.c */ -#line 1875 "dtool/src/cppparser/cppBison.yxx" +#line 1911 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } break; - case 246: + case 248: /* Line 1792 of yacc.c */ -#line 1879 "dtool/src/cppparser/cppBison.yxx" +#line 1915 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } break; - case 247: + case 249: /* Line 1792 of yacc.c */ -#line 1883 "dtool/src/cppparser/cppBison.yxx" +#line 1919 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } break; - case 248: -/* Line 1792 of yacc.c */ -#line 1887 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 249: -/* Line 1792 of yacc.c */ -#line 1891 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); -} - break; - case 250: /* Line 1792 of yacc.c */ -#line 1895 "dtool/src/cppparser/cppBison.yxx" +#line 1923 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } break; case 251: /* Line 1792 of yacc.c */ -#line 1899 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 252: -/* Line 1792 of yacc.c */ -#line 1903 "dtool/src/cppparser/cppBison.yxx" +#line 1927 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } break; - case 253: + case 252: /* Line 1792 of yacc.c */ -#line 1907 "dtool/src/cppparser/cppBison.yxx" +#line 1931 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } break; + case 253: +/* Line 1792 of yacc.c */ +#line 1935 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); +} + break; + case 254: /* Line 1792 of yacc.c */ -#line 1914 "dtool/src/cppparser/cppBison.yxx" +#line 1939 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); +} + break; + + case 255: +/* Line 1792 of yacc.c */ +#line 1943 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); +} + break; + + case 256: +/* Line 1792 of yacc.c */ +#line 1950 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.enum_type) = current_enum; current_enum = NULL; } break; - case 255: + case 257: /* Line 1792 of yacc.c */ -#line 1922 "dtool/src/cppparser/cppBison.yxx" +#line 1958 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } break; - case 256: + case 258: /* Line 1792 of yacc.c */ -#line 1926 "dtool/src/cppparser/cppBison.yxx" +#line 1962 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } break; - case 257: + case 259: /* Line 1792 of yacc.c */ -#line 1930 "dtool/src/cppparser/cppBison.yxx" +#line 1966 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } break; - case 258: + case 260: /* Line 1792 of yacc.c */ -#line 1934 "dtool/src/cppparser/cppBison.yxx" +#line 1970 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); } break; - case 259: + case 261: /* Line 1792 of yacc.c */ -#line 1941 "dtool/src/cppparser/cppBison.yxx" +#line 1977 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 260: + case 262: /* Line 1792 of yacc.c */ -#line 1945 "dtool/src/cppparser/cppBison.yxx" +#line 1981 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } break; - case 262: + case 264: /* Line 1792 of yacc.c */ -#line 1953 "dtool/src/cppparser/cppBison.yxx" +#line 1989 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); @@ -5691,9 +5740,9 @@ yyreduce: } break; - case 263: + case 265: /* Line 1792 of yacc.c */ -#line 1959 "dtool/src/cppparser/cppBison.yxx" +#line 1995 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5701,9 +5750,9 @@ yyreduce: } break; - case 265: + case 267: /* Line 1792 of yacc.c */ -#line 1968 "dtool/src/cppparser/cppBison.yxx" +#line 2004 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5711,9 +5760,9 @@ yyreduce: } break; - case 266: + case 268: /* Line 1792 of yacc.c */ -#line 1974 "dtool/src/cppparser/cppBison.yxx" +#line 2010 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5721,41 +5770,41 @@ yyreduce: } break; - case 267: + case 269: /* Line 1792 of yacc.c */ -#line 1983 "dtool/src/cppparser/cppBison.yxx" +#line 2019 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } break; - case 268: + case 270: /* Line 1792 of yacc.c */ -#line 1990 "dtool/src/cppparser/cppBison.yxx" +#line 2026 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_class; } break; - case 269: + case 271: /* Line 1792 of yacc.c */ -#line 1994 "dtool/src/cppparser/cppBison.yxx" +#line 2030 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } break; - case 270: + case 272: /* Line 1792 of yacc.c */ -#line 1998 "dtool/src/cppparser/cppBison.yxx" +#line 2034 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_union; } break; - case 271: + case 273: /* Line 1792 of yacc.c */ -#line 2005 "dtool/src/cppparser/cppBison.yxx" +#line 2041 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -5775,17 +5824,17 @@ yyreduce: } break; - case 272: + case 274: /* Line 1792 of yacc.c */ -#line 2023 "dtool/src/cppparser/cppBison.yxx" +#line 2059 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 274: + case 276: /* Line 1792 of yacc.c */ -#line 2031 "dtool/src/cppparser/cppBison.yxx" +#line 2067 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -5793,9 +5842,9 @@ yyreduce: } break; - case 275: + case 277: /* Line 1792 of yacc.c */ -#line 2037 "dtool/src/cppparser/cppBison.yxx" +#line 2073 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); @@ -5803,111 +5852,111 @@ yyreduce: } break; - case 279: + case 281: /* Line 1792 of yacc.c */ -#line 2052 "dtool/src/cppparser/cppBison.yxx" +#line 2088 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; - case 280: + case 282: /* Line 1792 of yacc.c */ -#line 2056 "dtool/src/cppparser/cppBison.yxx" +#line 2092 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; - case 281: + case 283: /* Line 1792 of yacc.c */ -#line 2060 "dtool/src/cppparser/cppBison.yxx" +#line 2096 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } break; - case 282: + case 284: /* Line 1792 of yacc.c */ -#line 2064 "dtool/src/cppparser/cppBison.yxx" +#line 2100 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } break; - case 283: + case 285: /* Line 1792 of yacc.c */ -#line 2068 "dtool/src/cppparser/cppBison.yxx" +#line 2104 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); } break; - case 284: + case 286: /* Line 1792 of yacc.c */ -#line 2072 "dtool/src/cppparser/cppBison.yxx" +#line 2108 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_short); } break; - case 285: + case 287: /* Line 1792 of yacc.c */ -#line 2077 "dtool/src/cppparser/cppBison.yxx" +#line 2113 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } break; - case 286: + case 288: /* Line 1792 of yacc.c */ -#line 2082 "dtool/src/cppparser/cppBison.yxx" +#line 2118 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 287: + case 289: /* Line 1792 of yacc.c */ -#line 2087 "dtool/src/cppparser/cppBison.yxx" +#line 2123 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 288: + case 290: /* Line 1792 of yacc.c */ -#line 2092 "dtool/src/cppparser/cppBison.yxx" +#line 2128 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 289: + case 291: /* Line 1792 of yacc.c */ -#line 2097 "dtool/src/cppparser/cppBison.yxx" +#line 2133 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 290: + case 292: /* Line 1792 of yacc.c */ -#line 2101 "dtool/src/cppparser/cppBison.yxx" +#line 2137 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 291: + case 293: /* Line 1792 of yacc.c */ -#line 2106 "dtool/src/cppparser/cppBison.yxx" +#line 2142 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -5918,173 +5967,157 @@ yyreduce: } break; - case 292: + case 294: /* Line 1792 of yacc.c */ -#line 2115 "dtool/src/cppparser/cppBison.yxx" +#line 2151 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 293: + case 295: /* Line 1792 of yacc.c */ -#line 2120 "dtool/src/cppparser/cppBison.yxx" +#line 2156 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 294: + case 296: /* Line 1792 of yacc.c */ -#line 2128 "dtool/src/cppparser/cppBison.yxx" +#line 2164 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 295: + case 297: /* Line 1792 of yacc.c */ -#line 2132 "dtool/src/cppparser/cppBison.yxx" +#line 2168 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; - case 296: + case 298: /* Line 1792 of yacc.c */ -#line 2137 "dtool/src/cppparser/cppBison.yxx" +#line 2173 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; - case 297: + case 299: /* Line 1792 of yacc.c */ -#line 2141 "dtool/src/cppparser/cppBison.yxx" +#line 2177 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_longlong); } break; - case 298: + case 300: /* Line 1792 of yacc.c */ -#line 2146 "dtool/src/cppparser/cppBison.yxx" +#line 2182 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, CPPSimpleType::F_long); } break; - case 299: + case 301: /* Line 1792 of yacc.c */ -#line 2154 "dtool/src/cppparser/cppBison.yxx" +#line 2190 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); } break; - case 300: + case 302: /* Line 1792 of yacc.c */ -#line 2163 "dtool/src/cppparser/cppBison.yxx" +#line 2199 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = false; } break; - case 301: + case 303: /* Line 1792 of yacc.c */ -#line 2167 "dtool/src/cppparser/cppBison.yxx" +#line 2203 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = true; } break; - case 304: -/* Line 1792 of yacc.c */ -#line 2179 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 305: -/* Line 1792 of yacc.c */ -#line 2182 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - case 306: /* Line 1792 of yacc.c */ -#line 2185 "dtool/src/cppparser/cppBison.yxx" +#line 2215 "dtool/src/cppparser/cppBison.yxx" { } break; case 307: /* Line 1792 of yacc.c */ -#line 2188 "dtool/src/cppparser/cppBison.yxx" +#line 2218 "dtool/src/cppparser/cppBison.yxx" { } break; case 308: /* Line 1792 of yacc.c */ -#line 2191 "dtool/src/cppparser/cppBison.yxx" +#line 2221 "dtool/src/cppparser/cppBison.yxx" { } break; case 309: /* Line 1792 of yacc.c */ -#line 2194 "dtool/src/cppparser/cppBison.yxx" +#line 2224 "dtool/src/cppparser/cppBison.yxx" { } break; case 310: /* Line 1792 of yacc.c */ -#line 2197 "dtool/src/cppparser/cppBison.yxx" +#line 2227 "dtool/src/cppparser/cppBison.yxx" { } break; case 311: /* Line 1792 of yacc.c */ -#line 2200 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 386: -/* Line 1792 of yacc.c */ -#line 2221 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 410: -/* Line 1792 of yacc.c */ #line 2230 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 411: + case 312: /* Line 1792 of yacc.c */ -#line 2234 "dtool/src/cppparser/cppBison.yxx" +#line 2233 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 313: +/* Line 1792 of yacc.c */ +#line 2236 "dtool/src/cppparser/cppBison.yxx" + { +} + break; + + case 388: +/* Line 1792 of yacc.c */ +#line 2257 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 412: /* Line 1792 of yacc.c */ -#line 2241 "dtool/src/cppparser/cppBison.yxx" +#line 2266 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -6092,7 +6125,7 @@ yyreduce: case 413: /* Line 1792 of yacc.c */ -#line 2245 "dtool/src/cppparser/cppBison.yxx" +#line 2270 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6100,23 +6133,23 @@ yyreduce: case 414: /* Line 1792 of yacc.c */ -#line 2252 "dtool/src/cppparser/cppBison.yxx" +#line 2277 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 415: /* Line 1792 of yacc.c */ -#line 2256 "dtool/src/cppparser/cppBison.yxx" +#line 2281 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 416: /* Line 1792 of yacc.c */ -#line 2263 "dtool/src/cppparser/cppBison.yxx" +#line 2288 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6124,55 +6157,71 @@ yyreduce: case 417: /* Line 1792 of yacc.c */ -#line 2267 "dtool/src/cppparser/cppBison.yxx" +#line 2292 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 418: /* Line 1792 of yacc.c */ -#line 2271 "dtool/src/cppparser/cppBison.yxx" +#line 2299 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 419: /* Line 1792 of yacc.c */ -#line 2275 "dtool/src/cppparser/cppBison.yxx" +#line 2303 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; case 420: /* Line 1792 of yacc.c */ -#line 2279 "dtool/src/cppparser/cppBison.yxx" +#line 2307 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 421: /* Line 1792 of yacc.c */ -#line 2283 "dtool/src/cppparser/cppBison.yxx" +#line 2311 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 422: /* Line 1792 of yacc.c */ -#line 2287 "dtool/src/cppparser/cppBison.yxx" +#line 2315 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 423: /* Line 1792 of yacc.c */ -#line 2291 "dtool/src/cppparser/cppBison.yxx" +#line 2319 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 424: +/* Line 1792 of yacc.c */ +#line 2323 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 425: +/* Line 1792 of yacc.c */ +#line 2327 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6186,252 +6235,255 @@ yyreduce: } break; - case 424: + case 426: /* Line 1792 of yacc.c */ -#line 2303 "dtool/src/cppparser/cppBison.yxx" +#line 2339 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; - case 425: + case 427: /* Line 1792 of yacc.c */ -#line 2307 "dtool/src/cppparser/cppBison.yxx" +#line 2343 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 426: + case 428: /* Line 1792 of yacc.c */ -#line 2311 "dtool/src/cppparser/cppBison.yxx" +#line 2347 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 427: + case 429: /* Line 1792 of yacc.c */ -#line 2315 "dtool/src/cppparser/cppBison.yxx" +#line 2351 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 428: + case 430: /* Line 1792 of yacc.c */ -#line 2319 "dtool/src/cppparser/cppBison.yxx" +#line 2355 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 429: + case 431: /* Line 1792 of yacc.c */ -#line 2323 "dtool/src/cppparser/cppBison.yxx" +#line 2359 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 430: + case 432: /* Line 1792 of yacc.c */ -#line 2327 "dtool/src/cppparser/cppBison.yxx" +#line 2363 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 431: + case 433: /* Line 1792 of yacc.c */ -#line 2331 "dtool/src/cppparser/cppBison.yxx" +#line 2367 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 432: + case 434: /* Line 1792 of yacc.c */ -#line 2335 "dtool/src/cppparser/cppBison.yxx" +#line 2371 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 433: + case 435: /* Line 1792 of yacc.c */ -#line 2339 "dtool/src/cppparser/cppBison.yxx" +#line 2375 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 434: + case 436: /* Line 1792 of yacc.c */ -#line 2343 "dtool/src/cppparser/cppBison.yxx" +#line 2379 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 435: + case 437: /* Line 1792 of yacc.c */ -#line 2347 "dtool/src/cppparser/cppBison.yxx" +#line 2383 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 436: + case 438: /* Line 1792 of yacc.c */ -#line 2351 "dtool/src/cppparser/cppBison.yxx" +#line 2387 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 437: + case 439: /* Line 1792 of yacc.c */ -#line 2355 "dtool/src/cppparser/cppBison.yxx" +#line 2391 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 438: + case 440: /* Line 1792 of yacc.c */ -#line 2359 "dtool/src/cppparser/cppBison.yxx" +#line 2395 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 439: + case 441: /* Line 1792 of yacc.c */ -#line 2363 "dtool/src/cppparser/cppBison.yxx" +#line 2399 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 440: + case 442: /* Line 1792 of yacc.c */ -#line 2367 "dtool/src/cppparser/cppBison.yxx" +#line 2403 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 441: + case 443: /* Line 1792 of yacc.c */ -#line 2371 "dtool/src/cppparser/cppBison.yxx" +#line 2407 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 442: + case 444: /* Line 1792 of yacc.c */ -#line 2375 "dtool/src/cppparser/cppBison.yxx" +#line 2411 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 443: + case 445: /* Line 1792 of yacc.c */ -#line 2379 "dtool/src/cppparser/cppBison.yxx" +#line 2415 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 444: + case 446: /* Line 1792 of yacc.c */ -#line 2383 "dtool/src/cppparser/cppBison.yxx" +#line 2419 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 445: + case 447: /* Line 1792 of yacc.c */ -#line 2387 "dtool/src/cppparser/cppBison.yxx" +#line 2423 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 446: + case 448: /* Line 1792 of yacc.c */ -#line 2391 "dtool/src/cppparser/cppBison.yxx" +#line 2427 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 447: + case 449: /* Line 1792 of yacc.c */ -#line 2395 "dtool/src/cppparser/cppBison.yxx" +#line 2431 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 448: + case 450: /* Line 1792 of yacc.c */ -#line 2399 "dtool/src/cppparser/cppBison.yxx" +#line 2435 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 449: + case 451: /* Line 1792 of yacc.c */ -#line 2407 "dtool/src/cppparser/cppBison.yxx" +#line 2443 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 450: + case 452: /* Line 1792 of yacc.c */ -#line 2411 "dtool/src/cppparser/cppBison.yxx" +#line 2447 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; - case 451: -/* Line 1792 of yacc.c */ -#line 2415 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 452: -/* Line 1792 of yacc.c */ -#line 2419 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - case 453: /* Line 1792 of yacc.c */ -#line 2423 "dtool/src/cppparser/cppBison.yxx" +#line 2451 "dtool/src/cppparser/cppBison.yxx" { - // A constructor call. - CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - assert(type != NULL); - (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[(3) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 454: /* Line 1792 of yacc.c */ -#line 2430 "dtool/src/cppparser/cppBison.yxx" +#line 2455 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 455: +/* Line 1792 of yacc.c */ +#line 2459 "dtool/src/cppparser/cppBison.yxx" + { + // A constructor call. + CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + (yyvsp[(1) - (4)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (4)])); + } + assert(type != NULL); + (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[(3) - (4)].u.expr))); +} + break; + + case 456: +/* Line 1792 of yacc.c */ +#line 2469 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6439,9 +6491,9 @@ yyreduce: } break; - case 455: + case 457: /* Line 1792 of yacc.c */ -#line 2436 "dtool/src/cppparser/cppBison.yxx" +#line 2475 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6449,9 +6501,9 @@ yyreduce: } break; - case 456: + case 458: /* Line 1792 of yacc.c */ -#line 2442 "dtool/src/cppparser/cppBison.yxx" +#line 2481 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6459,9 +6511,9 @@ yyreduce: } break; - case 457: + case 459: /* Line 1792 of yacc.c */ -#line 2448 "dtool/src/cppparser/cppBison.yxx" +#line 2487 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6469,9 +6521,9 @@ yyreduce: } break; - case 458: + case 460: /* Line 1792 of yacc.c */ -#line 2454 "dtool/src/cppparser/cppBison.yxx" +#line 2493 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6479,9 +6531,9 @@ yyreduce: } break; - case 459: + case 461: /* Line 1792 of yacc.c */ -#line 2460 "dtool/src/cppparser/cppBison.yxx" +#line 2499 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6489,9 +6541,9 @@ yyreduce: } break; - case 460: + case 462: /* Line 1792 of yacc.c */ -#line 2466 "dtool/src/cppparser/cppBison.yxx" +#line 2505 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6500,9 +6552,9 @@ yyreduce: } break; - case 461: + case 463: /* Line 1792 of yacc.c */ -#line 2473 "dtool/src/cppparser/cppBison.yxx" +#line 2512 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6511,9 +6563,9 @@ yyreduce: } break; - case 462: + case 464: /* Line 1792 of yacc.c */ -#line 2480 "dtool/src/cppparser/cppBison.yxx" +#line 2519 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6522,9 +6574,9 @@ yyreduce: } break; - case 463: + case 465: /* Line 1792 of yacc.c */ -#line 2487 "dtool/src/cppparser/cppBison.yxx" +#line 2526 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6533,9 +6585,9 @@ yyreduce: } break; - case 464: + case 466: /* Line 1792 of yacc.c */ -#line 2494 "dtool/src/cppparser/cppBison.yxx" +#line 2533 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6543,9 +6595,9 @@ yyreduce: } break; - case 465: + case 467: /* Line 1792 of yacc.c */ -#line 2500 "dtool/src/cppparser/cppBison.yxx" +#line 2539 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6553,409 +6605,49 @@ yyreduce: } break; - case 466: -/* Line 1792 of yacc.c */ -#line 2506 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 467: -/* Line 1792 of yacc.c */ -#line 2510 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); -} - break; - case 468: /* Line 1792 of yacc.c */ -#line 2514 "dtool/src/cppparser/cppBison.yxx" +#line 2545 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 469: /* Line 1792 of yacc.c */ -#line 2518 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 470: -/* Line 1792 of yacc.c */ -#line 2522 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 471: -/* Line 1792 of yacc.c */ -#line 2526 "dtool/src/cppparser/cppBison.yxx" - { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } -} - break; - - case 472: -/* Line 1792 of yacc.c */ -#line 2538 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 473: -/* Line 1792 of yacc.c */ -#line 2542 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 474: -/* Line 1792 of yacc.c */ -#line 2546 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 475: -/* Line 1792 of yacc.c */ -#line 2550 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 476: -/* Line 1792 of yacc.c */ -#line 2554 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 477: -/* Line 1792 of yacc.c */ -#line 2558 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 478: -/* Line 1792 of yacc.c */ -#line 2562 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 479: -/* Line 1792 of yacc.c */ -#line 2566 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 480: -/* Line 1792 of yacc.c */ -#line 2570 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 481: -/* Line 1792 of yacc.c */ -#line 2574 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 482: -/* Line 1792 of yacc.c */ -#line 2578 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 483: -/* Line 1792 of yacc.c */ -#line 2582 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 484: -/* Line 1792 of yacc.c */ -#line 2586 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 485: -/* Line 1792 of yacc.c */ -#line 2590 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 486: -/* Line 1792 of yacc.c */ -#line 2594 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 487: -/* Line 1792 of yacc.c */ -#line 2598 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 488: -/* Line 1792 of yacc.c */ -#line 2602 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 489: -/* Line 1792 of yacc.c */ -#line 2606 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 490: -/* Line 1792 of yacc.c */ -#line 2610 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 491: -/* Line 1792 of yacc.c */ -#line 2614 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 492: -/* Line 1792 of yacc.c */ -#line 2618 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 493: -/* Line 1792 of yacc.c */ -#line 2622 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 494: -/* Line 1792 of yacc.c */ -#line 2626 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 495: -/* Line 1792 of yacc.c */ -#line 2630 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 496: -/* Line 1792 of yacc.c */ -#line 2634 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 497: -/* Line 1792 of yacc.c */ -#line 2638 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 498: -/* Line 1792 of yacc.c */ -#line 2642 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 499: -/* Line 1792 of yacc.c */ -#line 2649 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 500: -/* Line 1792 of yacc.c */ -#line 2653 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(true); -} - break; - - case 501: -/* Line 1792 of yacc.c */ -#line 2657 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(false); -} - break; - - case 502: -/* Line 1792 of yacc.c */ -#line 2661 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 503: -/* Line 1792 of yacc.c */ -#line 2665 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); -} - break; - - case 504: -/* Line 1792 of yacc.c */ -#line 2669 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); -} - break; - - case 505: -/* Line 1792 of yacc.c */ -#line 2673 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); -} - break; - - case 506: -/* Line 1792 of yacc.c */ -#line 2687 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 507: -/* Line 1792 of yacc.c */ -#line 2691 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 508: -/* Line 1792 of yacc.c */ -#line 2695 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 509: -/* Line 1792 of yacc.c */ -#line 2699 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 510: -/* Line 1792 of yacc.c */ -#line 2703 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 511: -/* Line 1792 of yacc.c */ -#line 2707 "dtool/src/cppparser/cppBison.yxx" +#line 2549 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; - case 512: + case 470: /* Line 1792 of yacc.c */ -#line 2711 "dtool/src/cppparser/cppBison.yxx" +#line 2553 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; - case 513: + case 471: /* Line 1792 of yacc.c */ -#line 2715 "dtool/src/cppparser/cppBison.yxx" +#line 2557 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; - case 514: + case 472: /* Line 1792 of yacc.c */ -#line 2719 "dtool/src/cppparser/cppBison.yxx" +#line 2561 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; - case 515: + case 473: /* Line 1792 of yacc.c */ -#line 2723 "dtool/src/cppparser/cppBison.yxx" +#line 2565 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); @@ -6969,265 +6661,625 @@ yyreduce: } break; - case 516: + case 474: /* Line 1792 of yacc.c */ -#line 2735 "dtool/src/cppparser/cppBison.yxx" +#line 2577 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 475: +/* Line 1792 of yacc.c */ +#line 2581 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 517: + case 476: /* Line 1792 of yacc.c */ -#line 2739 "dtool/src/cppparser/cppBison.yxx" +#line 2585 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 518: + case 477: /* Line 1792 of yacc.c */ -#line 2743 "dtool/src/cppparser/cppBison.yxx" +#line 2589 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 519: + case 478: /* Line 1792 of yacc.c */ -#line 2747 "dtool/src/cppparser/cppBison.yxx" +#line 2593 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 520: + case 479: /* Line 1792 of yacc.c */ -#line 2751 "dtool/src/cppparser/cppBison.yxx" +#line 2597 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 521: + case 480: /* Line 1792 of yacc.c */ -#line 2755 "dtool/src/cppparser/cppBison.yxx" +#line 2601 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 522: + case 481: /* Line 1792 of yacc.c */ -#line 2759 "dtool/src/cppparser/cppBison.yxx" +#line 2605 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 523: + case 482: /* Line 1792 of yacc.c */ -#line 2763 "dtool/src/cppparser/cppBison.yxx" +#line 2609 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 524: + case 483: /* Line 1792 of yacc.c */ -#line 2767 "dtool/src/cppparser/cppBison.yxx" +#line 2613 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 525: + case 484: /* Line 1792 of yacc.c */ -#line 2771 "dtool/src/cppparser/cppBison.yxx" +#line 2617 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 526: + case 485: /* Line 1792 of yacc.c */ -#line 2775 "dtool/src/cppparser/cppBison.yxx" +#line 2621 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 527: + case 486: /* Line 1792 of yacc.c */ -#line 2779 "dtool/src/cppparser/cppBison.yxx" +#line 2625 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 528: + case 487: /* Line 1792 of yacc.c */ -#line 2783 "dtool/src/cppparser/cppBison.yxx" +#line 2629 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 529: + case 488: /* Line 1792 of yacc.c */ -#line 2787 "dtool/src/cppparser/cppBison.yxx" +#line 2633 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 530: + case 489: /* Line 1792 of yacc.c */ -#line 2791 "dtool/src/cppparser/cppBison.yxx" +#line 2637 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 531: + case 490: /* Line 1792 of yacc.c */ -#line 2795 "dtool/src/cppparser/cppBison.yxx" +#line 2641 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 532: + case 491: /* Line 1792 of yacc.c */ -#line 2799 "dtool/src/cppparser/cppBison.yxx" +#line 2645 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 533: + case 492: /* Line 1792 of yacc.c */ -#line 2803 "dtool/src/cppparser/cppBison.yxx" +#line 2649 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 534: + case 493: /* Line 1792 of yacc.c */ -#line 2807 "dtool/src/cppparser/cppBison.yxx" +#line 2653 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 535: + case 494: /* Line 1792 of yacc.c */ -#line 2811 "dtool/src/cppparser/cppBison.yxx" +#line 2657 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 536: + case 495: /* Line 1792 of yacc.c */ -#line 2815 "dtool/src/cppparser/cppBison.yxx" +#line 2661 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 537: + case 496: /* Line 1792 of yacc.c */ -#line 2819 "dtool/src/cppparser/cppBison.yxx" +#line 2665 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 538: + case 497: /* Line 1792 of yacc.c */ -#line 2823 "dtool/src/cppparser/cppBison.yxx" +#line 2669 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 539: + case 498: /* Line 1792 of yacc.c */ -#line 2827 "dtool/src/cppparser/cppBison.yxx" +#line 2673 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 540: + case 499: /* Line 1792 of yacc.c */ -#line 2831 "dtool/src/cppparser/cppBison.yxx" +#line 2677 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 541: + case 500: /* Line 1792 of yacc.c */ -#line 2835 "dtool/src/cppparser/cppBison.yxx" +#line 2681 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 542: + case 501: /* Line 1792 of yacc.c */ -#line 2842 "dtool/src/cppparser/cppBison.yxx" +#line 2688 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 543: + case 502: /* Line 1792 of yacc.c */ -#line 2846 "dtool/src/cppparser/cppBison.yxx" +#line 2692 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(true); } break; - case 544: + case 503: /* Line 1792 of yacc.c */ -#line 2850 "dtool/src/cppparser/cppBison.yxx" +#line 2696 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(false); } break; - case 545: + case 504: /* Line 1792 of yacc.c */ -#line 2854 "dtool/src/cppparser/cppBison.yxx" +#line 2700 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 546: + case 505: /* Line 1792 of yacc.c */ -#line 2858 "dtool/src/cppparser/cppBison.yxx" +#line 2704 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; - case 547: + case 506: /* Line 1792 of yacc.c */ -#line 2862 "dtool/src/cppparser/cppBison.yxx" +#line 2708 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); } break; + case 507: +/* Line 1792 of yacc.c */ +#line 2712 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 508: +/* Line 1792 of yacc.c */ +#line 2726 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 509: +/* Line 1792 of yacc.c */ +#line 2730 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 510: +/* Line 1792 of yacc.c */ +#line 2734 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 511: +/* Line 1792 of yacc.c */ +#line 2738 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 512: +/* Line 1792 of yacc.c */ +#line 2742 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 513: +/* Line 1792 of yacc.c */ +#line 2746 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); +} + break; + + case 514: +/* Line 1792 of yacc.c */ +#line 2750 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); +} + break; + + case 515: +/* Line 1792 of yacc.c */ +#line 2754 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 516: +/* Line 1792 of yacc.c */ +#line 2758 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 517: +/* Line 1792 of yacc.c */ +#line 2762 "dtool/src/cppparser/cppBison.yxx" + { + if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; + } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; + } else { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + } +} + break; + + case 518: +/* Line 1792 of yacc.c */ +#line 2774 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 519: +/* Line 1792 of yacc.c */ +#line 2778 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 520: +/* Line 1792 of yacc.c */ +#line 2782 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 521: +/* Line 1792 of yacc.c */ +#line 2786 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 522: +/* Line 1792 of yacc.c */ +#line 2790 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 523: +/* Line 1792 of yacc.c */ +#line 2794 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 524: +/* Line 1792 of yacc.c */ +#line 2798 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 525: +/* Line 1792 of yacc.c */ +#line 2802 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 526: +/* Line 1792 of yacc.c */ +#line 2806 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 527: +/* Line 1792 of yacc.c */ +#line 2810 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 528: +/* Line 1792 of yacc.c */ +#line 2814 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 529: +/* Line 1792 of yacc.c */ +#line 2818 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 530: +/* Line 1792 of yacc.c */ +#line 2822 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 531: +/* Line 1792 of yacc.c */ +#line 2826 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 532: +/* Line 1792 of yacc.c */ +#line 2830 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 533: +/* Line 1792 of yacc.c */ +#line 2834 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 534: +/* Line 1792 of yacc.c */ +#line 2838 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 535: +/* Line 1792 of yacc.c */ +#line 2842 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 536: +/* Line 1792 of yacc.c */ +#line 2846 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 537: +/* Line 1792 of yacc.c */ +#line 2850 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 538: +/* Line 1792 of yacc.c */ +#line 2854 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 539: +/* Line 1792 of yacc.c */ +#line 2858 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 540: +/* Line 1792 of yacc.c */ +#line 2862 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 541: +/* Line 1792 of yacc.c */ +#line 2866 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 542: +/* Line 1792 of yacc.c */ +#line 2870 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 543: +/* Line 1792 of yacc.c */ +#line 2874 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 544: +/* Line 1792 of yacc.c */ +#line 2881 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + + case 545: +/* Line 1792 of yacc.c */ +#line 2885 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(true); +} + break; + + case 546: +/* Line 1792 of yacc.c */ +#line 2889 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(false); +} + break; + + case 547: +/* Line 1792 of yacc.c */ +#line 2893 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + case 548: /* Line 1792 of yacc.c */ -#line 2869 "dtool/src/cppparser/cppBison.yxx" +#line 2897 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); +} + break; + + case 549: +/* Line 1792 of yacc.c */ +#line 2901 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); +} + break; + + case 550: +/* Line 1792 of yacc.c */ +#line 2908 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7237,9 +7289,9 @@ yyreduce: } break; - case 549: + case 551: /* Line 1792 of yacc.c */ -#line 2877 "dtool/src/cppparser/cppBison.yxx" +#line 2916 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7249,41 +7301,41 @@ yyreduce: } break; - case 550: + case 552: /* Line 1792 of yacc.c */ -#line 2885 "dtool/src/cppparser/cppBison.yxx" +#line 2924 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 551: -/* Line 1792 of yacc.c */ -#line 2908 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - - case 552: -/* Line 1792 of yacc.c */ -#line 2912 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - case 553: /* Line 1792 of yacc.c */ -#line 2919 "dtool/src/cppparser/cppBison.yxx" +#line 2950 "dtool/src/cppparser/cppBison.yxx" { - (yyval.str) = (yyvsp[(1) - (1)].str); + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; case 554: /* Line 1792 of yacc.c */ -#line 2923 "dtool/src/cppparser/cppBison.yxx" +#line 2954 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); +} + break; + + case 555: +/* Line 1792 of yacc.c */ +#line 2961 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.str) = (yyvsp[(1) - (1)].str); +} + break; + + case 556: +/* Line 1792 of yacc.c */ +#line 2965 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = (yyvsp[(1) - (2)].str) + (yyvsp[(2) - (2)].str); } @@ -7291,7 +7343,7 @@ yyreduce: /* Line 1792 of yacc.c */ -#line 7295 "built/tmp/cppBison.yxx.c" +#line 7347 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.h.prebuilt b/dtool/src/cppparser/cppBison.h.prebuilt index 491ce5dc46..6c1aac48d8 100644 --- a/dtool/src/cppparser/cppBison.h.prebuilt +++ b/dtool/src/cppparser/cppBison.h.prebuilt @@ -131,25 +131,26 @@ extern int cppyydebug; KW_SIGNED = 340, KW_SIZEOF = 341, KW_STATIC = 342, - KW_STATIC_CAST = 343, - KW_STRUCT = 344, - KW_TEMPLATE = 345, - KW_THROW = 346, - KW_TRUE = 347, - KW_TRY = 348, - KW_TYPEDEF = 349, - KW_TYPENAME = 350, - KW_UNION = 351, - KW_UNSIGNED = 352, - KW_USING = 353, - KW_VIRTUAL = 354, - KW_VOID = 355, - KW_VOLATILE = 356, - KW_WCHAR_T = 357, - KW_WHILE = 358, - START_CPP = 359, - START_CONST_EXPR = 360, - START_TYPE = 361 + KW_STATIC_ASSERT = 343, + KW_STATIC_CAST = 344, + KW_STRUCT = 345, + KW_TEMPLATE = 346, + KW_THROW = 347, + KW_TRUE = 348, + KW_TRY = 349, + KW_TYPEDEF = 350, + KW_TYPENAME = 351, + KW_UNION = 352, + KW_UNSIGNED = 353, + KW_USING = 354, + KW_VIRTUAL = 355, + KW_VOID = 356, + KW_VOLATILE = 357, + KW_WCHAR_T = 358, + KW_WHILE = 359, + START_CPP = 360, + START_CONST_EXPR = 361, + START_TYPE = 362 }; #endif /* Tokens. */ @@ -238,25 +239,26 @@ extern int cppyydebug; #define KW_SIGNED 340 #define KW_SIZEOF 341 #define KW_STATIC 342 -#define KW_STATIC_CAST 343 -#define KW_STRUCT 344 -#define KW_TEMPLATE 345 -#define KW_THROW 346 -#define KW_TRUE 347 -#define KW_TRY 348 -#define KW_TYPEDEF 349 -#define KW_TYPENAME 350 -#define KW_UNION 351 -#define KW_UNSIGNED 352 -#define KW_USING 353 -#define KW_VIRTUAL 354 -#define KW_VOID 355 -#define KW_VOLATILE 356 -#define KW_WCHAR_T 357 -#define KW_WHILE 358 -#define START_CPP 359 -#define START_CONST_EXPR 360 -#define START_TYPE 361 +#define KW_STATIC_ASSERT 343 +#define KW_STATIC_CAST 344 +#define KW_STRUCT 345 +#define KW_TEMPLATE 346 +#define KW_THROW 347 +#define KW_TRUE 348 +#define KW_TRY 349 +#define KW_TYPEDEF 350 +#define KW_TYPENAME 351 +#define KW_UNION 352 +#define KW_UNSIGNED 353 +#define KW_USING 354 +#define KW_VIRTUAL 355 +#define KW_VOID 356 +#define KW_VOLATILE 357 +#define KW_WCHAR_T 358 +#define KW_WHILE 359 +#define START_CPP 360 +#define START_CONST_EXPR 361 +#define START_TYPE 362 diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index b94a21b749..5ca786f485 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -57,7 +57,7 @@ int yyparse(); static void yyerror(const string &msg) { - current_lexer->error(msg); + current_lexer->error(msg, current_lexer->_last_token_loc); } static void @@ -199,9 +199,11 @@ pop_struct() { /* This is a bison-specific declaration to enable recursive calls to yyparse(). It changes the calling sequence to yylex(), passing - pointers to the current yylval and yylloc. It also adds a pointer - to the current lloc to yyerror, which gives us better diagnostics. */ -%define api.pure full + pointers to the current yylval and yylloc. Bison 2.7 introduces a + different syntax that will also pass the current yylloc to yyerror, + but we have to support Bison versions as old as 2.5 for now. */ +/*%define api.pure full*/ +%pure-parser %locations %token REAL @@ -288,6 +290,7 @@ pop_struct() { %token KW_SIGNED %token KW_SIZEOF %token KW_STATIC +%token KW_STATIC_ASSERT %token KW_STATIC_CAST %token KW_STRUCT %token KW_TEMPLATE @@ -518,10 +521,29 @@ declaration: current_scope->add_declaration(make_property, global_scope, current_lexer, @1); } } - | KW_MAKE_SEQ '(' name ',' name ',' name ')' ';' + | KW_MAKE_SEQ '(' name ',' name ',' name ')' ';' { CPPMakeSeq *make_seq = new CPPMakeSeq($3->get_simple_name(), $5->get_simple_name(), $7->get_simple_name(), @1.file); current_scope->add_declaration(make_seq, global_scope, current_lexer, @1); +} + | KW_STATIC_ASSERT '(' const_expr ',' string ')' +{ + CPPExpression::Result result = $3->evaluate(); + if (result._type == CPPExpression::RT_error) { + yywarning("static_assert requires a constant expression", @3); + } else if (!result.as_boolean()) { + yywarning("static_assert failed: " + $5, @3); + } +} + | KW_STATIC_ASSERT '(' const_expr ')' +{ + // This alternative version of static_assert was introduced in C++17. + CPPExpression::Result result = $3->evaluate(); + if (result._type == CPPExpression::RT_error) { + yywarning("static_assert requires a constant expression", @3); + } else if (!result.as_boolean()) { + yywarning("static_assert failed", @3); + } } ; @@ -856,6 +878,9 @@ function_prototype: { pop_scope(); CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert(type != NULL); CPPInstanceIdentifier *ii = $4; @@ -871,6 +896,9 @@ function_prototype: { pop_scope(); CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert(type != NULL); CPPInstanceIdentifier *ii = $5; @@ -1213,6 +1241,9 @@ template_formal_parameter_type: | TYPENAME_IDENTIFIER { $$ = $1->find_type(current_scope, global_scope, false, current_lexer); + if ($$ == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert($$ != NULL); } ; @@ -1608,6 +1639,9 @@ type: | TYPENAME_IDENTIFIER { $$ = $1->find_type(current_scope, global_scope, false, current_lexer); + if ($$ == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert($$ != NULL); } | KW_TYPENAME name @@ -1668,6 +1702,9 @@ type_decl: | TYPENAME_IDENTIFIER { $$ = $1->find_type(current_scope, global_scope, false, current_lexer); + if ($$ == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert($$ != NULL); } | KW_TYPENAME name @@ -1746,6 +1783,9 @@ predefined_type: | TYPENAME_IDENTIFIER { $$ = $1->find_type(current_scope, global_scope, false, current_lexer); + if ($$ == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert($$ != NULL); } | KW_TYPENAME name @@ -2419,6 +2459,9 @@ const_expr: { // A constructor call. CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert(type != NULL); $$ = new CPPExpression(CPPExpression::construct_op(type, $3)); } @@ -2888,6 +2931,9 @@ typedefname: TYPENAME_IDENTIFIER { CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer); + if (type == NULL) { + yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1); + } assert(type != NULL); $$ = type; } diff --git a/dtool/src/cppparser/cppManifest.cxx b/dtool/src/cppparser/cppManifest.cxx index ff0d50e8e4..451416f93d 100644 --- a/dtool/src/cppparser/cppManifest.cxx +++ b/dtool/src/cppparser/cppManifest.cxx @@ -46,9 +46,9 @@ ExpansionNode(const string &str, bool paste) : // Description: //////////////////////////////////////////////////////////////////// CPPManifest:: -CPPManifest(const string &args, const CPPFile &file) : +CPPManifest(const string &args, const cppyyltype &loc) : _variadic_param(-1), - _file(file), + _loc(loc), _expr((CPPExpression *)NULL) { assert(!args.empty()); diff --git a/dtool/src/cppparser/cppManifest.h b/dtool/src/cppparser/cppManifest.h index 5717ad408a..549c50494f 100644 --- a/dtool/src/cppparser/cppManifest.h +++ b/dtool/src/cppparser/cppManifest.h @@ -19,6 +19,7 @@ #include "cppFile.h" #include "cppVisibility.h" +#include "cppBisonDefs.h" #include "vector_string.h" @@ -31,7 +32,7 @@ class CPPType; //////////////////////////////////////////////////////////////////// class CPPManifest { public: - CPPManifest(const string &args, const CPPFile &file = CPPFile()); + CPPManifest(const string &args, const cppyyltype &loc = {0}); ~CPPManifest(); static string stringify(const string &source); @@ -45,7 +46,7 @@ public: bool _has_parameters; int _num_parameters; int _variadic_param; - CPPFile _file; + cppyyltype _loc; CPPExpression *_expr; // Manifests don't have a visibility in the normal sense. Normally diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 71f7dbc568..4a52bde6ec 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -407,6 +407,7 @@ get_next_token0() { return token; } _saved_tokens.push_back(token); + _last_token_loc = loc; return CPPToken(SCOPING, loc, name, result); } @@ -444,10 +445,12 @@ get_next_token0() { token_type = TYPENAME_IDENTIFIER; } + _last_token_loc = loc; return CPPToken(token_type, loc, name, result); } // This is the normal case: just pass through whatever token we got. + _last_token_loc = loc; return token; } @@ -843,10 +846,6 @@ expand_manifests(const string &input_expr, bool expand_undefined) { // Repeatedly scan the expr for any manifest names or defined() // function. - // We'll need to save the set of manifests we've already expanded, - // to guard against recursive references. - set already_expanded; - bool manifest_found; do { manifest_found = false; @@ -867,10 +866,9 @@ expand_manifests(const string &input_expr, bool expand_undefined) { Manifests::const_iterator mi = _manifests.find(ident); if (mi != _manifests.end()) { const CPPManifest *manifest = (*mi).second; - if (already_expanded.insert(manifest).second) { - expand_manifest_inline(expr, q, p, (*mi).second); - manifest_found = true; - } + expand_manifest_inline(expr, q, p, (*mi).second); + manifest_found = true; + } else if (expand_undefined && ident != "true" && ident != "false") { // It is not found. Expand it to 0. expr = expr.substr(0, q) + "0" + expr.substr(p); @@ -1470,7 +1468,7 @@ handle_define_directive(const string &args, const YYLTYPE &loc) { if (args.empty()) { warning("Ignoring empty #define directive", loc); } else { - CPPManifest *manifest = new CPPManifest(args, loc.file); + CPPManifest *manifest = new CPPManifest(args, loc); manifest->_vis = preprocessor_vis; if (!manifest->_has_parameters) { string expr_string = manifest->expand(); @@ -1479,18 +1477,17 @@ handle_define_directive(const string &args, const YYLTYPE &loc) { } } - // ok one memory leak here.. - Manifests::iterator mi = _manifests.find(manifest->_name); - if(mi != _manifests.end()) - { - // i do not see a goodway to compare the old and new hmmmm - //cerr << "Warning Overwriting Constant " << manifest->_name << "\n"; - delete mi->second; + pair result = + _manifests.insert(Manifests::value_type(manifest->_name, manifest)); + + if (!result.second) { + // There was already a macro with this name. Delete the old. + CPPManifest *other = result.first->second; + warning("redefinition of macro '" + manifest->_name + "'", loc); + warning("previous definition is here", other->_loc); + delete other; + result.first->second = manifest; } - - _manifests[manifest->_name] = manifest; - - } } @@ -1560,7 +1557,9 @@ handle_if_directive(const string &args, const YYLTYPE &loc) { if (expr != (CPPExpression *)NULL) { CPPExpression::Result result = expr->evaluate(); if (result._type == CPPExpression::RT_error) { - warning("Ignoring invalid expression " + args, loc); + ostringstream strm; + strm << *expr; + warning("Ignoring invalid expression " + strm.str(), loc); } else { expression_result = result.as_integer(); } @@ -2302,6 +2301,8 @@ check_keyword(const string &name) { if (name == "char32_t") return KW_CHAR32_T; if (name == "class") return KW_CLASS; if (name == "const") return KW_CONST; + if (name == "__const") return KW_CONST; + if (name == "__const__") return KW_CONST; if (name == "delete") return KW_DELETE; if (name == "double") return KW_DOUBLE; if (name == "dynamic_cast") return KW_DYNAMIC_CAST; @@ -2319,6 +2320,8 @@ check_keyword(const string &name) { if (name == "goto") return KW_GOTO; if (name == "if") return KW_IF; if (name == "inline") return KW_INLINE; + if (name == "__inline") return KW_INLINE; + if (name == "__inline__") return KW_INLINE; if (name == "int") return KW_INT; if (name == "long") return KW_LONG; if (name == "__make_property") return KW_MAKE_PROPERTY; @@ -2337,6 +2340,7 @@ check_keyword(const string &name) { if (name == "signed") return KW_SIGNED; if (name == "sizeof") return KW_SIZEOF; if (name == "static") return KW_STATIC; + if (name == "static_assert") return KW_STATIC_ASSERT; if (name == "static_cast") return KW_STATIC_CAST; if (name == "struct") return KW_STRUCT; if (name == "template") return KW_TEMPLATE; diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index c02f0a2e25..4d8e025682 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -101,6 +101,9 @@ public: // incremented), or set it higher to get more debugging information. int _verbose; + // The location of the last token. + cppyyltype _last_token_loc; + protected: bool init_cpp(const CPPFile &file); bool init_const_expr(const string &expr); diff --git a/dtool/src/interrogate/interrogateBuilder.cxx b/dtool/src/interrogate/interrogateBuilder.cxx index 5336c809f8..f16143c413 100644 --- a/dtool/src/interrogate/interrogateBuilder.cxx +++ b/dtool/src/interrogate/interrogateBuilder.cxx @@ -1344,14 +1344,14 @@ scan_manifest(CPPManifest *manifest) { return; } - if (manifest->_file.is_c_file()) { + if (manifest->_loc.file.is_c_file()) { // This #define appears in a .C file. We can only export // manifests defined in a .h file. return; } - if (manifest->_file._source != CPPFile::S_local || - in_ignorefile(manifest->_file._filename_as_referenced)) { + if (manifest->_loc.file._source != CPPFile::S_local || + in_ignorefile(manifest->_loc.file._filename_as_referenced)) { // The manifest is defined in some other package or in an // ignorable file. return; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 180e8bd3e2..8822a6d1c2 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1354,13 +1354,13 @@ def CompileIgate(woutd,wsrc,opts): cmd += ' -srcdir %s -I%s' % (srcdir, srcdir) cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus=201103L' if (COMPILER=="MSVC"): - cmd += ' -D__inline -D_X86_ -DWIN32_VC -DWIN32 -D_WIN32' + cmd += ' -D_X86_ -DWIN32_VC -DWIN32 -D_WIN32' if GetTargetArch() == 'x64': cmd += ' -DWIN64_VC -DWIN64 -D_WIN64' # NOTE: this 1600 value is the version number for VC2010. cmd += ' -D_MSC_VER=1600 -D"__declspec(param)=" -D__cdecl -D_near -D_far -D__near -D__far -D__stdcall' if (COMPILER=="GCC"): - cmd += ' -D__inline -D__const=const -D__attribute__\(x\)=' + cmd += ' -D__attribute__\(x\)=' if GetTargetArch() in ("x86_64", "amd64"): cmd += ' -D_LP64' else: From 51ebc564aaca50ebd48c9e07c6b46d11329f0793 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 11 Oct 2015 16:55:46 +0200 Subject: [PATCH 161/200] Provide stub implementations of several C/C++ standard headers, to make parsing thirdparty sources significantly easier --- dtool/src/parser-inc/README | 5 ++++ dtool/src/parser-inc/assert.h | 6 +++++ dtool/src/parser-inc/inttypes.h | 1 + dtool/src/parser-inc/limits.h | 39 ++++++++++++++++++++++++++++++ dtool/src/parser-inc/stdarg.h | 6 +++++ dtool/src/parser-inc/stdio.h | 8 ++++++ dtool/src/parser-inc/stdlib.h | 1 + dtool/src/parser-inc/stdtypedefs.h | 2 -- dtool/src/parser-inc/string.h | 1 + dtool/src/parser-inc/time.h | 1 + 10 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 dtool/src/parser-inc/README create mode 100644 dtool/src/parser-inc/assert.h create mode 100644 dtool/src/parser-inc/inttypes.h create mode 100644 dtool/src/parser-inc/limits.h create mode 100644 dtool/src/parser-inc/stdarg.h create mode 100644 dtool/src/parser-inc/stdio.h create mode 100644 dtool/src/parser-inc/stdlib.h create mode 100644 dtool/src/parser-inc/string.h create mode 100644 dtool/src/parser-inc/time.h diff --git a/dtool/src/parser-inc/README b/dtool/src/parser-inc/README new file mode 100644 index 0000000000..f0432e94c6 --- /dev/null +++ b/dtool/src/parser-inc/README @@ -0,0 +1,5 @@ +This file, and all the other files in this directory, aren't +intended to be compiled--they're just parsed by CPPParser (and +interrogate) in lieu of the actual system headers, to generate the +interrogate database. + diff --git a/dtool/src/parser-inc/assert.h b/dtool/src/parser-inc/assert.h new file mode 100644 index 0000000000..86422859db --- /dev/null +++ b/dtool/src/parser-inc/assert.h @@ -0,0 +1,6 @@ +#ifndef ASSERT_H +#define ASSERT_H + +#define assert(ignore)((void) 0) + +#endif diff --git a/dtool/src/parser-inc/inttypes.h b/dtool/src/parser-inc/inttypes.h new file mode 100644 index 0000000000..9a6118bd85 --- /dev/null +++ b/dtool/src/parser-inc/inttypes.h @@ -0,0 +1 @@ +#include diff --git a/dtool/src/parser-inc/limits.h b/dtool/src/parser-inc/limits.h new file mode 100644 index 0000000000..08072557fd --- /dev/null +++ b/dtool/src/parser-inc/limits.h @@ -0,0 +1,39 @@ +#ifndef _LIMITS_H +#define _LIMITS_H + +#define CHAR_BIT 8 +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 +#define CHAR_MIN SCHAR_MIN +#define CHAR_MAX SCHAR_MAX + +#define SHRT_MIN (-32768) +#define SHRT_MAX 32767 +#define USHRT_MAX 65535 + +#define INT_MIN -2147483648 +#define INT_MAX 2147483647 +#define UINT_MAX 4294967295U + +#ifdef _LP64 +#define LONG_MIN -9223372036854775808L +#define LONG_MAX 9223372036854775807L +#define ULONG_MAX 18446744073709551615UL +#else +#define LONG_MIN -2147483648L +#define LONG_MAX 2147483647L +#define ULONG_MAX 4294967295UL +#endif + +#define LLONG_MIN -9223372036854775808LL +#define LLONG_MAX -9223372036854775807LL +#define ULLONG_MAX 18446744073709551615ULL + +#ifdef _MSC_VER +#define _I64_MIN -9223372036854775808LL +#define _I64_MAX -9223372036854775807LL +#define _UI64_MAX 18446744073709551615ULL +#endif + +#endif diff --git a/dtool/src/parser-inc/stdarg.h b/dtool/src/parser-inc/stdarg.h new file mode 100644 index 0000000000..38099206b2 --- /dev/null +++ b/dtool/src/parser-inc/stdarg.h @@ -0,0 +1,6 @@ +#ifndef STDARG_H +#define STDARG_H + +typedef struct {} va_list[1]; + +#endif diff --git a/dtool/src/parser-inc/stdio.h b/dtool/src/parser-inc/stdio.h new file mode 100644 index 0000000000..0986ee733b --- /dev/null +++ b/dtool/src/parser-inc/stdio.h @@ -0,0 +1,8 @@ +#ifndef STDIO_H +#define STDIO_H + +#include + +struct FILE; + +#endif diff --git a/dtool/src/parser-inc/stdlib.h b/dtool/src/parser-inc/stdlib.h new file mode 100644 index 0000000000..74093ee881 --- /dev/null +++ b/dtool/src/parser-inc/stdlib.h @@ -0,0 +1 @@ +#include diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index cae3ec4c04..290f97c699 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -23,8 +23,6 @@ typedef int off_t; typedef long time_t; typedef long clock_t; -struct FILE; - namespace std { } diff --git a/dtool/src/parser-inc/string.h b/dtool/src/parser-inc/string.h new file mode 100644 index 0000000000..74093ee881 --- /dev/null +++ b/dtool/src/parser-inc/string.h @@ -0,0 +1 @@ +#include diff --git a/dtool/src/parser-inc/time.h b/dtool/src/parser-inc/time.h new file mode 100644 index 0000000000..74093ee881 --- /dev/null +++ b/dtool/src/parser-inc/time.h @@ -0,0 +1 @@ +#include From 83d9c4f5289731c8adda2110c875a067af7396d4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 11 Oct 2015 20:11:30 +0200 Subject: [PATCH 162/200] Use /usr/local instead of /usr in Mac OS X installer, to work around El Capitan's System Integrity Protection --- makepanda/makepanda.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 8c28cc20cc..7758c4df44 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -6674,8 +6674,8 @@ def MakeInstallerOSX(): # Trailing newline is important, works around a bug in OSX WriteFile("dstroot/tools/etc/paths.d/Panda3D", "/Developer/Tools/Panda3D\n") - oscmd("mkdir -p dstroot/tools/usr/share/man/man1") - oscmd("cp doc/man/*.1 dstroot/tools/usr/share/man/man1/") + oscmd("mkdir -p dstroot/tools/usr/local/share/man/man1") + oscmd("cp doc/man/*.1 dstroot/tools/usr/local/share/man/man1/") for base in os.listdir(GetOutputDir()+"/bin"): binname = "dstroot/tools/Developer/Tools/Panda3D/" + base @@ -6693,13 +6693,13 @@ def MakeInstallerOSX(): if PkgSkip("PYTHON")==0: PV = SDK["PYTHONVERSION"].replace("python", "") - oscmd("mkdir -p dstroot/pythoncode/usr/bin") + oscmd("mkdir -p dstroot/pythoncode/usr/local/bin") oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D") oscmd("mkdir -p dstroot/pythoncode/Library/Python/%s/site-packages" % PV) WriteFile("dstroot/pythoncode/Library/Python/%s/site-packages/Panda3D.pth" % PV, "/Developer/Panda3D") oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/pandac" % GetOutputDir()) oscmd("cp -R %s/direct dstroot/pythoncode/Developer/Panda3D/direct" % GetOutputDir()) - oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"]) + oscmd("ln -s %s dstroot/pythoncode/usr/local/bin/ppython" % SDK["PYTHONEXEC"]) if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/Pmw" % GetOutputDir()) compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/Pmw") From a43d6a45c18f7bdad0539790616c9dd9602502bd Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 12 Oct 2015 14:20:23 +0200 Subject: [PATCH 163/200] Fix issue building with pre-C++11 compiler --- dtool/src/cppparser/cppManifest.cxx | 54 ++++++++++++++++++++++++--- dtool/src/cppparser/cppManifest.h | 3 +- dtool/src/interrogate/interrogate.cxx | 2 +- dtool/src/interrogate/parse_file.cxx | 2 +- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/dtool/src/cppparser/cppManifest.cxx b/dtool/src/cppparser/cppManifest.cxx index 451416f93d..eeb2859c0d 100644 --- a/dtool/src/cppparser/cppManifest.cxx +++ b/dtool/src/cppparser/cppManifest.cxx @@ -43,22 +43,19 @@ ExpansionNode(const string &str, bool paste) : //////////////////////////////////////////////////////////////////// // Function: CPPManifest::Constructor // Access: Public -// Description: +// Description: Creates a manifest from a preprocessor definition. //////////////////////////////////////////////////////////////////// CPPManifest:: CPPManifest(const string &args, const cppyyltype &loc) : _variadic_param(-1), _loc(loc), - _expr((CPPExpression *)NULL) + _expr((CPPExpression *)NULL), + _vis(V_public) { assert(!args.empty()); assert(!isspace(args[0])); - _expr = (CPPExpression *)NULL; - _vis = V_public; - // First, identify the manifest name. - size_t p = 0; while (p < args.size() && !isspace(args[p]) && args[p] != '(') { p++; @@ -88,6 +85,51 @@ CPPManifest(const string &args, const cppyyltype &loc) : save_expansion(args.substr(p), parameter_names); } +//////////////////////////////////////////////////////////////////// +// Function: CPPManifest::Constructor +// Access: Public +// Description: Creates a custom manifest definition, for example +// as specified from a command-line -D option. +//////////////////////////////////////////////////////////////////// +CPPManifest:: +CPPManifest(const string ¯o, const string &definition) : + _variadic_param(-1), + _expr((CPPExpression *)NULL), + _vis(V_public) +{ + _loc.first_line = 0; + _loc.first_column = 0; + _loc.last_line = 0; + _loc.last_column = 0; + + assert(!macro.empty()); + assert(!isspace(macro[0])); + + // First, identify the manifest name. + size_t p = 0; + while (p < macro.size() && !isspace(macro[p]) && macro[p] != '(') { + p++; + } + + _name = macro.substr(0, p); + + vector_string parameter_names; + + if (macro[p] == '(') { + // Hmm, parameters. + _has_parameters = true; + parse_parameters(macro, p, parameter_names); + _num_parameters = parameter_names.size(); + + p++; + } else { + _has_parameters = false; + _num_parameters = 0; + } + + save_expansion(definition, parameter_names); +} + //////////////////////////////////////////////////////////////////// // Function: CPPManifest::Destructor // Access: Public diff --git a/dtool/src/cppparser/cppManifest.h b/dtool/src/cppparser/cppManifest.h index 549c50494f..3510fa14fe 100644 --- a/dtool/src/cppparser/cppManifest.h +++ b/dtool/src/cppparser/cppManifest.h @@ -32,7 +32,8 @@ class CPPType; //////////////////////////////////////////////////////////////////// class CPPManifest { public: - CPPManifest(const string &args, const cppyyltype &loc = {0}); + CPPManifest(const string &args, const cppyyltype &loc); + CPPManifest(const string ¯o, const string &definition); ~CPPManifest(); static string stringify(const string &source); diff --git a/dtool/src/interrogate/interrogate.cxx b/dtool/src/interrogate/interrogate.cxx index 7e7e6e8280..232f293a9b 100644 --- a/dtool/src/interrogate/interrogate.cxx +++ b/dtool/src/interrogate/interrogate.cxx @@ -300,7 +300,7 @@ predefine_macro(CPPParser& parser, const string& inoption) { macro_name = inoption; } - CPPManifest *macro = new CPPManifest(macro_name + " " + macro_def); + CPPManifest *macro = new CPPManifest(macro_name, macro_def); parser._manifests[macro->_name] = macro; } diff --git a/dtool/src/interrogate/parse_file.cxx b/dtool/src/interrogate/parse_file.cxx index 33d99917c6..938ca95731 100644 --- a/dtool/src/interrogate/parse_file.cxx +++ b/dtool/src/interrogate/parse_file.cxx @@ -41,7 +41,7 @@ predefine_macro(CPPParser &parser, const string &option) { cerr << "Predefining " << macro_name << " as " << macro_def << "\n"; - CPPManifest *macro = new CPPManifest(macro_name + " " + macro_def); + CPPManifest *macro = new CPPManifest(macro_name, macro_def); parser._manifests[macro->_name] = macro; } From b65ad853fe10aeb5b75be1ec31faedcc5ffbd0e6 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 12 Oct 2015 23:28:53 +0200 Subject: [PATCH 164/200] Support C++11/14 features: nullptr, decltype, unicode literals, custom literals, alignof --- dtool/src/cppparser/cppBison.cxx.prebuilt | 6204 +++++++++++---------- dtool/src/cppparser/cppBison.h.prebuilt | 422 +- dtool/src/cppparser/cppBison.yxx | 180 +- dtool/src/cppparser/cppBisonDefs.h | 4 +- dtool/src/cppparser/cppExpression.cxx | 303 +- dtool/src/cppparser/cppExpression.h | 30 +- dtool/src/cppparser/cppExtensionType.cxx | 3 +- dtool/src/cppparser/cppExtensionType.h | 2 +- dtool/src/cppparser/cppInstance.cxx | 46 +- dtool/src/cppparser/cppInstance.h | 3 + dtool/src/cppparser/cppPreprocessor.cxx | 270 +- dtool/src/cppparser/cppPreprocessor.h | 2 + dtool/src/cppparser/cppScope.cxx | 4 +- dtool/src/cppparser/cppSimpleType.cxx | 4 + dtool/src/cppparser/cppSimpleType.h | 5 + dtool/src/cppparser/cppToken.cxx | 8 +- dtool/src/parser-inc/stddef.h | 4 + dtool/src/parser-inc/string | 21 + 18 files changed, 4139 insertions(+), 3376 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index bee2ccfa65..863abcd1d4 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -305,216 +305,234 @@ extern int cppyydebug; REAL = 258, INTEGER = 259, CHAR_TOK = 260, - STRING = 261, + SIMPLE_STRING = 261, SIMPLE_IDENTIFIER = 262, - IDENTIFIER = 263, - TYPENAME_IDENTIFIER = 264, - SCOPING = 265, - TYPEDEFNAME = 266, - ELLIPSIS = 267, - OROR = 268, - ANDAND = 269, - EQCOMPARE = 270, - NECOMPARE = 271, - LECOMPARE = 272, - GECOMPARE = 273, - LSHIFT = 274, - RSHIFT = 275, - POINTSAT_STAR = 276, - DOT_STAR = 277, - UNARY = 278, - UNARY_NOT = 279, - UNARY_NEGATE = 280, - UNARY_MINUS = 281, - UNARY_STAR = 282, - UNARY_REF = 283, - POINTSAT = 284, - SCOPE = 285, - PLUSPLUS = 286, - MINUSMINUS = 287, - TIMESEQUAL = 288, - DIVIDEEQUAL = 289, - MODEQUAL = 290, - PLUSEQUAL = 291, - MINUSEQUAL = 292, - OREQUAL = 293, - ANDEQUAL = 294, - XOREQUAL = 295, - LSHIFTEQUAL = 296, - RSHIFTEQUAL = 297, - KW_BEGIN_PUBLISH = 298, - KW_BLOCKING = 299, - KW_BOOL = 300, - KW_CATCH = 301, - KW_CHAR = 302, - KW_CHAR16_T = 303, - KW_CHAR32_T = 304, - KW_CLASS = 305, - KW_CONST = 306, - KW_DELETE = 307, - KW_DOUBLE = 308, - KW_DYNAMIC_CAST = 309, - KW_ELSE = 310, - KW_END_PUBLISH = 311, - KW_ENUM = 312, - KW_EXTENSION = 313, - KW_EXTERN = 314, - KW_EXPLICIT = 315, - KW_PUBLISHED = 316, - KW_FALSE = 317, - KW_FLOAT = 318, - KW_FRIEND = 319, - KW_FOR = 320, - KW_GOTO = 321, - KW_IF = 322, - KW_INLINE = 323, - KW_INT = 324, - KW_LONG = 325, - KW_LONGLONG = 326, - KW_MAKE_PROPERTY = 327, - KW_MAKE_SEQ = 328, - KW_MUTABLE = 329, - KW_NAMESPACE = 330, - KW_NEW = 331, - KW_NOEXCEPT = 332, - KW_OPERATOR = 333, - KW_PRIVATE = 334, - KW_PROTECTED = 335, - KW_PUBLIC = 336, - KW_REGISTER = 337, - KW_RETURN = 338, - KW_SHORT = 339, - KW_SIGNED = 340, - KW_SIZEOF = 341, - KW_STATIC = 342, - KW_STATIC_ASSERT = 343, - KW_STATIC_CAST = 344, - KW_STRUCT = 345, - KW_TEMPLATE = 346, - KW_THROW = 347, - KW_TRUE = 348, - KW_TRY = 349, - KW_TYPEDEF = 350, - KW_TYPENAME = 351, - KW_UNION = 352, - KW_UNSIGNED = 353, - KW_USING = 354, - KW_VIRTUAL = 355, - KW_VOID = 356, - KW_VOLATILE = 357, - KW_WCHAR_T = 358, - KW_WHILE = 359, - START_CPP = 360, - START_CONST_EXPR = 361, - START_TYPE = 362 + STRING_LITERAL = 263, + CUSTOM_LITERAL = 264, + IDENTIFIER = 265, + TYPENAME_IDENTIFIER = 266, + SCOPING = 267, + TYPEDEFNAME = 268, + ELLIPSIS = 269, + OROR = 270, + ANDAND = 271, + EQCOMPARE = 272, + NECOMPARE = 273, + LECOMPARE = 274, + GECOMPARE = 275, + LSHIFT = 276, + RSHIFT = 277, + POINTSAT_STAR = 278, + DOT_STAR = 279, + UNARY = 280, + UNARY_NOT = 281, + UNARY_NEGATE = 282, + UNARY_MINUS = 283, + UNARY_STAR = 284, + UNARY_REF = 285, + POINTSAT = 286, + SCOPE = 287, + PLUSPLUS = 288, + MINUSMINUS = 289, + TIMESEQUAL = 290, + DIVIDEEQUAL = 291, + MODEQUAL = 292, + PLUSEQUAL = 293, + MINUSEQUAL = 294, + OREQUAL = 295, + ANDEQUAL = 296, + XOREQUAL = 297, + LSHIFTEQUAL = 298, + RSHIFTEQUAL = 299, + KW_ALIGNAS = 300, + KW_ALIGNOF = 301, + KW_AUTO = 302, + KW_BEGIN_PUBLISH = 303, + KW_BLOCKING = 304, + KW_BOOL = 305, + KW_CATCH = 306, + KW_CHAR = 307, + KW_CHAR16_T = 308, + KW_CHAR32_T = 309, + KW_CLASS = 310, + KW_CONST = 311, + KW_CONSTEXPR = 312, + KW_DECLTYPE = 313, + KW_DEFAULT = 314, + KW_DELETE = 315, + KW_DOUBLE = 316, + KW_DYNAMIC_CAST = 317, + KW_ELSE = 318, + KW_END_PUBLISH = 319, + KW_ENUM = 320, + KW_EXTENSION = 321, + KW_EXTERN = 322, + KW_EXPLICIT = 323, + KW_PUBLISHED = 324, + KW_FALSE = 325, + KW_FLOAT = 326, + KW_FRIEND = 327, + KW_FOR = 328, + KW_GOTO = 329, + KW_IF = 330, + KW_INLINE = 331, + KW_INT = 332, + KW_LONG = 333, + KW_LONGLONG = 334, + KW_MAKE_PROPERTY = 335, + KW_MAKE_SEQ = 336, + KW_MUTABLE = 337, + KW_NAMESPACE = 338, + KW_NEW = 339, + KW_NOEXCEPT = 340, + KW_NULLPTR = 341, + KW_OPERATOR = 342, + KW_PRIVATE = 343, + KW_PROTECTED = 344, + KW_PUBLIC = 345, + KW_REGISTER = 346, + KW_RETURN = 347, + KW_SHORT = 348, + KW_SIGNED = 349, + KW_SIZEOF = 350, + KW_STATIC = 351, + KW_STATIC_ASSERT = 352, + KW_STATIC_CAST = 353, + KW_STRUCT = 354, + KW_TEMPLATE = 355, + KW_THROW = 356, + KW_TRUE = 357, + KW_TRY = 358, + KW_TYPEDEF = 359, + KW_TYPENAME = 360, + KW_UNION = 361, + KW_UNSIGNED = 362, + KW_USING = 363, + KW_VIRTUAL = 364, + KW_VOID = 365, + KW_VOLATILE = 366, + KW_WCHAR_T = 367, + KW_WHILE = 368, + START_CPP = 369, + START_CONST_EXPR = 370, + START_TYPE = 371 }; #endif /* Tokens. */ #define REAL 258 #define INTEGER 259 #define CHAR_TOK 260 -#define STRING 261 +#define SIMPLE_STRING 261 #define SIMPLE_IDENTIFIER 262 -#define IDENTIFIER 263 -#define TYPENAME_IDENTIFIER 264 -#define SCOPING 265 -#define TYPEDEFNAME 266 -#define ELLIPSIS 267 -#define OROR 268 -#define ANDAND 269 -#define EQCOMPARE 270 -#define NECOMPARE 271 -#define LECOMPARE 272 -#define GECOMPARE 273 -#define LSHIFT 274 -#define RSHIFT 275 -#define POINTSAT_STAR 276 -#define DOT_STAR 277 -#define UNARY 278 -#define UNARY_NOT 279 -#define UNARY_NEGATE 280 -#define UNARY_MINUS 281 -#define UNARY_STAR 282 -#define UNARY_REF 283 -#define POINTSAT 284 -#define SCOPE 285 -#define PLUSPLUS 286 -#define MINUSMINUS 287 -#define TIMESEQUAL 288 -#define DIVIDEEQUAL 289 -#define MODEQUAL 290 -#define PLUSEQUAL 291 -#define MINUSEQUAL 292 -#define OREQUAL 293 -#define ANDEQUAL 294 -#define XOREQUAL 295 -#define LSHIFTEQUAL 296 -#define RSHIFTEQUAL 297 -#define KW_BEGIN_PUBLISH 298 -#define KW_BLOCKING 299 -#define KW_BOOL 300 -#define KW_CATCH 301 -#define KW_CHAR 302 -#define KW_CHAR16_T 303 -#define KW_CHAR32_T 304 -#define KW_CLASS 305 -#define KW_CONST 306 -#define KW_DELETE 307 -#define KW_DOUBLE 308 -#define KW_DYNAMIC_CAST 309 -#define KW_ELSE 310 -#define KW_END_PUBLISH 311 -#define KW_ENUM 312 -#define KW_EXTENSION 313 -#define KW_EXTERN 314 -#define KW_EXPLICIT 315 -#define KW_PUBLISHED 316 -#define KW_FALSE 317 -#define KW_FLOAT 318 -#define KW_FRIEND 319 -#define KW_FOR 320 -#define KW_GOTO 321 -#define KW_IF 322 -#define KW_INLINE 323 -#define KW_INT 324 -#define KW_LONG 325 -#define KW_LONGLONG 326 -#define KW_MAKE_PROPERTY 327 -#define KW_MAKE_SEQ 328 -#define KW_MUTABLE 329 -#define KW_NAMESPACE 330 -#define KW_NEW 331 -#define KW_NOEXCEPT 332 -#define KW_OPERATOR 333 -#define KW_PRIVATE 334 -#define KW_PROTECTED 335 -#define KW_PUBLIC 336 -#define KW_REGISTER 337 -#define KW_RETURN 338 -#define KW_SHORT 339 -#define KW_SIGNED 340 -#define KW_SIZEOF 341 -#define KW_STATIC 342 -#define KW_STATIC_ASSERT 343 -#define KW_STATIC_CAST 344 -#define KW_STRUCT 345 -#define KW_TEMPLATE 346 -#define KW_THROW 347 -#define KW_TRUE 348 -#define KW_TRY 349 -#define KW_TYPEDEF 350 -#define KW_TYPENAME 351 -#define KW_UNION 352 -#define KW_UNSIGNED 353 -#define KW_USING 354 -#define KW_VIRTUAL 355 -#define KW_VOID 356 -#define KW_VOLATILE 357 -#define KW_WCHAR_T 358 -#define KW_WHILE 359 -#define START_CPP 360 -#define START_CONST_EXPR 361 -#define START_TYPE 362 +#define STRING_LITERAL 263 +#define CUSTOM_LITERAL 264 +#define IDENTIFIER 265 +#define TYPENAME_IDENTIFIER 266 +#define SCOPING 267 +#define TYPEDEFNAME 268 +#define ELLIPSIS 269 +#define OROR 270 +#define ANDAND 271 +#define EQCOMPARE 272 +#define NECOMPARE 273 +#define LECOMPARE 274 +#define GECOMPARE 275 +#define LSHIFT 276 +#define RSHIFT 277 +#define POINTSAT_STAR 278 +#define DOT_STAR 279 +#define UNARY 280 +#define UNARY_NOT 281 +#define UNARY_NEGATE 282 +#define UNARY_MINUS 283 +#define UNARY_STAR 284 +#define UNARY_REF 285 +#define POINTSAT 286 +#define SCOPE 287 +#define PLUSPLUS 288 +#define MINUSMINUS 289 +#define TIMESEQUAL 290 +#define DIVIDEEQUAL 291 +#define MODEQUAL 292 +#define PLUSEQUAL 293 +#define MINUSEQUAL 294 +#define OREQUAL 295 +#define ANDEQUAL 296 +#define XOREQUAL 297 +#define LSHIFTEQUAL 298 +#define RSHIFTEQUAL 299 +#define KW_ALIGNAS 300 +#define KW_ALIGNOF 301 +#define KW_AUTO 302 +#define KW_BEGIN_PUBLISH 303 +#define KW_BLOCKING 304 +#define KW_BOOL 305 +#define KW_CATCH 306 +#define KW_CHAR 307 +#define KW_CHAR16_T 308 +#define KW_CHAR32_T 309 +#define KW_CLASS 310 +#define KW_CONST 311 +#define KW_CONSTEXPR 312 +#define KW_DECLTYPE 313 +#define KW_DEFAULT 314 +#define KW_DELETE 315 +#define KW_DOUBLE 316 +#define KW_DYNAMIC_CAST 317 +#define KW_ELSE 318 +#define KW_END_PUBLISH 319 +#define KW_ENUM 320 +#define KW_EXTENSION 321 +#define KW_EXTERN 322 +#define KW_EXPLICIT 323 +#define KW_PUBLISHED 324 +#define KW_FALSE 325 +#define KW_FLOAT 326 +#define KW_FRIEND 327 +#define KW_FOR 328 +#define KW_GOTO 329 +#define KW_IF 330 +#define KW_INLINE 331 +#define KW_INT 332 +#define KW_LONG 333 +#define KW_LONGLONG 334 +#define KW_MAKE_PROPERTY 335 +#define KW_MAKE_SEQ 336 +#define KW_MUTABLE 337 +#define KW_NAMESPACE 338 +#define KW_NEW 339 +#define KW_NOEXCEPT 340 +#define KW_NULLPTR 341 +#define KW_OPERATOR 342 +#define KW_PRIVATE 343 +#define KW_PROTECTED 344 +#define KW_PUBLIC 345 +#define KW_REGISTER 346 +#define KW_RETURN 347 +#define KW_SHORT 348 +#define KW_SIGNED 349 +#define KW_SIZEOF 350 +#define KW_STATIC 351 +#define KW_STATIC_ASSERT 352 +#define KW_STATIC_CAST 353 +#define KW_STRUCT 354 +#define KW_TEMPLATE 355 +#define KW_THROW 356 +#define KW_TRUE 357 +#define KW_TRY 358 +#define KW_TYPEDEF 359 +#define KW_TYPENAME 360 +#define KW_UNION 361 +#define KW_UNSIGNED 362 +#define KW_USING 363 +#define KW_VIRTUAL 364 +#define KW_VOID 365 +#define KW_VOLATILE 366 +#define KW_WCHAR_T 367 +#define KW_WHILE 368 +#define START_CPP 369 +#define START_CONST_EXPR 370 +#define START_TYPE 371 @@ -557,7 +575,7 @@ int cppyyparse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 561 "built/tmp/cppBison.yxx.c" +#line 579 "built/tmp/cppBison.yxx.c" #ifdef short # undef short @@ -777,22 +795,22 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 73 +#define YYFINAL 78 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3843 +#define YYLAST 4093 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 132 +#define YYNTOKENS 141 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 93 /* YYNRULES -- Number of rules. */ -#define YYNRULES 557 +#define YYNRULES 579 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1015 +#define YYNSTATES 1053 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 362 +#define YYMAXUTOK 371 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -803,16 +821,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 130, 2, 2, 2, 123, 116, 2, - 126, 128, 121, 119, 109, 120, 125, 122, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 111, 110, - 117, 112, 118, 113, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 139, 2, 2, 2, 132, 125, 2, + 135, 137, 130, 128, 118, 129, 134, 131, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 120, 119, + 126, 121, 127, 122, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 127, 2, 131, 115, 2, 2, 2, 2, 2, + 2, 136, 2, 140, 124, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 108, 114, 129, 124, 2, 2, 2, + 2, 2, 2, 117, 123, 138, 133, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -836,7 +854,8 @@ static const yytype_uint8 yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107 + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116 }; #if YYDEBUG @@ -858,289 +877,299 @@ static const yytype_uint16 yyprhs[] = 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 386, 389, 391, 393, 395, 397, 398, 405, 408, 410, 412, 414, 418, 421, 426, 429, 434, 438, 443, - 445, 447, 449, 451, 454, 457, 460, 463, 466, 469, - 473, 478, 482, 486, 487, 494, 496, 498, 500, 504, - 507, 509, 513, 515, 518, 520, 523, 525, 529, 535, - 539, 544, 546, 548, 551, 553, 557, 561, 567, 571, - 575, 580, 586, 589, 591, 593, 595, 597, 600, 603, - 606, 609, 612, 616, 621, 623, 625, 627, 630, 633, - 636, 639, 642, 646, 651, 659, 663, 665, 668, 671, - 674, 677, 680, 684, 689, 697, 699, 701, 704, 706, - 708, 710, 713, 718, 720, 722, 725, 727, 729, 731, - 734, 739, 742, 744, 746, 749, 752, 755, 758, 762, - 763, 769, 770, 778, 780, 782, 785, 789, 792, 795, - 798, 802, 806, 810, 814, 818, 822, 827, 832, 835, - 839, 841, 843, 845, 847, 851, 857, 859, 862, 867, - 869, 871, 873, 875, 876, 883, 888, 891, 895, 897, - 899, 901, 903, 905, 907, 909, 911, 913, 915, 917, - 919, 921, 923, 926, 929, 932, 935, 937, 940, 942, - 946, 949, 951, 952, 955, 957, 960, 962, 964, 966, - 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, - 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, - 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, - 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, - 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, - 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, - 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, - 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, - 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, - 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, - 1168, 1170, 1174, 1176, 1178, 1180, 1182, 1184, 1188, 1190, - 1195, 1203, 1211, 1216, 1219, 1222, 1225, 1228, 1231, 1235, - 1239, 1243, 1247, 1251, 1255, 1259, 1263, 1267, 1271, 1275, - 1279, 1283, 1287, 1291, 1295, 1301, 1306, 1311, 1315, 1319, - 1323, 1327, 1329, 1334, 1342, 1350, 1355, 1360, 1365, 1370, - 1375, 1380, 1385, 1390, 1395, 1400, 1405, 1410, 1415, 1420, - 1423, 1429, 1432, 1435, 1438, 1441, 1444, 1448, 1452, 1456, - 1460, 1464, 1468, 1472, 1476, 1480, 1484, 1488, 1492, 1496, - 1500, 1504, 1508, 1512, 1516, 1522, 1527, 1532, 1536, 1540, - 1544, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564, - 1569, 1577, 1585, 1590, 1593, 1599, 1602, 1605, 1608, 1611, - 1615, 1619, 1623, 1627, 1631, 1635, 1639, 1643, 1647, 1651, - 1655, 1659, 1663, 1667, 1671, 1675, 1679, 1683, 1689, 1694, - 1699, 1703, 1707, 1711, 1715, 1717, 1719, 1721, 1723, 1725, - 1727, 1729, 1732, 1735, 1737, 1739, 1741, 1744 + 445, 447, 449, 451, 454, 458, 461, 464, 467, 470, + 473, 477, 482, 486, 490, 491, 498, 500, 502, 504, + 508, 511, 513, 517, 519, 522, 524, 527, 529, 533, + 539, 543, 548, 550, 552, 555, 557, 561, 565, 571, + 575, 579, 584, 590, 593, 595, 597, 599, 601, 604, + 607, 610, 613, 616, 620, 625, 627, 629, 631, 634, + 637, 640, 643, 646, 650, 655, 663, 667, 669, 672, + 675, 678, 681, 684, 688, 693, 701, 703, 705, 708, + 710, 712, 714, 717, 722, 727, 729, 731, 734, 736, + 738, 740, 743, 748, 751, 756, 758, 760, 763, 766, + 769, 772, 776, 777, 783, 784, 792, 794, 796, 799, + 803, 806, 809, 812, 816, 820, 824, 828, 832, 836, + 841, 846, 849, 853, 855, 857, 859, 861, 865, 871, + 873, 876, 881, 883, 885, 887, 889, 890, 897, 902, + 905, 909, 911, 913, 915, 917, 919, 921, 923, 925, + 927, 929, 931, 933, 935, 937, 940, 943, 946, 949, + 951, 954, 956, 960, 963, 965, 966, 969, 971, 974, + 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, + 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, + 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, + 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, + 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, + 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, + 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, + 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, + 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, + 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, + 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, + 1196, 1198, 1200, 1202, 1204, 1208, 1210, 1212, 1214, 1216, + 1218, 1222, 1224, 1229, 1237, 1245, 1250, 1255, 1258, 1261, + 1264, 1267, 1270, 1274, 1278, 1282, 1286, 1290, 1294, 1298, + 1302, 1306, 1310, 1314, 1318, 1322, 1326, 1330, 1334, 1340, + 1345, 1350, 1354, 1358, 1362, 1366, 1368, 1373, 1381, 1389, + 1394, 1399, 1404, 1409, 1414, 1419, 1424, 1429, 1434, 1439, + 1444, 1449, 1454, 1459, 1464, 1467, 1473, 1476, 1479, 1482, + 1485, 1488, 1492, 1496, 1500, 1504, 1508, 1512, 1516, 1520, + 1524, 1528, 1532, 1536, 1540, 1544, 1548, 1552, 1556, 1560, + 1566, 1571, 1576, 1580, 1584, 1588, 1592, 1594, 1596, 1598, + 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1617, 1625, 1633, + 1638, 1643, 1646, 1652, 1655, 1658, 1661, 1664, 1668, 1672, + 1676, 1680, 1684, 1688, 1692, 1696, 1700, 1704, 1708, 1712, + 1716, 1720, 1724, 1728, 1732, 1736, 1742, 1747, 1752, 1756, + 1760, 1764, 1768, 1770, 1772, 1774, 1776, 1778, 1780, 1782, + 1784, 1786, 1789, 1792, 1794, 1796, 1798, 1800, 1803, 1806 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 133, 0, -1, 105, 134, -1, 106, 217, -1, 107, - 187, -1, 224, -1, 134, 110, -1, 134, 139, -1, - 136, -1, 135, 109, 136, -1, 222, 126, 214, 128, - -1, -1, 142, 108, 138, 134, 129, -1, 143, -1, - 165, -1, 137, -1, 202, -1, 204, -1, 140, -1, - 95, 149, -1, 43, -1, 56, -1, 61, 111, -1, - 81, 111, -1, 80, 111, -1, 79, 111, -1, 72, - 126, 8, 109, 8, 128, 110, -1, 72, 126, 8, - 109, 8, 109, 8, 128, 110, -1, 73, 126, 222, - 109, 222, 109, 222, 128, 110, -1, 88, 126, 217, - 109, 223, 128, -1, 88, 126, 217, 128, -1, -1, - 64, 141, 139, -1, 224, -1, 142, 59, -1, 142, - 59, 223, -1, 142, 87, -1, 142, 68, -1, 142, - 100, -1, 142, 60, -1, 142, 102, -1, 142, 74, - -1, 142, 82, -1, 142, 44, -1, 142, 58, -1, - 144, -1, 142, 185, 110, -1, 142, 154, 177, -1, - -1, 142, 185, 145, 147, -1, -1, 142, 51, 184, - 146, 148, -1, 171, 177, -1, 171, 176, 109, 147, - -1, 171, 177, -1, 171, 176, 109, 148, -1, -1, - 142, 185, 150, 152, -1, -1, 142, 51, 184, 151, - 153, -1, 142, 154, 177, -1, 171, 177, -1, 171, - 176, 109, 152, -1, 171, 177, -1, 171, 176, 109, - 153, -1, -1, 8, 126, 155, 173, 128, 162, -1, - -1, 9, 126, 156, 173, 128, 162, -1, -1, 124, - 222, 126, 157, 173, 128, 162, -1, -1, 9, 126, - 121, 171, 128, 126, 158, 173, 128, 162, -1, -1, - 9, 126, 10, 121, 171, 128, 126, 159, 173, 128, - 162, -1, -1, 78, 184, 181, 126, 160, 173, 128, - 162, -1, -1, 78, 51, 184, 181, 126, 161, 173, - 128, 162, -1, 8, -1, 224, -1, 51, -1, 162, - 77, -1, 162, 92, 126, 128, -1, 162, 92, 126, - 222, 128, -1, 130, -1, 124, -1, 121, -1, 122, - -1, 123, -1, 119, -1, 120, -1, 114, -1, 116, - -1, 115, -1, 13, -1, 14, -1, 15, -1, 16, - -1, 17, -1, 18, -1, 117, -1, 118, -1, 19, - -1, 20, -1, 112, -1, 109, -1, 31, -1, 32, - -1, 33, -1, 34, -1, 35, -1, 36, -1, 37, - -1, 38, -1, 39, -1, 40, -1, 41, -1, 42, - -1, 29, -1, 127, 131, -1, 126, 128, -1, 76, - -1, 52, -1, 143, -1, 165, -1, -1, 91, 166, - 117, 167, 118, 164, -1, 91, 143, -1, 224, -1, - 168, -1, 169, -1, 168, 109, 169, -1, 50, 222, - -1, 50, 222, 112, 187, -1, 96, 222, -1, 96, - 222, 112, 187, -1, 170, 182, 175, -1, 51, 170, - 182, 175, -1, 205, -1, 8, -1, 9, -1, 222, - -1, 78, 163, -1, 51, 171, -1, 102, 171, -1, - 121, 171, -1, 116, 171, -1, 14, 171, -1, 10, - 121, 171, -1, 171, 127, 213, 131, -1, 171, 111, - 4, -1, 126, 171, 128, -1, -1, 171, 126, 172, - 173, 128, 162, -1, 224, -1, 12, -1, 174, -1, - 174, 109, 12, -1, 174, 12, -1, 180, -1, 174, - 109, 180, -1, 224, -1, 112, 216, -1, 224, -1, - 112, 217, -1, 110, -1, 108, 209, 129, -1, 111, - 135, 108, 209, 129, -1, 112, 217, 110, -1, 112, - 108, 178, 129, -1, 224, -1, 179, -1, 179, 109, - -1, 217, -1, 108, 178, 129, -1, 179, 109, 217, - -1, 179, 109, 108, 178, 129, -1, 184, 182, 176, - -1, 8, 182, 176, -1, 51, 184, 182, 176, -1, - 51, 82, 184, 182, 176, -1, 82, 180, -1, 219, - -1, 224, -1, 8, -1, 9, -1, 51, 181, -1, - 102, 181, -1, 121, 181, -1, 116, 181, -1, 14, - 181, -1, 10, 121, 181, -1, 181, 127, 213, 131, - -1, 224, -1, 8, -1, 9, -1, 51, 182, -1, - 102, 182, -1, 121, 182, -1, 116, 182, -1, 14, - 182, -1, 10, 121, 182, -1, 182, 127, 213, 131, - -1, 126, 182, 128, 126, 173, 128, 162, -1, 126, - 182, 128, -1, 224, -1, 51, 183, -1, 102, 183, - -1, 121, 183, -1, 116, 183, -1, 14, 183, -1, - 10, 121, 183, -1, 183, 127, 213, 131, -1, 126, - 183, 128, 126, 173, 128, 162, -1, 205, -1, 9, - -1, 96, 222, -1, 188, -1, 190, -1, 195, -1, - 201, 222, -1, 200, 222, 111, 197, -1, 205, -1, - 9, -1, 96, 222, -1, 188, -1, 190, -1, 195, - -1, 201, 222, -1, 200, 222, 111, 197, -1, 200, - 222, -1, 205, -1, 9, -1, 96, 222, -1, 201, - 222, -1, 200, 222, -1, 184, 183, -1, 51, 184, - 183, -1, -1, 201, 108, 189, 134, 129, -1, -1, - 201, 222, 191, 192, 108, 134, 129, -1, 224, -1, - 193, -1, 111, 194, -1, 193, 109, 194, -1, 81, - 221, -1, 80, 221, -1, 79, 221, -1, 100, 81, - 221, -1, 100, 80, 221, -1, 100, 79, 221, -1, - 81, 100, 221, -1, 80, 100, 221, -1, 79, 100, - 221, -1, 196, 108, 199, 129, -1, 200, 222, 111, - 197, -1, 200, 222, -1, 200, 111, 197, -1, 200, - -1, 206, -1, 9, -1, 224, -1, 198, 222, 109, - -1, 198, 222, 112, 217, 109, -1, 198, -1, 198, - 222, -1, 198, 222, 112, 217, -1, 57, -1, 50, - -1, 90, -1, 97, -1, -1, 75, 222, 108, 203, - 134, 129, -1, 75, 108, 134, 129, -1, 99, 222, - -1, 99, 75, 222, -1, 206, -1, 207, -1, 208, - -1, 45, -1, 47, -1, 103, -1, 48, -1, 49, - -1, 84, -1, 70, -1, 71, -1, 98, -1, 85, - -1, 69, -1, 84, 206, -1, 70, 206, -1, 98, - 206, -1, 85, 206, -1, 63, -1, 70, 63, -1, - 53, -1, 70, 70, 63, -1, 70, 53, -1, 101, - -1, -1, 210, 211, -1, 224, -1, 211, 212, -1, - 3, -1, 4, -1, 6, -1, 5, -1, 8, -1, - 9, -1, 10, -1, 7, -1, 12, -1, 13, -1, - 14, -1, 15, -1, 16, -1, 17, -1, 18, -1, - 19, -1, 20, -1, 21, -1, 22, -1, 29, -1, - 30, -1, 31, -1, 32, -1, 33, -1, 34, -1, - 35, -1, 36, -1, 37, -1, 38, -1, 39, -1, - 40, -1, 41, -1, 42, -1, 45, -1, 46, -1, - 47, -1, 48, -1, 49, -1, 103, -1, 50, -1, - 51, -1, 52, -1, 53, -1, 54, -1, 55, -1, - 57, -1, 59, -1, 60, -1, 62, -1, 63, -1, - 64, -1, 65, -1, 66, -1, 67, -1, 68, -1, - 69, -1, 70, -1, 74, -1, 76, -1, 79, -1, - 80, -1, 81, -1, 61, -1, 82, -1, 83, -1, - 84, -1, 85, -1, 86, -1, 87, -1, 89, -1, - 90, -1, 92, -1, 93, -1, 94, -1, 95, -1, - 96, -1, 97, -1, 98, -1, 100, -1, 101, -1, - 102, -1, 104, -1, 78, -1, 119, -1, 120, -1, - 121, -1, 122, -1, 116, -1, 114, -1, 115, -1, - 130, -1, 124, -1, 112, -1, 123, -1, 117, -1, - 118, -1, 126, -1, 128, -1, 125, -1, 109, -1, - 110, -1, 111, -1, 127, -1, 131, -1, 113, -1, - 108, 211, 129, -1, 224, -1, 217, -1, 224, -1, - 215, -1, 217, -1, 215, 109, 217, -1, 218, -1, - 126, 187, 128, 216, -1, 89, 117, 187, 118, 126, - 215, 128, -1, 54, 117, 187, 118, 126, 215, 128, - -1, 86, 126, 187, 128, -1, 130, 216, -1, 124, - 216, -1, 120, 216, -1, 121, 216, -1, 116, 216, - -1, 216, 121, 216, -1, 216, 122, 216, -1, 216, - 123, 216, -1, 216, 119, 216, -1, 216, 120, 216, - -1, 216, 114, 216, -1, 216, 115, 216, -1, 216, - 116, 216, -1, 216, 13, 216, -1, 216, 14, 216, - -1, 216, 15, 216, -1, 216, 16, 216, -1, 216, - 17, 216, -1, 216, 18, 216, -1, 216, 19, 216, - -1, 216, 20, 216, -1, 216, 113, 216, 111, 216, - -1, 216, 127, 217, 131, -1, 216, 126, 215, 128, - -1, 216, 126, 128, -1, 216, 125, 216, -1, 216, - 29, 216, -1, 126, 215, 128, -1, 218, -1, 126, - 187, 128, 217, -1, 89, 117, 187, 118, 126, 215, - 128, -1, 54, 117, 187, 118, 126, 215, 128, -1, - 9, 126, 214, 128, -1, 69, 126, 214, 128, -1, - 47, 126, 214, 128, -1, 103, 126, 214, 128, -1, - 48, 126, 214, 128, -1, 49, 126, 214, 128, -1, - 45, 126, 214, 128, -1, 84, 126, 214, 128, -1, - 70, 126, 214, 128, -1, 98, 126, 214, 128, -1, - 85, 126, 214, 128, -1, 63, 126, 214, 128, -1, - 53, 126, 214, 128, -1, 86, 126, 187, 128, -1, - 76, 186, -1, 76, 186, 126, 214, 128, -1, 130, - 217, -1, 124, 217, -1, 120, 217, -1, 121, 217, - -1, 116, 217, -1, 217, 121, 217, -1, 217, 122, - 217, -1, 217, 123, 217, -1, 217, 119, 217, -1, - 217, 120, 217, -1, 217, 114, 217, -1, 217, 115, - 217, -1, 217, 116, 217, -1, 217, 13, 217, -1, - 217, 14, 217, -1, 217, 15, 217, -1, 217, 16, - 217, -1, 217, 17, 217, -1, 217, 18, 217, -1, - 217, 117, 217, -1, 217, 118, 217, -1, 217, 19, - 217, -1, 217, 20, 217, -1, 217, 113, 217, 111, - 217, -1, 217, 127, 217, 131, -1, 217, 126, 215, - 128, -1, 217, 126, 128, -1, 217, 125, 217, -1, - 217, 29, 217, -1, 126, 215, 128, -1, 4, -1, - 93, -1, 62, -1, 5, -1, 3, -1, 223, -1, - 8, -1, 220, -1, 126, 187, 128, 217, -1, 89, - 117, 187, 118, 126, 215, 128, -1, 54, 117, 187, - 118, 126, 215, 128, -1, 86, 126, 187, 128, -1, - 76, 186, -1, 76, 186, 126, 214, 128, -1, 130, - 217, -1, 124, 217, -1, 120, 217, -1, 116, 217, - -1, 219, 121, 217, -1, 219, 122, 217, -1, 219, - 123, 217, -1, 219, 119, 217, -1, 219, 120, 217, - -1, 219, 114, 217, -1, 219, 115, 217, -1, 219, - 116, 217, -1, 219, 13, 217, -1, 219, 14, 217, - -1, 219, 15, 217, -1, 219, 16, 217, -1, 219, - 17, 217, -1, 219, 18, 217, -1, 219, 117, 217, - -1, 219, 118, 217, -1, 219, 19, 217, -1, 219, - 20, 217, -1, 219, 113, 217, 111, 217, -1, 219, - 127, 217, 131, -1, 219, 126, 215, 128, -1, 219, - 126, 128, -1, 219, 125, 217, -1, 219, 29, 217, - -1, 126, 215, 128, -1, 4, -1, 93, -1, 62, - -1, 5, -1, 3, -1, 223, -1, 222, -1, 201, - 222, -1, 96, 222, -1, 8, -1, 9, -1, 6, - -1, 223, 6, -1, -1 + 142, 0, -1, 114, 143, -1, 115, 226, -1, 116, + 196, -1, 233, -1, 143, 119, -1, 143, 148, -1, + 145, -1, 144, 118, 145, -1, 231, 135, 223, 137, + -1, -1, 151, 117, 147, 143, 138, -1, 152, -1, + 174, -1, 146, -1, 211, -1, 213, -1, 149, -1, + 104, 158, -1, 48, -1, 64, -1, 69, 120, -1, + 90, 120, -1, 89, 120, -1, 88, 120, -1, 80, + 135, 10, 118, 10, 137, 119, -1, 80, 135, 10, + 118, 10, 118, 10, 137, 119, -1, 81, 135, 231, + 118, 231, 118, 231, 137, 119, -1, 97, 135, 226, + 118, 232, 137, -1, 97, 135, 226, 137, -1, -1, + 72, 150, 148, -1, 233, -1, 151, 67, -1, 151, + 67, 6, -1, 151, 96, -1, 151, 76, -1, 151, + 109, -1, 151, 68, -1, 151, 111, -1, 151, 82, + -1, 151, 91, -1, 151, 49, -1, 151, 66, -1, + 153, -1, 151, 194, 119, -1, 151, 163, 186, -1, + -1, 151, 194, 154, 156, -1, -1, 151, 56, 193, + 155, 157, -1, 180, 186, -1, 180, 185, 118, 156, + -1, 180, 186, -1, 180, 185, 118, 157, -1, -1, + 151, 194, 159, 161, -1, -1, 151, 56, 193, 160, + 162, -1, 151, 163, 186, -1, 180, 186, -1, 180, + 185, 118, 161, -1, 180, 186, -1, 180, 185, 118, + 162, -1, -1, 10, 135, 164, 182, 137, 171, -1, + -1, 11, 135, 165, 182, 137, 171, -1, -1, 133, + 231, 135, 166, 182, 137, 171, -1, -1, 11, 135, + 130, 180, 137, 135, 167, 182, 137, 171, -1, -1, + 11, 135, 12, 130, 180, 137, 135, 168, 182, 137, + 171, -1, -1, 87, 193, 190, 135, 169, 182, 137, + 171, -1, -1, 87, 56, 193, 190, 135, 170, 182, + 137, 171, -1, 10, -1, 233, -1, 56, -1, 171, + 85, -1, 171, 101, 135, 137, -1, 171, 101, 135, + 231, 137, -1, 139, -1, 133, -1, 130, -1, 131, + -1, 132, -1, 128, -1, 129, -1, 123, -1, 125, + -1, 124, -1, 15, -1, 16, -1, 17, -1, 18, + -1, 19, -1, 20, -1, 126, -1, 127, -1, 21, + -1, 22, -1, 121, -1, 118, -1, 33, -1, 34, + -1, 35, -1, 36, -1, 37, -1, 38, -1, 39, + -1, 40, -1, 41, -1, 42, -1, 43, -1, 44, + -1, 31, -1, 136, 140, -1, 135, 137, -1, 84, + -1, 60, -1, 152, -1, 174, -1, -1, 100, 175, + 126, 176, 127, 173, -1, 100, 152, -1, 233, -1, + 177, -1, 178, -1, 177, 118, 178, -1, 55, 231, + -1, 55, 231, 121, 196, -1, 105, 231, -1, 105, + 231, 121, 196, -1, 179, 191, 184, -1, 56, 179, + 191, 184, -1, 214, -1, 10, -1, 11, -1, 231, + -1, 87, 172, -1, 87, 6, 10, -1, 56, 180, + -1, 111, 180, -1, 130, 180, -1, 125, 180, -1, + 16, 180, -1, 12, 130, 180, -1, 180, 136, 222, + 140, -1, 180, 120, 4, -1, 135, 180, 137, -1, + -1, 180, 135, 181, 182, 137, 171, -1, 233, -1, + 14, -1, 183, -1, 183, 118, 14, -1, 183, 14, + -1, 189, -1, 183, 118, 189, -1, 233, -1, 121, + 225, -1, 233, -1, 121, 226, -1, 119, -1, 117, + 218, 138, -1, 120, 144, 117, 218, 138, -1, 121, + 226, 119, -1, 121, 117, 187, 138, -1, 233, -1, + 188, -1, 188, 118, -1, 226, -1, 117, 187, 138, + -1, 188, 118, 226, -1, 188, 118, 117, 187, 138, + -1, 193, 191, 185, -1, 10, 191, 185, -1, 56, + 193, 191, 185, -1, 56, 91, 193, 191, 185, -1, + 91, 189, -1, 228, -1, 233, -1, 10, -1, 11, + -1, 56, 190, -1, 111, 190, -1, 130, 190, -1, + 125, 190, -1, 16, 190, -1, 12, 130, 190, -1, + 190, 136, 222, 140, -1, 233, -1, 10, -1, 11, + -1, 56, 191, -1, 111, 191, -1, 130, 191, -1, + 125, 191, -1, 16, 191, -1, 12, 130, 191, -1, + 191, 136, 222, 140, -1, 135, 191, 137, 135, 182, + 137, 171, -1, 135, 191, 137, -1, 233, -1, 56, + 192, -1, 111, 192, -1, 130, 192, -1, 125, 192, + -1, 16, 192, -1, 12, 130, 192, -1, 192, 136, + 222, 140, -1, 135, 192, 137, 135, 182, 137, 171, + -1, 214, -1, 11, -1, 105, 231, -1, 197, -1, + 199, -1, 204, -1, 210, 231, -1, 209, 231, 120, + 206, -1, 58, 135, 226, 137, -1, 214, -1, 11, + -1, 105, 231, -1, 197, -1, 199, -1, 204, -1, + 210, 231, -1, 209, 231, 120, 206, -1, 209, 231, + -1, 58, 135, 226, 137, -1, 214, -1, 11, -1, + 105, 231, -1, 210, 231, -1, 209, 231, -1, 193, + 192, -1, 56, 193, 192, -1, -1, 210, 117, 198, + 143, 138, -1, -1, 210, 231, 200, 201, 117, 143, + 138, -1, 233, -1, 202, -1, 120, 203, -1, 202, + 118, 203, -1, 90, 230, -1, 89, 230, -1, 88, + 230, -1, 109, 90, 230, -1, 109, 89, 230, -1, + 109, 88, 230, -1, 90, 109, 230, -1, 89, 109, + 230, -1, 88, 109, 230, -1, 205, 117, 208, 138, + -1, 209, 231, 120, 206, -1, 209, 231, -1, 209, + 120, 206, -1, 209, -1, 215, -1, 11, -1, 233, + -1, 207, 231, 118, -1, 207, 231, 121, 226, 118, + -1, 207, -1, 207, 231, -1, 207, 231, 121, 226, + -1, 65, -1, 55, -1, 99, -1, 106, -1, -1, + 83, 231, 117, 212, 143, 138, -1, 83, 117, 143, + 138, -1, 108, 231, -1, 108, 83, 231, -1, 215, + -1, 216, -1, 217, -1, 50, -1, 52, -1, 112, + -1, 53, -1, 54, -1, 93, -1, 78, -1, 79, + -1, 107, -1, 94, -1, 77, -1, 93, 215, -1, + 78, 215, -1, 107, 215, -1, 94, 215, -1, 71, + -1, 78, 71, -1, 61, -1, 78, 78, 71, -1, + 78, 61, -1, 110, -1, -1, 219, 220, -1, 233, + -1, 220, 221, -1, 3, -1, 4, -1, 6, -1, + 8, -1, 9, -1, 5, -1, 10, -1, 11, -1, + 12, -1, 7, -1, 14, -1, 15, -1, 16, -1, + 17, -1, 18, -1, 19, -1, 20, -1, 21, -1, + 22, -1, 23, -1, 24, -1, 31, -1, 32, -1, + 33, -1, 34, -1, 35, -1, 36, -1, 37, -1, + 38, -1, 39, -1, 40, -1, 41, -1, 42, -1, + 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, + 50, -1, 51, -1, 52, -1, 53, -1, 54, -1, + 55, -1, 56, -1, 57, -1, 58, -1, 59, -1, + 60, -1, 61, -1, 62, -1, 63, -1, 65, -1, + 67, -1, 68, -1, 70, -1, 71, -1, 72, -1, + 73, -1, 74, -1, 75, -1, 76, -1, 77, -1, + 78, -1, 82, -1, 84, -1, 86, -1, 87, -1, + 88, -1, 89, -1, 90, -1, 69, -1, 91, -1, + 92, -1, 93, -1, 94, -1, 95, -1, 96, -1, + 97, -1, 98, -1, 99, -1, 101, -1, 102, -1, + 103, -1, 104, -1, 105, -1, 106, -1, 107, -1, + 109, -1, 110, -1, 111, -1, 112, -1, 113, -1, + 128, -1, 129, -1, 130, -1, 131, -1, 125, -1, + 123, -1, 124, -1, 139, -1, 133, -1, 121, -1, + 132, -1, 126, -1, 127, -1, 135, -1, 137, -1, + 134, -1, 118, -1, 119, -1, 120, -1, 136, -1, + 140, -1, 122, -1, 117, 220, 138, -1, 233, -1, + 226, -1, 233, -1, 224, -1, 226, -1, 224, 118, + 226, -1, 227, -1, 135, 196, 137, 225, -1, 98, + 126, 196, 127, 135, 224, 137, -1, 62, 126, 196, + 127, 135, 224, 137, -1, 95, 135, 196, 137, -1, + 46, 135, 196, 137, -1, 139, 225, -1, 133, 225, + -1, 129, 225, -1, 130, 225, -1, 125, 225, -1, + 225, 130, 225, -1, 225, 131, 225, -1, 225, 132, + 225, -1, 225, 128, 225, -1, 225, 129, 225, -1, + 225, 123, 225, -1, 225, 124, 225, -1, 225, 125, + 225, -1, 225, 15, 225, -1, 225, 16, 225, -1, + 225, 17, 225, -1, 225, 18, 225, -1, 225, 19, + 225, -1, 225, 20, 225, -1, 225, 21, 225, -1, + 225, 22, 225, -1, 225, 122, 225, 120, 225, -1, + 225, 136, 226, 140, -1, 225, 135, 224, 137, -1, + 225, 135, 137, -1, 225, 134, 225, -1, 225, 31, + 225, -1, 135, 224, 137, -1, 227, -1, 135, 196, + 137, 226, -1, 98, 126, 196, 127, 135, 224, 137, + -1, 62, 126, 196, 127, 135, 224, 137, -1, 11, + 135, 223, 137, -1, 77, 135, 223, 137, -1, 52, + 135, 223, 137, -1, 112, 135, 223, 137, -1, 53, + 135, 223, 137, -1, 54, 135, 223, 137, -1, 50, + 135, 223, 137, -1, 93, 135, 223, 137, -1, 78, + 135, 223, 137, -1, 107, 135, 223, 137, -1, 94, + 135, 223, 137, -1, 71, 135, 223, 137, -1, 61, + 135, 223, 137, -1, 95, 135, 196, 137, -1, 46, + 135, 196, 137, -1, 84, 195, -1, 84, 195, 135, + 223, 137, -1, 139, 226, -1, 133, 226, -1, 129, + 226, -1, 130, 226, -1, 125, 226, -1, 226, 130, + 226, -1, 226, 131, 226, -1, 226, 132, 226, -1, + 226, 128, 226, -1, 226, 129, 226, -1, 226, 123, + 226, -1, 226, 124, 226, -1, 226, 125, 226, -1, + 226, 15, 226, -1, 226, 16, 226, -1, 226, 17, + 226, -1, 226, 18, 226, -1, 226, 19, 226, -1, + 226, 20, 226, -1, 226, 126, 226, -1, 226, 127, + 226, -1, 226, 21, 226, -1, 226, 22, 226, -1, + 226, 122, 226, 120, 226, -1, 226, 136, 226, 140, + -1, 226, 135, 224, 137, -1, 226, 135, 137, -1, + 226, 134, 226, -1, 226, 31, 226, -1, 135, 224, + 137, -1, 4, -1, 102, -1, 70, -1, 5, -1, + 3, -1, 232, -1, 9, -1, 10, -1, 86, -1, + 229, -1, 135, 196, 137, 226, -1, 98, 126, 196, + 127, 135, 224, 137, -1, 62, 126, 196, 127, 135, + 224, 137, -1, 95, 135, 196, 137, -1, 46, 135, + 196, 137, -1, 84, 195, -1, 84, 195, 135, 223, + 137, -1, 139, 226, -1, 133, 226, -1, 129, 226, + -1, 125, 226, -1, 228, 130, 226, -1, 228, 131, + 226, -1, 228, 132, 226, -1, 228, 128, 226, -1, + 228, 129, 226, -1, 228, 123, 226, -1, 228, 124, + 226, -1, 228, 125, 226, -1, 228, 15, 226, -1, + 228, 16, 226, -1, 228, 17, 226, -1, 228, 18, + 226, -1, 228, 19, 226, -1, 228, 20, 226, -1, + 228, 126, 226, -1, 228, 127, 226, -1, 228, 21, + 226, -1, 228, 22, 226, -1, 228, 122, 226, 120, + 226, -1, 228, 136, 226, 140, -1, 228, 135, 224, + 137, -1, 228, 135, 137, -1, 228, 134, 226, -1, + 228, 31, 226, -1, 135, 224, 137, -1, 4, -1, + 102, -1, 70, -1, 5, -1, 3, -1, 232, -1, + 9, -1, 86, -1, 231, -1, 210, 231, -1, 105, + 231, -1, 10, -1, 11, -1, 6, -1, 8, -1, + 232, 6, -1, 232, 8, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 396, 396, 397, 401, 408, 409, 410, 414, 415, - 419, 432, 431, 443, 444, 445, 446, 447, 448, 449, - 450, 463, 472, 476, 484, 488, 492, 503, 524, 529, - 538, 552, 551, 566, 570, 574, 585, 589, 593, 597, - 601, 605, 609, 613, 617, 624, 628, 637, 649, 648, - 664, 663, 681, 689, 700, 709, 723, 722, 738, 737, - 748, 763, 769, 778, 785, 798, 797, 820, 819, 844, - 843, 874, 873, 892, 891, 912, 911, 943, 942, 968, - 981, 985, 989, 993, 997, 1004, 1008, 1012, 1016, 1020, - 1024, 1028, 1032, 1036, 1040, 1044, 1048, 1052, 1056, 1060, - 1064, 1068, 1072, 1076, 1080, 1084, 1088, 1092, 1096, 1100, - 1104, 1108, 1112, 1116, 1120, 1124, 1128, 1132, 1136, 1140, - 1144, 1148, 1152, 1156, 1163, 1164, 1169, 1168, 1176, 1180, - 1181, 1185, 1191, 1200, 1204, 1208, 1212, 1216, 1222, 1232, - 1236, 1241, 1253, 1257, 1271, 1276, 1281, 1286, 1291, 1296, - 1301, 1306, 1311, 1317, 1316, 1338, 1342, 1347, 1351, 1356, - 1364, 1369, 1377, 1381, 1388, 1392, 1399, 1403, 1407, 1411, - 1415, 1422, 1423, 1424, 1428, 1431, 1432, 1433, 1437, 1442, - 1450, 1456, 1462, 1466, 1476, 1480, 1484, 1488, 1493, 1498, - 1503, 1508, 1513, 1518, 1526, 1530, 1534, 1538, 1543, 1548, - 1553, 1558, 1563, 1568, 1573, 1579, 1587, 1591, 1596, 1601, - 1606, 1611, 1616, 1621, 1626, 1635, 1639, 1647, 1651, 1655, - 1659, 1663, 1679, 1698, 1702, 1710, 1714, 1718, 1722, 1726, - 1742, 1758, 1779, 1783, 1791, 1795, 1811, 1830, 1836, 1847, - 1846, 1871, 1870, 1900, 1901, 1905, 1906, 1910, 1914, 1918, - 1922, 1926, 1930, 1934, 1938, 1942, 1949, 1957, 1961, 1965, - 1969, 1976, 1980, 1987, 1988, 1994, 2002, 2003, 2009, 2018, - 2025, 2029, 2033, 2041, 2040, 2062, 2066, 2072, 2081, 2082, - 2083, 2087, 2091, 2095, 2099, 2103, 2107, 2112, 2117, 2122, - 2127, 2132, 2136, 2141, 2150, 2155, 2163, 2167, 2172, 2176, - 2181, 2189, 2199, 2199, 2209, 2210, 2214, 2217, 2220, 2223, - 2226, 2229, 2232, 2235, 2238, 2238, 2238, 2239, 2239, 2239, - 2239, 2240, 2240, 2240, 2240, 2240, 2241, 2241, 2241, 2242, - 2242, 2242, 2242, 2242, 2243, 2243, 2243, 2243, 2243, 2244, - 2244, 2244, 2244, 2244, 2245, 2245, 2245, 2246, 2246, 2246, - 2246, 2246, 2247, 2247, 2247, 2248, 2248, 2248, 2248, 2249, - 2249, 2249, 2250, 2250, 2250, 2250, 2250, 2251, 2251, 2251, - 2251, 2252, 2252, 2252, 2252, 2252, 2253, 2253, 2253, 2253, - 2253, 2253, 2254, 2254, 2254, 2254, 2254, 2255, 2256, 2259, - 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, - 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, 2260, - 2261, 2261, 2265, 2269, 2276, 2280, 2287, 2291, 2298, 2302, - 2306, 2310, 2314, 2318, 2322, 2326, 2338, 2342, 2346, 2350, - 2354, 2358, 2362, 2366, 2370, 2374, 2378, 2382, 2386, 2390, - 2394, 2398, 2402, 2406, 2410, 2414, 2418, 2422, 2426, 2430, - 2434, 2442, 2446, 2450, 2454, 2458, 2468, 2474, 2480, 2486, - 2492, 2498, 2504, 2511, 2518, 2525, 2532, 2538, 2544, 2548, - 2552, 2556, 2560, 2564, 2576, 2580, 2584, 2588, 2592, 2596, - 2600, 2604, 2608, 2612, 2616, 2620, 2624, 2628, 2632, 2636, - 2640, 2644, 2648, 2652, 2656, 2660, 2664, 2668, 2672, 2676, - 2680, 2687, 2691, 2695, 2699, 2703, 2707, 2711, 2725, 2729, - 2733, 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2773, 2777, - 2781, 2785, 2789, 2793, 2797, 2801, 2805, 2809, 2813, 2817, - 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849, 2853, 2857, - 2861, 2865, 2869, 2873, 2880, 2884, 2888, 2892, 2896, 2900, - 2907, 2915, 2923, 2949, 2953, 2960, 2964, 2970 + 0, 404, 404, 405, 409, 416, 417, 418, 422, 423, + 427, 440, 439, 451, 452, 453, 454, 455, 456, 457, + 458, 471, 480, 484, 492, 496, 500, 511, 532, 537, + 548, 562, 561, 576, 580, 584, 595, 599, 603, 607, + 611, 615, 619, 623, 627, 634, 638, 647, 659, 658, + 674, 673, 691, 699, 710, 719, 733, 732, 748, 747, + 758, 773, 779, 788, 795, 808, 807, 830, 829, 854, + 853, 884, 883, 902, 901, 922, 921, 953, 952, 978, + 991, 995, 999, 1003, 1007, 1014, 1018, 1022, 1026, 1030, + 1034, 1038, 1042, 1046, 1050, 1054, 1058, 1062, 1066, 1070, + 1074, 1078, 1082, 1086, 1090, 1094, 1098, 1102, 1106, 1110, + 1114, 1118, 1122, 1126, 1130, 1134, 1138, 1142, 1146, 1150, + 1154, 1158, 1162, 1166, 1173, 1174, 1179, 1178, 1186, 1190, + 1191, 1195, 1201, 1210, 1214, 1218, 1222, 1226, 1232, 1242, + 1246, 1251, 1263, 1267, 1281, 1296, 1301, 1306, 1311, 1316, + 1321, 1326, 1331, 1336, 1342, 1341, 1363, 1367, 1372, 1376, + 1381, 1389, 1394, 1402, 1406, 1413, 1417, 1424, 1428, 1432, + 1436, 1440, 1447, 1448, 1449, 1453, 1456, 1457, 1458, 1462, + 1467, 1475, 1481, 1487, 1491, 1501, 1505, 1509, 1513, 1518, + 1523, 1528, 1533, 1538, 1543, 1551, 1555, 1559, 1563, 1568, + 1573, 1578, 1583, 1588, 1593, 1598, 1604, 1612, 1616, 1621, + 1626, 1631, 1636, 1641, 1646, 1651, 1660, 1664, 1672, 1676, + 1680, 1684, 1688, 1704, 1720, 1732, 1736, 1744, 1748, 1752, + 1756, 1760, 1776, 1792, 1810, 1822, 1826, 1834, 1838, 1854, + 1873, 1879, 1890, 1889, 1914, 1913, 1943, 1944, 1948, 1949, + 1953, 1957, 1961, 1965, 1969, 1973, 1977, 1981, 1985, 1992, + 2000, 2004, 2008, 2012, 2019, 2023, 2030, 2031, 2037, 2045, + 2046, 2052, 2061, 2068, 2072, 2076, 2084, 2083, 2105, 2109, + 2115, 2124, 2125, 2126, 2130, 2134, 2138, 2142, 2146, 2150, + 2155, 2160, 2165, 2170, 2175, 2179, 2184, 2193, 2198, 2206, + 2210, 2215, 2219, 2224, 2232, 2242, 2242, 2252, 2253, 2257, + 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, + 2267, 2267, 2268, 2268, 2268, 2268, 2269, 2269, 2269, 2269, + 2269, 2270, 2270, 2270, 2271, 2271, 2271, 2271, 2271, 2272, + 2272, 2272, 2272, 2272, 2273, 2273, 2273, 2273, 2273, 2274, + 2274, 2274, 2275, 2275, 2275, 2275, 2275, 2276, 2276, 2276, + 2276, 2276, 2277, 2277, 2277, 2278, 2278, 2278, 2278, 2279, + 2279, 2279, 2279, 2279, 2280, 2280, 2280, 2280, 2280, 2281, + 2281, 2281, 2281, 2282, 2282, 2282, 2282, 2282, 2283, 2283, + 2283, 2283, 2283, 2284, 2284, 2284, 2284, 2284, 2285, 2285, + 2285, 2285, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, + 2288, 2288, 2288, 2289, 2289, 2289, 2289, 2289, 2289, 2289, + 2289, 2289, 2289, 2290, 2290, 2294, 2298, 2305, 2309, 2316, + 2320, 2327, 2331, 2335, 2339, 2343, 2347, 2351, 2355, 2359, + 2363, 2367, 2371, 2375, 2379, 2383, 2387, 2391, 2395, 2399, + 2403, 2407, 2411, 2415, 2419, 2423, 2427, 2431, 2435, 2439, + 2443, 2447, 2451, 2455, 2459, 2467, 2471, 2475, 2479, 2483, + 2493, 2499, 2505, 2511, 2517, 2523, 2529, 2536, 2543, 2550, + 2557, 2563, 2569, 2573, 2577, 2581, 2585, 2589, 2593, 2597, + 2601, 2605, 2609, 2613, 2617, 2621, 2625, 2629, 2633, 2637, + 2641, 2645, 2649, 2653, 2657, 2661, 2665, 2669, 2673, 2677, + 2681, 2685, 2689, 2693, 2697, 2701, 2708, 2712, 2716, 2720, + 2724, 2728, 2732, 2736, 2740, 2754, 2758, 2762, 2766, 2770, + 2774, 2778, 2782, 2786, 2790, 2794, 2798, 2802, 2806, 2810, + 2814, 2818, 2822, 2826, 2830, 2834, 2838, 2842, 2846, 2850, + 2854, 2858, 2862, 2866, 2870, 2874, 2878, 2882, 2886, 2890, + 2894, 2898, 2905, 2909, 2913, 2917, 2921, 2925, 2929, 2933, + 2940, 2948, 2956, 2982, 2986, 2993, 2997, 3001, 3007, 3018 }; #endif @@ -1149,33 +1178,35 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "REAL", "INTEGER", "CHAR_TOK", "STRING", - "SIMPLE_IDENTIFIER", "IDENTIFIER", "TYPENAME_IDENTIFIER", "SCOPING", - "TYPEDEFNAME", "ELLIPSIS", "OROR", "ANDAND", "EQCOMPARE", "NECOMPARE", - "LECOMPARE", "GECOMPARE", "LSHIFT", "RSHIFT", "POINTSAT_STAR", - "DOT_STAR", "UNARY", "UNARY_NOT", "UNARY_NEGATE", "UNARY_MINUS", - "UNARY_STAR", "UNARY_REF", "POINTSAT", "SCOPE", "PLUSPLUS", "MINUSMINUS", - "TIMESEQUAL", "DIVIDEEQUAL", "MODEQUAL", "PLUSEQUAL", "MINUSEQUAL", - "OREQUAL", "ANDEQUAL", "XOREQUAL", "LSHIFTEQUAL", "RSHIFTEQUAL", - "KW_BEGIN_PUBLISH", "KW_BLOCKING", "KW_BOOL", "KW_CATCH", "KW_CHAR", - "KW_CHAR16_T", "KW_CHAR32_T", "KW_CLASS", "KW_CONST", "KW_DELETE", + "$end", "error", "$undefined", "REAL", "INTEGER", "CHAR_TOK", + "SIMPLE_STRING", "SIMPLE_IDENTIFIER", "STRING_LITERAL", "CUSTOM_LITERAL", + "IDENTIFIER", "TYPENAME_IDENTIFIER", "SCOPING", "TYPEDEFNAME", + "ELLIPSIS", "OROR", "ANDAND", "EQCOMPARE", "NECOMPARE", "LECOMPARE", + "GECOMPARE", "LSHIFT", "RSHIFT", "POINTSAT_STAR", "DOT_STAR", "UNARY", + "UNARY_NOT", "UNARY_NEGATE", "UNARY_MINUS", "UNARY_STAR", "UNARY_REF", + "POINTSAT", "SCOPE", "PLUSPLUS", "MINUSMINUS", "TIMESEQUAL", + "DIVIDEEQUAL", "MODEQUAL", "PLUSEQUAL", "MINUSEQUAL", "OREQUAL", + "ANDEQUAL", "XOREQUAL", "LSHIFTEQUAL", "RSHIFTEQUAL", "KW_ALIGNAS", + "KW_ALIGNOF", "KW_AUTO", "KW_BEGIN_PUBLISH", "KW_BLOCKING", "KW_BOOL", + "KW_CATCH", "KW_CHAR", "KW_CHAR16_T", "KW_CHAR32_T", "KW_CLASS", + "KW_CONST", "KW_CONSTEXPR", "KW_DECLTYPE", "KW_DEFAULT", "KW_DELETE", "KW_DOUBLE", "KW_DYNAMIC_CAST", "KW_ELSE", "KW_END_PUBLISH", "KW_ENUM", "KW_EXTENSION", "KW_EXTERN", "KW_EXPLICIT", "KW_PUBLISHED", "KW_FALSE", "KW_FLOAT", "KW_FRIEND", "KW_FOR", "KW_GOTO", "KW_IF", "KW_INLINE", "KW_INT", "KW_LONG", "KW_LONGLONG", "KW_MAKE_PROPERTY", "KW_MAKE_SEQ", - "KW_MUTABLE", "KW_NAMESPACE", "KW_NEW", "KW_NOEXCEPT", "KW_OPERATOR", - "KW_PRIVATE", "KW_PROTECTED", "KW_PUBLIC", "KW_REGISTER", "KW_RETURN", - "KW_SHORT", "KW_SIGNED", "KW_SIZEOF", "KW_STATIC", "KW_STATIC_ASSERT", - "KW_STATIC_CAST", "KW_STRUCT", "KW_TEMPLATE", "KW_THROW", "KW_TRUE", - "KW_TRY", "KW_TYPEDEF", "KW_TYPENAME", "KW_UNION", "KW_UNSIGNED", - "KW_USING", "KW_VIRTUAL", "KW_VOID", "KW_VOLATILE", "KW_WCHAR_T", - "KW_WHILE", "START_CPP", "START_CONST_EXPR", "START_TYPE", "'{'", "','", - "';'", "':'", "'='", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", - "'-'", "'*'", "'/'", "'%'", "'~'", "'.'", "'('", "'['", "')'", "'}'", - "'!'", "']'", "$accept", "grammar", "cpp", "constructor_inits", - "constructor_init", "extern_c", "$@1", "declaration", - "friend_declaration", "$@2", "storage_class", "type_like_declaration", - "multiple_var_declaration", "$@3", "$@4", + "KW_MUTABLE", "KW_NAMESPACE", "KW_NEW", "KW_NOEXCEPT", "KW_NULLPTR", + "KW_OPERATOR", "KW_PRIVATE", "KW_PROTECTED", "KW_PUBLIC", "KW_REGISTER", + "KW_RETURN", "KW_SHORT", "KW_SIGNED", "KW_SIZEOF", "KW_STATIC", + "KW_STATIC_ASSERT", "KW_STATIC_CAST", "KW_STRUCT", "KW_TEMPLATE", + "KW_THROW", "KW_TRUE", "KW_TRY", "KW_TYPEDEF", "KW_TYPENAME", "KW_UNION", + "KW_UNSIGNED", "KW_USING", "KW_VIRTUAL", "KW_VOID", "KW_VOLATILE", + "KW_WCHAR_T", "KW_WHILE", "START_CPP", "START_CONST_EXPR", "START_TYPE", + "'{'", "','", "';'", "':'", "'='", "'?'", "'|'", "'^'", "'&'", "'<'", + "'>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'.'", "'('", "'['", + "')'", "'}'", "'!'", "']'", "$accept", "grammar", "cpp", + "constructor_inits", "constructor_init", "extern_c", "$@1", + "declaration", "friend_declaration", "$@2", "storage_class", + "type_like_declaration", "multiple_var_declaration", "$@3", "$@4", "multiple_instance_identifiers", "multiple_const_instance_identifiers", "typedef_declaration", "$@5", "$@6", "typedef_instance_identifiers", "typedef_const_instance_identifiers", "function_prototype", "$@7", "$@8", @@ -1199,7 +1230,7 @@ static const char *const yytname[] = "element", "optional_const_expr", "optional_const_expr_comma", "const_expr_comma", "no_angle_bracket_const_expr", "const_expr", "const_operand", "formal_const_expr", "formal_const_operand", - "class_derivation_name", "name", "string", "empty", YY_NULL + "class_derivation_name", "name", "string_literal", "empty", YY_NULL }; #endif @@ -1218,72 +1249,75 @@ static const yytype_uint16 yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 123, 44, - 59, 58, 61, 63, 124, 94, 38, 60, 62, 43, - 45, 42, 47, 37, 126, 46, 40, 91, 41, 125, - 33, 93 + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 123, 44, 59, + 58, 61, 63, 124, 94, 38, 60, 62, 43, 45, + 42, 47, 37, 126, 46, 40, 91, 41, 125, 33, + 93 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 132, 133, 133, 133, 134, 134, 134, 135, 135, - 136, 138, 137, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 141, 140, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 143, 143, 143, 145, 144, - 146, 144, 147, 147, 148, 148, 150, 149, 151, 149, - 149, 152, 152, 153, 153, 155, 154, 156, 154, 157, - 154, 158, 154, 159, 154, 160, 154, 161, 154, 154, - 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 164, 164, 166, 165, 165, 167, - 167, 168, 168, 169, 169, 169, 169, 169, 169, 170, - 170, 170, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 172, 171, 173, 173, 173, 173, 173, - 174, 174, 175, 175, 176, 176, 177, 177, 177, 177, - 177, 178, 178, 178, 179, 179, 179, 179, 180, 180, - 180, 180, 180, 180, 181, 181, 181, 181, 181, 181, - 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 184, 184, 184, 184, 184, - 184, 184, 184, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 186, 186, 186, 186, 186, 187, 187, 189, - 188, 191, 190, 192, 192, 193, 193, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 195, 196, 196, 196, - 196, 197, 197, 198, 198, 198, 199, 199, 199, 200, - 201, 201, 201, 203, 202, 202, 204, 204, 205, 205, - 205, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 207, 207, 207, 207, - 207, 208, 210, 209, 211, 211, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 213, 213, 214, 214, 215, 215, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 218, 218, 218, 218, 218, 218, 218, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 220, 220, 220, 220, 220, 220, - 221, 221, 221, 222, 222, 223, 223, 224 + 0, 141, 142, 142, 142, 143, 143, 143, 144, 144, + 145, 147, 146, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 150, 149, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 152, 152, 152, 154, 153, + 155, 153, 156, 156, 157, 157, 159, 158, 160, 158, + 158, 161, 161, 162, 162, 164, 163, 165, 163, 166, + 163, 167, 163, 168, 163, 169, 163, 170, 163, 163, + 171, 171, 171, 171, 171, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 173, 173, 175, 174, 174, 176, + 176, 177, 177, 178, 178, 178, 178, 178, 178, 179, + 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 181, 180, 182, 182, 182, 182, + 182, 183, 183, 184, 184, 185, 185, 186, 186, 186, + 186, 186, 187, 187, 187, 188, 188, 188, 188, 189, + 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, + 191, 191, 191, 191, 191, 191, 191, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 195, 195, 195, 195, 195, + 196, 196, 198, 197, 200, 199, 201, 201, 202, 202, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 204, + 205, 205, 205, 205, 206, 206, 207, 207, 207, 208, + 208, 208, 209, 210, 210, 210, 212, 211, 211, 213, + 213, 214, 214, 214, 215, 215, 215, 215, 215, 215, + 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, + 216, 216, 216, 216, 217, 219, 218, 220, 220, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 222, 222, 223, 223, 224, + 224, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 229, 229, 229, 229, 229, 229, 229, 229, + 230, 230, 230, 231, 231, 232, 232, 232, 232, 233 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1303,23 +1337,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 0, 6, 2, 1, 1, 1, 3, 2, 4, 2, 4, 3, 4, 1, - 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, - 4, 3, 3, 0, 6, 1, 1, 1, 3, 2, - 1, 3, 1, 2, 1, 2, 1, 3, 5, 3, - 4, 1, 1, 2, 1, 3, 3, 5, 3, 3, - 4, 5, 2, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 3, 4, 1, 1, 1, 2, 2, 2, - 2, 2, 3, 4, 7, 3, 1, 2, 2, 2, - 2, 2, 3, 4, 7, 1, 1, 2, 1, 1, - 1, 2, 4, 1, 1, 2, 1, 1, 1, 2, - 4, 2, 1, 1, 2, 2, 2, 2, 3, 0, - 5, 0, 7, 1, 1, 2, 3, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 4, 4, 2, 3, - 1, 1, 1, 1, 3, 5, 1, 2, 4, 1, - 1, 1, 1, 0, 6, 4, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 1, 2, 1, 3, - 2, 1, 0, 2, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, + 3, 4, 3, 3, 0, 6, 1, 1, 1, 3, + 2, 1, 3, 1, 2, 1, 2, 1, 3, 5, + 3, 4, 1, 1, 2, 1, 3, 3, 5, 3, + 3, 4, 5, 2, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 3, 4, 1, 1, 1, 2, 2, + 2, 2, 2, 3, 4, 7, 3, 1, 2, 2, + 2, 2, 2, 3, 4, 7, 1, 1, 2, 1, + 1, 1, 2, 4, 4, 1, 1, 2, 1, 1, + 1, 2, 4, 2, 4, 1, 1, 2, 2, 2, + 2, 3, 0, 5, 0, 7, 1, 1, 2, 3, + 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, + 4, 2, 3, 1, 1, 1, 1, 3, 5, 1, + 2, 4, 1, 1, 1, 1, 0, 6, 4, 2, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, + 2, 1, 3, 2, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1330,21 +1364,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 4, - 7, 7, 4, 2, 2, 2, 2, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 1, 4, 7, 7, 4, 4, 2, 2, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, + 4, 3, 3, 3, 3, 1, 4, 7, 7, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 2, 5, 2, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, + 4, 4, 3, 3, 3, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 4, 7, 7, 4, + 4, 2, 5, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, - 3, 1, 4, 7, 7, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, - 5, 2, 2, 2, 2, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 7, 7, 4, 2, 5, 2, 2, 2, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, - 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 1, 1, 1, 2, 0 + 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 1, 1, 1, 1, 2, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1352,1143 +1388,1205 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 557, 0, 0, 0, 557, 5, 505, 501, 504, - 555, 507, 0, 0, 0, 0, 0, 0, 0, 503, - 0, 0, 0, 0, 0, 0, 0, 0, 502, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 451, 506, - 216, 281, 282, 284, 285, 270, 0, 298, 269, 296, - 291, 287, 288, 286, 290, 271, 0, 272, 289, 301, - 283, 557, 4, 218, 219, 220, 0, 260, 0, 215, - 278, 279, 280, 1, 20, 21, 0, 31, 0, 0, - 0, 0, 0, 0, 0, 557, 557, 0, 6, 15, - 7, 18, 0, 13, 45, 14, 16, 17, 33, 557, - 557, 557, 557, 557, 557, 0, 557, 557, 557, 233, - 0, 469, 0, 0, 232, 557, 557, 0, 0, 557, - 557, 475, 473, 474, 472, 216, 281, 282, 284, 285, - 298, 296, 291, 287, 286, 290, 289, 283, 0, 0, - 416, 471, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 579, 0, 0, 0, 579, 5, 520, 516, 519, + 575, 576, 522, 523, 0, 0, 0, 0, 0, 0, + 0, 0, 518, 0, 0, 0, 0, 524, 0, 0, + 0, 0, 517, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 465, 521, 217, 284, 285, 287, 288, 273, + 0, 0, 301, 272, 299, 294, 290, 291, 289, 293, + 274, 0, 275, 292, 304, 286, 579, 4, 219, 220, + 221, 0, 263, 0, 216, 281, 282, 283, 1, 20, + 21, 0, 31, 0, 0, 0, 0, 0, 0, 0, + 579, 579, 0, 6, 15, 7, 18, 0, 13, 45, + 14, 16, 17, 33, 579, 0, 579, 579, 579, 579, + 579, 0, 579, 579, 579, 236, 0, 484, 0, 0, + 235, 579, 579, 0, 0, 579, 579, 490, 488, 489, + 487, 217, 284, 285, 287, 288, 301, 299, 294, 290, + 289, 293, 292, 286, 0, 0, 429, 486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 556, 557, 300, 297, 287, - 293, 287, 292, 295, 553, 554, 217, 294, 0, 557, - 557, 557, 557, 557, 557, 237, 206, 557, 0, 258, - 239, 221, 22, 557, 0, 0, 557, 0, 25, 24, - 23, 0, 0, 128, 0, 0, 19, 0, 276, 79, - 224, 43, 0, 44, 34, 39, 37, 41, 0, 42, - 36, 0, 38, 40, 11, 0, 0, 48, 226, 227, - 228, 260, 0, 223, 0, 415, 414, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 234, 557, 236, 235, - 0, 0, 0, 0, 0, 0, 0, 0, 500, 484, - 485, 486, 487, 488, 489, 492, 493, 499, 0, 481, - 482, 483, 490, 491, 479, 480, 476, 477, 478, 498, - 497, 0, 0, 238, 299, 557, 211, 207, 208, 210, - 209, 0, 557, 266, 0, 263, 262, 259, 261, 0, - 557, 557, 32, 0, 0, 557, 273, 0, 557, 0, - 0, 56, 277, 65, 67, 50, 35, 0, 557, 225, - 557, 0, 302, 166, 0, 0, 47, 46, 0, 231, - 229, 455, 461, 457, 459, 460, 467, 0, 466, 456, - 463, 0, 462, 465, 468, 0, 464, 458, 452, 417, - 0, 496, 495, 212, 0, 0, 413, 412, 267, 256, - 222, 557, 0, 0, 244, 243, 0, 0, 275, 557, - 0, 30, 140, 141, 0, 0, 0, 0, 130, 131, - 557, 139, 129, 58, 60, 0, 557, 0, 0, 557, - 0, 557, 185, 186, 0, 557, 557, 557, 557, 557, - 0, 184, 557, 69, 0, 557, 0, 8, 0, 557, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, - 557, 142, 0, 0, 470, 0, 494, 557, 213, 264, - 0, 240, 0, 0, 0, 0, 245, 557, 0, 0, - 0, 557, 0, 133, 557, 135, 557, 0, 195, 196, - 0, 557, 557, 557, 557, 557, 557, 557, 194, 0, - 57, 557, 548, 544, 547, 557, 156, 0, 0, 546, - 0, 0, 0, 0, 545, 0, 0, 0, 0, 0, - 0, 157, 160, 557, 183, 508, 549, 155, 0, 0, - 0, 51, 557, 0, 557, 191, 187, 188, 190, 189, - 75, 557, 12, 557, 167, 303, 304, 302, 0, 557, - 557, 0, 172, 174, 171, 169, 0, 148, 144, 95, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 577, 578, 579, 0, 303, 300, 290, 296, 290, + 295, 298, 573, 574, 218, 297, 0, 579, 579, 579, + 579, 579, 579, 240, 207, 579, 0, 261, 242, 222, + 22, 579, 0, 0, 579, 0, 25, 24, 23, 0, + 0, 128, 0, 0, 19, 0, 279, 79, 226, 43, + 0, 0, 44, 34, 39, 37, 41, 0, 42, 36, + 0, 38, 40, 11, 0, 0, 48, 228, 229, 230, + 263, 0, 225, 0, 428, 427, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 237, 579, 239, 238, + 0, 0, 0, 0, 0, 0, 0, 0, 515, 499, + 500, 501, 502, 503, 504, 507, 508, 514, 0, 496, + 497, 498, 505, 506, 494, 495, 491, 492, 493, 513, + 512, 0, 0, 241, 0, 302, 579, 212, 208, 209, + 211, 210, 0, 579, 269, 0, 266, 265, 262, 264, + 0, 579, 579, 32, 0, 0, 579, 276, 0, 579, + 0, 0, 56, 280, 65, 67, 50, 0, 35, 0, + 579, 227, 579, 0, 305, 167, 0, 0, 47, 46, + 0, 233, 231, 469, 483, 475, 471, 473, 474, 481, + 0, 480, 470, 477, 0, 476, 479, 482, 0, 478, + 472, 466, 430, 0, 511, 510, 224, 213, 0, 0, + 426, 425, 270, 259, 223, 579, 0, 0, 247, 246, + 0, 0, 278, 579, 0, 30, 140, 141, 0, 0, + 0, 0, 130, 131, 579, 139, 129, 58, 60, 0, + 579, 0, 0, 579, 0, 0, 579, 186, 187, 0, + 579, 579, 579, 579, 579, 0, 185, 579, 69, 0, + 579, 0, 8, 0, 579, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 579, 142, 0, 0, 485, + 0, 509, 579, 214, 267, 0, 243, 0, 0, 0, + 0, 248, 579, 0, 0, 0, 579, 0, 133, 579, + 135, 579, 0, 196, 197, 0, 579, 579, 579, 579, + 579, 579, 579, 195, 0, 57, 579, 566, 562, 565, + 568, 579, 157, 0, 0, 0, 564, 0, 569, 0, + 0, 0, 563, 0, 0, 0, 0, 0, 0, 158, + 161, 579, 184, 525, 567, 156, 0, 0, 0, 51, + 579, 234, 0, 579, 192, 188, 189, 191, 190, 75, + 579, 12, 579, 168, 306, 307, 305, 0, 579, 579, + 0, 173, 175, 172, 170, 0, 149, 145, 0, 95, 96, 97, 98, 99, 100, 103, 104, 119, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 123, 122, 106, 105, 92, 94, 93, 101, 102, 90, - 91, 87, 88, 89, 86, 0, 0, 85, 143, 145, - 147, 146, 0, 0, 0, 153, 557, 0, 52, 164, - 230, 0, 0, 0, 268, 0, 0, 0, 249, 550, - 0, 248, 0, 247, 0, 0, 0, 557, 246, 0, - 0, 0, 274, 29, 0, 557, 0, 124, 127, 125, - 132, 557, 201, 197, 198, 200, 199, 0, 0, 557, - 137, 162, 59, 557, 0, 61, 557, 0, 557, 0, - 513, 182, 0, 0, 518, 517, 516, 0, 0, 515, - 557, 159, 0, 557, 0, 0, 0, 0, 0, 0, + 91, 87, 88, 89, 86, 0, 0, 85, 143, 146, + 148, 147, 0, 0, 0, 154, 579, 0, 52, 165, + 232, 0, 0, 0, 271, 0, 0, 0, 252, 570, + 0, 251, 0, 250, 0, 0, 0, 579, 249, 0, + 0, 0, 277, 29, 0, 579, 0, 124, 127, 125, + 132, 579, 202, 198, 199, 201, 200, 0, 0, 579, + 137, 163, 59, 579, 0, 61, 579, 0, 0, 579, + 0, 531, 183, 0, 0, 536, 535, 534, 0, 0, + 533, 579, 160, 0, 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 557, 0, 54, 77, 192, 557, 0, 0, 306, 307, - 309, 308, 313, 310, 311, 312, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 345, 346, 347, 348, - 349, 350, 351, 352, 353, 368, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 388, 365, 366, - 367, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385, 386, 344, - 387, 557, 405, 406, 407, 398, 410, 394, 395, 393, - 400, 401, 389, 390, 391, 392, 399, 397, 404, 402, - 408, 403, 396, 409, 305, 0, 9, 0, 0, 170, - 173, 149, 121, 120, 152, 151, 165, 557, 0, 0, - 454, 453, 557, 265, 552, 255, 551, 254, 253, 252, - 251, 250, 242, 0, 26, 0, 134, 138, 136, 202, - 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 163, 418, 0, 0, 63, 0, 0, 179, 557, 557, - 0, 557, 0, 0, 0, 543, 81, 66, 80, 158, - 161, 178, 527, 528, 529, 530, 531, 532, 535, 536, - 542, 0, 524, 525, 526, 533, 534, 522, 523, 519, - 520, 521, 541, 540, 0, 0, 0, 71, 68, 0, - 557, 0, 193, 557, 0, 168, 10, 175, 557, 176, - 0, 150, 53, 214, 0, 0, 557, 0, 0, 0, - 427, 425, 426, 424, 0, 0, 423, 0, 0, 0, + 0, 579, 0, 54, 77, 193, 579, 0, 0, 309, + 310, 314, 311, 318, 312, 313, 315, 316, 317, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 380, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 579, 418, 419, 420, 411, 423, 407, 408, + 406, 413, 414, 402, 403, 404, 405, 412, 410, 417, + 415, 421, 416, 409, 422, 308, 0, 9, 0, 0, + 171, 174, 150, 144, 121, 120, 153, 152, 166, 579, + 0, 0, 468, 467, 579, 268, 572, 258, 571, 257, + 256, 255, 254, 253, 245, 0, 26, 0, 134, 138, + 136, 203, 206, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 164, 431, 0, 0, 63, 0, 0, + 180, 0, 579, 579, 0, 579, 0, 0, 0, 561, + 81, 66, 80, 159, 162, 179, 545, 546, 547, 548, + 549, 550, 553, 554, 560, 0, 542, 543, 544, 551, + 552, 540, 541, 537, 538, 539, 559, 558, 0, 0, + 0, 71, 68, 0, 579, 0, 194, 579, 0, 169, + 10, 176, 579, 177, 0, 151, 53, 215, 0, 0, + 579, 0, 0, 0, 0, 441, 439, 440, 438, 0, + 0, 437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 203, 0, - 62, 165, 557, 180, 0, 0, 512, 0, 509, 82, - 0, 0, 539, 538, 73, 557, 55, 0, 557, 70, - 411, 0, 557, 27, 28, 0, 0, 0, 0, 0, - 450, 436, 437, 438, 439, 440, 441, 442, 443, 449, - 0, 433, 434, 435, 431, 432, 428, 429, 430, 448, - 447, 0, 0, 64, 181, 0, 514, 0, 0, 537, - 557, 0, 557, 76, 177, 154, 557, 0, 422, 0, - 419, 0, 446, 445, 0, 0, 83, 0, 0, 557, - 78, 204, 0, 0, 444, 511, 510, 84, 557, 72, - 0, 0, 74, 421, 420 + 0, 0, 0, 204, 0, 62, 166, 530, 579, 181, + 0, 0, 529, 0, 526, 82, 0, 0, 557, 556, + 73, 579, 55, 0, 579, 70, 424, 0, 579, 27, + 28, 0, 0, 0, 0, 0, 0, 464, 450, 451, + 452, 453, 454, 455, 456, 457, 463, 0, 447, 448, + 449, 445, 446, 442, 443, 444, 462, 461, 0, 0, + 64, 182, 0, 532, 0, 0, 555, 579, 0, 579, + 76, 178, 155, 579, 436, 0, 435, 0, 432, 0, + 460, 459, 0, 0, 83, 0, 0, 579, 78, 205, + 0, 0, 458, 528, 527, 84, 579, 72, 0, 0, + 74, 434, 433 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 406, 407, 89, 320, 90, 91, 193, - 92, 93, 94, 328, 390, 419, 491, 206, 385, 459, - 460, 612, 226, 386, 389, 503, 935, 980, 665, 870, - 837, 558, 598, 95, 204, 377, 378, 379, 380, 420, - 787, 480, 481, 610, 567, 326, 511, 512, 482, 400, - 457, 185, 61, 227, 111, 62, 63, 300, 64, 301, - 363, 364, 436, 65, 66, 297, 293, 294, 67, 68, - 96, 369, 97, 69, 70, 71, 72, 404, 405, 505, - 774, 355, 234, 235, 820, 140, 38, 484, 485, 578, - 421, 39, 236 + -1, 4, 5, 421, 422, 94, 332, 95, 96, 201, + 97, 98, 99, 340, 404, 434, 509, 214, 399, 474, + 475, 632, 235, 400, 403, 522, 971, 1017, 686, 904, + 871, 578, 618, 100, 212, 391, 392, 393, 394, 435, + 819, 498, 499, 630, 587, 338, 530, 531, 500, 415, + 472, 193, 66, 236, 117, 67, 68, 311, 69, 312, + 377, 378, 451, 70, 71, 308, 304, 305, 72, 73, + 101, 383, 102, 74, 75, 76, 77, 419, 420, 524, + 805, 369, 243, 244, 853, 146, 42, 502, 503, 598, + 436, 43, 245 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -508 +#define YYPACT_NINF -594 static const yytype_int16 yypact[] = { - 84, -508, 2205, 3287, 35, 3159, -508, -508, -508, -508, - -508, -508, -77, -64, -48, -46, -40, -30, -86, -508, - -28, 1, 3, 3458, 29, 34, 73, 94, -508, 113, - 115, 2205, 2205, 2205, 2205, 1580, 2205, 2865, -508, 132, - -508, -508, -508, -508, -508, -508, 3515, -508, -508, -508, - -508, 3447, -508, 3712, 3712, -508, 105, -508, 3712, -508, - -508, 230, -508, -508, -508, -508, 43, 91, 33, -508, - -508, -508, -508, -508, -508, -508, 138, -508, 129, 156, - 58, 181, 192, 194, 184, 211, -508, 110, -508, -508, - -508, -508, 2556, -508, -508, -508, -508, -508, -508, 2205, - 2205, 2205, 2205, 2205, 2205, 3287, 2205, 2205, 2205, -508, - 105, 190, 105, 105, -508, 2205, 2205, 3287, 3287, 2205, - 2205, 50, 50, 50, 50, -77, -64, -48, -46, -40, - -30, -28, 1, 2103, 1367, 3158, 3333, 115, 201, -27, - 2865, 50, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - 2205, 2205, 2205, 1782, 2205, -508, 230, -508, -508, 3504, - -508, 3712, -508, -508, -508, -508, -508, -508, 215, 230, - 230, 230, 230, 230, 230, 210, -508, -508, 1771, 228, - -508, 14, -508, 3744, 335, 105, -508, 236, -508, -508, - -508, 2205, 2624, -508, 232, 2692, -508, 105, -508, 221, - 224, -508, 3515, -508, 346, -508, -508, -508, 3344, -508, - -508, 105, -508, -508, -508, 105, 336, 243, -508, -508, - -508, 91, 33, -508, 227, 248, -508, 233, 234, 235, - 237, 244, 240, 247, 250, 252, -508, 2205, -508, -508, - 254, 256, 258, 269, 261, 265, 2205, 2205, -508, 895, - 1597, 977, 977, 1572, 1572, 312, 312, -508, 2715, 2268, - 2913, 3026, 1572, 1572, 352, 352, 50, 50, 50, -508, - -508, -26, 2298, 210, -508, 230, 210, 210, 210, 210, - 210, 87, 2205, 105, 271, -508, -508, -508, -508, 1771, - -508, 291, -508, 267, 297, 3553, -508, 2417, 3228, 3515, - 336, -508, -508, -508, 24, -508, 132, 3515, 238, -508, - -508, 283, -508, -508, 105, 1873, -508, -508, 199, 53, - 14, -508, -508, -508, -508, -508, -508, 284, -508, -508, - -508, 285, -508, -508, -508, 290, -508, -508, 50, 2865, - 2205, -508, -508, 210, 292, 280, 2865, -508, 11, -508, - 309, 3581, 36, 313, 316, -508, 414, 105, -508, -508, - 346, -508, -508, -508, 105, 736, 105, 323, 333, -508, - 520, -508, -508, -508, -508, 199, 1378, 328, 199, 1378, - 199, 238, -508, -508, 340, 238, 238, 238, 238, 238, - 145, -508, 3614, -508, 339, -508, 200, -508, 331, 1884, - 2783, 348, 199, 199, 2472, 199, 199, 199, 199, -508, - 185, -508, 1771, 2205, -508, 2205, 2865, 1378, -508, -508, - 2205, -508, 537, 697, 802, 124, -508, -508, 36, 12, - 361, 3642, 16, 359, 520, 368, 401, 3228, -508, -508, - 373, 520, 520, 520, 520, 520, 520, -54, -508, 199, - -508, 185, -508, -508, -508, 520, -508, 3401, 384, -508, - 3458, 1681, 377, 389, -508, 2205, 2205, 2205, 1580, 2205, - 385, 25, -508, 520, 2898, -508, 132, -508, 199, 207, - 386, -508, 185, 187, 238, 388, 388, 388, 388, 388, - -508, 2205, -508, 1378, -508, 1249, -508, -508, 105, 2205, - 1884, 390, 408, 2865, -508, -508, 199, 195, 195, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, 393, 387, -508, -508, 195, - 195, 195, 370, 154, 1873, -508, 2205, 416, -508, -508, - 309, 21, 22, 398, 2830, 105, 277, 105, -508, -508, - 277, -508, 277, -508, 277, 277, 277, 3675, -508, 519, - 421, 105, -508, -508, 3287, -54, 3287, -508, -508, -508, - -508, 520, 413, 413, 413, 413, 413, 196, 2216, 2205, - -508, -508, -508, 185, 426, -508, -23, 3515, 520, 3287, - 415, -508, 3287, 3287, 50, 50, 50, 419, 142, 50, - 493, -508, 1479, -23, 2205, 2205, 2205, 2205, 2205, 2205, - 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - 2205, 2205, 2205, 2205, 2205, 2012, 2205, 411, 544, 428, - 493, 443, -508, -508, 388, 1378, 424, 430, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, -508, -508, 427, -508, 431, 432, -508, - 2023, 195, -508, -508, -508, -508, 2783, 1378, 433, 199, - -508, -508, 493, -508, -508, -508, -508, -508, -508, -508, - -508, -508, -508, 434, -508, 435, -508, -508, -508, 413, - 441, 453, 448, 460, 2216, 2216, 2216, 2216, 1580, 2216, - 930, -508, 452, 470, -508, 199, 2205, -508, 520, -23, - 467, 2205, 461, 472, 2205, -508, -508, 32, -508, -508, - -508, -508, 895, 1597, 977, 977, 1572, 1572, 312, 312, - -508, 2847, 2268, 2913, 3026, 1572, 1572, 352, 352, 50, - 50, 50, -508, -508, 148, 2334, 465, -508, 32, 199, - 1378, 464, -508, 493, 1120, -508, -508, -508, 1884, 2865, - 478, -508, -508, 32, 483, 494, 1378, 3287, 3287, 3287, - 141, 141, 141, 141, 479, 150, 141, 2216, 2216, 2216, - 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, - 2216, 2216, 2216, 2216, 2216, 2216, 2114, 2205, -508, 199, - -508, 2865, -23, -508, 484, 481, -508, 485, 50, -508, - 487, 2205, -508, -508, -508, 1378, -508, 486, 493, 32, - -508, 489, 493, -508, -508, 488, 501, 492, 505, 2216, - -508, 1391, 2978, 3167, 3167, 1921, 1921, 476, 476, -508, - 847, 3041, 3056, 3091, 363, 363, 141, 141, 141, -508, - -508, 152, 2353, -508, -508, 2205, -508, 2205, 31, 2865, - 1378, 497, 493, 32, -508, 32, 493, 502, -508, 504, - 141, 2216, -508, -508, 160, 170, -508, 503, 511, 493, - 32, 32, 2205, 2205, 930, -508, -508, -508, 493, 32, - 174, 178, 32, -508, -508 + 272, -594, 2401, 3534, 18, 1969, -594, -594, -594, -594, + -594, -594, -594, -594, -91, -79, -33, -24, -11, -2, + 3, 47, -594, 62, 70, 75, 3730, -594, 78, 82, + 119, 131, -594, 138, 158, 2401, 2401, 2401, 2401, 1581, + 2401, 3091, -594, 46, -594, -594, -594, -594, -594, -594, + 3693, 161, -594, -594, -594, -594, 3981, -594, 3584, 3584, + -594, 76, -594, 3584, -594, -594, 427, -594, -594, -594, + -594, 192, 14, 99, -594, -594, -594, -594, -594, -594, + -594, 200, -594, 177, 189, 112, 208, 210, 213, 206, + 236, -594, 63, -594, -594, -594, -594, 2629, -594, -594, + -594, -594, -594, -594, 2401, 3534, 2401, 2401, 2401, 2401, + 2401, 3534, 2401, 2401, 2401, -594, 76, 229, 76, 76, + -594, 2401, 2401, 3534, 3534, 2401, 2401, 114, 114, 114, + 114, -91, -33, -24, -11, -2, 3, 62, 70, 3950, + 1790, 3253, 3439, 158, -17, -87, 3091, 114, 2401, 2401, + 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, + 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 1801, + 2401, -594, -594, 427, 2401, -594, -594, 3523, -594, 3584, + -594, -594, -594, -594, -594, -594, 237, 427, 427, 427, + 427, 427, 427, 235, -594, -594, 897, 255, -594, -41, + -594, 2069, 368, 76, -594, 277, -594, -594, -594, 2401, + 2699, -594, 254, 2763, -594, 76, -594, 261, 266, -594, + 3693, 268, -594, 383, -594, -594, -594, 3595, -594, -594, + 76, -594, -594, -594, 76, 365, 279, -594, -594, -594, + 14, 99, -594, 278, 304, -594, 298, 299, 305, 309, + 310, 313, 325, 320, 322, 324, -594, 2401, -594, -594, + 326, 327, 336, 347, 341, 342, 2401, 2401, -594, 3141, + 2471, 2445, 2445, 668, 668, 566, 566, -594, 2917, 3277, + 3292, 3322, 668, 668, 759, 759, 114, 114, 114, -594, + -594, -71, 1379, 235, 2882, -594, 427, 235, 235, 235, + 235, 235, 147, 2401, 76, 338, -594, -594, -594, -594, + 897, -594, 369, -594, 378, 380, 3758, -594, 2861, 3449, + 3693, 365, -594, -594, -594, 1, -594, 2401, -594, 3693, + 676, -594, -594, 364, -594, -594, 76, 1901, -594, -594, + 421, -36, -41, -594, -594, -594, -594, -594, -594, -594, + 366, -594, -594, -594, 367, -594, -594, -594, 370, -594, + -594, 114, 3091, 2401, -594, -594, -594, 235, 371, 375, + 3091, -594, 11, -594, 385, 3795, -26, 390, 393, -594, + 506, 76, -594, -594, 263, -594, -594, -594, 76, 3486, + 76, 391, 399, -594, 265, -594, -594, -594, -594, 421, + 1361, 392, 421, 1361, 421, 2899, 676, -594, -594, 394, + 676, 676, 676, 676, 676, 151, -594, 3838, -594, 387, + -594, 183, -594, 398, 2001, 2935, 397, 421, 421, 2526, + 421, 421, 421, 421, -594, 187, -594, 897, 2401, -594, + 2401, 3091, 1361, -594, -594, 2401, -594, 233, 503, 525, + 339, -594, -594, -26, -69, 416, 3875, 45, 419, 265, + 420, 442, 3449, -594, -594, 413, 265, 265, 265, 265, + 265, 265, -78, -594, 421, -594, 187, -594, -594, -594, + -594, 265, -594, 409, 3632, 424, -594, 3730, -594, 1691, + 410, 428, -594, 2401, 2401, 2401, 1581, 2401, 418, 66, + -594, 265, 3108, -594, 46, -594, 421, 154, 422, -594, + 187, -594, 181, 676, 411, 411, 411, 411, 411, -594, + 2401, -594, 1361, -594, 1223, -594, -594, 76, 2401, 2001, + 415, 445, 3091, -594, -594, 421, 256, 256, 550, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, 429, 425, -594, -594, 256, + 256, 256, 162, 362, 1901, -594, 2401, 446, -594, -594, + 385, -59, -19, 430, 3057, 76, 315, 76, -594, -594, + 315, -594, 315, -594, 315, 315, 315, 3918, -594, 559, + 451, 76, -594, -594, 3534, -78, 3534, -594, -594, -594, + -594, 265, 435, 435, 435, 435, 435, 281, 925, 2401, + -594, -594, -594, 187, 454, -594, 98, 3534, 3693, 265, + 3534, 438, -594, 3534, 3534, 114, 114, 114, 437, 7, + 114, 519, -594, 1471, 98, 2401, 2401, 2401, 2401, 2401, + 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, + 2401, 2401, 2401, 2401, 2401, 2401, 2101, 2401, 199, 574, + 444, 519, 463, -594, -594, 411, 1361, 443, 452, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, -594, 450, -594, 456, 453, + -594, 2201, 256, -594, -594, -594, -594, -594, 2935, 1361, + 459, 421, -594, -594, 519, -594, -594, -594, -594, -594, + -594, -594, -594, -594, -594, 467, -594, 470, -594, -594, + -594, 435, 447, 461, 484, 478, 485, 925, 925, 925, + 925, 1581, 925, 3125, -594, 475, 498, -594, 421, 2401, + -594, 480, 265, 98, 492, 2401, 488, 494, 2401, -594, + -594, 167, -594, -594, -594, -594, 3141, 2471, 2445, 2445, + 668, 668, 566, 566, -594, 3074, 3277, 3292, 3322, 668, + 668, 759, 759, 114, 114, 114, -594, -594, 83, 1599, + 487, -594, 167, 421, 1361, 489, -594, 519, 1085, -594, + -594, -594, 2001, 3091, 496, -594, -594, 167, 518, 521, + 1361, 3534, 3534, 3534, 3534, 144, 144, 144, 144, 504, + 88, 144, 925, 925, 925, 925, 925, 925, 925, 925, + 925, 925, 925, 925, 925, 925, 925, 925, 925, 925, + 925, 2301, 2401, -594, 421, -594, 3091, -594, 98, -594, + 509, 517, -594, 511, 114, -594, 541, 2401, -594, -594, + -594, 1361, -594, 556, 519, 167, -594, 540, 519, -594, + -594, 567, 571, 576, 572, 584, 925, -594, 3262, 3307, + 2485, 2485, 715, 715, 621, 621, -594, 752, 3337, 1814, + 3352, 824, 824, 144, 144, 144, -594, -594, 93, 2502, + -594, -594, 2401, -594, 2401, 6, 3091, 1361, 575, 519, + 167, -594, 167, 519, -594, 578, -594, 579, 144, 925, + -594, -594, 105, 118, -594, 581, 583, 519, 167, 167, + 2401, 2401, 3125, -594, -594, -594, 519, 167, 127, 133, + 167, -594, -594 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -508, -508, -163, -508, 134, -508, -508, 450, -508, -508, - -69, -55, -508, -508, -508, -145, -224, -508, -508, -508, - -178, -271, 445, -508, -508, -508, -508, -508, -508, -508, - -466, -508, -508, 209, -508, -508, -508, 213, 281, -362, - -508, -375, -508, 62, -460, -249, -507, -508, -444, -327, - -408, -89, -44, 457, 188, 30, -63, -508, -33, -508, - -508, -508, 223, -18, -508, -289, -508, -508, -5, -4, - -508, -508, -508, 40, 643, -508, -508, 158, -508, -85, - -508, -463, -95, -20, 173, 74, -141, -508, -508, -322, - 456, -133, -1 + -594, -594, -190, -594, 188, -594, -594, 522, -594, -594, + -84, -82, -594, -594, -594, -99, -179, -594, -594, -594, + -133, -228, 514, -594, -594, -594, -594, -594, -594, -594, + -593, -594, -594, 269, -594, -594, -594, 267, 344, -327, + -594, -394, -594, 128, -455, -264, -528, -594, -477, -173, + -374, -75, -35, 532, 260, 91, -74, -594, -30, -594, + -594, -594, 295, 22, -594, -300, -594, -594, -15, 43, + -594, -594, -594, -6, 542, -594, -594, 228, -594, -23, + -594, -460, -80, -34, -108, 0, -589, -594, -594, -378, + 476, -381, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -259 +#define YYTABLE_NINF -262 static const yytype_int16 yytable[] = { - 6, 614, 166, 778, 98, 237, 238, 239, 240, 241, - 360, 243, 244, 245, 490, 139, 202, 205, 112, 113, - 250, 251, 165, 461, 254, 255, 489, 621, 492, 228, - 203, 105, 661, 305, 387, 73, 595, 631, 666, 174, - 175, 174, 175, 602, 603, 604, 605, 606, 607, 99, - 517, 518, 573, 559, 560, 561, 562, 616, 608, 229, - 186, 384, 100, 114, 493, 138, 174, 175, 495, 496, - 497, 498, 499, 609, 230, 633, 37, 283, 101, 150, - 102, 316, 257, 257, 98, 98, 103, 231, 232, 826, - 286, 287, 288, 289, 290, 291, 104, 613, 106, 174, - 175, 258, 351, 788, 609, 121, 122, 123, 124, 929, - 141, 581, 583, 174, 175, 432, 433, 434, 174, 175, - 429, 589, -241, 430, 930, -241, 657, 107, 667, 108, - 257, 257, 233, 570, 632, 242, 435, 361, 165, 228, - 590, 190, 228, 281, 593, 388, 822, 252, 253, 790, - 791, 187, 341, 823, 781, 115, 827, 402, 785, 996, - 116, -258, 174, 175, 422, 186, 196, 664, 315, 229, - 905, 568, 229, 841, 318, 162, 163, 164, 186, 186, - 186, 186, 186, 186, 230, 207, 295, 230, 840, 1, - 2, 3, 98, 809, 868, 6, 353, 231, 232, 117, - 231, 232, 188, 584, 585, 586, 441, 174, 175, 411, - 829, 118, 615, 412, 292, 354, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 442, 282, 119, - 178, 120, 233, 662, 179, 233, 392, 393, 394, 192, - 413, 257, 395, 486, 795, 194, 486, 257, 797, 257, - 798, 257, 799, 800, 801, 383, 915, 916, 917, 257, - 835, 500, 501, 391, 587, 307, 932, 414, 950, 257, - 992, 180, 195, 257, 186, 174, 175, 257, 1005, 396, - 871, 357, 198, 322, 486, 323, 563, 564, 1006, 6, - 365, 415, 1013, 199, 98, 200, 1014, 382, 507, 508, - 201, 565, 566, 663, 501, 416, 247, 401, 658, 6, - 417, 565, 566, 609, 810, 418, 883, 45, -126, 256, - 348, 349, 181, 565, 566, 659, 285, 292, 486, 299, - 397, 150, 483, 303, 306, 483, 182, 313, 381, 308, - 314, 183, 10, 327, 398, 331, 184, 257, 337, 399, - 98, 332, 333, 334, 824, 335, 356, 55, 6, 923, - 486, 941, 336, 575, 57, 338, 366, 202, 339, 458, - 340, 150, 342, 483, 343, 487, 344, 345, 487, 346, - 401, 597, 905, 347, 401, 401, 401, 401, 401, 410, - 359, 98, 362, 571, 506, 572, 367, 939, 514, 403, - 423, 428, 880, 424, 777, 381, 425, -257, 427, 569, - 922, 437, 439, 618, 426, 438, 487, 483, 577, 577, - 577, 157, 158, 159, 160, 161, 6, 162, 163, 164, - 98, 446, 447, 458, 322, 98, 323, 324, 325, 488, - 458, 458, 458, 458, 458, 458, 611, 509, 628, 483, - 569, 494, 974, 461, 458, 112, 113, 821, 504, 516, - 591, 594, 983, 159, 160, 161, 985, 162, 163, 164, - 596, 658, 458, 513, 912, 913, 914, 381, 915, 916, - 917, 569, 85, 401, 601, 937, 565, 566, 784, 486, - 357, 619, 487, 622, 574, 905, 623, 492, 627, 514, - 114, 945, 176, 630, 660, 501, 1000, 780, 783, 779, - 1001, 782, 658, 189, 191, 789, 792, 803, 448, 449, - 450, 804, 486, 1009, 451, 825, 197, 565, 566, 866, - 609, 831, 1012, 208, 836, 174, 175, 834, 785, 624, - 625, 626, 869, 629, 867, 872, 875, 613, 873, 876, - 981, 877, 884, 885, 881, 357, 246, 886, 248, 249, - 887, 452, 577, 828, 888, 356, 577, 889, 577, 919, - 577, 577, 577, 918, 513, 924, 98, 45, 483, 926, - 927, 934, 938, 943, 611, 910, 911, 912, 913, 914, - 458, 915, 916, 917, 944, 998, 942, 949, 357, 976, - 975, 977, 569, 978, 982, 569, 986, 458, 984, 987, - 988, 483, 453, 989, 806, 999, 808, 55, 1002, 838, - 1003, 1007, 569, 575, 57, 864, 454, 576, 786, 1008, - 356, 455, 776, 302, 882, 936, 456, 920, 973, 830, - 310, 304, 832, 833, 486, 599, 444, 807, 620, 838, - 600, 588, 311, 312, 487, 775, 874, 0, 0, 0, - 0, 0, 0, 821, 821, 821, 821, 319, 821, 0, - 0, 321, 0, 356, 0, 0, 0, 329, 330, 0, - 0, 0, 0, 0, 170, 0, 172, 173, 0, 0, - 0, 177, 0, 0, 0, 174, 175, 0, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 0, - 865, 0, 0, 0, 0, 0, 925, 486, 0, 0, - 0, 0, 0, 483, 372, 373, 0, 45, 0, 358, - 506, 0, 0, 486, 0, 0, 821, 821, 821, 821, - 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, - 821, 821, 821, 821, 821, 0, 170, 172, 173, 177, - 408, 41, 0, 42, 43, 44, 487, 55, 0, 47, - 0, 838, 0, 575, 57, 0, 0, 580, 895, 49, - 0, 0, 486, 0, 0, 50, 51, 52, 821, 0, - 174, 175, 170, 0, 170, 0, 0, 0, 0, 0, - 53, 54, 0, 440, 0, 0, 483, 458, 569, 0, - 443, 298, 445, 0, 58, 0, 0, 59, 0, 60, - 0, 0, 483, 0, 0, 0, 0, 486, 894, 0, - 821, 0, 45, 0, 879, 0, 0, 0, 0, 0, - 897, 898, 899, 900, 901, 902, 903, 904, 0, 487, - 0, 0, 838, 0, 0, 0, 905, 514, 0, 0, - 0, 0, 0, 0, 0, 487, 0, 0, 579, 579, - 579, 483, 55, 0, 0, 0, 971, 0, 575, 57, - 921, 0, 582, 0, 0, 0, 0, 0, 928, 143, - 144, 145, 146, 147, 148, 149, 0, 946, 947, 948, - 0, 569, 0, 0, 150, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 487, 0, 483, 838, 0, 0, - 0, 838, 298, 897, 898, 899, 900, 901, 902, 903, - 904, 0, 513, 0, 0, 994, 0, 995, 991, 905, - 906, 907, 908, 909, 408, 0, 910, 911, 912, 913, - 914, 0, 915, 916, 917, 0, 0, 0, 0, 487, - 0, 838, 1010, 1011, 0, 838, 0, 890, 891, 892, - 893, 972, 896, 0, 146, 147, 148, 149, 838, 0, - 0, 0, 0, 0, 0, 979, 150, 838, 0, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 408, - 162, 163, 164, 0, 0, 0, 0, 0, 0, 0, - 0, 794, 579, 796, 0, 0, 579, 0, 579, 0, - 579, 579, 579, 906, 907, 908, 909, 805, 0, 910, - 911, 912, 913, 914, 0, 915, 916, 917, 0, 0, - 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, - 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, - 961, 962, 963, 964, 965, 966, 967, 968, 969, 0, - 0, 0, 0, 0, 155, 156, 157, 158, 159, 160, - 161, 0, 162, 163, 164, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 990, 668, 669, 670, 671, 672, 673, 674, - 675, 0, 676, 677, 678, 679, 680, 681, 682, 683, - 684, 685, 686, 0, 0, 0, 0, 0, 0, 687, - 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, - 698, 699, 700, 0, 1004, 701, 702, 703, 704, 705, - 706, 707, 708, 709, 710, 711, 0, 712, 0, 713, + 6, 809, 41, 457, 103, 145, 210, 213, 211, 508, + 374, 118, 642, 401, 316, 173, 182, 183, 78, 504, + 120, 634, 504, 237, 182, 183, 247, 248, 249, 250, + 251, 267, 253, 254, 255, 127, 128, 129, 130, 854, + 147, 260, 261, 628, 104, 264, 265, 267, 593, 609, + 268, 171, 171, 172, 172, 682, 105, 398, 629, 267, + 687, 504, 447, 448, 449, 194, 364, 238, 610, 119, + 601, 603, 476, 182, 183, 507, -244, 510, 822, -244, + 652, -261, 240, 450, 437, 615, 182, 183, 902, 103, + 103, 242, 622, 623, 624, 625, 626, 627, 293, 267, + 536, 537, 106, 579, 580, 581, 582, 636, 504, 182, + 183, 107, 297, 298, 299, 300, 301, 302, 823, 239, + 266, 375, 182, 183, 108, 267, 820, 654, 688, 444, + 144, 402, 445, 109, 196, 291, 237, 590, 110, 237, + 241, 504, 417, 1034, 869, 156, 215, 633, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 855, + 292, 588, 194, 111, 294, 940, 874, 354, 856, 678, + 238, 860, 613, 238, 653, 326, 194, 194, 194, 194, + 194, 194, 330, 456, 306, 240, 246, 112, 240, 875, + 103, 267, 252, 6, 242, 113, 267, 242, 812, 318, + 114, 267, 635, 121, 262, 263, 198, 122, 827, 859, + 968, 367, 829, 267, 830, 987, 831, 832, 833, 204, + 1030, 917, 239, 512, 629, 239, 267, 514, 515, 516, + 517, 518, 1043, 182, 183, 267, 683, 841, 168, 169, + 170, 267, 965, 241, 123, 1044, 241, 124, 854, 854, + 854, 854, 607, 854, 1051, 863, 361, 362, 966, 10, + 1052, 11, 504, 125, 679, 463, 464, 465, 950, 951, + 952, 466, 679, 303, 368, 397, 519, 520, 49, 585, + 586, 680, 905, 126, 406, 194, 174, 585, 586, 816, + 526, 527, 371, 370, 334, 504, 335, 583, 584, 195, + 6, 379, 202, 395, 975, 103, 684, 520, 396, 679, + 200, 467, 585, 586, 203, 182, 183, 405, 206, 416, + 207, 6, 60, 208, 585, 586, 900, 425, 595, 62, + 685, 209, 596, 854, 854, 854, 854, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, + 854, 854, -126, 441, 257, 501, 817, 296, 501, 857, + 49, 303, 182, 183, 103, 310, 468, 210, 314, 617, + 319, 1020, 6, 395, 977, 1022, 1, 2, 3, 328, + 469, 585, 586, 473, 317, 470, 324, 854, 339, 505, + 471, 325, 505, 327, 591, 416, 592, 501, 959, 416, + 416, 416, 416, 416, 60, 343, 103, 629, 842, 525, + 595, 62, 267, 533, 532, 914, 1038, 604, 605, 606, + 1039, 182, 183, 426, 589, 344, 345, 427, 504, 186, + 854, 505, 346, 187, 1047, 594, 347, 348, 808, 639, + 349, 6, 350, 1050, 501, 103, 395, 351, 473, 352, + 103, 353, 649, 355, 356, 473, 473, 473, 473, 473, + 473, 631, 118, 357, 358, 589, 373, 428, 359, 360, + 473, 120, 334, 188, 335, 336, 337, 501, 958, 376, + 597, 597, 597, 645, 646, 647, 380, 650, 381, 418, + 473, 438, -260, 1011, 439, 440, 442, 452, 429, 589, + 973, 453, 416, 182, 183, 443, 454, 462, 461, 371, + 370, 505, 506, 504, 513, 523, 981, 535, 533, 532, + 119, 476, 430, 528, 611, 182, 183, 184, 189, 504, + 614, 616, 90, 621, 637, 643, 431, 520, 197, 199, + 640, 432, 190, 810, 644, 651, 433, 191, 49, 681, + 813, 205, 192, 811, 821, 815, 814, 824, 216, 835, + 836, 629, 858, 865, 868, 870, 510, 1018, 817, 901, + 49, 903, 920, 906, 818, 371, 370, 648, 909, 907, + 504, 911, 256, 910, 258, 259, 921, 156, 178, 915, + 180, 181, 60, 862, 918, 185, 103, 919, 595, 62, + 922, 924, 600, 923, 631, 953, 954, 957, 501, 960, + 473, 963, 970, 1036, 60, 962, 974, 633, 371, 370, + 595, 62, 589, 978, 602, 589, 504, 979, 473, 597, + 980, 986, 898, 597, 1012, 597, 1014, 597, 597, 597, + 872, 501, 940, 589, 1013, 876, 877, 878, 879, 880, + 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, + 891, 892, 893, 894, 895, 896, 1015, 899, 1021, 315, + 872, 178, 180, 181, 185, 505, 407, 408, 409, 154, + 155, 323, 410, 1019, 163, 164, 165, 166, 167, 156, + 168, 169, 170, 1025, 1023, 838, 331, 840, 1024, 1026, + 333, 1027, 1037, 1040, 1041, 807, 341, 342, 1045, 178, + 1046, 178, 916, 313, 972, 955, 1010, 321, 861, 620, + 619, 864, 411, 459, 866, 867, 938, 939, 309, 925, + 926, 927, 928, 839, 931, 322, 940, 641, 608, 945, + 946, 947, 948, 949, 806, 950, 951, 952, 0, 908, + 0, 0, 0, 0, 0, 0, 0, 932, 933, 934, + 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, + 372, 525, 0, 940, 501, 961, 0, 412, 0, 0, + 156, 0, 0, 0, 0, 0, 163, 164, 165, 166, + 167, 413, 168, 169, 170, 0, 414, 0, 0, 0, + 0, 913, 423, 0, 0, 0, 0, 930, 505, 0, + 0, 0, 0, 872, 988, 989, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, + 1004, 1005, 1006, 945, 946, 947, 948, 949, 0, 950, + 951, 952, 309, 0, 0, 940, 0, 455, 0, 956, + 0, 473, 589, 0, 458, 0, 460, 0, 964, 501, + 0, 0, 1029, 0, 941, 942, 943, 944, 1028, 0, + 945, 946, 947, 948, 949, 501, 950, 951, 952, 165, + 166, 167, 0, 168, 169, 170, 0, 0, 0, 0, + 0, 0, 0, 505, 0, 0, 872, 0, 307, 0, + 0, 533, 532, 0, 0, 0, 0, 1008, 0, 505, + 0, 1042, 0, 599, 599, 599, 0, 0, 7, 8, + 9, 10, 0, 11, 12, 13, 501, 0, 0, 0, + 0, 0, 929, 0, 0, 0, 0, 45, 0, 46, + 47, 48, 1009, 0, 947, 948, 949, 589, 950, 951, + 952, 0, 0, 0, 0, 0, 0, 1016, 0, 0, + 505, 843, 0, 872, 55, 179, 57, 872, 1032, 309, + 1033, 0, 501, 0, 0, 0, 0, 844, 0, 0, + 58, 59, 0, 0, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 423, 63, 0, 1048, 1049, 0, 65, + 0, 27, 982, 983, 984, 985, 505, 0, 872, 0, + 845, 0, 872, 846, 0, 0, 0, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 872, 0, 0, 0, + 0, 0, 0, 0, 0, 872, 0, 0, 0, 0, + 847, 0, 0, 0, 848, 849, 0, 0, 850, 423, + 851, 0, 0, 0, 852, 0, 0, 0, 0, 0, + 0, 826, 599, 828, 0, 0, 599, 0, 599, 0, + 599, 599, 599, 0, 0, 0, 0, 837, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 0, 699, + 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, + 0, 0, 0, 0, 0, 0, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, - 724, 0, 0, 0, 725, 0, 726, 0, 727, 728, - 729, 730, 731, 732, 733, 734, 735, 736, 0, 737, - 738, 0, 739, 740, 741, 742, 743, 744, 745, 0, - 746, 747, 748, 749, 750, 0, 0, 0, 751, 752, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 763, 764, 765, 766, 767, 768, 769, 770, 771, 940, - 772, 773, 668, 669, 670, 671, 672, 673, 674, 675, - 0, 676, 677, 678, 679, 680, 681, 682, 683, 684, - 685, 686, 0, 0, 0, 0, 0, 0, 687, 688, - 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, - 699, 700, 0, 0, 701, 702, 703, 704, 705, 706, - 707, 708, 709, 710, 711, 0, 712, 0, 713, 714, - 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, - 0, 0, 0, 725, 0, 726, 0, 727, 728, 729, - 730, 731, 732, 733, 734, 735, 736, 0, 737, 738, - 0, 739, 740, 741, 742, 743, 744, 745, 0, 746, - 747, 748, 749, 750, 0, 0, 0, 751, 752, 753, - 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, - 764, 765, 766, 767, 768, 769, 770, 771, 0, 772, - 773, 462, 463, 464, 10, 0, 465, 40, 0, 0, - 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 898, 899, 900, 901, 902, - 903, 904, 41, 0, 42, 43, 44, 0, 0, 0, - 905, 0, 0, 41, 0, 42, 43, 44, 45, 467, - 0, 47, 468, 0, 997, 48, 50, 171, 52, 0, - 469, 49, 0, 0, 0, 0, 0, 50, 51, 52, - 0, 53, 54, 0, 470, 0, 0, 0, 0, 0, - 471, 0, 53, 54, 472, 58, 0, 473, 55, 0, - 60, 474, 0, 0, 56, 57, 58, 0, 0, 59, - 0, 60, 462, 463, 464, 10, 0, 465, 40, 0, - 0, 839, 0, 115, 475, 0, 0, 0, 476, 0, - 0, 0, 477, 0, 478, 907, 908, 909, 479, 0, - 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, - 0, 0, 0, 0, 41, 0, 42, 43, 44, 45, - 467, 0, 47, 468, 0, 0, 48, 0, 0, 0, - 0, 469, 49, 0, 0, 0, 0, 0, 50, 51, - 52, 0, 0, 0, 0, 470, 0, 0, 0, 0, - 0, 471, 0, 53, 54, 472, 0, 0, 473, 55, - 0, 0, 474, 0, 0, 56, 57, 58, 0, 0, - 59, 0, 60, 7, 8, 9, 10, 0, 11, 125, - 0, 148, 149, 0, 0, 475, 0, 0, 0, 476, - 0, 150, 0, 477, 0, 478, 0, 0, 0, 479, - 0, 0, 144, 145, 146, 147, 148, 149, 0, 0, - 0, 0, 0, 0, 0, 126, 150, 127, 128, 129, - 45, 46, 0, 130, 18, 0, 0, 48, 0, 0, - 0, 0, 19, 131, 0, 0, 0, 0, 0, 132, - 133, 52, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 134, 135, 26, 0, 0, 27, - 55, 0, 0, 28, 0, 0, 56, 57, 136, 0, - 0, 59, 0, 137, 462, 463, 464, 10, 0, 465, - 40, 157, 158, 159, 160, 161, 31, 162, 163, 164, - 32, 33, 0, 0, 34, 0, 35, 0, 0, 0, - 36, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 0, 162, 163, 164, 0, 41, 0, 42, 43, - 44, 45, 467, 0, 47, 468, 0, 0, 48, 0, - 0, 0, 0, 469, 49, 0, 0, 0, 0, 0, - 50, 51, 52, 0, 0, 0, 0, 470, 0, 0, - 0, 0, 0, 471, 0, 53, 54, 472, 0, 0, - 473, 55, 0, 0, 474, 0, 0, 56, 57, 58, - 296, 0, 59, 0, 60, 7, 8, 9, 10, 0, - 11, 12, 0, 0, 0, 0, 0, 475, 0, 0, - 0, 476, 0, 0, 0, 477, 0, 478, 0, 0, - 0, 479, 0, 0, 0, 0, 41, 0, 42, 43, - 44, 0, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 0, 0, - 50, 171, 52, 0, 19, 20, 0, 0, 0, 0, - 0, 21, 22, 0, 0, 53, 54, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 24, 25, 26, 58, - 0, 27, 0, 0, 60, 28, 7, 8, 9, 10, - 29, 11, 12, 0, 0, 30, 0, 7, 8, 9, - 10, 0, 11, 12, 0, 0, 0, 0, 31, 0, - 0, 0, 32, 33, 0, 0, 34, 0, 35, 0, - 280, 0, 36, 0, 0, 0, 0, 0, 13, 0, - 14, 15, 16, 0, 0, 0, 17, 18, 0, 13, - 0, 14, 15, 16, 0, 19, 20, 17, 18, 0, - 903, 904, 21, 22, 0, 0, 19, 20, 0, 23, - 905, 0, 0, 21, 22, 0, 0, 24, 25, 26, - 23, 0, 27, 0, 0, 0, 28, 0, 24, 25, - 26, 29, 0, 27, 0, 0, 30, 28, 0, 0, - 0, 409, 29, 0, 0, 0, 0, 30, 0, 31, - 0, 0, 510, 32, 33, 0, 0, 34, 0, 35, - 31, 0, 0, 36, 32, 33, 0, 0, 34, 0, - 35, 0, 0, 0, 36, 7, 8, 9, 10, 0, - 11, 12, 0, 0, 0, 0, 7, 8, 9, 10, - 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, - 0, 0, 0, 0, 0, 0, 0, 13, 0, 14, - 15, 16, 0, 0, 0, 17, 18, 0, 13, 0, - 14, 15, 16, 0, 19, 20, 17, 18, 0, 0, - 0, 21, 22, 0, 0, 19, 20, 0, 23, 0, - 0, 0, 21, 22, 0, 0, 24, 25, 26, 23, - 0, 27, 0, 0, 0, 28, 0, 24, 25, 26, - 29, 0, 27, 0, 0, 30, 28, 7, 8, 9, - 10, 29, 11, 12, 0, 0, 30, 0, 31, 0, - 0, 878, 32, 33, 0, 0, 34, 0, 35, 31, - 863, 0, 36, 32, 33, 0, 0, 34, 41, 35, - 42, 43, 44, 36, 0, 0, 167, 0, 0, 13, - 0, 14, 15, 16, 0, 0, 168, 17, 18, 0, - 0, 0, 50, 169, 52, 0, 19, 20, 0, 0, - 0, 0, 0, 21, 22, 0, 0, 53, 54, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 24, 25, - 26, 58, 0, 27, 0, 0, 60, 28, 7, 8, - 9, 10, 29, 11, 12, 0, 0, 30, 0, 7, - 8, 9, 10, 0, 11, 0, 0, 0, 0, 108, - 31, 0, 0, 0, 32, 33, 0, 0, 34, 0, - 35, 0, 970, 0, 36, 0, 0, 0, 0, 0, - 13, 0, 14, 15, 16, 0, 0, 0, 17, 18, - 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, - 811, 0, 0, 0, 21, 22, 0, 0, 19, 0, - 0, 23, 0, 144, 145, 146, 147, 148, 149, 24, - 25, 26, 0, 0, 27, 0, 0, 150, 28, 0, - 0, 0, 812, 29, 0, 813, 0, 0, 30, 28, - 0, 142, 143, 144, 145, 146, 147, 148, 149, 0, - 0, 31, 0, 0, 0, 32, 33, 150, 0, 34, - 0, 35, 814, 0, 0, 36, 815, 816, 0, 0, - 817, 0, 818, 0, 0, 0, 819, 142, 143, 144, - 145, 146, 147, 148, 149, 0, 0, 0, 0, 0, - 0, 0, 0, 150, 0, 0, 142, 143, 144, 145, - 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, - 0, 0, 150, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 0, 162, 163, 164, 0, 0, 0, 0, + 724, 725, 726, 0, 0, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 0, + 741, 0, 742, 743, 744, 745, 746, 747, 748, 749, + 750, 751, 752, 753, 0, 0, 0, 754, 0, 755, + 0, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 0, 770, 771, 772, 773, + 774, 775, 776, 0, 777, 778, 779, 780, 781, 0, + 0, 0, 782, 783, 784, 785, 786, 787, 788, 789, + 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, + 800, 801, 802, 976, 803, 804, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 0, 699, 700, 701, + 702, 703, 704, 705, 706, 707, 708, 709, 0, 0, + 0, 0, 0, 0, 710, 711, 712, 713, 714, 715, + 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 726, 0, 0, 727, 728, 729, 730, 731, 732, 733, + 734, 735, 736, 737, 738, 739, 740, 0, 741, 0, + 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, + 752, 753, 0, 0, 0, 754, 0, 755, 0, 756, + 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, + 767, 768, 769, 0, 770, 771, 772, 773, 774, 775, + 776, 0, 777, 778, 779, 780, 781, 0, 0, 0, + 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, + 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, + 802, 0, 803, 804, 477, 478, 479, 10, 0, 11, + 480, 481, 44, 0, 0, 482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 0, 162, 163, 164, 0, 0, 0, 352, - 142, 143, 144, 145, 146, 147, 148, 149, 0, 0, - 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 0, 162, - 163, 164, 0, 0, 0, 933, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, - 164, 0, 0, 0, 993, 519, 520, 521, 522, 523, - 524, 525, 526, 0, 0, 0, 0, 0, 0, 0, - 0, 527, 0, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 540, 0, 370, 0, 0, 0, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 0, 162, 163, 164, 371, 0, 0, 541, 0, + 0, 0, 0, 0, 148, 149, 150, 151, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 483, 0, 0, + 156, 45, 0, 46, 47, 48, 49, 484, 0, 51, + 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, + 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, + 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, + 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, + 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, + 0, 64, 0, 65, 477, 478, 479, 10, 0, 11, + 480, 481, 44, 0, 0, 873, 493, 0, 0, 0, + 494, 1035, 0, 0, 495, 0, 496, 0, 0, 0, + 497, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 0, 168, 169, 170, 0, 483, 0, 365, + 0, 45, 0, 46, 47, 48, 49, 484, 0, 51, + 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, + 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, + 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, + 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, + 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, + 0, 64, 0, 65, 7, 8, 9, 10, 0, 11, + 12, 13, 131, 0, 0, 0, 493, 0, 0, 0, + 494, 0, 0, 0, 495, 0, 496, 0, 0, 0, + 497, 0, 0, 0, 148, 149, 150, 151, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 15, 0, 0, + 156, 132, 0, 133, 134, 135, 49, 50, 0, 51, + 0, 0, 136, 21, 0, 0, 53, 0, 0, 0, + 0, 22, 137, 0, 0, 0, 0, 0, 138, 139, + 57, 0, 0, 0, 0, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 140, 141, 30, 0, 0, 31, + 60, 0, 0, 32, 0, 0, 61, 62, 142, 0, + 0, 64, 0, 143, 477, 478, 479, 10, 0, 11, + 480, 481, 44, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 0, 38, 0, 39, 0, 0, 0, + 40, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 0, 168, 169, 170, 0, 483, 0, 969, + 0, 45, 0, 46, 47, 48, 49, 484, 0, 51, + 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, + 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, + 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, + 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, + 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, + 0, 64, 0, 65, 7, 8, 9, 10, 0, 11, + 12, 13, 14, 0, 0, 0, 493, 0, 0, 0, + 494, 0, 0, 0, 495, 0, 496, 0, 0, 0, + 497, 934, 935, 936, 937, 938, 939, 0, 0, 0, + 45, 0, 46, 47, 48, 940, 0, 15, 0, 0, + 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 20, 21, 0, 0, 0, 55, 179, 57, + 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, + 0, 0, 0, 58, 59, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 28, 29, 30, 63, 0, 31, + 0, 0, 65, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 121, 35, 0, 0, 0, + 36, 37, 0, 0, 38, 0, 39, 0, 290, 944, + 40, 0, 945, 946, 947, 948, 949, 15, 950, 951, + 952, 16, 0, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 20, 21, 0, 0, 0, 0, 0, -2, + 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, + 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 79, 424, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 80, 38, 0, 39, 0, 81, 0, + 40, 82, 0, 0, 0, 0, 0, 15, 0, 83, + 84, 16, 85, 17, 18, 19, 0, 86, 87, 88, + 0, 0, 20, 21, 0, 0, 89, 0, 0, 90, + 0, 22, 23, 91, 0, 0, 0, 92, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 93, 0, + 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, + 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 79, 529, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 80, 38, 0, 39, 0, 81, 0, + 40, 82, 0, 0, 0, 0, 0, 15, 0, 83, + 84, 16, 85, 17, 18, 19, 0, 86, 87, 88, + 0, 0, 20, 21, 0, 0, 89, 0, 0, 90, + 0, 22, 23, 91, 0, 0, 0, 92, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, + 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 0, 38, 0, 39, 0, 897, 0, + 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, + 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, + 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 0, 912, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 0, 38, 0, 39, 0, 0, 0, + 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, + 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, + 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, + 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, + 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 0, 38, 0, 39, 0, 1007, 0, + 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 20, 21, 152, 153, 154, 155, 0, 0, + 0, 22, 23, 0, 0, 0, 156, 0, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 27, 150, 151, + 152, 153, 154, 155, 28, 29, 30, 0, 0, 31, + 0, 0, 156, 32, 936, 937, 938, 939, 33, 0, + 0, 0, 0, 34, 0, 0, 940, 148, 149, 150, + 151, 152, 153, 154, 155, 0, 35, 0, 0, 0, + 36, 37, 538, 156, 38, 0, 39, 0, 0, 0, + 40, 539, 540, 541, 542, 543, 544, 545, 546, 0, + 0, 0, 0, 0, 0, 0, 0, 547, 0, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 161, 162, 163, 164, 165, 166, 167, 0, 168, + 169, 170, 0, 0, 0, 0, 560, 0, 0, 0, + 0, 0, 0, 0, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 0, 168, 169, 170, 0, 0, + 561, 0, 0, 945, 946, 947, 948, 949, 0, 950, + 951, 952, 0, 0, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 0, 168, 169, 170, 217, + 218, 0, 1031, 0, 562, 0, 0, 563, 0, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 0, 575, 576, 0, 0, 577, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 219, 45, + 0, 46, 47, 48, 49, 220, 0, 221, 0, 0, + 52, 0, 0, 0, 53, 222, 223, 224, 0, 0, + 54, 0, 0, 0, 0, 225, 55, 56, 57, 217, + 218, 226, 0, 0, 0, 0, 227, 0, 0, 0, + 228, 0, 58, 59, 0, 229, 0, 0, 60, 0, + 0, 0, 0, 0, 230, 62, 63, 0, 231, 64, + 232, 65, 0, 0, 0, 0, 233, 0, 219, 45, + 0, 46, 47, 48, 49, 220, 0, 221, 0, 0, + 52, 0, 234, 0, 53, 222, 223, 224, 0, 0, + 54, 0, 0, 217, 218, 225, 55, 56, 57, 0, + 0, 226, 0, 0, 0, 0, 227, 0, 0, 0, + 228, 0, 58, 59, 0, 229, 0, 0, 60, 0, + 0, 0, 0, 0, 230, 62, 63, 0, 231, 64, + 232, 65, 219, 45, 0, 46, 47, 48, 49, 320, + 0, 221, 0, 0, 52, 0, 0, 0, 53, 222, + 223, 224, 234, 0, 54, 0, 0, 0, 0, 225, + 55, 56, 57, 0, 0, 226, 0, 0, 0, 0, + 227, 0, 0, 0, 228, 0, 58, 59, 0, 229, + 0, 0, 60, 0, 0, 0, 0, 0, 230, 62, + 63, 0, 231, 64, 232, 65, 148, 149, 150, 151, + 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 0, 0, 0, 234, 148, 149, 150, + 151, 152, 153, 154, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 156, 148, 149, 150, 151, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, + 156, 0, 148, 149, 150, 151, 152, 153, 154, 155, + 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, + 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, + 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 0, 168, 169, 170, 385, 0, + 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 0, 168, 169, 170, 366, + 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 0, 168, 169, 170, 511, 363, 0, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 0, 168, 169, 170, 534, 0, 0, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 0, 168, + 169, 170, 148, 149, 150, 151, 152, 153, 154, 155, + 0, 0, 0, 0, 0, 0, 0, 0, 156, 148, + 149, 150, 151, 152, 153, 154, 155, 0, 0, 0, + 0, 0, 0, 0, 0, 156, 148, 149, 150, 151, + 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 655, 656, 657, 658, 659, 660, 661, + 662, 0, 0, 0, 0, 0, 0, 0, 0, 663, + 932, 933, 934, 935, 936, 937, 938, 939, 0, 0, + 0, 0, 0, 0, 0, 0, 940, 149, 150, 151, + 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 0, 0, 825, 0, 0, 0, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 0, 168, 169, 170, 967, 0, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 0, 168, 169, + 170, 0, 0, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 0, 168, 169, 170, 0, 0, + 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, + 674, 0, 675, 676, 677, 0, 0, 941, 942, 943, + 944, 0, 0, 945, 946, 947, 948, 949, 0, 950, + 951, 952, 0, 0, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 0, 168, 169, 170, 933, 934, + 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, + 0, 0, 0, 940, 150, 151, 152, 153, 154, 155, + 0, 0, 0, 45, 0, 46, 47, 48, 156, 150, + 151, 152, 153, 154, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 156, 934, 935, 936, 937, 938, 939, + 55, 179, 57, 0, 0, 0, 0, 0, 940, 150, + 151, 152, 153, 154, 155, 0, 58, 59, 0, 0, + 0, 0, 0, 156, 934, 935, 936, 937, 938, 939, + 63, 0, 0, 0, 0, 65, 0, 0, 940, 934, + 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, + 0, 0, 0, 940, 0, 942, 943, 944, 122, 0, + 945, 946, 947, 948, 949, 0, 950, 951, 952, 0, + 0, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 0, 168, 169, 170, 0, 0, 0, 160, 161, 162, + 163, 164, 165, 166, 167, 0, 168, 169, 170, 0, + 942, 943, 944, 0, 0, 945, 946, 947, 948, 949, + 0, 950, 951, 952, 0, 0, 0, 0, 161, 162, + 163, 164, 165, 166, 167, 0, 168, 169, 170, 386, + 387, 943, 944, 0, 0, 945, 946, 947, 948, 949, + 0, 950, 951, 952, 0, 0, 0, 0, 0, 0, + 945, 946, 947, 948, 949, 0, 950, 951, 952, 45, + 0, 46, 47, 48, 0, 0, 386, 387, 0, 45, + 0, 46, 47, 48, 388, 389, 0, 0, 0, 0, + 52, 0, 0, 0, 0, 0, 55, 179, 57, 0, + 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, + 0, 0, 58, 59, 0, 0, 45, 0, 46, 47, + 48, 0, 58, 59, 0, 44, 63, 52, 0, 0, + 0, 65, 0, 0, 390, 0, 63, 54, 0, 64, + 0, 65, 0, 55, 56, 57, 0, 0, 0, 0, + 0, 0, 0, 45, 125, 46, 47, 48, 0, 58, + 59, 0, 0, 0, 45, 0, 46, 47, 48, 49, + 50, 0, 51, 63, 295, 52, 64, 0, 65, 53, + 55, 179, 57, 0, 0, 54, 44, 0, 0, 0, + 0, 55, 56, 57, 0, 0, 58, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 58, 59, 0, + 63, 0, 0, 60, 45, 65, 46, 47, 48, 61, + 62, 63, 0, 44, 64, 45, 65, 46, 47, 48, + 49, 329, 0, 51, 0, 0, 52, 0, 0, 0, + 53, 55, 179, 57, 0, 0, 54, 0, 0, 0, + 0, 0, 55, 56, 57, 0, 0, 58, 59, 0, + 0, 0, 45, 0, 46, 47, 48, 49, 58, 59, + 51, 63, 0, 52, 60, 0, 65, 53, 0, 0, + 61, 62, 63, 54, 44, 64, 0, 65, 0, 55, + 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 638, 0, 58, 59, 0, 0, 0, + 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, + 0, 115, 64, 45, 65, 46, 47, 48, 49, 0, + 0, 51, 0, 0, 52, 0, 0, 0, 53, 0, + 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, + 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, + 45, 0, 46, 47, 48, 49, 58, 59, 0, 0, + 0, 52, 60, 0, 0, 53, 0, 0, 61, 62, + 63, 54, 0, 64, 0, 65, 79, 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 209, 210, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 542, 0, 0, 543, 0, 544, 545, 546, 547, - 548, 549, 550, 551, 552, 553, 554, 0, 555, 556, - 211, 41, 557, 42, 43, 44, 45, 212, 0, 47, - 0, 0, 0, 48, 213, 214, 215, 0, 0, 49, - 0, 0, 0, 0, 216, 50, 51, 52, 0, 0, - 217, 0, 209, 210, 218, 0, 0, 0, 219, 0, - 53, 54, 0, 220, 0, 0, 55, 0, 0, 0, - 0, 0, 221, 57, 58, 0, 222, 59, 223, 60, - 0, 0, 0, 0, 224, 0, 0, 0, 211, 41, - 0, 42, 43, 44, 45, 212, 0, 47, 0, 0, - 225, 48, 213, 214, 215, 0, 0, 49, 0, 0, - 0, 0, 216, 50, 51, 52, 0, 0, 217, 0, - 209, 210, 218, 0, 0, 0, 219, 0, 53, 54, - 0, 220, 0, 0, 55, 0, 0, 0, 0, 0, - 221, 57, 58, 0, 222, 59, 223, 60, 142, 143, - 144, 145, 146, 147, 148, 149, 211, 41, 0, 42, - 43, 44, 45, 309, 150, 47, 0, 0, 225, 48, - 213, 214, 215, 0, 0, 49, 0, 0, 0, 0, - 216, 50, 51, 52, 0, 0, 217, 0, 0, 0, - 218, 0, 0, 0, 219, 0, 53, 54, 0, 220, - 0, 0, 55, 0, 0, 0, 0, 0, 221, 57, - 58, 0, 222, 59, 223, 60, 142, 143, 144, 145, - 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, - 0, 0, 150, 0, 0, 0, 225, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 350, 0, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 0, - 162, 163, 164, 142, 143, 144, 145, 146, 147, 148, - 149, 0, 0, 0, 0, 0, 0, 0, 0, 150, - 142, 143, 144, 145, 146, 147, 148, 149, 0, 0, - 0, 0, 0, 0, 0, 0, 150, 0, 142, 143, - 144, 145, 146, 147, 148, 149, 0, 0, 0, 0, - 0, 0, 0, 515, 150, 0, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, - 164, 634, 635, 636, 637, 638, 639, 640, 641, 0, - 0, 0, 0, 0, 0, 0, 0, 642, 144, 145, - 146, 147, 148, 149, 0, 0, 0, 0, 0, 793, - 0, 0, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 0, 162, 163, 164, 931, 0, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 0, 162, 163, 164, 0, 0, 0, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 0, - 162, 163, 164, 899, 900, 901, 902, 903, 904, 0, - 0, 0, 0, 0, 0, 0, 0, 905, 0, 0, - 0, 643, 644, 645, 646, 647, 648, 649, 650, 651, - 652, 653, 0, 654, 655, 656, 0, 0, 0, 154, - 155, 156, 157, 158, 159, 160, 161, 0, 162, 163, - 164, 144, 145, 146, 147, 148, 149, 0, 0, 0, - 0, 0, 0, 0, 0, 150, 899, 900, 901, 902, - 903, 904, 0, 0, 0, 0, 0, 0, 0, 0, - 905, 899, 900, 901, 902, 903, 904, 0, 0, 0, - 0, 0, 0, 0, 0, 905, 0, 0, 0, 0, - 0, 0, 907, 908, 909, 0, 0, 910, 911, 912, - 913, 914, 0, 915, 916, 917, 899, 900, 901, 902, - 903, 904, 0, 0, 0, 0, 0, 0, 0, 0, - 905, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 155, 156, 157, 158, 159, 160, 161, - 0, 162, 163, 164, 0, 0, 908, 909, 0, -2, - 910, 911, 912, 913, 914, 0, 915, 916, 917, 0, - 0, 0, 909, 0, 0, 910, 911, 912, 913, 914, - 0, 915, 916, 917, 901, 902, 903, 904, 0, 0, - 0, 0, 0, 0, 0, 0, 905, 0, 0, 0, - 0, 0, 74, 41, 0, 42, 43, 44, 0, 0, - 910, 911, 912, 913, 914, 75, 915, 916, 917, 0, - 76, 0, 0, 77, 0, 0, 0, 50, 171, 52, - 0, 78, 79, 0, 80, 0, 372, 373, 81, 82, - 83, 0, 53, 54, 0, 0, 0, 84, 0, 0, - 85, 0, 0, 0, 86, 0, 58, 0, 87, 0, - 0, 60, 0, 0, 0, 0, 0, 0, 0, 88, - 0, 0, 0, 41, 0, 42, 43, 44, 374, 375, - 0, 47, 0, 0, 116, 0, 910, 911, 912, 913, - 914, 49, 915, 916, 917, 0, 40, 50, 51, 52, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 376, 0, 58, 0, 0, 59, - 0, 60, 41, 0, 42, 43, 44, 45, 46, 0, - 47, 0, 0, 0, 48, 0, 0, 0, 0, 0, - 49, 0, 0, 40, 0, 0, 50, 51, 52, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 54, 0, 0, 0, 0, 55, 41, 0, - 42, 43, 44, 56, 57, 58, 0, 0, 59, 41, - 60, 42, 43, 44, 45, 317, 0, 47, 0, 0, - 0, 48, 50, 171, 52, 0, 0, 49, 0, 0, - 40, 0, 0, 50, 51, 52, 0, 53, 54, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, - 0, 58, 0, 0, 55, 0, 60, 0, 0, 0, - 56, 57, 58, 0, 0, 59, 41, 60, 42, 43, - 44, 45, 0, 0, 47, 0, 0, 0, 48, 119, - 0, 0, 0, 0, 49, 0, 0, 109, 0, 0, - 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 617, 0, 53, 54, 0, 0, 0, - 0, 55, 41, 0, 42, 43, 44, 56, 57, 58, - 167, 0, 59, 41, 60, 42, 43, 44, 45, 0, - 168, 47, 0, 0, 0, 48, 50, 169, 52, 0, - 0, 49, 0, 0, 40, 0, 0, 50, 51, 52, - 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 54, 0, 58, 0, 0, 55, 41, - 60, 42, 43, 44, 110, 57, 58, 0, 0, 59, - 41, 60, 42, 43, 44, 45, 0, 284, 47, 0, - 0, 0, 48, 50, 171, 52, 0, 0, 49, 0, - 0, 0, 0, 0, 50, 51, 52, 0, 53, 54, - 0, 0, 0, 0, 0, 0, 74, 0, 0, 53, - 54, 0, 58, 0, 0, 55, 0, 60, 0, 75, - 0, 56, 57, 58, 76, 0, 59, 77, 60, 0, - 0, 0, 0, 0, 74, 78, 79, 0, 80, 0, - 0, 0, 81, 82, 83, 0, 0, 75, 0, 0, - 0, 84, 76, 0, 85, 77, 0, 0, 86, 0, - 0, 0, 87, 78, 79, 0, 80, 74, 0, 0, - 81, 82, 83, 88, 0, 0, 0, 0, 0, 84, - 75, 0, 85, 0, 0, 76, 86, 0, 77, 0, - 87, 0, 368, 0, 0, 74, 78, 79, 0, 80, - 0, 88, 0, 81, 82, 83, 0, 0, 75, 0, - 0, 0, 84, 76, 0, 85, 77, 0, 0, 86, - 431, 0, 0, 87, 78, 79, 0, 80, 74, 0, - 0, 81, 82, 83, 88, 0, 0, 0, 0, 0, - 84, 75, 0, 85, 0, 0, 76, 86, 0, 77, - 0, 87, 0, 502, 0, 0, 0, 78, 79, 0, - 80, 0, 88, 0, 81, 82, 83, 41, 0, 42, - 43, 44, 0, 84, 0, 0, 85, 0, 0, 0, - 86, 592, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 50, 171, 52, 0, 88, 0, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 54, 0, 0, - 75, 0, 0, 0, 802, 76, 0, 0, 77, 0, - 58, 0, 0, 0, 0, 60, 78, 79, 0, 80, - 0, 0, 0, 81, 82, 83, 0, 0, 0, 0, - 0, 0, 84, 0, 0, 85, 0, 0, 0, 86, - 0, 0, 0, 87 + 0, 0, 80, 58, 59, 0, 0, 81, 0, 60, + 82, 0, 0, 0, 0, 116, 62, 63, 83, 84, + 64, 85, 65, 79, 0, 0, 86, 87, 88, 0, + 0, 0, 0, 0, 0, 89, 0, 0, 90, 80, + 0, 0, 91, 0, 81, 0, 92, 82, 0, 0, + 0, 0, 0, 0, 0, 83, 84, 93, 85, 0, + 0, 0, 0, 86, 87, 88, 79, 0, 0, 0, + 0, 0, 89, 0, 0, 90, 382, 0, 0, 91, + 0, 0, 80, 92, 0, 0, 0, 81, 0, 0, + 82, 0, 0, 0, 93, 0, 0, 0, 83, 84, + 0, 85, 0, 79, 0, 0, 86, 87, 88, 0, + 0, 0, 0, 446, 0, 89, 0, 0, 90, 80, + 0, 0, 91, 0, 81, 0, 92, 82, 0, 0, + 0, 0, 0, 0, 0, 83, 84, 93, 85, 0, + 0, 0, 0, 86, 87, 88, 79, 0, 0, 0, + 0, 0, 89, 0, 0, 90, 521, 0, 0, 91, + 0, 0, 80, 92, 0, 0, 0, 81, 0, 0, + 82, 0, 0, 0, 93, 0, 0, 0, 83, 84, + 45, 85, 46, 47, 48, 0, 86, 87, 88, 0, + 0, 175, 0, 612, 0, 89, 0, 0, 90, 0, + 0, 176, 91, 0, 0, 0, 92, 55, 177, 57, + 0, 45, 0, 46, 47, 48, 0, 93, 0, 0, + 0, 0, 175, 58, 59, 0, 0, 0, 0, 0, + 0, 0, 176, 0, 0, 0, 834, 63, 55, 177, + 57, 0, 65, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 59, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 114, 0, 0, 63, 0, + 0, 0, 0, 65 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-508))) + (!!((Yystate) == (-594))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 461, 46, 510, 5, 100, 101, 102, 103, 104, - 299, 106, 107, 108, 389, 35, 85, 86, 23, 23, - 115, 116, 6, 385, 119, 120, 388, 471, 390, 92, - 85, 117, 492, 196, 10, 0, 444, 12, 501, 8, - 9, 8, 9, 451, 452, 453, 454, 455, 456, 126, - 412, 413, 427, 415, 416, 417, 418, 465, 112, 92, - 61, 310, 126, 23, 391, 35, 8, 9, 395, 396, - 397, 398, 399, 127, 92, 483, 2, 166, 126, 29, - 126, 214, 109, 109, 85, 86, 126, 92, 92, 112, - 179, 180, 181, 182, 183, 184, 126, 459, 126, 8, - 9, 128, 128, 566, 127, 31, 32, 33, 34, 77, - 36, 433, 434, 8, 9, 79, 80, 81, 8, 9, - 109, 109, 108, 112, 92, 111, 488, 126, 503, 126, - 109, 109, 92, 422, 109, 105, 100, 300, 6, 202, - 128, 108, 205, 163, 128, 121, 609, 117, 118, 128, - 128, 108, 247, 613, 516, 126, 616, 320, 4, 128, - 126, 108, 8, 9, 111, 166, 108, 494, 212, 202, - 29, 420, 205, 633, 218, 125, 126, 127, 179, 180, - 181, 182, 183, 184, 202, 75, 187, 205, 632, 105, - 106, 107, 193, 601, 660, 196, 285, 202, 202, 126, - 205, 205, 111, 79, 80, 81, 369, 8, 9, 10, - 618, 117, 461, 14, 127, 128, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 370, 164, 126, - 10, 126, 202, 492, 14, 205, 8, 9, 10, 111, - 51, 109, 14, 386, 576, 126, 389, 109, 580, 109, - 582, 109, 584, 585, 586, 309, 125, 126, 127, 109, - 128, 126, 127, 317, 437, 201, 128, 78, 128, 109, - 128, 51, 126, 109, 285, 8, 9, 109, 128, 51, - 665, 292, 111, 108, 427, 110, 111, 112, 128, 300, - 301, 102, 128, 111, 305, 111, 128, 308, 108, 109, - 126, 126, 127, 126, 127, 116, 126, 318, 111, 320, - 121, 126, 127, 127, 128, 126, 792, 50, 117, 128, - 256, 257, 102, 126, 127, 128, 121, 127, 471, 111, - 102, 29, 386, 8, 108, 389, 116, 126, 308, 117, - 126, 121, 6, 110, 116, 128, 126, 109, 118, 121, - 361, 128, 128, 128, 613, 128, 292, 90, 369, 829, - 503, 878, 128, 96, 97, 128, 109, 446, 128, 380, - 128, 29, 128, 427, 128, 386, 128, 118, 389, 128, - 391, 446, 29, 128, 395, 396, 397, 398, 399, 325, - 129, 402, 111, 423, 405, 425, 109, 873, 409, 126, - 126, 131, 787, 128, 509, 375, 126, 108, 126, 420, - 828, 108, 8, 467, 350, 109, 427, 471, 432, 433, - 434, 119, 120, 121, 122, 123, 437, 125, 126, 127, - 441, 118, 109, 444, 108, 446, 110, 111, 112, 121, - 451, 452, 453, 454, 455, 456, 457, 126, 478, 503, - 461, 121, 922, 825, 465, 470, 470, 608, 129, 121, - 109, 112, 938, 121, 122, 123, 942, 125, 126, 127, - 112, 111, 483, 409, 121, 122, 123, 447, 125, 126, - 127, 492, 91, 494, 121, 870, 126, 127, 128, 632, - 501, 117, 503, 126, 430, 29, 117, 869, 478, 510, - 470, 886, 56, 128, 128, 127, 982, 109, 131, 129, - 986, 128, 111, 67, 68, 109, 128, 8, 8, 9, - 10, 110, 665, 999, 14, 109, 80, 126, 127, 128, - 127, 126, 1008, 87, 51, 8, 9, 128, 4, 475, - 476, 477, 109, 479, 126, 131, 129, 919, 128, 128, - 935, 129, 128, 128, 131, 566, 110, 126, 112, 113, - 117, 51, 576, 617, 126, 501, 580, 117, 582, 109, - 584, 585, 586, 131, 510, 118, 587, 50, 632, 128, - 118, 126, 128, 110, 595, 119, 120, 121, 122, 123, - 601, 125, 126, 127, 110, 980, 128, 128, 609, 128, - 126, 126, 613, 126, 128, 616, 128, 618, 129, 118, - 128, 665, 102, 118, 594, 128, 596, 90, 126, 630, - 126, 128, 633, 96, 97, 655, 116, 100, 564, 128, - 566, 121, 508, 193, 789, 869, 126, 825, 919, 619, - 205, 195, 622, 623, 787, 446, 375, 595, 470, 660, - 447, 438, 205, 207, 665, 507, 751, -1, -1, -1, - -1, -1, -1, 814, 815, 816, 817, 221, 819, -1, - -1, 225, -1, 609, -1, -1, -1, 231, 232, -1, - -1, -1, -1, -1, 51, -1, 53, 54, -1, -1, - -1, 58, -1, -1, -1, 8, 9, -1, 634, 635, - 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, - 646, 647, 648, 649, 650, 651, 652, 653, 654, -1, - 656, -1, -1, -1, -1, -1, 831, 870, -1, -1, - -1, -1, -1, 787, 8, 9, -1, 50, -1, 293, - 751, -1, -1, 886, -1, -1, 897, 898, 899, 900, - 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, - 911, 912, 913, 914, 915, -1, 133, 134, 135, 136, - 324, 45, -1, 47, 48, 49, 787, 90, -1, 53, - -1, 792, -1, 96, 97, -1, -1, 100, 818, 63, - -1, -1, 935, -1, -1, 69, 70, 71, 949, -1, - 8, 9, 169, -1, 171, -1, -1, -1, -1, -1, - 84, 85, -1, 367, -1, -1, 870, 828, 829, -1, - 374, 188, 376, -1, 98, -1, -1, 101, -1, 103, - -1, -1, 886, -1, -1, -1, -1, 980, 818, -1, - 991, -1, 50, -1, 780, -1, -1, -1, -1, -1, - 13, 14, 15, 16, 17, 18, 19, 20, -1, 870, - -1, -1, 873, -1, -1, -1, 29, 878, -1, -1, - -1, -1, -1, -1, -1, 886, -1, -1, 432, 433, - 434, 935, 90, -1, -1, -1, 916, -1, 96, 97, - 826, -1, 100, -1, -1, -1, -1, -1, 834, 14, - 15, 16, 17, 18, 19, 20, -1, 887, 888, 889, - -1, 922, -1, -1, 29, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 935, -1, 980, 938, -1, -1, - -1, 942, 299, 13, 14, 15, 16, 17, 18, 19, - 20, -1, 878, -1, -1, 975, -1, 977, 111, 29, - 113, 114, 115, 116, 508, -1, 119, 120, 121, 122, - 123, -1, 125, 126, 127, -1, -1, -1, -1, 980, - -1, 982, 1002, 1003, -1, 986, -1, 814, 815, 816, - 817, 917, 819, -1, 17, 18, 19, 20, 999, -1, - -1, -1, -1, -1, -1, 931, 29, 1008, -1, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 563, - 125, 126, 127, -1, -1, -1, -1, -1, -1, -1, - -1, 575, 576, 577, -1, -1, 580, -1, 582, -1, - 584, 585, 586, 113, 114, 115, 116, 591, -1, 119, - 120, 121, 122, 123, -1, 125, 126, 127, -1, -1, - -1, -1, -1, -1, -1, 422, -1, -1, -1, -1, - 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, - 907, 908, 909, 910, 911, 912, 913, 914, 915, -1, - -1, -1, -1, -1, 117, 118, 119, 120, 121, 122, - 123, -1, 125, 126, 127, -1, -1, -1, -1, -1, + 1, 529, 2, 384, 5, 39, 90, 91, 90, 403, + 310, 26, 489, 12, 204, 50, 10, 11, 0, 400, + 26, 476, 403, 97, 10, 11, 106, 107, 108, 109, + 110, 118, 112, 113, 114, 35, 36, 37, 38, 628, + 40, 121, 122, 121, 135, 125, 126, 118, 442, 118, + 137, 6, 6, 8, 8, 510, 135, 321, 136, 118, + 520, 442, 88, 89, 90, 66, 137, 97, 137, 26, + 448, 449, 399, 10, 11, 402, 117, 404, 137, 120, + 14, 117, 97, 109, 120, 459, 10, 11, 681, 90, + 91, 97, 466, 467, 468, 469, 470, 471, 173, 118, + 427, 428, 135, 430, 431, 432, 433, 481, 489, 10, + 11, 135, 187, 188, 189, 190, 191, 192, 137, 97, + 137, 311, 10, 11, 135, 118, 586, 501, 522, 118, + 39, 130, 121, 135, 120, 169, 210, 437, 135, 213, + 97, 522, 332, 137, 137, 31, 83, 474, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 629, + 170, 435, 173, 126, 174, 31, 653, 257, 633, 506, + 210, 636, 137, 213, 118, 220, 187, 188, 189, 190, + 191, 192, 227, 383, 195, 210, 105, 135, 213, 654, + 201, 118, 111, 204, 210, 135, 118, 213, 535, 209, + 135, 118, 476, 135, 123, 124, 117, 135, 596, 121, + 137, 296, 600, 118, 602, 137, 604, 605, 606, 117, + 137, 824, 210, 406, 136, 213, 118, 410, 411, 412, + 413, 414, 137, 10, 11, 118, 510, 621, 134, 135, + 136, 118, 85, 210, 135, 137, 213, 126, 847, 848, + 849, 850, 452, 852, 137, 639, 266, 267, 101, 6, + 137, 8, 653, 135, 120, 10, 11, 12, 134, 135, + 136, 16, 120, 136, 137, 320, 135, 136, 55, 135, + 136, 137, 686, 135, 329, 296, 135, 135, 136, 137, + 117, 118, 303, 303, 117, 686, 119, 120, 121, 117, + 311, 312, 135, 319, 907, 316, 135, 136, 319, 120, + 120, 56, 135, 136, 135, 10, 11, 327, 120, 330, + 120, 332, 99, 120, 135, 136, 137, 337, 105, 106, + 513, 135, 109, 932, 933, 934, 935, 936, 937, 938, + 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, + 949, 950, 126, 363, 135, 400, 4, 130, 403, 633, + 55, 136, 10, 11, 375, 120, 111, 461, 10, 461, + 126, 974, 383, 389, 912, 978, 114, 115, 116, 6, + 125, 135, 136, 394, 117, 130, 135, 986, 119, 400, + 135, 135, 403, 135, 438, 406, 440, 442, 863, 410, + 411, 412, 413, 414, 99, 137, 417, 136, 137, 420, + 105, 106, 118, 424, 424, 819, 1019, 88, 89, 90, + 1023, 10, 11, 12, 435, 137, 137, 16, 819, 12, + 1029, 442, 137, 16, 1037, 445, 137, 137, 528, 484, + 137, 452, 127, 1046, 489, 456, 462, 137, 459, 137, + 461, 137, 496, 137, 137, 466, 467, 468, 469, 470, + 471, 472, 487, 137, 127, 476, 138, 56, 137, 137, + 481, 487, 117, 56, 119, 120, 121, 522, 862, 120, + 447, 448, 449, 493, 494, 495, 118, 497, 118, 135, + 501, 135, 117, 958, 137, 135, 135, 117, 87, 510, + 904, 118, 513, 10, 11, 140, 10, 118, 127, 520, + 520, 522, 130, 904, 130, 138, 920, 130, 529, 529, + 487, 858, 111, 135, 118, 10, 11, 61, 111, 920, + 121, 121, 100, 130, 135, 135, 125, 136, 72, 73, + 126, 130, 125, 138, 126, 137, 135, 130, 55, 137, + 10, 85, 135, 118, 118, 140, 137, 137, 92, 10, + 119, 136, 118, 135, 137, 56, 903, 971, 4, 135, + 55, 118, 135, 140, 584, 586, 586, 496, 138, 137, + 971, 138, 116, 137, 118, 119, 135, 31, 56, 140, + 58, 59, 99, 638, 137, 63, 607, 137, 105, 106, + 126, 126, 109, 135, 615, 140, 118, 137, 653, 127, + 621, 127, 135, 1017, 99, 137, 137, 954, 629, 629, + 105, 106, 633, 137, 109, 636, 1017, 119, 639, 596, + 119, 137, 676, 600, 135, 602, 135, 604, 605, 606, + 651, 686, 31, 654, 137, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, + 670, 671, 672, 673, 674, 675, 135, 677, 138, 203, + 681, 139, 140, 141, 142, 686, 10, 11, 12, 21, + 22, 215, 16, 137, 128, 129, 130, 131, 132, 31, + 134, 135, 136, 127, 137, 614, 230, 616, 137, 137, + 234, 127, 137, 135, 135, 527, 240, 241, 137, 177, + 137, 179, 821, 201, 903, 858, 954, 213, 637, 462, + 461, 640, 56, 389, 643, 644, 21, 22, 196, 847, + 848, 849, 850, 615, 852, 213, 31, 487, 453, 128, + 129, 130, 131, 132, 526, 134, 135, 136, -1, 782, + -1, -1, -1, -1, -1, -1, -1, 15, 16, 17, + 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, + 304, 782, -1, 31, 819, 865, -1, 111, -1, -1, + 31, -1, -1, -1, -1, -1, 128, 129, 130, 131, + 132, 125, 134, 135, 136, -1, 130, -1, -1, -1, + -1, 811, 336, -1, -1, -1, -1, 851, 819, -1, + -1, -1, -1, 824, 932, 933, 934, 935, 936, 937, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, + 948, 949, 950, 128, 129, 130, 131, 132, -1, 134, + 135, 136, 310, -1, -1, 31, -1, 381, -1, 859, + -1, 862, 863, -1, 388, -1, 390, -1, 868, 904, + -1, -1, 120, -1, 122, 123, 124, 125, 986, -1, + 128, 129, 130, 131, 132, 920, 134, 135, 136, 130, + 131, 132, -1, 134, 135, 136, -1, -1, -1, -1, + -1, -1, -1, 904, -1, -1, 907, -1, 11, -1, + -1, 912, 912, -1, -1, -1, -1, 951, -1, 920, + -1, 1029, -1, 447, 448, 449, -1, -1, 3, 4, + 5, 6, -1, 8, 9, 10, 971, -1, -1, -1, + -1, -1, 851, -1, -1, -1, -1, 50, -1, 52, + 53, 54, 952, -1, 130, 131, 132, 958, 134, 135, + 136, -1, -1, -1, -1, -1, -1, 967, -1, -1, + 971, 46, -1, 974, 77, 78, 79, 978, 1012, 437, + 1014, -1, 1017, -1, -1, -1, -1, 62, -1, -1, + 93, 94, -1, -1, -1, 70, -1, -1, -1, -1, + -1, -1, -1, 527, 107, -1, 1040, 1041, -1, 112, + -1, 86, 921, 922, 923, 924, 1017, -1, 1019, -1, + 95, -1, 1023, 98, -1, -1, -1, 102, -1, -1, + -1, -1, -1, -1, -1, -1, 1037, -1, -1, -1, + -1, -1, -1, -1, -1, 1046, -1, -1, -1, -1, + 125, -1, -1, -1, 129, 130, -1, -1, 133, 583, + 135, -1, -1, -1, 139, -1, -1, -1, -1, -1, + -1, 595, 596, 597, -1, -1, 600, -1, 602, -1, + 604, 605, 606, -1, -1, -1, -1, 611, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + -1, -1, -1, -1, -1, -1, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, -1, -1, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, + 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, -1, -1, -1, 82, -1, 84, + -1, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, -1, 101, 102, 103, 104, + 105, 106, 107, -1, 109, 110, 111, 112, 113, -1, + -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, -1, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, -1, -1, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, -1, 65, -1, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, -1, -1, -1, 82, -1, 84, -1, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, -1, 101, 102, 103, 104, 105, 106, + 107, -1, 109, 110, 111, 112, 113, -1, -1, -1, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, -1, 139, 140, 3, 4, 5, 6, -1, 8, + 9, 10, 11, -1, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 949, 3, 4, 5, 6, 7, 8, 9, - 10, -1, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, -1, 991, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, -1, -1, -1, 74, -1, 76, -1, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, - 90, -1, 92, 93, 94, 95, 96, 97, 98, -1, - 100, 101, 102, 103, 104, -1, -1, -1, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 3, 4, 5, 6, 7, 8, 9, 10, - -1, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, -1, -1, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, -1, 57, -1, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - -1, -1, -1, 74, -1, 76, -1, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, - -1, 92, 93, 94, 95, 96, 97, 98, -1, 100, - 101, 102, 103, 104, -1, -1, -1, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, -1, 130, - 131, 3, 4, 5, 6, -1, 8, 9, -1, -1, - 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 14, 15, 16, 17, 18, - 19, 20, 45, -1, 47, 48, 49, -1, -1, -1, - 29, -1, -1, 45, -1, 47, 48, 49, 50, 51, - -1, 53, 54, -1, 978, 57, 69, 70, 71, -1, - 62, 63, -1, -1, -1, -1, -1, 69, 70, 71, - -1, 84, 85, -1, 76, -1, -1, -1, -1, -1, - 82, -1, 84, 85, 86, 98, -1, 89, 90, -1, - 103, 93, -1, -1, 96, 97, 98, -1, -1, 101, - -1, 103, 3, 4, 5, 6, -1, 8, 9, -1, - -1, 12, -1, 126, 116, -1, -1, -1, 120, -1, - -1, -1, 124, -1, 126, 114, 115, 116, 130, -1, - 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, - -1, -1, -1, -1, 45, -1, 47, 48, 49, 50, - 51, -1, 53, 54, -1, -1, 57, -1, -1, -1, - -1, 62, 63, -1, -1, -1, -1, -1, 69, 70, - 71, -1, -1, -1, -1, 76, -1, -1, -1, -1, - -1, 82, -1, 84, 85, 86, -1, -1, 89, 90, - -1, -1, 93, -1, -1, 96, 97, 98, -1, -1, - 101, -1, 103, 3, 4, 5, 6, -1, 8, 9, - -1, 19, 20, -1, -1, 116, -1, -1, -1, 120, - -1, 29, -1, 124, -1, 126, -1, -1, -1, 130, - -1, -1, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, 45, 29, 47, 48, 49, - 50, 51, -1, 53, 54, -1, -1, 57, -1, -1, - -1, -1, 62, 63, -1, -1, -1, -1, -1, 69, - 70, 71, -1, -1, -1, -1, 76, -1, -1, -1, - -1, -1, -1, -1, 84, 85, 86, -1, -1, 89, - 90, -1, -1, 93, -1, -1, 96, 97, 98, -1, - -1, 101, -1, 103, 3, 4, 5, 6, -1, 8, - 9, 119, 120, 121, 122, 123, 116, 125, 126, 127, - 120, 121, -1, -1, 124, -1, 126, -1, -1, -1, - 130, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, -1, 125, 126, 127, -1, 45, -1, 47, 48, - 49, 50, 51, -1, 53, 54, -1, -1, 57, -1, - -1, -1, -1, 62, 63, -1, -1, -1, -1, -1, - 69, 70, 71, -1, -1, -1, -1, 76, -1, -1, - -1, -1, -1, 82, -1, 84, 85, 86, -1, -1, - 89, 90, -1, -1, 93, -1, -1, 96, 97, 98, - 9, -1, 101, -1, 103, 3, 4, 5, 6, -1, - 8, 9, -1, -1, -1, -1, -1, 116, -1, -1, - -1, 120, -1, -1, -1, 124, -1, 126, -1, -1, - -1, 130, -1, -1, -1, -1, 45, -1, 47, 48, - 49, -1, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, -1, -1, - 69, 70, 71, -1, 62, 63, -1, -1, -1, -1, - -1, 69, 70, -1, -1, 84, 85, -1, 76, -1, - -1, -1, -1, -1, -1, -1, 84, 85, 86, 98, - -1, 89, -1, -1, 103, 93, 3, 4, 5, 6, - 98, 8, 9, -1, -1, 103, -1, 3, 4, 5, - 6, -1, 8, 9, -1, -1, -1, -1, 116, -1, - -1, -1, 120, 121, -1, -1, 124, -1, 126, -1, - 128, -1, 130, -1, -1, -1, -1, -1, 45, -1, - 47, 48, 49, -1, -1, -1, 53, 54, -1, 45, - -1, 47, 48, 49, -1, 62, 63, 53, 54, -1, - 19, 20, 69, 70, -1, -1, 62, 63, -1, 76, - 29, -1, -1, 69, 70, -1, -1, 84, 85, 86, - 76, -1, 89, -1, -1, -1, 93, -1, 84, 85, - 86, 98, -1, 89, -1, -1, 103, 93, -1, -1, - -1, 108, 98, -1, -1, -1, -1, 103, -1, 116, - -1, -1, 108, 120, 121, -1, -1, 124, -1, 126, - 116, -1, -1, 130, 120, 121, -1, -1, 124, -1, - 126, -1, -1, -1, 130, 3, 4, 5, 6, -1, - 8, 9, -1, -1, -1, -1, 3, 4, 5, 6, - -1, 8, 9, -1, -1, -1, -1, -1, -1, -1, - 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, - -1, -1, -1, -1, -1, -1, -1, 45, -1, 47, - 48, 49, -1, -1, -1, 53, 54, -1, 45, -1, - 47, 48, 49, -1, 62, 63, 53, 54, -1, -1, - -1, 69, 70, -1, -1, 62, 63, -1, 76, -1, - -1, -1, 69, 70, -1, -1, 84, 85, 86, 76, - -1, 89, -1, -1, -1, 93, -1, 84, 85, 86, - 98, -1, 89, -1, -1, 103, 93, 3, 4, 5, - 6, 98, 8, 9, -1, -1, 103, -1, 116, -1, - -1, 108, 120, 121, -1, -1, 124, -1, 126, 116, - 128, -1, 130, 120, 121, -1, -1, 124, 45, 126, - 47, 48, 49, 130, -1, -1, 53, -1, -1, 45, - -1, 47, 48, 49, -1, -1, 63, 53, 54, -1, - -1, -1, 69, 70, 71, -1, 62, 63, -1, -1, - -1, -1, -1, 69, 70, -1, -1, 84, 85, -1, - 76, -1, -1, -1, -1, -1, -1, -1, 84, 85, - 86, 98, -1, 89, -1, -1, 103, 93, 3, 4, - 5, 6, 98, 8, 9, -1, -1, 103, -1, 3, - 4, 5, 6, -1, 8, -1, -1, -1, -1, 126, - 116, -1, -1, -1, 120, 121, -1, -1, 124, -1, - 126, -1, 128, -1, 130, -1, -1, -1, -1, -1, - 45, -1, 47, 48, 49, -1, -1, -1, 53, 54, - -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, - 54, -1, -1, -1, 69, 70, -1, -1, 62, -1, - -1, 76, -1, 15, 16, 17, 18, 19, 20, 84, - 85, 86, -1, -1, 89, -1, -1, 29, 93, -1, - -1, -1, 86, 98, -1, 89, -1, -1, 103, 93, - -1, 13, 14, 15, 16, 17, 18, 19, 20, -1, - -1, 116, -1, -1, -1, 120, 121, 29, -1, 124, - -1, 126, 116, -1, -1, 130, 120, 121, -1, -1, - 124, -1, 126, -1, -1, -1, 130, 13, 14, 15, - 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, - -1, -1, -1, 29, -1, -1, 13, 14, 15, 16, - 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, - -1, -1, 29, 115, 116, 117, 118, 119, 120, 121, - 122, 123, -1, 125, 126, 127, -1, -1, -1, -1, + -1, -1, -1, -1, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, 46, -1, -1, + 31, 50, -1, 52, 53, 54, 55, 56, -1, 58, + -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, + 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, + -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, + 9, 10, 11, -1, -1, 14, 125, -1, -1, -1, + 129, 1015, -1, -1, 133, -1, 135, -1, -1, -1, + 139, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, -1, 134, 135, 136, -1, 46, -1, 140, + -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, + -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, + 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, + -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, + 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, + 129, -1, -1, -1, 133, -1, 135, -1, -1, -1, + 139, -1, -1, -1, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, 46, -1, -1, + 31, 50, -1, 52, 53, 54, 55, 56, -1, 58, + -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, + -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, + 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, -1, 133, -1, 135, -1, -1, -1, + 139, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, -1, 134, 135, 136, -1, 46, -1, 140, + -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, + -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, + 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, + -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, + 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, + 129, -1, -1, -1, 133, -1, 135, -1, -1, -1, + 139, 17, 18, 19, 20, 21, 22, -1, -1, -1, + 50, -1, 52, 53, 54, 31, -1, 46, -1, -1, + -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, + -1, -1, 61, 62, -1, -1, -1, 77, 78, 79, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + -1, -1, -1, 93, 94, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, 107, -1, 98, + -1, -1, 112, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 135, 125, -1, -1, -1, + 129, 130, -1, -1, 133, -1, 135, -1, 137, 125, + 139, -1, 128, 129, 130, 131, 132, 46, 134, 135, + 136, 50, -1, 52, 53, 54, -1, -1, -1, -1, + -1, -1, 61, 62, -1, -1, -1, -1, -1, 0, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, 48, 117, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, 64, 133, -1, 135, -1, 69, -1, + 139, 72, -1, -1, -1, -1, -1, 46, -1, 80, + 81, 50, 83, 52, 53, 54, -1, 88, 89, 90, + -1, -1, 61, 62, -1, -1, 97, -1, -1, 100, + -1, 70, 71, 104, -1, -1, -1, 108, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, 119, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, 48, 117, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, 64, 133, -1, 135, -1, 69, -1, + 139, 72, -1, -1, -1, -1, -1, 46, -1, 80, + 81, 50, 83, 52, 53, 54, -1, 88, 89, 90, + -1, -1, 61, 62, -1, -1, 97, -1, -1, 100, + -1, 70, 71, 104, -1, -1, -1, 108, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, -1, 133, -1, 135, -1, 137, -1, + 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, + -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, + -1, -1, 61, 62, -1, -1, -1, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, -1, 117, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, -1, 133, -1, 135, -1, -1, -1, + 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, + -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, + -1, -1, 61, 62, -1, -1, -1, -1, -1, -1, + -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, + -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, + -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, + 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + 129, 130, -1, -1, 133, -1, 135, -1, 137, -1, + 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, + -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, + -1, -1, 61, 62, 19, 20, 21, 22, -1, -1, + -1, 70, 71, -1, -1, -1, 31, -1, 77, 78, + -1, -1, -1, -1, -1, 84, -1, 86, 17, 18, + 19, 20, 21, 22, 93, 94, 95, -1, -1, 98, + -1, -1, 31, 102, 19, 20, 21, 22, 107, -1, + -1, -1, -1, 112, -1, -1, 31, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 125, -1, -1, -1, + 129, 130, 6, 31, 133, -1, 135, -1, -1, -1, + 139, 15, 16, 17, 18, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, 31, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 126, 127, 128, 129, 130, 131, 132, -1, 134, + 135, 136, -1, -1, -1, -1, 60, -1, -1, -1, + -1, -1, -1, -1, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, + 84, -1, -1, 128, 129, 130, 131, 132, -1, 134, + 135, 136, -1, -1, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 10, + 11, -1, 140, -1, 118, -1, -1, 121, -1, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + -1, 135, 136, -1, -1, 139, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 49, 50, + -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, + 61, -1, -1, -1, 65, 66, 67, 68, -1, -1, + 71, -1, -1, -1, -1, 76, 77, 78, 79, 10, + 11, 82, -1, -1, -1, -1, 87, -1, -1, -1, + 91, -1, 93, 94, -1, 96, -1, -1, 99, -1, + -1, -1, -1, -1, 105, 106, 107, -1, 109, 110, + 111, 112, -1, -1, -1, -1, 117, -1, 49, 50, + -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, + 61, -1, 133, -1, 65, 66, 67, 68, -1, -1, + 71, -1, -1, 10, 11, 76, 77, 78, 79, -1, + -1, 82, -1, -1, -1, -1, 87, -1, -1, -1, + 91, -1, 93, 94, -1, 96, -1, -1, 99, -1, + -1, -1, -1, -1, 105, 106, 107, -1, 109, 110, + 111, 112, 49, 50, -1, 52, 53, 54, 55, 56, + -1, 58, -1, -1, 61, -1, -1, -1, 65, 66, + 67, 68, 133, -1, 71, -1, -1, -1, -1, 76, + 77, 78, 79, -1, -1, 82, -1, -1, -1, -1, + 87, -1, -1, -1, 91, -1, 93, 94, -1, 96, + -1, -1, 99, -1, -1, -1, -1, -1, 105, 106, + 107, -1, 109, 110, 111, 112, 15, 16, 17, 18, + 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 31, -1, -1, -1, 133, 15, 16, 17, + 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + 31, -1, 15, 16, 17, 18, 19, 20, 21, 22, + -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, + 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, + -1, -1, -1, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 118, + -1, -1, -1, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, 137, -1, + -1, -1, -1, -1, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 137, + -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, -1, 134, 135, 136, 137, 120, -1, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, 119, -1, -1, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, + 135, 136, 15, 16, 17, 18, 19, 20, 21, 22, + -1, -1, -1, -1, -1, -1, -1, -1, 31, 15, + 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, + -1, -1, -1, -1, -1, 31, 15, 16, 17, 18, + 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, + 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, + -1, -1, -1, -1, -1, -1, 31, 16, 17, 18, + 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 31, -1, -1, 118, -1, -1, -1, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, 120, -1, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, + 136, -1, -1, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, -1, 134, 135, 136, -1, -1, 122, 123, 124, + 125, -1, -1, 128, 129, 130, 131, 132, -1, 134, + 135, 136, -1, -1, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, 16, 17, + 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, + -1, -1, -1, 50, -1, 52, 53, 54, 31, 17, + 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, + 77, 78, 79, -1, -1, -1, -1, -1, 31, 17, + 18, 19, 20, 21, 22, -1, 93, 94, -1, -1, + -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, + 107, -1, -1, -1, -1, 112, -1, -1, 31, 17, + 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, + -1, -1, -1, 31, -1, 123, 124, 125, 135, -1, + 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, + -1, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, -1, -1, -1, 125, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, + 123, 124, 125, -1, -1, 128, 129, 130, 131, 132, + -1, 134, 135, 136, -1, -1, -1, -1, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 10, + 11, 124, 125, -1, -1, 128, 129, 130, 131, 132, + -1, 134, 135, 136, -1, -1, -1, -1, -1, -1, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 50, + -1, 52, 53, 54, -1, -1, 10, 11, -1, 50, + -1, 52, 53, 54, 55, 56, -1, -1, -1, -1, + 61, -1, -1, -1, -1, -1, 77, 78, 79, -1, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + -1, -1, 93, 94, -1, -1, 50, -1, 52, 53, + 54, -1, 93, 94, -1, 11, 107, 61, -1, -1, + -1, 112, -1, -1, 105, -1, 107, 71, -1, 110, + -1, 112, -1, 77, 78, 79, -1, -1, -1, -1, + -1, -1, -1, 50, 135, 52, 53, 54, -1, 93, + 94, -1, -1, -1, 50, -1, 52, 53, 54, 55, + 56, -1, 58, 107, 71, 61, 110, -1, 112, 65, + 77, 78, 79, -1, -1, 71, 11, -1, -1, -1, + -1, 77, 78, 79, -1, -1, 93, 94, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 93, 94, -1, + 107, -1, -1, 99, 50, 112, 52, 53, 54, 105, + 106, 107, -1, 11, 110, 50, 112, 52, 53, 54, + 55, 56, -1, 58, -1, -1, 61, -1, -1, -1, + 65, 77, 78, 79, -1, -1, 71, -1, -1, -1, + -1, -1, 77, 78, 79, -1, -1, 93, 94, -1, + -1, -1, 50, -1, 52, 53, 54, 55, 93, 94, + 58, 107, -1, 61, 99, -1, 112, 65, -1, -1, + 105, 106, 107, 71, 11, 110, -1, 112, -1, 77, + 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, + -1, 99, -1, -1, -1, -1, -1, 105, 106, 107, + -1, 11, 110, 50, 112, 52, 53, 54, 55, -1, + -1, 58, -1, -1, 61, -1, -1, -1, 65, -1, + -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, + 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, + 50, -1, 52, 53, 54, 55, 93, 94, -1, -1, + -1, 61, 99, -1, -1, 65, -1, -1, 105, 106, + 107, 71, -1, 110, -1, 112, 48, 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, -1, 125, 126, 127, -1, -1, -1, 131, - 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, -1, 125, - 126, 127, -1, -1, -1, 131, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, - 127, -1, -1, -1, 131, 13, 14, 15, 16, 17, - 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, - -1, 29, -1, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 109, -1, -1, -1, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, -1, 125, 126, 127, 128, -1, -1, 76, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 8, 9, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 109, -1, -1, 112, -1, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, -1, 126, 127, - 44, 45, 130, 47, 48, 49, 50, 51, -1, 53, - -1, -1, -1, 57, 58, 59, 60, -1, -1, 63, - -1, -1, -1, -1, 68, 69, 70, 71, -1, -1, - 74, -1, 8, 9, 78, -1, -1, -1, 82, -1, - 84, 85, -1, 87, -1, -1, 90, -1, -1, -1, - -1, -1, 96, 97, 98, -1, 100, 101, 102, 103, - -1, -1, -1, -1, 108, -1, -1, -1, 44, 45, - -1, 47, 48, 49, 50, 51, -1, 53, -1, -1, - 124, 57, 58, 59, 60, -1, -1, 63, -1, -1, - -1, -1, 68, 69, 70, 71, -1, -1, 74, -1, - 8, 9, 78, -1, -1, -1, 82, -1, 84, 85, - -1, 87, -1, -1, 90, -1, -1, -1, -1, -1, - 96, 97, 98, -1, 100, 101, 102, 103, 13, 14, - 15, 16, 17, 18, 19, 20, 44, 45, -1, 47, - 48, 49, 50, 51, 29, 53, -1, -1, 124, 57, - 58, 59, 60, -1, -1, 63, -1, -1, -1, -1, - 68, 69, 70, 71, -1, -1, 74, -1, -1, -1, - 78, -1, -1, -1, 82, -1, 84, 85, -1, 87, - -1, -1, 90, -1, -1, -1, -1, -1, 96, 97, - 98, -1, 100, 101, 102, 103, 13, 14, 15, 16, - 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, - -1, -1, 29, -1, -1, -1, 124, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 111, -1, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, - 125, 126, 127, 13, 14, 15, 16, 17, 18, 19, - 20, -1, -1, -1, -1, -1, -1, -1, -1, 29, - 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, -1, 13, 14, - 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, - -1, -1, -1, 110, 29, -1, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, - 127, 13, 14, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, 15, 16, - 17, 18, 19, 20, -1, -1, -1, -1, -1, 109, - -1, -1, 29, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, -1, 125, 126, 127, 111, -1, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, -1, 125, 126, 127, -1, -1, -1, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, - 125, 126, 127, 15, 16, 17, 18, 19, 20, -1, - -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, - -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, -1, 125, 126, 127, -1, -1, -1, 116, - 117, 118, 119, 120, 121, 122, 123, -1, 125, 126, - 127, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, 15, 16, 17, 18, - 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, - 29, 15, 16, 17, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, - -1, -1, 114, 115, 116, -1, -1, 119, 120, 121, - 122, 123, -1, 125, 126, 127, 15, 16, 17, 18, - 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, 119, 120, 121, 122, 123, - -1, 125, 126, 127, -1, -1, 115, 116, -1, 0, - 119, 120, 121, 122, 123, -1, 125, 126, 127, -1, - -1, -1, 116, -1, -1, 119, 120, 121, 122, 123, - -1, 125, 126, 127, 17, 18, 19, 20, -1, -1, - -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, - -1, -1, 43, 45, -1, 47, 48, 49, -1, -1, - 119, 120, 121, 122, 123, 56, 125, 126, 127, -1, - 61, -1, -1, 64, -1, -1, -1, 69, 70, 71, - -1, 72, 73, -1, 75, -1, 8, 9, 79, 80, - 81, -1, 84, 85, -1, -1, -1, 88, -1, -1, - 91, -1, -1, -1, 95, -1, 98, -1, 99, -1, - -1, 103, -1, -1, -1, -1, -1, -1, -1, 110, - -1, -1, -1, 45, -1, 47, 48, 49, 50, 51, - -1, 53, -1, -1, 126, -1, 119, 120, 121, 122, - 123, 63, 125, 126, 127, -1, 9, 69, 70, 71, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 84, 85, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 96, -1, 98, -1, -1, 101, - -1, 103, 45, -1, 47, 48, 49, 50, 51, -1, - 53, -1, -1, -1, 57, -1, -1, -1, -1, -1, - 63, -1, -1, 9, -1, -1, 69, 70, 71, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 84, 85, -1, -1, -1, -1, 90, 45, -1, - 47, 48, 49, 96, 97, 98, -1, -1, 101, 45, - 103, 47, 48, 49, 50, 51, -1, 53, -1, -1, - -1, 57, 69, 70, 71, -1, -1, 63, -1, -1, - 9, -1, -1, 69, 70, 71, -1, 84, 85, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, - -1, 98, -1, -1, 90, -1, 103, -1, -1, -1, - 96, 97, 98, -1, -1, 101, 45, 103, 47, 48, - 49, 50, -1, -1, 53, -1, -1, -1, 57, 126, - -1, -1, -1, -1, 63, -1, -1, 9, -1, -1, - 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 82, -1, 84, 85, -1, -1, -1, - -1, 90, 45, -1, 47, 48, 49, 96, 97, 98, - 53, -1, 101, 45, 103, 47, 48, 49, 50, -1, - 63, 53, -1, -1, -1, 57, 69, 70, 71, -1, - -1, 63, -1, -1, 9, -1, -1, 69, 70, 71, - -1, 84, 85, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 84, 85, -1, 98, -1, -1, 90, 45, - 103, 47, 48, 49, 96, 97, 98, -1, -1, 101, - 45, 103, 47, 48, 49, 50, -1, 63, 53, -1, - -1, -1, 57, 69, 70, 71, -1, -1, 63, -1, - -1, -1, -1, -1, 69, 70, 71, -1, 84, 85, - -1, -1, -1, -1, -1, -1, 43, -1, -1, 84, - 85, -1, 98, -1, -1, 90, -1, 103, -1, 56, - -1, 96, 97, 98, 61, -1, 101, 64, 103, -1, - -1, -1, -1, -1, 43, 72, 73, -1, 75, -1, - -1, -1, 79, 80, 81, -1, -1, 56, -1, -1, - -1, 88, 61, -1, 91, 64, -1, -1, 95, -1, - -1, -1, 99, 72, 73, -1, 75, 43, -1, -1, - 79, 80, 81, 110, -1, -1, -1, -1, -1, 88, - 56, -1, 91, -1, -1, 61, 95, -1, 64, -1, - 99, -1, 129, -1, -1, 43, 72, 73, -1, 75, - -1, 110, -1, 79, 80, 81, -1, -1, 56, -1, - -1, -1, 88, 61, -1, 91, 64, -1, -1, 95, - 129, -1, -1, 99, 72, 73, -1, 75, 43, -1, - -1, 79, 80, 81, 110, -1, -1, -1, -1, -1, - 88, 56, -1, 91, -1, -1, 61, 95, -1, 64, - -1, 99, -1, 129, -1, -1, -1, 72, 73, -1, - 75, -1, 110, -1, 79, 80, 81, 45, -1, 47, - 48, 49, -1, 88, -1, -1, 91, -1, -1, -1, - 95, 129, -1, -1, 99, -1, -1, -1, -1, -1, - -1, 69, 70, 71, -1, 110, -1, 43, -1, -1, - -1, -1, -1, -1, -1, -1, 84, 85, -1, -1, - 56, -1, -1, -1, 129, 61, -1, -1, 64, -1, - 98, -1, -1, -1, -1, 103, 72, 73, -1, 75, - -1, -1, -1, 79, 80, 81, -1, -1, -1, -1, - -1, -1, 88, -1, -1, 91, -1, -1, -1, 95, - -1, -1, -1, 99 + -1, -1, 64, 93, 94, -1, -1, 69, -1, 99, + 72, -1, -1, -1, -1, 105, 106, 107, 80, 81, + 110, 83, 112, 48, -1, -1, 88, 89, 90, -1, + -1, -1, -1, -1, -1, 97, -1, -1, 100, 64, + -1, -1, 104, -1, 69, -1, 108, 72, -1, -1, + -1, -1, -1, -1, -1, 80, 81, 119, 83, -1, + -1, -1, -1, 88, 89, 90, 48, -1, -1, -1, + -1, -1, 97, -1, -1, 100, 138, -1, -1, 104, + -1, -1, 64, 108, -1, -1, -1, 69, -1, -1, + 72, -1, -1, -1, 119, -1, -1, -1, 80, 81, + -1, 83, -1, 48, -1, -1, 88, 89, 90, -1, + -1, -1, -1, 138, -1, 97, -1, -1, 100, 64, + -1, -1, 104, -1, 69, -1, 108, 72, -1, -1, + -1, -1, -1, -1, -1, 80, 81, 119, 83, -1, + -1, -1, -1, 88, 89, 90, 48, -1, -1, -1, + -1, -1, 97, -1, -1, 100, 138, -1, -1, 104, + -1, -1, 64, 108, -1, -1, -1, 69, -1, -1, + 72, -1, -1, -1, 119, -1, -1, -1, 80, 81, + 50, 83, 52, 53, 54, -1, 88, 89, 90, -1, + -1, 61, -1, 138, -1, 97, -1, -1, 100, -1, + -1, 71, 104, -1, -1, -1, 108, 77, 78, 79, + -1, 50, -1, 52, 53, 54, -1, 119, -1, -1, + -1, -1, 61, 93, 94, -1, -1, -1, -1, -1, + -1, -1, 71, -1, -1, -1, 138, 107, 77, 78, + 79, -1, 112, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, 94, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 135, -1, -1, 107, -1, + -1, -1, -1, 112 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 105, 106, 107, 133, 134, 224, 3, 4, 5, - 6, 8, 9, 45, 47, 48, 49, 53, 54, 62, - 63, 69, 70, 76, 84, 85, 86, 89, 93, 98, - 103, 116, 120, 121, 124, 126, 130, 217, 218, 223, - 9, 45, 47, 48, 49, 50, 51, 53, 57, 63, - 69, 70, 71, 84, 85, 90, 96, 97, 98, 101, - 103, 184, 187, 188, 190, 195, 196, 200, 201, 205, - 206, 207, 208, 0, 43, 56, 61, 64, 72, 73, - 75, 79, 80, 81, 88, 91, 95, 99, 110, 137, - 139, 140, 142, 143, 144, 165, 202, 204, 224, 126, - 126, 126, 126, 126, 126, 117, 126, 126, 126, 9, - 96, 186, 200, 201, 205, 126, 126, 126, 117, 126, - 126, 217, 217, 217, 217, 9, 45, 47, 48, 49, - 53, 63, 69, 70, 84, 85, 98, 103, 187, 215, - 217, 217, 13, 14, 15, 16, 17, 18, 19, 20, - 29, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 125, 126, 127, 6, 184, 53, 63, 70, - 206, 70, 206, 206, 8, 9, 222, 206, 10, 14, - 51, 102, 116, 121, 126, 183, 224, 108, 111, 222, - 108, 222, 111, 141, 126, 126, 108, 222, 111, 111, - 111, 126, 142, 143, 166, 142, 149, 75, 222, 8, - 9, 44, 51, 58, 59, 60, 68, 74, 78, 82, - 87, 96, 100, 102, 108, 124, 154, 185, 188, 190, - 195, 200, 201, 205, 214, 215, 224, 214, 214, 214, - 214, 214, 187, 214, 214, 214, 222, 126, 222, 222, - 214, 214, 187, 187, 214, 214, 128, 109, 128, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 128, 215, 217, 183, 63, 121, 183, 183, 183, 183, - 183, 183, 127, 198, 199, 224, 9, 197, 206, 111, - 189, 191, 139, 8, 222, 134, 108, 217, 117, 51, - 154, 185, 222, 126, 126, 184, 223, 51, 184, 222, - 138, 222, 108, 110, 111, 112, 177, 110, 145, 222, - 222, 128, 128, 128, 128, 128, 128, 118, 128, 128, - 128, 214, 128, 128, 128, 118, 128, 128, 217, 217, - 111, 128, 131, 183, 128, 213, 217, 224, 222, 129, - 197, 134, 111, 192, 193, 224, 109, 109, 129, 203, - 109, 128, 8, 9, 50, 51, 96, 167, 168, 169, - 170, 205, 224, 184, 177, 150, 155, 10, 121, 156, - 146, 184, 8, 9, 10, 14, 51, 102, 116, 121, - 181, 224, 134, 126, 209, 210, 135, 136, 222, 108, - 217, 10, 14, 51, 78, 102, 116, 121, 126, 147, - 171, 222, 111, 126, 128, 126, 217, 126, 131, 109, - 112, 129, 79, 80, 81, 100, 194, 108, 109, 8, - 222, 134, 223, 222, 170, 222, 118, 109, 8, 9, - 10, 14, 51, 102, 116, 121, 126, 182, 224, 151, - 152, 171, 3, 4, 5, 8, 12, 51, 54, 62, - 76, 82, 86, 89, 93, 116, 120, 124, 126, 130, - 173, 174, 180, 184, 219, 220, 223, 224, 121, 171, - 173, 148, 171, 181, 121, 181, 181, 181, 181, 181, - 126, 127, 129, 157, 129, 211, 224, 108, 109, 126, - 108, 178, 179, 217, 224, 110, 121, 171, 171, 13, - 14, 15, 16, 17, 18, 19, 20, 29, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 52, 76, 109, 112, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 126, 127, 130, 163, 171, - 171, 171, 171, 111, 112, 126, 127, 176, 177, 224, - 197, 215, 215, 173, 217, 96, 100, 201, 221, 222, - 100, 221, 100, 221, 79, 80, 81, 134, 194, 109, - 128, 109, 129, 128, 112, 182, 112, 143, 164, 165, - 169, 121, 182, 182, 182, 182, 182, 182, 112, 127, - 175, 224, 153, 171, 176, 177, 182, 82, 184, 117, - 186, 180, 126, 117, 217, 217, 217, 187, 215, 217, - 128, 12, 109, 182, 13, 14, 15, 16, 17, 18, - 19, 20, 29, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 125, 126, 127, 171, 111, 128, - 128, 176, 177, 126, 181, 160, 213, 173, 3, 4, - 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 74, 76, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 89, 90, 92, - 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, - 104, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 130, 131, 212, 209, 136, 214, 178, 129, - 109, 171, 128, 131, 128, 4, 217, 172, 213, 109, - 128, 128, 128, 109, 222, 221, 222, 221, 221, 221, - 221, 221, 129, 8, 110, 222, 187, 175, 187, 182, - 128, 54, 86, 89, 116, 120, 121, 124, 126, 130, - 216, 218, 213, 176, 177, 109, 112, 176, 184, 182, - 187, 126, 187, 187, 128, 128, 51, 162, 224, 12, - 180, 176, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 128, 215, 217, 128, 126, 162, 109, - 161, 173, 131, 128, 211, 129, 128, 129, 108, 217, - 173, 131, 147, 162, 128, 128, 126, 117, 126, 117, - 216, 216, 216, 216, 187, 215, 216, 13, 14, 15, - 16, 17, 18, 19, 20, 29, 113, 114, 115, 116, - 119, 120, 121, 122, 123, 125, 126, 127, 131, 109, - 152, 217, 182, 176, 118, 214, 128, 118, 217, 77, - 92, 111, 128, 131, 126, 158, 148, 173, 128, 162, - 129, 178, 128, 110, 110, 173, 187, 187, 187, 128, - 128, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 128, 215, 217, 153, 176, 126, 128, 126, 126, 217, - 159, 173, 128, 162, 129, 162, 128, 118, 128, 118, - 216, 111, 128, 131, 215, 215, 128, 222, 173, 128, - 162, 162, 126, 126, 216, 128, 128, 128, 128, 162, - 215, 215, 162, 128, 128 + 0, 114, 115, 116, 142, 143, 233, 3, 4, 5, + 6, 8, 9, 10, 11, 46, 50, 52, 53, 54, + 61, 62, 70, 71, 77, 78, 84, 86, 93, 94, + 95, 98, 102, 107, 112, 125, 129, 130, 133, 135, + 139, 226, 227, 232, 11, 50, 52, 53, 54, 55, + 56, 58, 61, 65, 71, 77, 78, 79, 93, 94, + 99, 105, 106, 107, 110, 112, 193, 196, 197, 199, + 204, 205, 209, 210, 214, 215, 216, 217, 0, 48, + 64, 69, 72, 80, 81, 83, 88, 89, 90, 97, + 100, 104, 108, 119, 146, 148, 149, 151, 152, 153, + 174, 211, 213, 233, 135, 135, 135, 135, 135, 135, + 135, 126, 135, 135, 135, 11, 105, 195, 209, 210, + 214, 135, 135, 135, 126, 135, 135, 226, 226, 226, + 226, 11, 50, 52, 53, 54, 61, 71, 77, 78, + 93, 94, 107, 112, 196, 224, 226, 226, 15, 16, + 17, 18, 19, 20, 21, 22, 31, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, + 136, 6, 8, 193, 135, 61, 71, 78, 215, 78, + 215, 215, 10, 11, 231, 215, 12, 16, 56, 111, + 125, 130, 135, 192, 233, 117, 120, 231, 117, 231, + 120, 150, 135, 135, 117, 231, 120, 120, 120, 135, + 151, 152, 175, 151, 158, 83, 231, 10, 11, 49, + 56, 58, 66, 67, 68, 76, 82, 87, 91, 96, + 105, 109, 111, 117, 133, 163, 194, 197, 199, 204, + 209, 210, 214, 223, 224, 233, 196, 223, 223, 223, + 223, 223, 196, 223, 223, 223, 231, 135, 231, 231, + 223, 223, 196, 196, 223, 223, 137, 118, 137, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 137, 224, 226, 192, 226, 71, 130, 192, 192, 192, + 192, 192, 192, 136, 207, 208, 233, 11, 206, 215, + 120, 198, 200, 148, 10, 231, 143, 117, 226, 126, + 56, 163, 194, 231, 135, 135, 193, 135, 6, 56, + 193, 231, 147, 231, 117, 119, 120, 121, 186, 119, + 154, 231, 231, 137, 137, 137, 137, 137, 137, 137, + 127, 137, 137, 137, 223, 137, 137, 137, 127, 137, + 137, 226, 226, 120, 137, 140, 137, 192, 137, 222, + 226, 233, 231, 138, 206, 143, 120, 201, 202, 233, + 118, 118, 138, 212, 118, 137, 10, 11, 55, 56, + 105, 176, 177, 178, 179, 214, 233, 193, 186, 159, + 164, 12, 130, 165, 155, 226, 193, 10, 11, 12, + 16, 56, 111, 125, 130, 190, 233, 143, 135, 218, + 219, 144, 145, 231, 117, 226, 12, 16, 56, 87, + 111, 125, 130, 135, 156, 180, 231, 120, 135, 137, + 135, 226, 135, 140, 118, 121, 138, 88, 89, 90, + 109, 203, 117, 118, 10, 231, 143, 232, 231, 179, + 231, 127, 118, 10, 11, 12, 16, 56, 111, 125, + 130, 135, 191, 233, 160, 161, 180, 3, 4, 5, + 9, 10, 14, 46, 56, 62, 70, 84, 86, 91, + 95, 98, 102, 125, 129, 133, 135, 139, 182, 183, + 189, 193, 228, 229, 232, 233, 130, 180, 182, 157, + 180, 137, 190, 130, 190, 190, 190, 190, 190, 135, + 136, 138, 166, 138, 220, 233, 117, 118, 135, 117, + 187, 188, 226, 233, 119, 130, 180, 180, 6, 15, + 16, 17, 18, 19, 20, 21, 22, 31, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 60, 84, 118, 121, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 135, 136, 139, 172, 180, + 180, 180, 180, 120, 121, 135, 136, 185, 186, 233, + 206, 224, 224, 182, 226, 105, 109, 210, 230, 231, + 109, 230, 109, 230, 88, 89, 90, 143, 203, 118, + 137, 118, 138, 137, 121, 191, 121, 152, 173, 174, + 178, 130, 191, 191, 191, 191, 191, 191, 121, 136, + 184, 233, 162, 180, 185, 186, 191, 135, 91, 193, + 126, 195, 189, 135, 126, 226, 226, 226, 196, 224, + 226, 137, 14, 118, 191, 15, 16, 17, 18, 19, + 20, 21, 22, 31, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 134, 135, 136, 180, 120, + 137, 137, 185, 186, 135, 190, 169, 222, 182, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 82, 84, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, + 112, 113, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 139, 140, 221, 218, 145, 223, 187, + 138, 118, 180, 10, 137, 140, 137, 4, 226, 181, + 222, 118, 137, 137, 137, 118, 231, 230, 231, 230, + 230, 230, 230, 230, 138, 10, 119, 231, 196, 184, + 196, 191, 137, 46, 62, 95, 98, 125, 129, 130, + 133, 135, 139, 225, 227, 222, 185, 186, 118, 121, + 185, 196, 193, 191, 196, 135, 196, 196, 137, 137, + 56, 171, 233, 14, 189, 185, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 137, 224, 226, + 137, 135, 171, 118, 170, 182, 140, 137, 220, 138, + 137, 138, 117, 226, 182, 140, 156, 171, 137, 137, + 135, 135, 126, 135, 126, 225, 225, 225, 225, 196, + 224, 225, 15, 16, 17, 18, 19, 20, 21, 22, + 31, 122, 123, 124, 125, 128, 129, 130, 131, 132, + 134, 135, 136, 140, 118, 161, 226, 137, 191, 185, + 127, 223, 137, 127, 226, 85, 101, 120, 137, 140, + 135, 167, 157, 182, 137, 171, 138, 187, 137, 119, + 119, 182, 196, 196, 196, 196, 137, 137, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 137, 224, 226, + 162, 185, 135, 137, 135, 135, 226, 168, 182, 137, + 171, 138, 171, 137, 137, 127, 137, 127, 225, 120, + 137, 140, 224, 224, 137, 231, 182, 137, 171, 171, + 135, 135, 225, 137, 137, 137, 137, 171, 224, 224, + 171, 137, 137 }; #define yyerrok (yyerrstatus = 0) @@ -3411,7 +3509,7 @@ yyreduce: { case 3: /* Line 1792 of yacc.c */ -#line 398 "dtool/src/cppparser/cppBison.yxx" +#line 406 "dtool/src/cppparser/cppBison.yxx" { current_expr = (yyvsp[(2) - (2)].u.expr); } @@ -3419,7 +3517,7 @@ yyreduce: case 4: /* Line 1792 of yacc.c */ -#line 402 "dtool/src/cppparser/cppBison.yxx" +#line 410 "dtool/src/cppparser/cppBison.yxx" { current_type = (yyvsp[(2) - (2)].u.type); } @@ -3427,7 +3525,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 420 "dtool/src/cppparser/cppBison.yxx" +#line 428 "dtool/src/cppparser/cppBison.yxx" { delete (yyvsp[(3) - (4)].u.expr); } @@ -3435,7 +3533,7 @@ yyreduce: case 11: /* Line 1792 of yacc.c */ -#line 432 "dtool/src/cppparser/cppBison.yxx" +#line 440 "dtool/src/cppparser/cppBison.yxx" { push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) | ((yyvsp[(1) - (2)].u.integer) & CPPInstance::SC_c_binding)); @@ -3444,7 +3542,7 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 437 "dtool/src/cppparser/cppBison.yxx" +#line 445 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3452,7 +3550,7 @@ yyreduce: case 20: /* Line 1792 of yacc.c */ -#line 451 "dtool/src/cppparser/cppBison.yxx" +#line 459 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 0) { yyerror("Unclosed __begin_publish", publish_loc); @@ -3469,7 +3567,7 @@ yyreduce: case 21: /* Line 1792 of yacc.c */ -#line 464 "dtool/src/cppparser/cppBison.yxx" +#line 472 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level != 1) { yyerror("Unmatched __end_publish", (yylsp[(1) - (1)])); @@ -3482,7 +3580,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 473 "dtool/src/cppparser/cppBison.yxx" +#line 481 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_published); } @@ -3490,7 +3588,7 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 477 "dtool/src/cppparser/cppBison.yxx" +#line 485 "dtool/src/cppparser/cppBison.yxx" { if (publish_nest_level > 0) { current_scope->set_current_vis(V_published); @@ -3502,7 +3600,7 @@ yyreduce: case 24: /* Line 1792 of yacc.c */ -#line 485 "dtool/src/cppparser/cppBison.yxx" +#line 493 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_protected); } @@ -3510,7 +3608,7 @@ yyreduce: case 25: /* Line 1792 of yacc.c */ -#line 489 "dtool/src/cppparser/cppBison.yxx" +#line 497 "dtool/src/cppparser/cppBison.yxx" { current_scope->set_current_vis(V_private); } @@ -3518,7 +3616,7 @@ yyreduce: case 26: /* Line 1792 of yacc.c */ -#line 493 "dtool/src/cppparser/cppBison.yxx" +#line 501 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (7)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -3533,7 +3631,7 @@ yyreduce: case 27: /* Line 1792 of yacc.c */ -#line 504 "dtool/src/cppparser/cppBison.yxx" +#line 512 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *getter = (yyvsp[(5) - (9)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); if (getter == (CPPDeclaration *)NULL || getter->get_subtype() != CPPDeclaration::ST_function_group) { @@ -3558,7 +3656,7 @@ yyreduce: case 28: /* Line 1792 of yacc.c */ -#line 525 "dtool/src/cppparser/cppBison.yxx" +#line 533 "dtool/src/cppparser/cppBison.yxx" { CPPMakeSeq *make_seq = new CPPMakeSeq((yyvsp[(3) - (9)].u.identifier)->get_simple_name(), (yyvsp[(5) - (9)].u.identifier)->get_simple_name(), (yyvsp[(7) - (9)].u.identifier)->get_simple_name(), (yylsp[(1) - (9)]).file); current_scope->add_declaration(make_seq, global_scope, current_lexer, (yylsp[(1) - (9)])); @@ -3567,20 +3665,22 @@ yyreduce: case 29: /* Line 1792 of yacc.c */ -#line 530 "dtool/src/cppparser/cppBison.yxx" +#line 538 "dtool/src/cppparser/cppBison.yxx" { CPPExpression::Result result = (yyvsp[(3) - (6)].u.expr)->evaluate(); if (result._type == CPPExpression::RT_error) { yywarning("static_assert requires a constant expression", (yylsp[(3) - (6)])); } else if (!result.as_boolean()) { - yywarning("static_assert failed: " + (yyvsp[(5) - (6)].str), (yylsp[(3) - (6)])); + stringstream str; + str << *(yyvsp[(5) - (6)].u.expr); + yywarning("static_assert failed: " + str.str(), (yylsp[(3) - (6)])); } } break; case 30: /* Line 1792 of yacc.c */ -#line 539 "dtool/src/cppparser/cppBison.yxx" +#line 549 "dtool/src/cppparser/cppBison.yxx" { // This alternative version of static_assert was introduced in C++17. CPPExpression::Result result = (yyvsp[(3) - (4)].u.expr)->evaluate(); @@ -3594,7 +3694,7 @@ yyreduce: case 31: /* Line 1792 of yacc.c */ -#line 552 "dtool/src/cppparser/cppBison.yxx" +#line 562 "dtool/src/cppparser/cppBison.yxx" { CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("temp"), V_public); @@ -3604,7 +3704,7 @@ yyreduce: case 32: /* Line 1792 of yacc.c */ -#line 558 "dtool/src/cppparser/cppBison.yxx" +#line 568 "dtool/src/cppparser/cppBison.yxx" { delete current_scope; pop_scope(); @@ -3613,7 +3713,7 @@ yyreduce: case 33: /* Line 1792 of yacc.c */ -#line 567 "dtool/src/cppparser/cppBison.yxx" +#line 577 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } @@ -3621,7 +3721,7 @@ yyreduce: case 34: /* Line 1792 of yacc.c */ -#line 571 "dtool/src/cppparser/cppBison.yxx" +#line 581 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extern; } @@ -3629,7 +3729,7 @@ yyreduce: case 35: /* Line 1792 of yacc.c */ -#line 575 "dtool/src/cppparser/cppBison.yxx" +#line 585 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (3)].u.integer) | (int)CPPInstance::SC_extern; if ((yyvsp[(3) - (3)].str) == "C") { @@ -3644,7 +3744,7 @@ yyreduce: case 36: /* Line 1792 of yacc.c */ -#line 586 "dtool/src/cppparser/cppBison.yxx" +#line 596 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_static; } @@ -3652,7 +3752,7 @@ yyreduce: case 37: /* Line 1792 of yacc.c */ -#line 590 "dtool/src/cppparser/cppBison.yxx" +#line 600 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_inline; } @@ -3660,7 +3760,7 @@ yyreduce: case 38: /* Line 1792 of yacc.c */ -#line 594 "dtool/src/cppparser/cppBison.yxx" +#line 604 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_virtual; } @@ -3668,7 +3768,7 @@ yyreduce: case 39: /* Line 1792 of yacc.c */ -#line 598 "dtool/src/cppparser/cppBison.yxx" +#line 608 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_explicit; } @@ -3676,7 +3776,7 @@ yyreduce: case 40: /* Line 1792 of yacc.c */ -#line 602 "dtool/src/cppparser/cppBison.yxx" +#line 612 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_volatile; } @@ -3684,7 +3784,7 @@ yyreduce: case 41: /* Line 1792 of yacc.c */ -#line 606 "dtool/src/cppparser/cppBison.yxx" +#line 616 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_mutable; } @@ -3692,7 +3792,7 @@ yyreduce: case 42: /* Line 1792 of yacc.c */ -#line 610 "dtool/src/cppparser/cppBison.yxx" +#line 620 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_register; } @@ -3700,7 +3800,7 @@ yyreduce: case 43: /* Line 1792 of yacc.c */ -#line 614 "dtool/src/cppparser/cppBison.yxx" +#line 624 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_blocking; } @@ -3708,7 +3808,7 @@ yyreduce: case 44: /* Line 1792 of yacc.c */ -#line 618 "dtool/src/cppparser/cppBison.yxx" +#line 628 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extension; } @@ -3716,7 +3816,7 @@ yyreduce: case 45: /* Line 1792 of yacc.c */ -#line 625 "dtool/src/cppparser/cppBison.yxx" +#line 635 "dtool/src/cppparser/cppBison.yxx" { /* multiple_var_declaration adds itself to the scope. */ } @@ -3724,7 +3824,7 @@ yyreduce: case 46: /* Line 1792 of yacc.c */ -#line 629 "dtool/src/cppparser/cppBison.yxx" +#line 639 "dtool/src/cppparser/cppBison.yxx" { // We don't really care about the storage class here. In fact, it's // not actually legal to define a class or struct using a particular @@ -3737,7 +3837,7 @@ yyreduce: case 47: /* Line 1792 of yacc.c */ -#line 638 "dtool/src/cppparser/cppBison.yxx" +#line 648 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPInstance *)NULL) { (yyvsp[(2) - (3)].u.instance)->_storage_class |= (current_storage_class | (yyvsp[(1) - (3)].u.integer)); @@ -3749,7 +3849,7 @@ yyreduce: case 48: /* Line 1792 of yacc.c */ -#line 649 "dtool/src/cppparser/cppBison.yxx" +#line 659 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3764,7 +3864,7 @@ yyreduce: case 49: /* Line 1792 of yacc.c */ -#line 660 "dtool/src/cppparser/cppBison.yxx" +#line 670 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3772,7 +3872,7 @@ yyreduce: case 50: /* Line 1792 of yacc.c */ -#line 664 "dtool/src/cppparser/cppBison.yxx" +#line 674 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3783,7 +3883,7 @@ yyreduce: case 51: /* Line 1792 of yacc.c */ -#line 671 "dtool/src/cppparser/cppBison.yxx" +#line 681 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3791,7 +3891,7 @@ yyreduce: case 52: /* Line 1792 of yacc.c */ -#line 682 "dtool/src/cppparser/cppBison.yxx" +#line 692 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), current_storage_class, @@ -3803,7 +3903,7 @@ yyreduce: case 53: /* Line 1792 of yacc.c */ -#line 690 "dtool/src/cppparser/cppBison.yxx" +#line 700 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), current_storage_class, @@ -3815,7 +3915,7 @@ yyreduce: case 54: /* Line 1792 of yacc.c */ -#line 701 "dtool/src/cppparser/cppBison.yxx" +#line 711 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), @@ -3828,7 +3928,7 @@ yyreduce: case 55: /* Line 1792 of yacc.c */ -#line 710 "dtool/src/cppparser/cppBison.yxx" +#line 720 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), @@ -3841,7 +3941,7 @@ yyreduce: case 56: /* Line 1792 of yacc.c */ -#line 723 "dtool/src/cppparser/cppBison.yxx" +#line 733 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3856,7 +3956,7 @@ yyreduce: case 57: /* Line 1792 of yacc.c */ -#line 734 "dtool/src/cppparser/cppBison.yxx" +#line 744 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3864,7 +3964,7 @@ yyreduce: case 58: /* Line 1792 of yacc.c */ -#line 738 "dtool/src/cppparser/cppBison.yxx" +#line 748 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3875,7 +3975,7 @@ yyreduce: case 59: /* Line 1792 of yacc.c */ -#line 745 "dtool/src/cppparser/cppBison.yxx" +#line 755 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } @@ -3883,7 +3983,7 @@ yyreduce: case 60: /* Line 1792 of yacc.c */ -#line 749 "dtool/src/cppparser/cppBison.yxx" +#line 759 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPDeclaration *)NULL) { CPPInstance *inst = (yyvsp[(2) - (3)].u.instance)->as_instance(); @@ -3899,7 +3999,7 @@ yyreduce: case 61: /* Line 1792 of yacc.c */ -#line 764 "dtool/src/cppparser/cppBison.yxx" +#line 774 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); @@ -3909,7 +4009,7 @@ yyreduce: case 62: /* Line 1792 of yacc.c */ -#line 770 "dtool/src/cppparser/cppBison.yxx" +#line 780 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); @@ -3919,7 +4019,7 @@ yyreduce: case 63: /* Line 1792 of yacc.c */ -#line 779 "dtool/src/cppparser/cppBison.yxx" +#line 789 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -3930,7 +4030,7 @@ yyreduce: case 64: /* Line 1792 of yacc.c */ -#line 786 "dtool/src/cppparser/cppBison.yxx" +#line 796 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -3941,7 +4041,7 @@ yyreduce: case 65: /* Line 1792 of yacc.c */ -#line 798 "dtool/src/cppparser/cppBison.yxx" +#line 808 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3949,7 +4049,7 @@ yyreduce: case 66: /* Line 1792 of yacc.c */ -#line 802 "dtool/src/cppparser/cppBison.yxx" +#line 812 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -3971,7 +4071,7 @@ yyreduce: case 67: /* Line 1792 of yacc.c */ -#line 820 "dtool/src/cppparser/cppBison.yxx" +#line 830 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -3979,7 +4079,7 @@ yyreduce: case 68: /* Line 1792 of yacc.c */ -#line 824 "dtool/src/cppparser/cppBison.yxx" +#line 834 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -4001,7 +4101,7 @@ yyreduce: case 69: /* Line 1792 of yacc.c */ -#line 844 "dtool/src/cppparser/cppBison.yxx" +#line 854 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(2) - (3)].u.identifier)->get_scope(current_scope, global_scope)); } @@ -4009,7 +4109,7 @@ yyreduce: case 70: /* Line 1792 of yacc.c */ -#line 848 "dtool/src/cppparser/cppBison.yxx" +#line 858 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); if ((yyvsp[(2) - (7)].u.identifier)->is_scoped()) { @@ -4032,7 +4132,7 @@ yyreduce: case 71: /* Line 1792 of yacc.c */ -#line 874 "dtool/src/cppparser/cppBison.yxx" +#line 884 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(4) - (6)].u.inst_ident)->get_scope(current_scope, global_scope)); } @@ -4040,7 +4140,7 @@ yyreduce: case 72: /* Line 1792 of yacc.c */ -#line 878 "dtool/src/cppparser/cppBison.yxx" +#line 888 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (10)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -4058,7 +4158,7 @@ yyreduce: case 73: /* Line 1792 of yacc.c */ -#line 892 "dtool/src/cppparser/cppBison.yxx" +#line 902 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(5) - (7)].u.inst_ident)->get_scope(current_scope, global_scope)); } @@ -4066,7 +4166,7 @@ yyreduce: case 74: /* Line 1792 of yacc.c */ -#line 896 "dtool/src/cppparser/cppBison.yxx" +#line 906 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (11)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -4084,7 +4184,7 @@ yyreduce: case 75: /* Line 1792 of yacc.c */ -#line 912 "dtool/src/cppparser/cppBison.yxx" +#line 922 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (4)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (4)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4094,7 +4194,7 @@ yyreduce: case 76: /* Line 1792 of yacc.c */ -#line 918 "dtool/src/cppparser/cppBison.yxx" +#line 928 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (8)].u.identifier) != NULL) { pop_scope(); @@ -4123,7 +4223,7 @@ yyreduce: case 77: /* Line 1792 of yacc.c */ -#line 943 "dtool/src/cppparser/cppBison.yxx" +#line 953 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (5)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (5)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4133,7 +4233,7 @@ yyreduce: case 78: /* Line 1792 of yacc.c */ -#line 949 "dtool/src/cppparser/cppBison.yxx" +#line 959 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (9)].u.identifier) != NULL) { pop_scope(); @@ -4153,7 +4253,7 @@ yyreduce: case 79: /* Line 1792 of yacc.c */ -#line 969 "dtool/src/cppparser/cppBison.yxx" +#line 979 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *decl = (yyvsp[(1) - (1)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -4167,7 +4267,7 @@ yyreduce: case 80: /* Line 1792 of yacc.c */ -#line 982 "dtool/src/cppparser/cppBison.yxx" +#line 992 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } @@ -4175,7 +4275,7 @@ yyreduce: case 81: /* Line 1792 of yacc.c */ -#line 986 "dtool/src/cppparser/cppBison.yxx" +#line 996 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_const_method; } @@ -4183,7 +4283,7 @@ yyreduce: case 82: /* Line 1792 of yacc.c */ -#line 990 "dtool/src/cppparser/cppBison.yxx" +#line 1000 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_noexcept; } @@ -4191,7 +4291,7 @@ yyreduce: case 83: /* Line 1792 of yacc.c */ -#line 994 "dtool/src/cppparser/cppBison.yxx" +#line 1004 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (4)].u.integer); } @@ -4199,7 +4299,7 @@ yyreduce: case 84: /* Line 1792 of yacc.c */ -#line 998 "dtool/src/cppparser/cppBison.yxx" +#line 1008 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (5)].u.integer); } @@ -4207,7 +4307,7 @@ yyreduce: case 85: /* Line 1792 of yacc.c */ -#line 1005 "dtool/src/cppparser/cppBison.yxx" +#line 1015 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!"; } @@ -4215,7 +4315,7 @@ yyreduce: case 86: /* Line 1792 of yacc.c */ -#line 1009 "dtool/src/cppparser/cppBison.yxx" +#line 1019 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "~"; } @@ -4223,7 +4323,7 @@ yyreduce: case 87: /* Line 1792 of yacc.c */ -#line 1013 "dtool/src/cppparser/cppBison.yxx" +#line 1023 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*"; } @@ -4231,7 +4331,7 @@ yyreduce: case 88: /* Line 1792 of yacc.c */ -#line 1017 "dtool/src/cppparser/cppBison.yxx" +#line 1027 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/"; } @@ -4239,7 +4339,7 @@ yyreduce: case 89: /* Line 1792 of yacc.c */ -#line 1021 "dtool/src/cppparser/cppBison.yxx" +#line 1031 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%"; } @@ -4247,7 +4347,7 @@ yyreduce: case 90: /* Line 1792 of yacc.c */ -#line 1025 "dtool/src/cppparser/cppBison.yxx" +#line 1035 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+"; } @@ -4255,7 +4355,7 @@ yyreduce: case 91: /* Line 1792 of yacc.c */ -#line 1029 "dtool/src/cppparser/cppBison.yxx" +#line 1039 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-"; } @@ -4263,7 +4363,7 @@ yyreduce: case 92: /* Line 1792 of yacc.c */ -#line 1033 "dtool/src/cppparser/cppBison.yxx" +#line 1043 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|"; } @@ -4271,7 +4371,7 @@ yyreduce: case 93: /* Line 1792 of yacc.c */ -#line 1037 "dtool/src/cppparser/cppBison.yxx" +#line 1047 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&"; } @@ -4279,7 +4379,7 @@ yyreduce: case 94: /* Line 1792 of yacc.c */ -#line 1041 "dtool/src/cppparser/cppBison.yxx" +#line 1051 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^"; } @@ -4287,7 +4387,7 @@ yyreduce: case 95: /* Line 1792 of yacc.c */ -#line 1045 "dtool/src/cppparser/cppBison.yxx" +#line 1055 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "||"; } @@ -4295,7 +4395,7 @@ yyreduce: case 96: /* Line 1792 of yacc.c */ -#line 1049 "dtool/src/cppparser/cppBison.yxx" +#line 1059 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&&"; } @@ -4303,7 +4403,7 @@ yyreduce: case 97: /* Line 1792 of yacc.c */ -#line 1053 "dtool/src/cppparser/cppBison.yxx" +#line 1063 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "=="; } @@ -4311,7 +4411,7 @@ yyreduce: case 98: /* Line 1792 of yacc.c */ -#line 1057 "dtool/src/cppparser/cppBison.yxx" +#line 1067 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!="; } @@ -4319,7 +4419,7 @@ yyreduce: case 99: /* Line 1792 of yacc.c */ -#line 1061 "dtool/src/cppparser/cppBison.yxx" +#line 1071 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<="; } @@ -4327,7 +4427,7 @@ yyreduce: case 100: /* Line 1792 of yacc.c */ -#line 1065 "dtool/src/cppparser/cppBison.yxx" +#line 1075 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">="; } @@ -4335,7 +4435,7 @@ yyreduce: case 101: /* Line 1792 of yacc.c */ -#line 1069 "dtool/src/cppparser/cppBison.yxx" +#line 1079 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<"; } @@ -4343,7 +4443,7 @@ yyreduce: case 102: /* Line 1792 of yacc.c */ -#line 1073 "dtool/src/cppparser/cppBison.yxx" +#line 1083 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">"; } @@ -4351,7 +4451,7 @@ yyreduce: case 103: /* Line 1792 of yacc.c */ -#line 1077 "dtool/src/cppparser/cppBison.yxx" +#line 1087 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<"; } @@ -4359,7 +4459,7 @@ yyreduce: case 104: /* Line 1792 of yacc.c */ -#line 1081 "dtool/src/cppparser/cppBison.yxx" +#line 1091 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>"; } @@ -4367,7 +4467,7 @@ yyreduce: case 105: /* Line 1792 of yacc.c */ -#line 1085 "dtool/src/cppparser/cppBison.yxx" +#line 1095 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "="; } @@ -4375,7 +4475,7 @@ yyreduce: case 106: /* Line 1792 of yacc.c */ -#line 1089 "dtool/src/cppparser/cppBison.yxx" +#line 1099 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ","; } @@ -4383,7 +4483,7 @@ yyreduce: case 107: /* Line 1792 of yacc.c */ -#line 1093 "dtool/src/cppparser/cppBison.yxx" +#line 1103 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "++"; } @@ -4391,7 +4491,7 @@ yyreduce: case 108: /* Line 1792 of yacc.c */ -#line 1097 "dtool/src/cppparser/cppBison.yxx" +#line 1107 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "--"; } @@ -4399,7 +4499,7 @@ yyreduce: case 109: /* Line 1792 of yacc.c */ -#line 1101 "dtool/src/cppparser/cppBison.yxx" +#line 1111 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*="; } @@ -4407,7 +4507,7 @@ yyreduce: case 110: /* Line 1792 of yacc.c */ -#line 1105 "dtool/src/cppparser/cppBison.yxx" +#line 1115 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/="; } @@ -4415,7 +4515,7 @@ yyreduce: case 111: /* Line 1792 of yacc.c */ -#line 1109 "dtool/src/cppparser/cppBison.yxx" +#line 1119 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%="; } @@ -4423,7 +4523,7 @@ yyreduce: case 112: /* Line 1792 of yacc.c */ -#line 1113 "dtool/src/cppparser/cppBison.yxx" +#line 1123 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+="; } @@ -4431,7 +4531,7 @@ yyreduce: case 113: /* Line 1792 of yacc.c */ -#line 1117 "dtool/src/cppparser/cppBison.yxx" +#line 1127 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-="; } @@ -4439,7 +4539,7 @@ yyreduce: case 114: /* Line 1792 of yacc.c */ -#line 1121 "dtool/src/cppparser/cppBison.yxx" +#line 1131 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|="; } @@ -4447,7 +4547,7 @@ yyreduce: case 115: /* Line 1792 of yacc.c */ -#line 1125 "dtool/src/cppparser/cppBison.yxx" +#line 1135 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&="; } @@ -4455,7 +4555,7 @@ yyreduce: case 116: /* Line 1792 of yacc.c */ -#line 1129 "dtool/src/cppparser/cppBison.yxx" +#line 1139 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^="; } @@ -4463,7 +4563,7 @@ yyreduce: case 117: /* Line 1792 of yacc.c */ -#line 1133 "dtool/src/cppparser/cppBison.yxx" +#line 1143 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<="; } @@ -4471,7 +4571,7 @@ yyreduce: case 118: /* Line 1792 of yacc.c */ -#line 1137 "dtool/src/cppparser/cppBison.yxx" +#line 1147 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>="; } @@ -4479,7 +4579,7 @@ yyreduce: case 119: /* Line 1792 of yacc.c */ -#line 1141 "dtool/src/cppparser/cppBison.yxx" +#line 1151 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "->"; } @@ -4487,7 +4587,7 @@ yyreduce: case 120: /* Line 1792 of yacc.c */ -#line 1145 "dtool/src/cppparser/cppBison.yxx" +#line 1155 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "[]"; } @@ -4495,7 +4595,7 @@ yyreduce: case 121: /* Line 1792 of yacc.c */ -#line 1149 "dtool/src/cppparser/cppBison.yxx" +#line 1159 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "()"; } @@ -4503,7 +4603,7 @@ yyreduce: case 122: /* Line 1792 of yacc.c */ -#line 1153 "dtool/src/cppparser/cppBison.yxx" +#line 1163 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "new"; } @@ -4511,7 +4611,7 @@ yyreduce: case 123: /* Line 1792 of yacc.c */ -#line 1157 "dtool/src/cppparser/cppBison.yxx" +#line 1167 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "delete"; } @@ -4519,7 +4619,7 @@ yyreduce: case 126: /* Line 1792 of yacc.c */ -#line 1169 "dtool/src/cppparser/cppBison.yxx" +#line 1179 "dtool/src/cppparser/cppBison.yxx" { push_scope(new CPPTemplateScope(current_scope)); } @@ -4527,7 +4627,7 @@ yyreduce: case 127: /* Line 1792 of yacc.c */ -#line 1173 "dtool/src/cppparser/cppBison.yxx" +#line 1183 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } @@ -4535,7 +4635,7 @@ yyreduce: case 131: /* Line 1792 of yacc.c */ -#line 1186 "dtool/src/cppparser/cppBison.yxx" +#line 1196 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4545,7 +4645,7 @@ yyreduce: case 132: /* Line 1792 of yacc.c */ -#line 1192 "dtool/src/cppparser/cppBison.yxx" +#line 1202 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); @@ -4555,7 +4655,7 @@ yyreduce: case 133: /* Line 1792 of yacc.c */ -#line 1201 "dtool/src/cppparser/cppBison.yxx" +#line 1211 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } @@ -4563,7 +4663,7 @@ yyreduce: case 134: /* Line 1792 of yacc.c */ -#line 1205 "dtool/src/cppparser/cppBison.yxx" +#line 1215 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } @@ -4571,7 +4671,7 @@ yyreduce: case 135: /* Line 1792 of yacc.c */ -#line 1209 "dtool/src/cppparser/cppBison.yxx" +#line 1219 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } @@ -4579,7 +4679,7 @@ yyreduce: case 136: /* Line 1792 of yacc.c */ -#line 1213 "dtool/src/cppparser/cppBison.yxx" +#line 1223 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } @@ -4587,7 +4687,7 @@ yyreduce: case 137: /* Line 1792 of yacc.c */ -#line 1217 "dtool/src/cppparser/cppBison.yxx" +#line 1227 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); inst->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4597,7 +4697,7 @@ yyreduce: case 138: /* Line 1792 of yacc.c */ -#line 1223 "dtool/src/cppparser/cppBison.yxx" +#line 1233 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4608,7 +4708,7 @@ yyreduce: case 139: /* Line 1792 of yacc.c */ -#line 1233 "dtool/src/cppparser/cppBison.yxx" +#line 1243 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -4616,7 +4716,7 @@ yyreduce: case 140: /* Line 1792 of yacc.c */ -#line 1237 "dtool/src/cppparser/cppBison.yxx" +#line 1247 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); @@ -4625,7 +4725,7 @@ yyreduce: case 141: /* Line 1792 of yacc.c */ -#line 1242 "dtool/src/cppparser/cppBison.yxx" +#line 1252 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -4637,7 +4737,7 @@ yyreduce: case 142: /* Line 1792 of yacc.c */ -#line 1254 "dtool/src/cppparser/cppBison.yxx" +#line 1264 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -4645,7 +4745,7 @@ yyreduce: case 143: /* Line 1792 of yacc.c */ -#line 1258 "dtool/src/cppparser/cppBison.yxx" +#line 1268 "dtool/src/cppparser/cppBison.yxx" { // For an operator function. We implement this simply by building a // ficticious name for the function; in other respects it's just @@ -4663,96 +4763,115 @@ yyreduce: case 144: /* Line 1792 of yacc.c */ -#line 1272 "dtool/src/cppparser/cppBison.yxx" +#line 1282 "dtool/src/cppparser/cppBison.yxx" + { + // A C++11 literal operator. + if (!(yyvsp[(2) - (3)].str).empty()) { + yyerror("expected empty string", (yylsp[(2) - (3)])); + } + CPPIdentifier *ident = (yyvsp[(1) - (3)].u.identifier); + if (ident == NULL) { + ident = new CPPIdentifier("operator \"\" "+(yyvsp[(3) - (3)].u.identifier)->get_simple_name(), (yylsp[(3) - (3)])); + } else { + ident->_names.push_back("operator \"\" "+(yyvsp[(3) - (3)].u.identifier)->get_simple_name()); + } + + (yyval.u.inst_ident) = new CPPInstanceIdentifier(ident); +} + break; + + case 145: +/* Line 1792 of yacc.c */ +#line 1297 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 145: + case 146: /* Line 1792 of yacc.c */ -#line 1277 "dtool/src/cppparser/cppBison.yxx" +#line 1302 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 146: + case 147: /* Line 1792 of yacc.c */ -#line 1282 "dtool/src/cppparser/cppBison.yxx" +#line 1307 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 147: + case 148: /* Line 1792 of yacc.c */ -#line 1287 "dtool/src/cppparser/cppBison.yxx" +#line 1312 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 148: + case 149: /* Line 1792 of yacc.c */ -#line 1292 "dtool/src/cppparser/cppBison.yxx" +#line 1317 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 149: + case 150: /* Line 1792 of yacc.c */ -#line 1297 "dtool/src/cppparser/cppBison.yxx" +#line 1322 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 150: + case 151: /* Line 1792 of yacc.c */ -#line 1302 "dtool/src/cppparser/cppBison.yxx" +#line 1327 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 151: + case 152: /* Line 1792 of yacc.c */ -#line 1307 "dtool/src/cppparser/cppBison.yxx" +#line 1332 "dtool/src/cppparser/cppBison.yxx" { // bitfield definition. We ignore the bitfield for now. (yyval.u.inst_ident) = (yyvsp[(1) - (3)].u.inst_ident); } break; - case 152: + case 153: /* Line 1792 of yacc.c */ -#line 1312 "dtool/src/cppparser/cppBison.yxx" +#line 1337 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 153: + case 154: /* Line 1792 of yacc.c */ -#line 1317 "dtool/src/cppparser/cppBison.yxx" +#line 1342 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 154: + case 155: /* Line 1792 of yacc.c */ -#line 1321 "dtool/src/cppparser/cppBison.yxx" +#line 1346 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); (yyval.u.inst_ident) = (yyvsp[(1) - (6)].u.inst_ident); @@ -4768,110 +4887,102 @@ yyreduce: } break; - case 155: -/* Line 1792 of yacc.c */ -#line 1339 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; -} - break; - case 156: /* Line 1792 of yacc.c */ -#line 1343 "dtool/src/cppparser/cppBison.yxx" +#line 1364 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; - (yyval.u.param_list)->_includes_ellipsis = true; } break; case 157: /* Line 1792 of yacc.c */ -#line 1348 "dtool/src/cppparser/cppBison.yxx" +#line 1368 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; + (yyval.u.param_list)->_includes_ellipsis = true; } break; case 158: /* Line 1792 of yacc.c */ -#line 1352 "dtool/src/cppparser/cppBison.yxx" +#line 1373 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); - (yyval.u.param_list)->_includes_ellipsis = true; + (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); } break; case 159: /* Line 1792 of yacc.c */ -#line 1357 "dtool/src/cppparser/cppBison.yxx" +#line 1377 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); + (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } break; case 160: /* Line 1792 of yacc.c */ -#line 1365 "dtool/src/cppparser/cppBison.yxx" +#line 1382 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); + (yyval.u.param_list)->_includes_ellipsis = true; +} + break; + + case 161: +/* Line 1792 of yacc.c */ +#line 1390 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[(1) - (1)].u.instance)); } break; - case 161: + case 162: /* Line 1792 of yacc.c */ -#line 1370 "dtool/src/cppparser/cppBison.yxx" +#line 1395 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[(3) - (3)].u.instance)); } break; - case 162: -/* Line 1792 of yacc.c */ -#line 1378 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - case 163: /* Line 1792 of yacc.c */ -#line 1382 "dtool/src/cppparser/cppBison.yxx" +#line 1403 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 164: /* Line 1792 of yacc.c */ -#line 1389 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 165: -/* Line 1792 of yacc.c */ -#line 1393 "dtool/src/cppparser/cppBison.yxx" +#line 1407 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } break; - case 166: + case 165: /* Line 1792 of yacc.c */ -#line 1400 "dtool/src/cppparser/cppBison.yxx" +#line 1414 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; + case 166: +/* Line 1792 of yacc.c */ +#line 1418 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); +} + break; + case 167: /* Line 1792 of yacc.c */ -#line 1404 "dtool/src/cppparser/cppBison.yxx" +#line 1425 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4879,7 +4990,7 @@ yyreduce: case 168: /* Line 1792 of yacc.c */ -#line 1408 "dtool/src/cppparser/cppBison.yxx" +#line 1429 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4887,39 +4998,47 @@ yyreduce: case 169: /* Line 1792 of yacc.c */ -#line 1412 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 170: -/* Line 1792 of yacc.c */ -#line 1416 "dtool/src/cppparser/cppBison.yxx" +#line 1433 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 174: + case 170: /* Line 1792 of yacc.c */ -#line 1429 "dtool/src/cppparser/cppBison.yxx" +#line 1437 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 171: +/* Line 1792 of yacc.c */ +#line 1441 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 175: +/* Line 1792 of yacc.c */ +#line 1454 "dtool/src/cppparser/cppBison.yxx" { } break; - case 178: + case 179: /* Line 1792 of yacc.c */ -#line 1438 "dtool/src/cppparser/cppBison.yxx" +#line 1463 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); } break; - case 179: + case 180: /* Line 1792 of yacc.c */ -#line 1443 "dtool/src/cppparser/cppBison.yxx" +#line 1468 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (3)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (3)])); CPPType *type = @@ -4929,9 +5048,9 @@ yyreduce: } break; - case 180: + case 181: /* Line 1792 of yacc.c */ -#line 1451 "dtool/src/cppparser/cppBison.yxx" +#line 1476 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4939,9 +5058,9 @@ yyreduce: } break; - case 181: + case 182: /* Line 1792 of yacc.c */ -#line 1457 "dtool/src/cppparser/cppBison.yxx" +#line 1482 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(4) - (5)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(3) - (5)].u.type), (yyvsp[(4) - (5)].u.inst_ident), 0, (yylsp[(3) - (5)]).file); @@ -4949,17 +5068,17 @@ yyreduce: } break; - case 182: + case 183: /* Line 1792 of yacc.c */ -#line 1463 "dtool/src/cppparser/cppBison.yxx" +#line 1488 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = (yyvsp[(2) - (2)].u.instance); } break; - case 183: + case 184: /* Line 1792 of yacc.c */ -#line 1467 "dtool/src/cppparser/cppBison.yxx" +#line 1492 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter)); @@ -4968,25 +5087,17 @@ yyreduce: } break; - case 184: + case 185: /* Line 1792 of yacc.c */ -#line 1477 "dtool/src/cppparser/cppBison.yxx" +#line 1502 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 185: -/* Line 1792 of yacc.c */ -#line 1481 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - case 186: /* Line 1792 of yacc.c */ -#line 1485 "dtool/src/cppparser/cppBison.yxx" +#line 1506 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -4994,86 +5105,86 @@ yyreduce: case 187: /* Line 1792 of yacc.c */ -#line 1489 "dtool/src/cppparser/cppBison.yxx" +#line 1510 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 188: +/* Line 1792 of yacc.c */ +#line 1514 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 188: + case 189: /* Line 1792 of yacc.c */ -#line 1494 "dtool/src/cppparser/cppBison.yxx" +#line 1519 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 189: + case 190: /* Line 1792 of yacc.c */ -#line 1499 "dtool/src/cppparser/cppBison.yxx" +#line 1524 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 190: + case 191: /* Line 1792 of yacc.c */ -#line 1504 "dtool/src/cppparser/cppBison.yxx" +#line 1529 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 191: + case 192: /* Line 1792 of yacc.c */ -#line 1509 "dtool/src/cppparser/cppBison.yxx" +#line 1534 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 192: + case 193: /* Line 1792 of yacc.c */ -#line 1514 "dtool/src/cppparser/cppBison.yxx" +#line 1539 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 193: + case 194: /* Line 1792 of yacc.c */ -#line 1519 "dtool/src/cppparser/cppBison.yxx" +#line 1544 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 194: + case 195: /* Line 1792 of yacc.c */ -#line 1527 "dtool/src/cppparser/cppBison.yxx" +#line 1552 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 195: -/* Line 1792 of yacc.c */ -#line 1531 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); -} - break; - case 196: /* Line 1792 of yacc.c */ -#line 1535 "dtool/src/cppparser/cppBison.yxx" +#line 1556 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -5081,70 +5192,78 @@ yyreduce: case 197: /* Line 1792 of yacc.c */ -#line 1539 "dtool/src/cppparser/cppBison.yxx" +#line 1560 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); +} + break; + + case 198: +/* Line 1792 of yacc.c */ +#line 1564 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 198: + case 199: /* Line 1792 of yacc.c */ -#line 1544 "dtool/src/cppparser/cppBison.yxx" +#line 1569 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 199: + case 200: /* Line 1792 of yacc.c */ -#line 1549 "dtool/src/cppparser/cppBison.yxx" +#line 1574 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 200: + case 201: /* Line 1792 of yacc.c */ -#line 1554 "dtool/src/cppparser/cppBison.yxx" +#line 1579 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 201: + case 202: /* Line 1792 of yacc.c */ -#line 1559 "dtool/src/cppparser/cppBison.yxx" +#line 1584 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 202: + case 203: /* Line 1792 of yacc.c */ -#line 1564 "dtool/src/cppparser/cppBison.yxx" +#line 1589 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 203: + case 204: /* Line 1792 of yacc.c */ -#line 1569 "dtool/src/cppparser/cppBison.yxx" +#line 1594 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 204: + case 205: /* Line 1792 of yacc.c */ -#line 1574 "dtool/src/cppparser/cppBison.yxx" +#line 1599 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5152,89 +5271,89 @@ yyreduce: } break; - case 205: + case 206: /* Line 1792 of yacc.c */ -#line 1580 "dtool/src/cppparser/cppBison.yxx" +#line 1605 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 206: + case 207: /* Line 1792 of yacc.c */ -#line 1588 "dtool/src/cppparser/cppBison.yxx" +#line 1613 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } break; - case 207: + case 208: /* Line 1792 of yacc.c */ -#line 1592 "dtool/src/cppparser/cppBison.yxx" +#line 1617 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 208: + case 209: /* Line 1792 of yacc.c */ -#line 1597 "dtool/src/cppparser/cppBison.yxx" +#line 1622 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 209: + case 210: /* Line 1792 of yacc.c */ -#line 1602 "dtool/src/cppparser/cppBison.yxx" +#line 1627 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 210: + case 211: /* Line 1792 of yacc.c */ -#line 1607 "dtool/src/cppparser/cppBison.yxx" +#line 1632 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 211: + case 212: /* Line 1792 of yacc.c */ -#line 1612 "dtool/src/cppparser/cppBison.yxx" +#line 1637 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 212: + case 213: /* Line 1792 of yacc.c */ -#line 1617 "dtool/src/cppparser/cppBison.yxx" +#line 1642 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 213: + case 214: /* Line 1792 of yacc.c */ -#line 1622 "dtool/src/cppparser/cppBison.yxx" +#line 1647 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 214: + case 215: /* Line 1792 of yacc.c */ -#line 1627 "dtool/src/cppparser/cppBison.yxx" +#line 1652 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5242,17 +5361,17 @@ yyreduce: } break; - case 215: + case 216: /* Line 1792 of yacc.c */ -#line 1636 "dtool/src/cppparser/cppBison.yxx" +#line 1661 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 216: + case 217: /* Line 1792 of yacc.c */ -#line 1640 "dtool/src/cppparser/cppBison.yxx" +#line 1665 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -5262,25 +5381,17 @@ yyreduce: } break; - case 217: + case 218: /* Line 1792 of yacc.c */ -#line 1648 "dtool/src/cppparser/cppBison.yxx" +#line 1673 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 218: -/* Line 1792 of yacc.c */ -#line 1652 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); -} - break; - case 219: /* Line 1792 of yacc.c */ -#line 1656 "dtool/src/cppparser/cppBison.yxx" +#line 1677 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } @@ -5288,15 +5399,23 @@ yyreduce: case 220: /* Line 1792 of yacc.c */ -#line 1660 "dtool/src/cppparser/cppBison.yxx" +#line 1681 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; case 221: /* Line 1792 of yacc.c */ -#line 1664 "dtool/src/cppparser/cppBison.yxx" +#line 1685 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); +} + break; + + case 222: +/* Line 1792 of yacc.c */ +#line 1689 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5314,37 +5433,50 @@ yyreduce: } break; - case 222: -/* Line 1792 of yacc.c */ -#line 1680 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (4)].u.extension_enum), (yyvsp[(2) - (4)].u.identifier), current_scope, (yylsp[(1) - (4)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (4)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } -} - break; - case 223: /* Line 1792 of yacc.c */ -#line 1699 "dtool/src/cppparser/cppBison.yxx" +#line 1705 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); + CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (4)].u.extension_enum), (yyvsp[(2) - (4)].u.identifier), current_scope, (yylsp[(1) - (4)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (4)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } } break; case 224: /* Line 1792 of yacc.c */ -#line 1703 "dtool/src/cppparser/cppBison.yxx" +#line 1721 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = (yyvsp[(3) - (4)].u.expr)->determine_type(); + if ((yyval.u.type) == (CPPType *)NULL) { + stringstream str; + str << *(yyvsp[(3) - (4)].u.expr); + yyerror("could not determine type of " + str.str(), (yylsp[(3) - (4)])); + } +} + break; + + case 225: +/* Line 1792 of yacc.c */ +#line 1733 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); +} + break; + + case 226: +/* Line 1792 of yacc.c */ +#line 1737 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.decl) == NULL) { @@ -5354,41 +5486,41 @@ yyreduce: } break; - case 225: + case 227: /* Line 1792 of yacc.c */ -#line 1711 "dtool/src/cppparser/cppBison.yxx" +#line 1745 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 226: + case 228: /* Line 1792 of yacc.c */ -#line 1715 "dtool/src/cppparser/cppBison.yxx" +#line 1749 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; - case 227: + case 229: /* Line 1792 of yacc.c */ -#line 1719 "dtool/src/cppparser/cppBison.yxx" +#line 1753 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); } break; - case 228: + case 230: /* Line 1792 of yacc.c */ -#line 1723 "dtool/src/cppparser/cppBison.yxx" +#line 1757 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); } break; - case 229: + case 231: /* Line 1792 of yacc.c */ -#line 1727 "dtool/src/cppparser/cppBison.yxx" +#line 1761 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5406,9 +5538,9 @@ yyreduce: } break; - case 230: + case 232: /* Line 1792 of yacc.c */ -#line 1743 "dtool/src/cppparser/cppBison.yxx" +#line 1777 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5426,9 +5558,9 @@ yyreduce: } break; - case 231: + case 233: /* Line 1792 of yacc.c */ -#line 1759 "dtool/src/cppparser/cppBison.yxx" +#line 1793 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5448,17 +5580,30 @@ yyreduce: } break; - case 232: + case 234: /* Line 1792 of yacc.c */ -#line 1780 "dtool/src/cppparser/cppBison.yxx" +#line 1811 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = (yyvsp[(3) - (4)].u.expr)->determine_type(); + if ((yyval.u.decl) == (CPPType *)NULL) { + stringstream str; + str << *(yyvsp[(3) - (4)].u.expr); + yyerror("could not determine type of " + str.str(), (yylsp[(3) - (4)])); + } +} + break; + + case 235: +/* Line 1792 of yacc.c */ +#line 1823 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 233: + case 236: /* Line 1792 of yacc.c */ -#line 1784 "dtool/src/cppparser/cppBison.yxx" +#line 1827 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -5468,17 +5613,17 @@ yyreduce: } break; - case 234: + case 237: /* Line 1792 of yacc.c */ -#line 1792 "dtool/src/cppparser/cppBison.yxx" +#line 1835 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 235: + case 238: /* Line 1792 of yacc.c */ -#line 1796 "dtool/src/cppparser/cppBison.yxx" +#line 1839 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5496,9 +5641,9 @@ yyreduce: } break; - case 236: + case 239: /* Line 1792 of yacc.c */ -#line 1812 "dtool/src/cppparser/cppBison.yxx" +#line 1855 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5516,9 +5661,9 @@ yyreduce: } break; - case 237: + case 240: /* Line 1792 of yacc.c */ -#line 1831 "dtool/src/cppparser/cppBison.yxx" +#line 1874 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5526,9 +5671,9 @@ yyreduce: } break; - case 238: + case 241: /* Line 1792 of yacc.c */ -#line 1837 "dtool/src/cppparser/cppBison.yxx" +#line 1880 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5537,9 +5682,9 @@ yyreduce: } break; - case 239: + case 242: /* Line 1792 of yacc.c */ -#line 1847 "dtool/src/cppparser/cppBison.yxx" +#line 1890 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5555,9 +5700,9 @@ yyreduce: } break; - case 240: + case 243: /* Line 1792 of yacc.c */ -#line 1861 "dtool/src/cppparser/cppBison.yxx" +#line 1904 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5566,9 +5711,9 @@ yyreduce: } break; - case 241: + case 244: /* Line 1792 of yacc.c */ -#line 1871 "dtool/src/cppparser/cppBison.yxx" +#line 1914 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5590,9 +5735,9 @@ yyreduce: } break; - case 242: + case 245: /* Line 1792 of yacc.c */ -#line 1891 "dtool/src/cppparser/cppBison.yxx" +#line 1934 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5601,57 +5746,33 @@ yyreduce: } break; - case 247: + case 250: /* Line 1792 of yacc.c */ -#line 1911 "dtool/src/cppparser/cppBison.yxx" +#line 1954 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } break; - case 248: + case 251: /* Line 1792 of yacc.c */ -#line 1915 "dtool/src/cppparser/cppBison.yxx" +#line 1958 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } break; - case 249: + case 252: /* Line 1792 of yacc.c */ -#line 1919 "dtool/src/cppparser/cppBison.yxx" +#line 1962 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } break; - case 250: -/* Line 1792 of yacc.c */ -#line 1923 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); -} - break; - - case 251: -/* Line 1792 of yacc.c */ -#line 1927 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); -} - break; - - case 252: -/* Line 1792 of yacc.c */ -#line 1931 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); -} - break; - case 253: /* Line 1792 of yacc.c */ -#line 1935 "dtool/src/cppparser/cppBison.yxx" +#line 1966 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } @@ -5659,7 +5780,7 @@ yyreduce: case 254: /* Line 1792 of yacc.c */ -#line 1939 "dtool/src/cppparser/cppBison.yxx" +#line 1970 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } @@ -5667,7 +5788,7 @@ yyreduce: case 255: /* Line 1792 of yacc.c */ -#line 1943 "dtool/src/cppparser/cppBison.yxx" +#line 1974 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } @@ -5675,64 +5796,88 @@ yyreduce: case 256: /* Line 1792 of yacc.c */ -#line 1950 "dtool/src/cppparser/cppBison.yxx" +#line 1978 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); +} + break; + + case 257: +/* Line 1792 of yacc.c */ +#line 1982 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); +} + break; + + case 258: +/* Line 1792 of yacc.c */ +#line 1986 "dtool/src/cppparser/cppBison.yxx" + { + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); +} + break; + + case 259: +/* Line 1792 of yacc.c */ +#line 1993 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.enum_type) = current_enum; current_enum = NULL; } break; - case 257: + case 260: /* Line 1792 of yacc.c */ -#line 1958 "dtool/src/cppparser/cppBison.yxx" +#line 2001 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } break; - case 258: + case 261: /* Line 1792 of yacc.c */ -#line 1962 "dtool/src/cppparser/cppBison.yxx" +#line 2005 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } break; - case 259: + case 262: /* Line 1792 of yacc.c */ -#line 1966 "dtool/src/cppparser/cppBison.yxx" +#line 2009 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } break; - case 260: + case 263: /* Line 1792 of yacc.c */ -#line 1970 "dtool/src/cppparser/cppBison.yxx" +#line 2013 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); } break; - case 261: + case 264: /* Line 1792 of yacc.c */ -#line 1977 "dtool/src/cppparser/cppBison.yxx" +#line 2020 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 262: + case 265: /* Line 1792 of yacc.c */ -#line 1981 "dtool/src/cppparser/cppBison.yxx" +#line 2024 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } break; - case 264: + case 267: /* Line 1792 of yacc.c */ -#line 1989 "dtool/src/cppparser/cppBison.yxx" +#line 2032 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); @@ -5740,9 +5885,9 @@ yyreduce: } break; - case 265: + case 268: /* Line 1792 of yacc.c */ -#line 1995 "dtool/src/cppparser/cppBison.yxx" +#line 2038 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5750,9 +5895,9 @@ yyreduce: } break; - case 267: + case 270: /* Line 1792 of yacc.c */ -#line 2004 "dtool/src/cppparser/cppBison.yxx" +#line 2047 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5760,9 +5905,9 @@ yyreduce: } break; - case 268: + case 271: /* Line 1792 of yacc.c */ -#line 2010 "dtool/src/cppparser/cppBison.yxx" +#line 2053 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5770,41 +5915,41 @@ yyreduce: } break; - case 269: + case 272: /* Line 1792 of yacc.c */ -#line 2019 "dtool/src/cppparser/cppBison.yxx" +#line 2062 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } break; - case 270: + case 273: /* Line 1792 of yacc.c */ -#line 2026 "dtool/src/cppparser/cppBison.yxx" +#line 2069 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_class; } break; - case 271: + case 274: /* Line 1792 of yacc.c */ -#line 2030 "dtool/src/cppparser/cppBison.yxx" +#line 2073 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } break; - case 272: + case 275: /* Line 1792 of yacc.c */ -#line 2034 "dtool/src/cppparser/cppBison.yxx" +#line 2077 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_union; } break; - case 273: + case 276: /* Line 1792 of yacc.c */ -#line 2041 "dtool/src/cppparser/cppBison.yxx" +#line 2084 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -5824,17 +5969,17 @@ yyreduce: } break; - case 274: + case 277: /* Line 1792 of yacc.c */ -#line 2059 "dtool/src/cppparser/cppBison.yxx" +#line 2102 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 276: + case 279: /* Line 1792 of yacc.c */ -#line 2067 "dtool/src/cppparser/cppBison.yxx" +#line 2110 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -5842,9 +5987,9 @@ yyreduce: } break; - case 277: + case 280: /* Line 1792 of yacc.c */ -#line 2073 "dtool/src/cppparser/cppBison.yxx" +#line 2116 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); @@ -5852,111 +5997,111 @@ yyreduce: } break; - case 281: + case 284: /* Line 1792 of yacc.c */ -#line 2088 "dtool/src/cppparser/cppBison.yxx" +#line 2131 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; - case 282: + case 285: /* Line 1792 of yacc.c */ -#line 2092 "dtool/src/cppparser/cppBison.yxx" +#line 2135 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; - case 283: + case 286: /* Line 1792 of yacc.c */ -#line 2096 "dtool/src/cppparser/cppBison.yxx" +#line 2139 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } break; - case 284: + case 287: /* Line 1792 of yacc.c */ -#line 2100 "dtool/src/cppparser/cppBison.yxx" +#line 2143 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } break; - case 285: + case 288: /* Line 1792 of yacc.c */ -#line 2104 "dtool/src/cppparser/cppBison.yxx" +#line 2147 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); } break; - case 286: + case 289: /* Line 1792 of yacc.c */ -#line 2108 "dtool/src/cppparser/cppBison.yxx" +#line 2151 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_short); } break; - case 287: + case 290: /* Line 1792 of yacc.c */ -#line 2113 "dtool/src/cppparser/cppBison.yxx" +#line 2156 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } break; - case 288: + case 291: /* Line 1792 of yacc.c */ -#line 2118 "dtool/src/cppparser/cppBison.yxx" +#line 2161 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 289: + case 292: /* Line 1792 of yacc.c */ -#line 2123 "dtool/src/cppparser/cppBison.yxx" +#line 2166 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 290: + case 293: /* Line 1792 of yacc.c */ -#line 2128 "dtool/src/cppparser/cppBison.yxx" +#line 2171 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 291: + case 294: /* Line 1792 of yacc.c */ -#line 2133 "dtool/src/cppparser/cppBison.yxx" +#line 2176 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 292: + case 295: /* Line 1792 of yacc.c */ -#line 2137 "dtool/src/cppparser/cppBison.yxx" +#line 2180 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 293: + case 296: /* Line 1792 of yacc.c */ -#line 2142 "dtool/src/cppparser/cppBison.yxx" +#line 2185 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -5967,203 +6112,107 @@ yyreduce: } break; - case 294: + case 297: /* Line 1792 of yacc.c */ -#line 2151 "dtool/src/cppparser/cppBison.yxx" +#line 2194 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 295: + case 298: /* Line 1792 of yacc.c */ -#line 2156 "dtool/src/cppparser/cppBison.yxx" +#line 2199 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 296: + case 299: /* Line 1792 of yacc.c */ -#line 2164 "dtool/src/cppparser/cppBison.yxx" +#line 2207 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 297: -/* Line 1792 of yacc.c */ -#line 2168 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, - CPPSimpleType::F_long); -} - break; - - case 298: -/* Line 1792 of yacc.c */ -#line 2173 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); -} - break; - - case 299: -/* Line 1792 of yacc.c */ -#line 2177 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, - CPPSimpleType::F_longlong); -} - break; - case 300: /* Line 1792 of yacc.c */ -#line 2182 "dtool/src/cppparser/cppBison.yxx" +#line 2211 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; case 301: /* Line 1792 of yacc.c */ -#line 2190 "dtool/src/cppparser/cppBison.yxx" +#line 2216 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; case 302: /* Line 1792 of yacc.c */ -#line 2199 "dtool/src/cppparser/cppBison.yxx" +#line 2220 "dtool/src/cppparser/cppBison.yxx" { - current_lexer->_resolve_identifiers = false; + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, + CPPSimpleType::F_longlong); } break; case 303: /* Line 1792 of yacc.c */ -#line 2203 "dtool/src/cppparser/cppBison.yxx" +#line 2225 "dtool/src/cppparser/cppBison.yxx" { - current_lexer->_resolve_identifiers = true; + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, + CPPSimpleType::F_long); +} + break; + + case 304: +/* Line 1792 of yacc.c */ +#line 2233 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); +} + break; + + case 305: +/* Line 1792 of yacc.c */ +#line 2242 "dtool/src/cppparser/cppBison.yxx" + { + current_lexer->_resolve_identifiers = false; } break; case 306: /* Line 1792 of yacc.c */ -#line 2215 "dtool/src/cppparser/cppBison.yxx" +#line 2246 "dtool/src/cppparser/cppBison.yxx" + { + current_lexer->_resolve_identifiers = true; +} + break; + + case 401: +/* Line 1792 of yacc.c */ +#line 2286 "dtool/src/cppparser/cppBison.yxx" { } break; - case 307: + case 425: /* Line 1792 of yacc.c */ -#line 2218 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 308: -/* Line 1792 of yacc.c */ -#line 2221 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 309: -/* Line 1792 of yacc.c */ -#line 2224 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 310: -/* Line 1792 of yacc.c */ -#line 2227 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 311: -/* Line 1792 of yacc.c */ -#line 2230 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 312: -/* Line 1792 of yacc.c */ -#line 2233 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 313: -/* Line 1792 of yacc.c */ -#line 2236 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 388: -/* Line 1792 of yacc.c */ -#line 2257 "dtool/src/cppparser/cppBison.yxx" - { -} - break; - - case 412: -/* Line 1792 of yacc.c */ -#line 2266 "dtool/src/cppparser/cppBison.yxx" +#line 2295 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 413: -/* Line 1792 of yacc.c */ -#line 2270 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 414: -/* Line 1792 of yacc.c */ -#line 2277 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 415: -/* Line 1792 of yacc.c */ -#line 2281 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 416: -/* Line 1792 of yacc.c */ -#line 2288 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 417: -/* Line 1792 of yacc.c */ -#line 2292 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 418: + case 426: /* Line 1792 of yacc.c */ #line 2299 "dtool/src/cppparser/cppBison.yxx" { @@ -6171,305 +6220,345 @@ yyreduce: } break; - case 419: -/* Line 1792 of yacc.c */ -#line 2303 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 420: -/* Line 1792 of yacc.c */ -#line 2307 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 421: -/* Line 1792 of yacc.c */ -#line 2311 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 422: -/* Line 1792 of yacc.c */ -#line 2315 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 423: -/* Line 1792 of yacc.c */ -#line 2319 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 424: -/* Line 1792 of yacc.c */ -#line 2323 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 425: -/* Line 1792 of yacc.c */ -#line 2327 "dtool/src/cppparser/cppBison.yxx" - { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } -} - break; - - case 426: -/* Line 1792 of yacc.c */ -#line 2339 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - case 427: /* Line 1792 of yacc.c */ -#line 2343 "dtool/src/cppparser/cppBison.yxx" +#line 2306 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 428: /* Line 1792 of yacc.c */ -#line 2347 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 429: -/* Line 1792 of yacc.c */ -#line 2351 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 430: -/* Line 1792 of yacc.c */ -#line 2355 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 431: -/* Line 1792 of yacc.c */ -#line 2359 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 432: -/* Line 1792 of yacc.c */ -#line 2363 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 433: -/* Line 1792 of yacc.c */ -#line 2367 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 434: -/* Line 1792 of yacc.c */ -#line 2371 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 435: -/* Line 1792 of yacc.c */ -#line 2375 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 436: -/* Line 1792 of yacc.c */ -#line 2379 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 437: -/* Line 1792 of yacc.c */ -#line 2383 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 438: -/* Line 1792 of yacc.c */ -#line 2387 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 439: -/* Line 1792 of yacc.c */ -#line 2391 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 440: -/* Line 1792 of yacc.c */ -#line 2395 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 441: -/* Line 1792 of yacc.c */ -#line 2399 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 442: -/* Line 1792 of yacc.c */ -#line 2403 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 443: -/* Line 1792 of yacc.c */ -#line 2407 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 444: -/* Line 1792 of yacc.c */ -#line 2411 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 445: -/* Line 1792 of yacc.c */ -#line 2415 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 446: -/* Line 1792 of yacc.c */ -#line 2419 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 447: -/* Line 1792 of yacc.c */ -#line 2423 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 448: -/* Line 1792 of yacc.c */ -#line 2427 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 449: -/* Line 1792 of yacc.c */ -#line 2431 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 450: -/* Line 1792 of yacc.c */ -#line 2435 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 451: -/* Line 1792 of yacc.c */ -#line 2443 "dtool/src/cppparser/cppBison.yxx" +#line 2310 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 452: + case 429: /* Line 1792 of yacc.c */ -#line 2447 "dtool/src/cppparser/cppBison.yxx" +#line 2317 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 430: +/* Line 1792 of yacc.c */ +#line 2321 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 431: +/* Line 1792 of yacc.c */ +#line 2328 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 432: +/* Line 1792 of yacc.c */ +#line 2332 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; - case 453: + case 433: /* Line 1792 of yacc.c */ -#line 2451 "dtool/src/cppparser/cppBison.yxx" +#line 2336 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; + case 434: +/* Line 1792 of yacc.c */ +#line 2340 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 435: +/* Line 1792 of yacc.c */ +#line 2344 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 436: +/* Line 1792 of yacc.c */ +#line 2348 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 437: +/* Line 1792 of yacc.c */ +#line 2352 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 438: +/* Line 1792 of yacc.c */ +#line 2356 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 439: +/* Line 1792 of yacc.c */ +#line 2360 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 440: +/* Line 1792 of yacc.c */ +#line 2364 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 441: +/* Line 1792 of yacc.c */ +#line 2368 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 442: +/* Line 1792 of yacc.c */ +#line 2372 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 443: +/* Line 1792 of yacc.c */ +#line 2376 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 444: +/* Line 1792 of yacc.c */ +#line 2380 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 445: +/* Line 1792 of yacc.c */ +#line 2384 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 446: +/* Line 1792 of yacc.c */ +#line 2388 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 447: +/* Line 1792 of yacc.c */ +#line 2392 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 448: +/* Line 1792 of yacc.c */ +#line 2396 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 449: +/* Line 1792 of yacc.c */ +#line 2400 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 450: +/* Line 1792 of yacc.c */ +#line 2404 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 451: +/* Line 1792 of yacc.c */ +#line 2408 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 452: +/* Line 1792 of yacc.c */ +#line 2412 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 453: +/* Line 1792 of yacc.c */ +#line 2416 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + case 454: /* Line 1792 of yacc.c */ -#line 2455 "dtool/src/cppparser/cppBison.yxx" +#line 2420 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 455: /* Line 1792 of yacc.c */ -#line 2459 "dtool/src/cppparser/cppBison.yxx" +#line 2424 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 456: +/* Line 1792 of yacc.c */ +#line 2428 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 457: +/* Line 1792 of yacc.c */ +#line 2432 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 458: +/* Line 1792 of yacc.c */ +#line 2436 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 459: +/* Line 1792 of yacc.c */ +#line 2440 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 460: +/* Line 1792 of yacc.c */ +#line 2444 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 461: +/* Line 1792 of yacc.c */ +#line 2448 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 462: +/* Line 1792 of yacc.c */ +#line 2452 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 463: +/* Line 1792 of yacc.c */ +#line 2456 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 464: +/* Line 1792 of yacc.c */ +#line 2460 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 465: +/* Line 1792 of yacc.c */ +#line 2468 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 466: +/* Line 1792 of yacc.c */ +#line 2472 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 467: +/* Line 1792 of yacc.c */ +#line 2476 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 468: +/* Line 1792 of yacc.c */ +#line 2480 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 469: +/* Line 1792 of yacc.c */ +#line 2484 "dtool/src/cppparser/cppBison.yxx" { // A constructor call. CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -6481,9 +6570,9 @@ yyreduce: } break; - case 456: + case 470: /* Line 1792 of yacc.c */ -#line 2469 "dtool/src/cppparser/cppBison.yxx" +#line 2494 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6491,9 +6580,9 @@ yyreduce: } break; - case 457: + case 471: /* Line 1792 of yacc.c */ -#line 2475 "dtool/src/cppparser/cppBison.yxx" +#line 2500 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6501,9 +6590,9 @@ yyreduce: } break; - case 458: + case 472: /* Line 1792 of yacc.c */ -#line 2481 "dtool/src/cppparser/cppBison.yxx" +#line 2506 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6511,9 +6600,9 @@ yyreduce: } break; - case 459: + case 473: /* Line 1792 of yacc.c */ -#line 2487 "dtool/src/cppparser/cppBison.yxx" +#line 2512 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6521,9 +6610,9 @@ yyreduce: } break; - case 460: + case 474: /* Line 1792 of yacc.c */ -#line 2493 "dtool/src/cppparser/cppBison.yxx" +#line 2518 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6531,9 +6620,9 @@ yyreduce: } break; - case 461: + case 475: /* Line 1792 of yacc.c */ -#line 2499 "dtool/src/cppparser/cppBison.yxx" +#line 2524 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6541,9 +6630,9 @@ yyreduce: } break; - case 462: + case 476: /* Line 1792 of yacc.c */ -#line 2505 "dtool/src/cppparser/cppBison.yxx" +#line 2530 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6552,9 +6641,9 @@ yyreduce: } break; - case 463: + case 477: /* Line 1792 of yacc.c */ -#line 2512 "dtool/src/cppparser/cppBison.yxx" +#line 2537 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6563,9 +6652,9 @@ yyreduce: } break; - case 464: + case 478: /* Line 1792 of yacc.c */ -#line 2519 "dtool/src/cppparser/cppBison.yxx" +#line 2544 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6574,9 +6663,9 @@ yyreduce: } break; - case 465: + case 479: /* Line 1792 of yacc.c */ -#line 2526 "dtool/src/cppparser/cppBison.yxx" +#line 2551 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6585,9 +6674,9 @@ yyreduce: } break; - case 466: + case 480: /* Line 1792 of yacc.c */ -#line 2533 "dtool/src/cppparser/cppBison.yxx" +#line 2558 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6595,9 +6684,9 @@ yyreduce: } break; - case 467: + case 481: /* Line 1792 of yacc.c */ -#line 2539 "dtool/src/cppparser/cppBison.yxx" +#line 2564 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6605,681 +6694,713 @@ yyreduce: } break; - case 468: -/* Line 1792 of yacc.c */ -#line 2545 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 469: -/* Line 1792 of yacc.c */ -#line 2549 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); -} - break; - - case 470: -/* Line 1792 of yacc.c */ -#line 2553 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); -} - break; - - case 471: -/* Line 1792 of yacc.c */ -#line 2557 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 472: -/* Line 1792 of yacc.c */ -#line 2561 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 473: -/* Line 1792 of yacc.c */ -#line 2565 "dtool/src/cppparser/cppBison.yxx" - { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } -} - break; - - case 474: -/* Line 1792 of yacc.c */ -#line 2577 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 475: -/* Line 1792 of yacc.c */ -#line 2581 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 476: -/* Line 1792 of yacc.c */ -#line 2585 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 477: -/* Line 1792 of yacc.c */ -#line 2589 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 478: -/* Line 1792 of yacc.c */ -#line 2593 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 479: -/* Line 1792 of yacc.c */ -#line 2597 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 480: -/* Line 1792 of yacc.c */ -#line 2601 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 481: -/* Line 1792 of yacc.c */ -#line 2605 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - case 482: /* Line 1792 of yacc.c */ -#line 2609 "dtool/src/cppparser/cppBison.yxx" +#line 2570 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 483: /* Line 1792 of yacc.c */ -#line 2613 "dtool/src/cppparser/cppBison.yxx" +#line 2574 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; case 484: /* Line 1792 of yacc.c */ -#line 2617 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 485: -/* Line 1792 of yacc.c */ -#line 2621 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 486: -/* Line 1792 of yacc.c */ -#line 2625 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 487: -/* Line 1792 of yacc.c */ -#line 2629 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 488: -/* Line 1792 of yacc.c */ -#line 2633 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 489: -/* Line 1792 of yacc.c */ -#line 2637 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 490: -/* Line 1792 of yacc.c */ -#line 2641 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 491: -/* Line 1792 of yacc.c */ -#line 2645 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 492: -/* Line 1792 of yacc.c */ -#line 2649 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 493: -/* Line 1792 of yacc.c */ -#line 2653 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 494: -/* Line 1792 of yacc.c */ -#line 2657 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 495: -/* Line 1792 of yacc.c */ -#line 2661 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 496: -/* Line 1792 of yacc.c */ -#line 2665 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 497: -/* Line 1792 of yacc.c */ -#line 2669 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 498: -/* Line 1792 of yacc.c */ -#line 2673 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 499: -/* Line 1792 of yacc.c */ -#line 2677 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 500: -/* Line 1792 of yacc.c */ -#line 2681 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 501: -/* Line 1792 of yacc.c */ -#line 2688 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 502: -/* Line 1792 of yacc.c */ -#line 2692 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(true); -} - break; - - case 503: -/* Line 1792 of yacc.c */ -#line 2696 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(false); -} - break; - - case 504: -/* Line 1792 of yacc.c */ -#line 2700 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 505: -/* Line 1792 of yacc.c */ -#line 2704 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); -} - break; - - case 506: -/* Line 1792 of yacc.c */ -#line 2708 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); -} - break; - - case 507: -/* Line 1792 of yacc.c */ -#line 2712 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); -} - break; - - case 508: -/* Line 1792 of yacc.c */ -#line 2726 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 509: -/* Line 1792 of yacc.c */ -#line 2730 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 510: -/* Line 1792 of yacc.c */ -#line 2734 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 511: -/* Line 1792 of yacc.c */ -#line 2738 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 512: -/* Line 1792 of yacc.c */ -#line 2742 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 513: -/* Line 1792 of yacc.c */ -#line 2746 "dtool/src/cppparser/cppBison.yxx" +#line 2578 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; - case 514: + case 485: /* Line 1792 of yacc.c */ -#line 2750 "dtool/src/cppparser/cppBison.yxx" +#line 2582 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; - case 515: + case 486: /* Line 1792 of yacc.c */ -#line 2754 "dtool/src/cppparser/cppBison.yxx" +#line 2586 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; - case 516: + case 487: /* Line 1792 of yacc.c */ -#line 2758 "dtool/src/cppparser/cppBison.yxx" +#line 2590 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; - case 517: + case 488: /* Line 1792 of yacc.c */ -#line 2762 "dtool/src/cppparser/cppBison.yxx" +#line 2594 "dtool/src/cppparser/cppBison.yxx" { - if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_integer) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._integer = -(yyval.u.expr)->_u._integer; - } else if ((yyvsp[(2) - (2)].u.expr)->_type == CPPExpression::T_real) { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); - (yyval.u.expr)->_u._real = -(yyval.u.expr)->_u._real; - } else { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); - } + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; - case 518: + case 489: /* Line 1792 of yacc.c */ -#line 2774 "dtool/src/cppparser/cppBison.yxx" +#line 2598 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 490: +/* Line 1792 of yacc.c */ +#line 2602 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 519: + case 491: /* Line 1792 of yacc.c */ -#line 2778 "dtool/src/cppparser/cppBison.yxx" +#line 2606 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 520: + case 492: /* Line 1792 of yacc.c */ -#line 2782 "dtool/src/cppparser/cppBison.yxx" +#line 2610 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 521: + case 493: /* Line 1792 of yacc.c */ -#line 2786 "dtool/src/cppparser/cppBison.yxx" +#line 2614 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 522: + case 494: /* Line 1792 of yacc.c */ -#line 2790 "dtool/src/cppparser/cppBison.yxx" +#line 2618 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 523: + case 495: /* Line 1792 of yacc.c */ -#line 2794 "dtool/src/cppparser/cppBison.yxx" +#line 2622 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 524: + case 496: /* Line 1792 of yacc.c */ -#line 2798 "dtool/src/cppparser/cppBison.yxx" +#line 2626 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 525: + case 497: /* Line 1792 of yacc.c */ -#line 2802 "dtool/src/cppparser/cppBison.yxx" +#line 2630 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 526: + case 498: /* Line 1792 of yacc.c */ -#line 2806 "dtool/src/cppparser/cppBison.yxx" +#line 2634 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 527: + case 499: /* Line 1792 of yacc.c */ -#line 2810 "dtool/src/cppparser/cppBison.yxx" +#line 2638 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 528: + case 500: /* Line 1792 of yacc.c */ -#line 2814 "dtool/src/cppparser/cppBison.yxx" +#line 2642 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 529: + case 501: /* Line 1792 of yacc.c */ -#line 2818 "dtool/src/cppparser/cppBison.yxx" +#line 2646 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 530: + case 502: /* Line 1792 of yacc.c */ -#line 2822 "dtool/src/cppparser/cppBison.yxx" +#line 2650 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 531: + case 503: /* Line 1792 of yacc.c */ -#line 2826 "dtool/src/cppparser/cppBison.yxx" +#line 2654 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 532: + case 504: /* Line 1792 of yacc.c */ -#line 2830 "dtool/src/cppparser/cppBison.yxx" +#line 2658 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 533: + case 505: /* Line 1792 of yacc.c */ -#line 2834 "dtool/src/cppparser/cppBison.yxx" +#line 2662 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 534: + case 506: /* Line 1792 of yacc.c */ -#line 2838 "dtool/src/cppparser/cppBison.yxx" +#line 2666 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 535: + case 507: /* Line 1792 of yacc.c */ -#line 2842 "dtool/src/cppparser/cppBison.yxx" +#line 2670 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 536: + case 508: /* Line 1792 of yacc.c */ -#line 2846 "dtool/src/cppparser/cppBison.yxx" +#line 2674 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 537: + case 509: /* Line 1792 of yacc.c */ -#line 2850 "dtool/src/cppparser/cppBison.yxx" +#line 2678 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 538: + case 510: /* Line 1792 of yacc.c */ -#line 2854 "dtool/src/cppparser/cppBison.yxx" +#line 2682 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 539: + case 511: /* Line 1792 of yacc.c */ -#line 2858 "dtool/src/cppparser/cppBison.yxx" +#line 2686 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 540: + case 512: /* Line 1792 of yacc.c */ -#line 2862 "dtool/src/cppparser/cppBison.yxx" +#line 2690 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 541: + case 513: /* Line 1792 of yacc.c */ -#line 2866 "dtool/src/cppparser/cppBison.yxx" +#line 2694 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 542: + case 514: /* Line 1792 of yacc.c */ -#line 2870 "dtool/src/cppparser/cppBison.yxx" +#line 2698 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 543: + case 515: /* Line 1792 of yacc.c */ -#line 2874 "dtool/src/cppparser/cppBison.yxx" +#line 2702 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 544: + case 516: /* Line 1792 of yacc.c */ -#line 2881 "dtool/src/cppparser/cppBison.yxx" +#line 2709 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 545: + case 517: /* Line 1792 of yacc.c */ -#line 2885 "dtool/src/cppparser/cppBison.yxx" +#line 2713 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(true); } break; - case 546: + case 518: /* Line 1792 of yacc.c */ -#line 2889 "dtool/src/cppparser/cppBison.yxx" +#line 2717 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(false); } break; - case 547: + case 519: /* Line 1792 of yacc.c */ -#line 2893 "dtool/src/cppparser/cppBison.yxx" +#line 2721 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; - case 548: + case 520: /* Line 1792 of yacc.c */ -#line 2897 "dtool/src/cppparser/cppBison.yxx" +#line 2725 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; + case 521: +/* Line 1792 of yacc.c */ +#line 2729 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 522: +/* Line 1792 of yacc.c */ +#line 2733 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 523: +/* Line 1792 of yacc.c */ +#line 2737 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 524: +/* Line 1792 of yacc.c */ +#line 2741 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); +} + break; + + case 525: +/* Line 1792 of yacc.c */ +#line 2755 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 526: +/* Line 1792 of yacc.c */ +#line 2759 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 527: +/* Line 1792 of yacc.c */ +#line 2763 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 528: +/* Line 1792 of yacc.c */ +#line 2767 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 529: +/* Line 1792 of yacc.c */ +#line 2771 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 530: +/* Line 1792 of yacc.c */ +#line 2775 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 531: +/* Line 1792 of yacc.c */ +#line 2779 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); +} + break; + + case 532: +/* Line 1792 of yacc.c */ +#line 2783 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); +} + break; + + case 533: +/* Line 1792 of yacc.c */ +#line 2787 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 534: +/* Line 1792 of yacc.c */ +#line 2791 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 535: +/* Line 1792 of yacc.c */ +#line 2795 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 536: +/* Line 1792 of yacc.c */ +#line 2799 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 537: +/* Line 1792 of yacc.c */ +#line 2803 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 538: +/* Line 1792 of yacc.c */ +#line 2807 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 539: +/* Line 1792 of yacc.c */ +#line 2811 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 540: +/* Line 1792 of yacc.c */ +#line 2815 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 541: +/* Line 1792 of yacc.c */ +#line 2819 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 542: +/* Line 1792 of yacc.c */ +#line 2823 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 543: +/* Line 1792 of yacc.c */ +#line 2827 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 544: +/* Line 1792 of yacc.c */ +#line 2831 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 545: +/* Line 1792 of yacc.c */ +#line 2835 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 546: +/* Line 1792 of yacc.c */ +#line 2839 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 547: +/* Line 1792 of yacc.c */ +#line 2843 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 548: +/* Line 1792 of yacc.c */ +#line 2847 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + case 549: /* Line 1792 of yacc.c */ -#line 2901 "dtool/src/cppparser/cppBison.yxx" +#line 2851 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 550: /* Line 1792 of yacc.c */ -#line 2908 "dtool/src/cppparser/cppBison.yxx" +#line 2855 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 551: +/* Line 1792 of yacc.c */ +#line 2859 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 552: +/* Line 1792 of yacc.c */ +#line 2863 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 553: +/* Line 1792 of yacc.c */ +#line 2867 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 554: +/* Line 1792 of yacc.c */ +#line 2871 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 555: +/* Line 1792 of yacc.c */ +#line 2875 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 556: +/* Line 1792 of yacc.c */ +#line 2879 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 557: +/* Line 1792 of yacc.c */ +#line 2883 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 558: +/* Line 1792 of yacc.c */ +#line 2887 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 559: +/* Line 1792 of yacc.c */ +#line 2891 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 560: +/* Line 1792 of yacc.c */ +#line 2895 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 561: +/* Line 1792 of yacc.c */ +#line 2899 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 562: +/* Line 1792 of yacc.c */ +#line 2906 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + + case 563: +/* Line 1792 of yacc.c */ +#line 2910 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(true); +} + break; + + case 564: +/* Line 1792 of yacc.c */ +#line 2914 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(false); +} + break; + + case 565: +/* Line 1792 of yacc.c */ +#line 2918 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); +} + break; + + case 566: +/* Line 1792 of yacc.c */ +#line 2922 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); +} + break; + + case 567: +/* Line 1792 of yacc.c */ +#line 2926 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 568: +/* Line 1792 of yacc.c */ +#line 2930 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 569: +/* Line 1792 of yacc.c */ +#line 2934 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); +} + break; + + case 570: +/* Line 1792 of yacc.c */ +#line 2941 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7289,9 +7410,9 @@ yyreduce: } break; - case 551: + case 571: /* Line 1792 of yacc.c */ -#line 2916 "dtool/src/cppparser/cppBison.yxx" +#line 2949 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7301,49 +7422,72 @@ yyreduce: } break; - case 552: + case 572: /* Line 1792 of yacc.c */ -#line 2924 "dtool/src/cppparser/cppBison.yxx" +#line 2957 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 553: + case 573: /* Line 1792 of yacc.c */ -#line 2950 "dtool/src/cppparser/cppBison.yxx" +#line 2983 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 554: + case 574: /* Line 1792 of yacc.c */ -#line 2954 "dtool/src/cppparser/cppBison.yxx" +#line 2987 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 555: + case 575: /* Line 1792 of yacc.c */ -#line 2961 "dtool/src/cppparser/cppBison.yxx" +#line 2994 "dtool/src/cppparser/cppBison.yxx" { - (yyval.str) = (yyvsp[(1) - (1)].str); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); } break; - case 556: + case 576: /* Line 1792 of yacc.c */ -#line 2965 "dtool/src/cppparser/cppBison.yxx" +#line 2998 "dtool/src/cppparser/cppBison.yxx" { - (yyval.str) = (yyvsp[(1) - (2)].str) + (yyvsp[(2) - (2)].str); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 577: +/* Line 1792 of yacc.c */ +#line 3002 "dtool/src/cppparser/cppBison.yxx" + { + // The right string takes on the literal type of the left. + (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); + (yyval.u.expr)->_str += (yyvsp[(2) - (2)].str); +} + break; + + case 578: +/* Line 1792 of yacc.c */ +#line 3008 "dtool/src/cppparser/cppBison.yxx" + { + // We have to check that the two literal types match up. + (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); + if ((yyvsp[(2) - (2)].u.expr)->_type != CPPExpression::T_string && (yyvsp[(2) - (2)].u.expr)->_type != (yyvsp[(1) - (2)].u.expr)->_type) { + yywarning("cannot concatenate two string literals of different types", (yyloc)); + } + (yyval.u.expr)->_str += (yyvsp[(2) - (2)].u.expr)->_str; } break; /* Line 1792 of yacc.c */ -#line 7347 "built/tmp/cppBison.yxx.c" +#line 7491 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.h.prebuilt b/dtool/src/cppparser/cppBison.h.prebuilt index 6c1aac48d8..2799f4873f 100644 --- a/dtool/src/cppparser/cppBison.h.prebuilt +++ b/dtool/src/cppparser/cppBison.h.prebuilt @@ -49,216 +49,234 @@ extern int cppyydebug; REAL = 258, INTEGER = 259, CHAR_TOK = 260, - STRING = 261, + SIMPLE_STRING = 261, SIMPLE_IDENTIFIER = 262, - IDENTIFIER = 263, - TYPENAME_IDENTIFIER = 264, - SCOPING = 265, - TYPEDEFNAME = 266, - ELLIPSIS = 267, - OROR = 268, - ANDAND = 269, - EQCOMPARE = 270, - NECOMPARE = 271, - LECOMPARE = 272, - GECOMPARE = 273, - LSHIFT = 274, - RSHIFT = 275, - POINTSAT_STAR = 276, - DOT_STAR = 277, - UNARY = 278, - UNARY_NOT = 279, - UNARY_NEGATE = 280, - UNARY_MINUS = 281, - UNARY_STAR = 282, - UNARY_REF = 283, - POINTSAT = 284, - SCOPE = 285, - PLUSPLUS = 286, - MINUSMINUS = 287, - TIMESEQUAL = 288, - DIVIDEEQUAL = 289, - MODEQUAL = 290, - PLUSEQUAL = 291, - MINUSEQUAL = 292, - OREQUAL = 293, - ANDEQUAL = 294, - XOREQUAL = 295, - LSHIFTEQUAL = 296, - RSHIFTEQUAL = 297, - KW_BEGIN_PUBLISH = 298, - KW_BLOCKING = 299, - KW_BOOL = 300, - KW_CATCH = 301, - KW_CHAR = 302, - KW_CHAR16_T = 303, - KW_CHAR32_T = 304, - KW_CLASS = 305, - KW_CONST = 306, - KW_DELETE = 307, - KW_DOUBLE = 308, - KW_DYNAMIC_CAST = 309, - KW_ELSE = 310, - KW_END_PUBLISH = 311, - KW_ENUM = 312, - KW_EXTENSION = 313, - KW_EXTERN = 314, - KW_EXPLICIT = 315, - KW_PUBLISHED = 316, - KW_FALSE = 317, - KW_FLOAT = 318, - KW_FRIEND = 319, - KW_FOR = 320, - KW_GOTO = 321, - KW_IF = 322, - KW_INLINE = 323, - KW_INT = 324, - KW_LONG = 325, - KW_LONGLONG = 326, - KW_MAKE_PROPERTY = 327, - KW_MAKE_SEQ = 328, - KW_MUTABLE = 329, - KW_NAMESPACE = 330, - KW_NEW = 331, - KW_NOEXCEPT = 332, - KW_OPERATOR = 333, - KW_PRIVATE = 334, - KW_PROTECTED = 335, - KW_PUBLIC = 336, - KW_REGISTER = 337, - KW_RETURN = 338, - KW_SHORT = 339, - KW_SIGNED = 340, - KW_SIZEOF = 341, - KW_STATIC = 342, - KW_STATIC_ASSERT = 343, - KW_STATIC_CAST = 344, - KW_STRUCT = 345, - KW_TEMPLATE = 346, - KW_THROW = 347, - KW_TRUE = 348, - KW_TRY = 349, - KW_TYPEDEF = 350, - KW_TYPENAME = 351, - KW_UNION = 352, - KW_UNSIGNED = 353, - KW_USING = 354, - KW_VIRTUAL = 355, - KW_VOID = 356, - KW_VOLATILE = 357, - KW_WCHAR_T = 358, - KW_WHILE = 359, - START_CPP = 360, - START_CONST_EXPR = 361, - START_TYPE = 362 + STRING_LITERAL = 263, + CUSTOM_LITERAL = 264, + IDENTIFIER = 265, + TYPENAME_IDENTIFIER = 266, + SCOPING = 267, + TYPEDEFNAME = 268, + ELLIPSIS = 269, + OROR = 270, + ANDAND = 271, + EQCOMPARE = 272, + NECOMPARE = 273, + LECOMPARE = 274, + GECOMPARE = 275, + LSHIFT = 276, + RSHIFT = 277, + POINTSAT_STAR = 278, + DOT_STAR = 279, + UNARY = 280, + UNARY_NOT = 281, + UNARY_NEGATE = 282, + UNARY_MINUS = 283, + UNARY_STAR = 284, + UNARY_REF = 285, + POINTSAT = 286, + SCOPE = 287, + PLUSPLUS = 288, + MINUSMINUS = 289, + TIMESEQUAL = 290, + DIVIDEEQUAL = 291, + MODEQUAL = 292, + PLUSEQUAL = 293, + MINUSEQUAL = 294, + OREQUAL = 295, + ANDEQUAL = 296, + XOREQUAL = 297, + LSHIFTEQUAL = 298, + RSHIFTEQUAL = 299, + KW_ALIGNAS = 300, + KW_ALIGNOF = 301, + KW_AUTO = 302, + KW_BEGIN_PUBLISH = 303, + KW_BLOCKING = 304, + KW_BOOL = 305, + KW_CATCH = 306, + KW_CHAR = 307, + KW_CHAR16_T = 308, + KW_CHAR32_T = 309, + KW_CLASS = 310, + KW_CONST = 311, + KW_CONSTEXPR = 312, + KW_DECLTYPE = 313, + KW_DEFAULT = 314, + KW_DELETE = 315, + KW_DOUBLE = 316, + KW_DYNAMIC_CAST = 317, + KW_ELSE = 318, + KW_END_PUBLISH = 319, + KW_ENUM = 320, + KW_EXTENSION = 321, + KW_EXTERN = 322, + KW_EXPLICIT = 323, + KW_PUBLISHED = 324, + KW_FALSE = 325, + KW_FLOAT = 326, + KW_FRIEND = 327, + KW_FOR = 328, + KW_GOTO = 329, + KW_IF = 330, + KW_INLINE = 331, + KW_INT = 332, + KW_LONG = 333, + KW_LONGLONG = 334, + KW_MAKE_PROPERTY = 335, + KW_MAKE_SEQ = 336, + KW_MUTABLE = 337, + KW_NAMESPACE = 338, + KW_NEW = 339, + KW_NOEXCEPT = 340, + KW_NULLPTR = 341, + KW_OPERATOR = 342, + KW_PRIVATE = 343, + KW_PROTECTED = 344, + KW_PUBLIC = 345, + KW_REGISTER = 346, + KW_RETURN = 347, + KW_SHORT = 348, + KW_SIGNED = 349, + KW_SIZEOF = 350, + KW_STATIC = 351, + KW_STATIC_ASSERT = 352, + KW_STATIC_CAST = 353, + KW_STRUCT = 354, + KW_TEMPLATE = 355, + KW_THROW = 356, + KW_TRUE = 357, + KW_TRY = 358, + KW_TYPEDEF = 359, + KW_TYPENAME = 360, + KW_UNION = 361, + KW_UNSIGNED = 362, + KW_USING = 363, + KW_VIRTUAL = 364, + KW_VOID = 365, + KW_VOLATILE = 366, + KW_WCHAR_T = 367, + KW_WHILE = 368, + START_CPP = 369, + START_CONST_EXPR = 370, + START_TYPE = 371 }; #endif /* Tokens. */ #define REAL 258 #define INTEGER 259 #define CHAR_TOK 260 -#define STRING 261 +#define SIMPLE_STRING 261 #define SIMPLE_IDENTIFIER 262 -#define IDENTIFIER 263 -#define TYPENAME_IDENTIFIER 264 -#define SCOPING 265 -#define TYPEDEFNAME 266 -#define ELLIPSIS 267 -#define OROR 268 -#define ANDAND 269 -#define EQCOMPARE 270 -#define NECOMPARE 271 -#define LECOMPARE 272 -#define GECOMPARE 273 -#define LSHIFT 274 -#define RSHIFT 275 -#define POINTSAT_STAR 276 -#define DOT_STAR 277 -#define UNARY 278 -#define UNARY_NOT 279 -#define UNARY_NEGATE 280 -#define UNARY_MINUS 281 -#define UNARY_STAR 282 -#define UNARY_REF 283 -#define POINTSAT 284 -#define SCOPE 285 -#define PLUSPLUS 286 -#define MINUSMINUS 287 -#define TIMESEQUAL 288 -#define DIVIDEEQUAL 289 -#define MODEQUAL 290 -#define PLUSEQUAL 291 -#define MINUSEQUAL 292 -#define OREQUAL 293 -#define ANDEQUAL 294 -#define XOREQUAL 295 -#define LSHIFTEQUAL 296 -#define RSHIFTEQUAL 297 -#define KW_BEGIN_PUBLISH 298 -#define KW_BLOCKING 299 -#define KW_BOOL 300 -#define KW_CATCH 301 -#define KW_CHAR 302 -#define KW_CHAR16_T 303 -#define KW_CHAR32_T 304 -#define KW_CLASS 305 -#define KW_CONST 306 -#define KW_DELETE 307 -#define KW_DOUBLE 308 -#define KW_DYNAMIC_CAST 309 -#define KW_ELSE 310 -#define KW_END_PUBLISH 311 -#define KW_ENUM 312 -#define KW_EXTENSION 313 -#define KW_EXTERN 314 -#define KW_EXPLICIT 315 -#define KW_PUBLISHED 316 -#define KW_FALSE 317 -#define KW_FLOAT 318 -#define KW_FRIEND 319 -#define KW_FOR 320 -#define KW_GOTO 321 -#define KW_IF 322 -#define KW_INLINE 323 -#define KW_INT 324 -#define KW_LONG 325 -#define KW_LONGLONG 326 -#define KW_MAKE_PROPERTY 327 -#define KW_MAKE_SEQ 328 -#define KW_MUTABLE 329 -#define KW_NAMESPACE 330 -#define KW_NEW 331 -#define KW_NOEXCEPT 332 -#define KW_OPERATOR 333 -#define KW_PRIVATE 334 -#define KW_PROTECTED 335 -#define KW_PUBLIC 336 -#define KW_REGISTER 337 -#define KW_RETURN 338 -#define KW_SHORT 339 -#define KW_SIGNED 340 -#define KW_SIZEOF 341 -#define KW_STATIC 342 -#define KW_STATIC_ASSERT 343 -#define KW_STATIC_CAST 344 -#define KW_STRUCT 345 -#define KW_TEMPLATE 346 -#define KW_THROW 347 -#define KW_TRUE 348 -#define KW_TRY 349 -#define KW_TYPEDEF 350 -#define KW_TYPENAME 351 -#define KW_UNION 352 -#define KW_UNSIGNED 353 -#define KW_USING 354 -#define KW_VIRTUAL 355 -#define KW_VOID 356 -#define KW_VOLATILE 357 -#define KW_WCHAR_T 358 -#define KW_WHILE 359 -#define START_CPP 360 -#define START_CONST_EXPR 361 -#define START_TYPE 362 +#define STRING_LITERAL 263 +#define CUSTOM_LITERAL 264 +#define IDENTIFIER 265 +#define TYPENAME_IDENTIFIER 266 +#define SCOPING 267 +#define TYPEDEFNAME 268 +#define ELLIPSIS 269 +#define OROR 270 +#define ANDAND 271 +#define EQCOMPARE 272 +#define NECOMPARE 273 +#define LECOMPARE 274 +#define GECOMPARE 275 +#define LSHIFT 276 +#define RSHIFT 277 +#define POINTSAT_STAR 278 +#define DOT_STAR 279 +#define UNARY 280 +#define UNARY_NOT 281 +#define UNARY_NEGATE 282 +#define UNARY_MINUS 283 +#define UNARY_STAR 284 +#define UNARY_REF 285 +#define POINTSAT 286 +#define SCOPE 287 +#define PLUSPLUS 288 +#define MINUSMINUS 289 +#define TIMESEQUAL 290 +#define DIVIDEEQUAL 291 +#define MODEQUAL 292 +#define PLUSEQUAL 293 +#define MINUSEQUAL 294 +#define OREQUAL 295 +#define ANDEQUAL 296 +#define XOREQUAL 297 +#define LSHIFTEQUAL 298 +#define RSHIFTEQUAL 299 +#define KW_ALIGNAS 300 +#define KW_ALIGNOF 301 +#define KW_AUTO 302 +#define KW_BEGIN_PUBLISH 303 +#define KW_BLOCKING 304 +#define KW_BOOL 305 +#define KW_CATCH 306 +#define KW_CHAR 307 +#define KW_CHAR16_T 308 +#define KW_CHAR32_T 309 +#define KW_CLASS 310 +#define KW_CONST 311 +#define KW_CONSTEXPR 312 +#define KW_DECLTYPE 313 +#define KW_DEFAULT 314 +#define KW_DELETE 315 +#define KW_DOUBLE 316 +#define KW_DYNAMIC_CAST 317 +#define KW_ELSE 318 +#define KW_END_PUBLISH 319 +#define KW_ENUM 320 +#define KW_EXTENSION 321 +#define KW_EXTERN 322 +#define KW_EXPLICIT 323 +#define KW_PUBLISHED 324 +#define KW_FALSE 325 +#define KW_FLOAT 326 +#define KW_FRIEND 327 +#define KW_FOR 328 +#define KW_GOTO 329 +#define KW_IF 330 +#define KW_INLINE 331 +#define KW_INT 332 +#define KW_LONG 333 +#define KW_LONGLONG 334 +#define KW_MAKE_PROPERTY 335 +#define KW_MAKE_SEQ 336 +#define KW_MUTABLE 337 +#define KW_NAMESPACE 338 +#define KW_NEW 339 +#define KW_NOEXCEPT 340 +#define KW_NULLPTR 341 +#define KW_OPERATOR 342 +#define KW_PRIVATE 343 +#define KW_PROTECTED 344 +#define KW_PUBLIC 345 +#define KW_REGISTER 346 +#define KW_RETURN 347 +#define KW_SHORT 348 +#define KW_SIGNED 349 +#define KW_SIZEOF 350 +#define KW_STATIC 351 +#define KW_STATIC_ASSERT 352 +#define KW_STATIC_CAST 353 +#define KW_STRUCT 354 +#define KW_TEMPLATE 355 +#define KW_THROW 356 +#define KW_TRUE 357 +#define KW_TRY 358 +#define KW_TYPEDEF 359 +#define KW_TYPENAME 360 +#define KW_UNION 361 +#define KW_UNSIGNED 362 +#define KW_USING 363 +#define KW_VIRTUAL 364 +#define KW_VOID 365 +#define KW_VOLATILE 366 +#define KW_WCHAR_T 367 +#define KW_WHILE 368 +#define START_CPP 369 +#define START_CONST_EXPR 370 +#define START_TYPE 371 diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 5ca786f485..6221bd8507 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -209,7 +209,8 @@ pop_struct() { %token REAL %token INTEGER %token CHAR_TOK -%token STRING SIMPLE_IDENTIFIER +%token SIMPLE_STRING SIMPLE_IDENTIFIER +%token STRING_LITERAL CUSTOM_LITERAL %token IDENTIFIER TYPENAME_IDENTIFIER SCOPING %token TYPEDEFNAME @@ -245,6 +246,9 @@ pop_struct() { %token LSHIFTEQUAL %token RSHIFTEQUAL +%token KW_ALIGNAS +%token KW_ALIGNOF +%token KW_AUTO %token KW_BEGIN_PUBLISH %token KW_BLOCKING %token KW_BOOL @@ -254,6 +258,9 @@ pop_struct() { %token KW_CHAR32_T %token KW_CLASS %token KW_CONST +%token KW_CONSTEXPR +%token KW_DECLTYPE +%token KW_DEFAULT %token KW_DELETE %token KW_DOUBLE %token KW_DYNAMIC_CAST @@ -280,6 +287,7 @@ pop_struct() { %token KW_NAMESPACE %token KW_NEW %token KW_NOEXCEPT +%token KW_NULLPTR %token KW_OPERATOR %token KW_PRIVATE %token KW_PROTECTED @@ -348,7 +356,7 @@ pop_struct() { %type enum_element_type /*%type typedefname*/ %type name -%type string +%type string_literal /* We need to treat KW_OPERATOR as a scopable keyword. */ %type KW_OPERATOR @@ -526,13 +534,15 @@ declaration: CPPMakeSeq *make_seq = new CPPMakeSeq($3->get_simple_name(), $5->get_simple_name(), $7->get_simple_name(), @1.file); current_scope->add_declaration(make_seq, global_scope, current_lexer, @1); } - | KW_STATIC_ASSERT '(' const_expr ',' string ')' + | KW_STATIC_ASSERT '(' const_expr ',' string_literal ')' { CPPExpression::Result result = $3->evaluate(); if (result._type == CPPExpression::RT_error) { yywarning("static_assert requires a constant expression", @3); } else if (!result.as_boolean()) { - yywarning("static_assert failed: " + $5, @3); + stringstream str; + str << *$5; + yywarning("static_assert failed: " + str.str(), @3); } } | KW_STATIC_ASSERT '(' const_expr ')' @@ -571,7 +581,7 @@ storage_class: { $$ = $1 | (int)CPPInstance::SC_extern; } - | storage_class KW_EXTERN string + | storage_class KW_EXTERN SIMPLE_STRING { $$ = $1 | (int)CPPInstance::SC_extern; if ($3 == "C") { @@ -1266,6 +1276,21 @@ instance_identifier: ident->_names.push_back("operator "+$2); } + $$ = new CPPInstanceIdentifier(ident); +} + | KW_OPERATOR SIMPLE_STRING IDENTIFIER +{ + // A C++11 literal operator. + if (!$2.empty()) { + yyerror("expected empty string", @2); + } + CPPIdentifier *ident = $1; + if (ident == NULL) { + ident = new CPPIdentifier("operator \"\" "+$3->get_simple_name(), @3); + } else { + ident->_names.push_back("operator \"\" "+$3->get_simple_name()); + } + $$ = new CPPInstanceIdentifier(ident); } | KW_CONST instance_identifier %prec UNARY @@ -1691,6 +1716,15 @@ type: } $$ = et; } +} + | KW_DECLTYPE '(' const_expr ')' +{ + $$ = $3->determine_type(); + if ($$ == (CPPType *)NULL) { + stringstream str; + str << *$3; + yyerror("could not determine type of " + str.str(), @3); + } } ; @@ -1772,6 +1806,15 @@ type_decl: } $$ = et; } +} + | KW_DECLTYPE '(' const_expr ')' +{ + $$ = $3->determine_type(); + if ($$ == (CPPType *)NULL) { + stringstream str; + str << *$3; + yyerror("could not determine type of " + str.str(), @3); + } } ; @@ -2212,48 +2255,34 @@ code_block: element: REAL -{ -} | INTEGER -{ -} - | STRING -{ -} + | SIMPLE_STRING + | STRING_LITERAL + | CUSTOM_LITERAL | CHAR_TOK -{ -} | IDENTIFIER -{ -} | TYPENAME_IDENTIFIER -{ -} | SCOPING -{ -} | SIMPLE_IDENTIFIER -{ -} | ELLIPSIS | OROR | ANDAND | EQCOMPARE | NECOMPARE | LECOMPARE | GECOMPARE | LSHIFT | RSHIFT | POINTSAT_STAR | DOT_STAR | POINTSAT | SCOPE | PLUSPLUS | MINUSMINUS | TIMESEQUAL | DIVIDEEQUAL | MODEQUAL | PLUSEQUAL | MINUSEQUAL | OREQUAL | ANDEQUAL | XOREQUAL | LSHIFTEQUAL | RSHIFTEQUAL - | KW_BOOL | KW_CATCH | KW_CHAR | KW_CHAR16_T | KW_CHAR32_T - | KW_WCHAR_T | KW_CLASS | KW_CONST + | KW_ALIGNAS | KW_ALIGNOF | KW_AUTO | KW_BOOL | KW_CATCH + | KW_CHAR | KW_CHAR16_T | KW_CHAR32_T + | KW_CLASS | KW_CONST | KW_CONSTEXPR | KW_DECLTYPE | KW_DEFAULT | KW_DELETE | KW_DOUBLE | KW_DYNAMIC_CAST | KW_ELSE | KW_ENUM | KW_EXTERN | KW_EXPLICIT | KW_FALSE | KW_FLOAT | KW_FRIEND | KW_FOR | KW_GOTO - | KW_IF | KW_INLINE | KW_INT - | KW_LONG | KW_MUTABLE | KW_NEW | KW_PRIVATE | KW_PROTECTED + | KW_IF | KW_INLINE | KW_INT | KW_LONG | KW_MUTABLE + | KW_NEW | KW_NULLPTR | KW_OPERATOR | KW_PRIVATE | KW_PROTECTED | KW_PUBLIC | KW_PUBLISHED | KW_REGISTER | KW_RETURN - | KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC | KW_STATIC_CAST - | KW_STRUCT | KW_THROW | KW_TRUE | KW_TRY | KW_TYPEDEF | KW_TYPENAME - | KW_UNION | KW_UNSIGNED | KW_VIRTUAL | KW_VOID | KW_VOLATILE - | KW_WHILE - | KW_OPERATOR + | KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC | KW_STATIC_ASSERT + | KW_STATIC_CAST | KW_STRUCT | KW_THROW | KW_TRUE | KW_TRY + | KW_TYPEDEF | KW_TYPENAME | KW_UNION | KW_UNSIGNED | KW_VIRTUAL + | KW_VOID | KW_VOLATILE | KW_WCHAR_T | KW_WHILE { } | '+' | '-' | '*' | '/' | '&' | '|' | '^' | '!' | '~' | '=' | '%' @@ -2314,6 +2343,10 @@ no_angle_bracket_const_expr: | KW_SIZEOF '(' full_type ')' %prec UNARY { $$ = new CPPExpression(CPPExpression::sizeof_func($3)); +} + | KW_ALIGNOF '(' full_type ')' %prec UNARY +{ + $$ = new CPPExpression(CPPExpression::alignof_func($3)); } | '!' no_angle_bracket_const_expr %prec UNARY { @@ -2325,15 +2358,7 @@ no_angle_bracket_const_expr: } | '-' no_angle_bracket_const_expr %prec UNARY { - if ($2->_type == CPPExpression::T_integer) { - $$ = $2; - $$->_u._integer = -$$->_u._integer; - } else if ($2->_type == CPPExpression::T_real) { - $$ = $2; - $$->_u._real = -$$->_u._real; - } else { - $$ = new CPPExpression(UNARY_MINUS, $2); - } + $$ = new CPPExpression(UNARY_MINUS, $2); } | '*' no_angle_bracket_const_expr %prec UNARY { @@ -2544,6 +2569,10 @@ const_expr: | KW_SIZEOF '(' full_type ')' %prec UNARY { $$ = new CPPExpression(CPPExpression::sizeof_func($3)); +} + | KW_ALIGNOF '(' full_type ')' %prec UNARY +{ + $$ = new CPPExpression(CPPExpression::alignof_func($3)); } | KW_NEW predefined_type %prec UNARY { @@ -2563,15 +2592,7 @@ const_expr: } | '-' const_expr %prec UNARY { - if ($2->_type == CPPExpression::T_integer) { - $$ = $2; - $$->_u._integer = -$$->_u._integer; - } else if ($2->_type == CPPExpression::T_real) { - $$ = $2; - $$->_u._real = -$$->_u._real; - } else { - $$ = new CPPExpression(UNARY_MINUS, $2); - } + $$ = new CPPExpression(UNARY_MINUS, $2); } | '*' const_expr %prec UNARY { @@ -2704,13 +2725,21 @@ const_operand: { $$ = new CPPExpression($1); } - | string + | string_literal { - $$ = new CPPExpression($1); + $$ = $1; +} + | CUSTOM_LITERAL +{ + $$ = $1; } | IDENTIFIER { $$ = new CPPExpression($1, current_scope, global_scope, current_lexer); +} + | KW_NULLPTR +{ + $$ = new CPPExpression(CPPExpression::get_nullptr()); } ; @@ -2741,6 +2770,10 @@ formal_const_expr: | KW_SIZEOF '(' full_type ')' %prec UNARY { $$ = new CPPExpression(CPPExpression::sizeof_func($3)); +} + | KW_ALIGNOF '(' full_type ')' %prec UNARY +{ + $$ = new CPPExpression(CPPExpression::alignof_func($3)); } | KW_NEW predefined_type %prec UNARY { @@ -2760,15 +2793,7 @@ formal_const_expr: } | '-' const_expr %prec UNARY { - if ($2->_type == CPPExpression::T_integer) { - $$ = $2; - $$->_u._integer = -$$->_u._integer; - } else if ($2->_type == CPPExpression::T_real) { - $$ = $2; - $$->_u._real = -$$->_u._real; - } else { - $$ = new CPPExpression(UNARY_MINUS, $2); - } + $$ = new CPPExpression(UNARY_MINUS, $2); } | '&' const_expr %prec UNARY { @@ -2897,9 +2922,17 @@ formal_const_operand: { $$ = new CPPExpression($1); } - | string + | string_literal { - $$ = new CPPExpression($1); + $$ = $1; +} + | CUSTOM_LITERAL +{ + $$ = $1; +} + | KW_NULLPTR +{ + $$ = new CPPExpression(CPPExpression::get_nullptr()); } ; @@ -2956,14 +2989,29 @@ name: } ; -string: - STRING +string_literal: + SIMPLE_STRING +{ + $$ = new CPPExpression($1); +} + | STRING_LITERAL { $$ = $1; } - | string STRING + | string_literal SIMPLE_STRING { - $$ = $1 + $2; + // The right string takes on the literal type of the left. + $$ = $1; + $$->_str += $2; +} + | string_literal STRING_LITERAL +{ + // We have to check that the two literal types match up. + $$ = $1; + if ($2->_type != CPPExpression::T_string && $2->_type != $1->_type) { + yywarning("cannot concatenate two string literals of different types", @$); + } + $$->_str += $2->_str; } ; diff --git a/dtool/src/cppparser/cppBisonDefs.h b/dtool/src/cppparser/cppBisonDefs.h index eb5253455d..ae1fc477d7 100644 --- a/dtool/src/cppparser/cppBisonDefs.h +++ b/dtool/src/cppparser/cppBisonDefs.h @@ -68,8 +68,8 @@ class cppyystype { public: string str; union { - int integer; - double real; + unsigned long long integer; + long double real; CPPScope *scope; CPPDeclaration *decl; CPPInstance *instance; diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index 25bb2140f7..fe28c3a044 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -201,6 +201,19 @@ output(ostream &out) const { } } +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression:: +CPPExpression(unsigned long long value) : + CPPDeclaration(CPPFile()) +{ + _type = T_integer; + _u._integer = value; +} + //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public @@ -220,7 +233,7 @@ CPPExpression(int value) : // Description: //////////////////////////////////////////////////////////////////// CPPExpression:: -CPPExpression(double value) : +CPPExpression(long double value) : CPPDeclaration(CPPFile()) { _type = T_real; @@ -397,6 +410,89 @@ sizeof_func(CPPType *type) { return expr; } +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::named alignof_func constructor +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression CPPExpression:: +alignof_func(CPPType *type) { + CPPExpression expr(0); + expr._type = T_alignof; + expr._u._typecast._to = type; + expr._u._typecast._op1 = NULL; + return expr; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::named literal constructor +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression CPPExpression:: +literal(unsigned long long value, CPPInstance *lit_op) { + CPPExpression expr(0); + expr._type = T_literal; + expr._u._literal._value = new CPPExpression(value); + expr._u._literal._operator = lit_op; + return expr; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::named literal constructor +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression CPPExpression:: +literal(long double value, CPPInstance *lit_op) { + CPPExpression expr(0); + expr._type = T_literal; + expr._u._literal._value = new CPPExpression(value); + expr._u._literal._operator = lit_op; + return expr; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::named literal constructor +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression CPPExpression:: +literal(CPPExpression *value, CPPInstance *lit_op) { + CPPExpression expr(0); + expr._type = T_literal; + expr._u._literal._value = value; + expr._u._literal._operator = lit_op; + return expr; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::named raw_literal constructor +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +CPPExpression CPPExpression:: +raw_literal(const string &raw, CPPInstance *lit_op) { + CPPExpression expr(0); + expr._type = T_raw_literal; + expr._str = raw; + expr._u._literal._value = (CPPExpression *)NULL; + expr._u._literal._operator = lit_op; + return expr; +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPExpression::get_nullptr +// Access: Public, Static +// Description: +//////////////////////////////////////////////////////////////////// +const CPPExpression &CPPExpression:: +get_nullptr() { + static CPPExpression expr(0); + expr._type = T_nullptr; + return expr; +} + //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Destructor // Access: Public @@ -416,13 +512,20 @@ evaluate() const { Result r1, r2; switch (_type) { + case T_nullptr: + return Result((void *)0); + case T_integer: - return Result(_u._integer); + return Result((int)_u._integer); case T_real: - return Result(_u._real); + return Result((double)_u._real); case T_string: + case T_wstring: + case T_u8string: + case T_u16string: + case T_u32string: return Result(); case T_variable: @@ -468,6 +571,17 @@ evaluate() const { case T_sizeof: return Result(); + case T_alignof: + if (_u._typecast._to != NULL) { + // Check if the type is defined with an alignas. TODO: this should + // probably be moved to a virtual getter on CPPType. + CPPExtensionType *etype = _u._typecast._to->as_extension_type(); + if (etype != NULL && etype->_alignment != NULL) { + return etype->_alignment->evaluate(); + } + } + return Result(); + case T_binary_operation: assert(_u._op._op2 != NULL); r2 = _u._op._op2->evaluate(); @@ -652,6 +766,10 @@ evaluate() const { abort(); } + case T_literal: + case T_raw_literal: + return Result(); + default: cerr << "**invalid operand**\n"; abort(); @@ -671,25 +789,51 @@ determine_type() const { CPPType *t1 = (CPPType *)NULL; CPPType *t2 = (CPPType *)NULL; - CPPType *int_type = + static CPPType *nullptr_type = + CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_nullptr)); + + static CPPType *int_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); - CPPType *bool_type = + static CPPType *unsigned_long_type = + CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, + CPPSimpleType::F_unsigned | + CPPSimpleType::F_long)); + + static CPPType *bool_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); - CPPType *float_type = + static CPPType *float_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); - CPPType *char_type = + static CPPType *char_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); - CPPType *const_char_type = - CPPType::new_type(new CPPConstType(char_type)); + static CPPType *wchar_type = + CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); - CPPType *char_star_type = - CPPType::new_type(new CPPPointerType(const_char_type)); + static CPPType *char16_type = + CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); + + static CPPType *char32_type = + CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); + + static CPPType *char_str_type = CPPType::new_type( + new CPPPointerType(CPPType::new_type(new CPPConstType(char_type)))); + + static CPPType *wchar_str_type = CPPType::new_type( + new CPPPointerType(CPPType::new_type(new CPPConstType(wchar_type)))); + + static CPPType *char16_str_type = CPPType::new_type( + new CPPPointerType(CPPType::new_type(new CPPConstType(char16_type)))); + + static CPPType *char32_str_type = CPPType::new_type( + new CPPPointerType(CPPType::new_type(new CPPConstType(char32_type)))); switch (_type) { + case T_nullptr: + return nullptr_type; + case T_integer: return int_type; @@ -697,7 +841,19 @@ determine_type() const { return float_type; case T_string: - return char_star_type; + return char_str_type; + + case T_wstring: + return wchar_str_type; + + case T_u8string: + return char_str_type; + + case T_u16string: + return char16_str_type; + + case T_u32string: + return char32_str_type; case T_variable: return _u._variable->_type; @@ -725,7 +881,11 @@ determine_type() const { return CPPType::new_type(new CPPPointerType(_u._typecast._to)); case T_sizeof: - return int_type; + case T_alignof: + // Note: this should actually be size_t, but that is defined as a + // typedef in parser-inc. We could try to resolve it, but that's + // hacky. Eh, it's probably not worth the effort to get this right. + return unsigned_long_type; case T_binary_operation: case T_trinary_operation: @@ -819,6 +979,18 @@ determine_type() const { abort(); } + case T_literal: + case T_raw_literal: + if (_u._literal._operator != NULL) { + CPPType *type = _u._literal._operator->_type; + + CPPFunctionType *ftype = type->as_function_type(); + if (ftype != (CPPFunctionType *)NULL) { + return ftype->_return_type; + } + } + return NULL; + default: cerr << "**invalid operand**\n"; abort(); @@ -842,9 +1014,14 @@ is_fully_specified() const { } switch (_type) { + case T_nullptr: case T_integer: case T_real: case T_string: + case T_wstring: + case T_u8string: + case T_u16string: + case T_u32string: return false; case T_variable: @@ -865,6 +1042,7 @@ is_fully_specified() const { case T_default_construct: case T_default_new: case T_sizeof: + case T_alignof: return _u._typecast._to->is_fully_specified(); case T_trinary_operation: @@ -882,6 +1060,13 @@ is_fully_specified() const { case T_unary_operation: return _u._op._op1->is_fully_specified(); + case T_literal: + return _u._literal._value->is_fully_specified() && + _u._literal._operator->is_fully_specified(); + + case T_raw_literal: + return _u._literal._value->is_fully_specified(); + default: return true; } @@ -972,6 +1157,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, case T_default_construct: case T_default_new: case T_sizeof: + case T_alignof: rep->_u._typecast._to = _u._typecast._to->substitute_decl(subst, current_scope, global_scope) ->as_type(); @@ -1042,6 +1228,7 @@ is_tbd() const { case T_default_construct: case T_default_new: case T_sizeof: + case T_alignof: return _u._typecast._to->is_tbd(); case T_trinary_operation: @@ -1075,6 +1262,10 @@ is_tbd() const { void CPPExpression:: output(ostream &out, int indent_level, CPPScope *scope, bool) const { switch (_type) { + case T_nullptr: + out << "nullptr"; + break; + case T_integer: out << _u._integer; break; @@ -1090,8 +1281,29 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { break; case T_string: - out << '"'; + case T_wstring: + case T_u8string: + case T_u16string: + case T_u32string: { + switch (_type) { + case T_wstring: + out << 'L'; + break; + case T_u8string: + out << "u8"; + break; + case T_u16string: + out << "u"; + break; + case T_u32string: + out << "U"; + break; + default: + break; + } + // We don't really care about preserving the encoding for now. + out << '"'; string::const_iterator si; for (si = _str.begin(); si != _str.end(); ++si) { switch (*si) { @@ -1193,6 +1405,12 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { out << ")"; break; + case T_alignof: + out << "alignof("; + _u._typecast._to->output(out, indent_level, scope, false); + out << ")"; + break; + case T_unary_operation: switch (_u._op._operator) { case UNARY_NOT: @@ -1208,9 +1426,8 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { break; case UNARY_MINUS: - out << "(- "; + out << '-'; _u._op._op1->output(out, indent_level, scope, false); - out << ")"; break; case UNARY_STAR: @@ -1362,6 +1579,24 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { out << ")"; break; + case T_literal: + _u._literal._value->output(out, indent_level, scope, false); + if (_u._literal._operator != NULL) { + string name = _u._literal._operator->get_simple_name(); + assert(name.substr(0, 12) == "operator \"\" "); + out << name.substr(12); + } + break; + + case T_raw_literal: + out << _str; + if (_u._literal._operator != NULL) { + string name = _u._literal._operator->get_simple_name(); + assert(name.substr(0, 12) == "operator \"\" "); + out << name.substr(12); + } + break; + default: out << "(** invalid operand type " << (int)_type << " **)"; } @@ -1456,6 +1691,9 @@ is_equal(const CPPDeclaration *other) const { } switch (_type) { + case T_nullptr: + return true; + case T_integer: return _u._integer == ot->_u._integer; @@ -1463,6 +1701,10 @@ is_equal(const CPPDeclaration *other) const { return _u._real == ot->_u._real; case T_string: + case T_wstring: + case T_u8string: + case T_u16string: + case T_u32string: return _str == ot->_str; case T_variable: @@ -1483,6 +1725,7 @@ is_equal(const CPPDeclaration *other) const { case T_default_construct: case T_default_new: case T_sizeof: + case T_alignof: return _u._typecast._to == ot->_u._typecast._to; case T_unary_operation: @@ -1496,6 +1739,14 @@ is_equal(const CPPDeclaration *other) const { return *_u._op._op1 == *ot->_u._op._op1 && *_u._op._op2 == *ot->_u._op._op2; + case T_literal: + return *_u._literal._value == *ot->_u._literal._value && + _u._literal._operator == ot->_u._literal._operator; + + case T_raw_literal: + return _str == ot->_str && + _u._literal._operator == ot->_u._literal._operator; + default: cerr << "(** invalid operand type " << (int)_type << " **)"; } @@ -1520,6 +1771,9 @@ is_less(const CPPDeclaration *other) const { } switch (_type) { + case T_nullptr: + return false; + case T_integer: return _u._integer < ot->_u._integer; @@ -1527,6 +1781,10 @@ is_less(const CPPDeclaration *other) const { return _u._real < ot->_u._real; case T_string: + case T_wstring: + case T_u8string: + case T_u16string: + case T_u32string: return _str < ot->_str; case T_variable: @@ -1549,6 +1807,7 @@ is_less(const CPPDeclaration *other) const { case T_default_construct: case T_default_new: case T_sizeof: + case T_alignof: return _u._typecast._to < ot->_u._typecast._to; case T_trinary_operation: @@ -1566,6 +1825,18 @@ is_less(const CPPDeclaration *other) const { case T_unary_operation: return *_u._op._op1 < *ot->_u._op._op1; + case T_literal: + if (_u._literal._operator != ot->_u._literal._operator) { + return _u._literal._operator < ot->_u._literal._operator; + } + return *_u._literal._value < *ot->_u._literal._value; + + case T_raw_literal: + if (_u._literal._operator != ot->_u._literal._operator) { + return _u._literal._operator < ot->_u._literal._operator; + } + return _str < ot->_str; + default: cerr << "(** invalid operand type " << (int)_type << " **)"; } diff --git a/dtool/src/cppparser/cppExpression.h b/dtool/src/cppparser/cppExpression.h index cd535b7320..44e72baf5c 100644 --- a/dtool/src/cppparser/cppExpression.h +++ b/dtool/src/cppparser/cppExpression.h @@ -30,9 +30,10 @@ class CPPFunctionGroup; //////////////////////////////////////////////////////////////////// class CPPExpression : public CPPDeclaration { public: + CPPExpression(unsigned long long value); CPPExpression(int value); CPPExpression(const string &value); - CPPExpression(double value); + CPPExpression(long double value); CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = NULL); CPPExpression(int unary_operator, CPPExpression *op1); @@ -43,6 +44,14 @@ public: static CPPExpression construct_op(CPPType *type, CPPExpression *op1); static CPPExpression new_op(CPPType *type, CPPExpression *op1 = NULL); static CPPExpression sizeof_func(CPPType *type); + static CPPExpression alignof_func(CPPType *type); + + static CPPExpression literal(unsigned long long value, CPPInstance *lit_op); + static CPPExpression literal(long double value, CPPInstance *lit_op); + static CPPExpression literal(CPPExpression *value, CPPInstance *lit_op); + static CPPExpression raw_literal(const string &raw, CPPInstance *lit_op); + + static const CPPExpression &get_nullptr(); ~CPPExpression(); @@ -92,9 +101,14 @@ public: enum Type { + T_nullptr, T_integer, T_real, T_string, + T_wstring, + T_u8string, + T_u16string, + T_u32string, T_variable, T_function, T_unknown_ident, @@ -104,16 +118,19 @@ public: T_new, T_default_new, T_sizeof, + T_alignof, T_unary_operation, T_binary_operation, T_trinary_operation, + T_literal, + T_raw_literal, }; Type _type; string _str; union { - int _integer; - double _real; + unsigned long long _integer; + long double _real; CPPInstance *_variable; CPPFunctionGroup *_fgroup; CPPIdentifier *_ident; @@ -131,6 +148,11 @@ public: CPPExpression *_op2; CPPExpression *_op3; } _op; + class { + public: + CPPInstance *_operator; + CPPExpression *_value; + } _literal; } _u; protected: @@ -146,5 +168,3 @@ operator << (ostream &out, const CPPExpression::Result &result) { } #endif - - diff --git a/dtool/src/cppparser/cppExtensionType.cxx b/dtool/src/cppparser/cppExtensionType.cxx index 3056b8b6d4..6060bb4b0d 100644 --- a/dtool/src/cppparser/cppExtensionType.cxx +++ b/dtool/src/cppparser/cppExtensionType.cxx @@ -29,7 +29,8 @@ CPPExtensionType(CPPExtensionType::Type type, CPPIdentifier *ident, CPPScope *current_scope, const CPPFile &file) : CPPType(file), - _type(type), _ident(ident) + _type(type), _ident(ident), + _alignment(NULL) { if (_ident != NULL) { _ident->_native_scope = current_scope; diff --git a/dtool/src/cppparser/cppExtensionType.h b/dtool/src/cppparser/cppExtensionType.h index d4201dc4e2..f70a4e99a5 100644 --- a/dtool/src/cppparser/cppExtensionType.h +++ b/dtool/src/cppparser/cppExtensionType.h @@ -65,9 +65,9 @@ public: virtual CPPExtensionType *as_extension_type(); - Type _type; CPPIdentifier *_ident; + CPPExpression *_alignment; }; ostream &operator << (ostream &out, CPPExtensionType::Type type); diff --git a/dtool/src/cppparser/cppInstance.cxx b/dtool/src/cppparser/cppInstance.cxx index 32790e0cde..7e969dfad2 100644 --- a/dtool/src/cppparser/cppInstance.cxx +++ b/dtool/src/cppparser/cppInstance.cxx @@ -38,7 +38,8 @@ CPPInstance(CPPType *type, const string &name, int storage_class) : CPPDeclaration(CPPFile()), _type(type), _ident(new CPPIdentifier(name)), - _storage_class(storage_class) + _storage_class(storage_class), + _alignment(NULL) { _initializer = NULL; } @@ -53,7 +54,8 @@ CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class) : CPPDeclaration(CPPFile()), _type(type), _ident(ident), - _storage_class(storage_class) + _storage_class(storage_class), + _alignment(NULL) { _initializer = NULL; } @@ -69,7 +71,8 @@ CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class) : CPPInstance:: CPPInstance(CPPType *type, CPPInstanceIdentifier *ii, int storage_class, const CPPFile &file) : - CPPDeclaration(file) + CPPDeclaration(file), + _alignment(NULL) { _type = ii->unroll_type(type); _ident = ii->_ident; @@ -102,7 +105,8 @@ CPPInstance(const CPPInstance ©) : _type(copy._type), _ident(copy._ident), _initializer(copy._initializer), - _storage_class(copy._storage_class) + _storage_class(copy._storage_class), + _alignment(copy._alignment) { assert(_type != NULL); } @@ -153,6 +157,9 @@ operator == (const CPPInstance &other) const { if (_storage_class != other._storage_class) { return false; } + if (_alignment != other._alignment) { + return false; + } // We *do* care about the identifier. We need to differentiate // types of function variables, among possibly other things, based @@ -199,6 +206,9 @@ operator < (const CPPInstance &other) const { if (_storage_class != other._storage_class) { return _storage_class < other._storage_class; } + if (_alignment != other._alignment) { + return _alignment < other._alignment; + } // We *do* care about the identifier. We need to differentiate // types of function variables, among possibly other things, based @@ -252,6 +262,29 @@ set_initializer(CPPExpression *initializer) { } } +//////////////////////////////////////////////////////////////////// +// Function: CPPInstance::set_alignment +// Access: Public +// Description: Sets the number of bytes to align this instance to. +//////////////////////////////////////////////////////////////////// +void CPPInstance:: +set_alignment(int align) { + _alignment = new CPPExpression(align); +} + +//////////////////////////////////////////////////////////////////// +// Function: CPPInstance::set_alignment +// Access: Public +// Description: Sets the expression that is used to determine the +// required alignment for the variable. This should +// be a constant expression, but we don't presently +// verify that it is. +//////////////////////////////////////////////////////////////////// +void CPPInstance:: +set_alignment(CPPExpression *const_expr) { + _alignment = const_expr; +} + //////////////////////////////////////////////////////////////////// // Function: CPPInstance::is_scoped // Access: Public @@ -536,6 +569,11 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete, get_template_scope()->_parameters.write_formal(out, scope); indent(out, indent_level); } + + if (_alignment != NULL) { + out << "alignas(" << *_alignment << ") "; + } + if (_storage_class & SC_static) { out << "static "; } diff --git a/dtool/src/cppparser/cppInstance.h b/dtool/src/cppparser/cppInstance.h index 9a8144fdd2..bf5843196f 100644 --- a/dtool/src/cppparser/cppInstance.h +++ b/dtool/src/cppparser/cppInstance.h @@ -77,6 +77,8 @@ public: bool operator < (const CPPInstance &other) const; void set_initializer(CPPExpression *initializer); + void set_alignment(int align); + void set_alignment(CPPExpression *const_expr); bool is_scoped() const; CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope, @@ -111,6 +113,7 @@ public: CPPExpression *_initializer; int _storage_class; + CPPExpression *_alignment; private: typedef map Instantiations; diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 4a52bde6ec..e09c7bfeec 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -26,6 +26,7 @@ #include "cppBison.h" #include "indent.h" #include "pstrtod.h" +#include "string_utils.h" #include #include @@ -404,6 +405,7 @@ get_next_token0() { // keyword. We make a special case for this, because it's // occasionally scoped in normal use. token._lval = result; + _last_token_loc = token._lloc; return token; } _saved_tokens.push_back(token); @@ -1803,9 +1805,7 @@ get_quoted_char(int c) { result.u.integer = 0; } - loc.last_line = get_line_number(); - loc.last_column = get_col_number(); - return CPPToken(CHAR_TOK, loc, str, result); + return get_literal(CHAR_TOK, loc, str, result); } //////////////////////////////////////////////////////////////////// @@ -1822,9 +1822,7 @@ get_quoted_string(int c) { string str = scan_quoted(c); - loc.last_line = get_line_number(); - loc.last_column = get_col_number(); - return CPPToken(STRING, loc, str); + return get_literal(SIMPLE_STRING, loc, str); } //////////////////////////////////////////////////////////////////// @@ -1848,25 +1846,51 @@ get_identifier(int c) { name += get(); c = peek(); } - if (c == '\'' || c == '"') { - // This is actually a wide-character or wide-string literal or - // some such: a string with an alphanumeric prefix. We don't - // necessarily try to parse it correctly; for most purposes, we - // don't care. - get(); - CPPToken token(0); - if (c == '\'') { - token = get_quoted_char(c); - } else { - token = get_quoted_string(c); - } - token._lloc.first_column = loc.first_column; - return token; - } loc.last_line = get_line_number(); loc.last_column = get_col_number(); + if ((c == '\'' || c == '"') && name != "operator") { + // This is actually a wide-character or wide-string literal or + // some such. Figure out the correct character type to use. + // We had to add in an exception in order to support operator"". + + CPPExpression::Type type; + if (name == "L") { + type = CPPExpression::T_wstring; + } else if (name == "u8") { + type = CPPExpression::T_u8string; + } else if (name == "u") { + type = CPPExpression::T_u16string; + } else if (name == "U") { + type = CPPExpression::T_u32string; + } else { + type = CPPExpression::T_string; + warning("unrecognized literal prefix " + name, loc); + } + + get(); + string str = scan_quoted(c); + + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + + YYSTYPE result; + if (c == '\'') { + // We don't really care about the type for now. + if (!str.empty()) { + result.u.integer = (int)str[0]; + } else { + result.u.integer = 0; + } + return get_literal(CHAR_TOK, loc, str, result); + } else { + result.u.expr = new CPPExpression(str); + result.u.expr->_type = type; + return get_literal(STRING_LITERAL, loc, str, result); + } + } + _last_c = 0; // Is it a manifest? @@ -1898,6 +1922,171 @@ get_identifier(int c) { return CPPToken(SIMPLE_IDENTIFIER, loc, name); } +//////////////////////////////////////////////////////////////////// +// Function: CPPPreprocessor::get_literal +// Access: Private +// Description: Under the assumption that we've just parsed a +// string or real constant, parse a following custom +// literal, and returns a token for it. +//////////////////////////////////////////////////////////////////// +CPPToken CPPPreprocessor:: +get_literal(int token, YYLTYPE loc, const string &str, const YYSTYPE &value) { + string suffix; + + int c = peek(); + if (isalpha(c) || c == '_') { + // A literal seems to be following directly. + while (c != EOF && (isalnum(c) || c == '_')) { + suffix += get(); + c = peek(); + } + } + loc.last_line = get_line_number(); + loc.last_column = get_col_number(); + + if (suffix.empty()) { + // There is no suffix. + return CPPToken(token, loc, str, value); + } + + // Handle built-in literal suffixes. + if (token == INTEGER) { + if (cmp_nocase(suffix, "u") == 0 || + cmp_nocase(suffix, "l") == 0 || + cmp_nocase(suffix, "ul") == 0 || cmp_nocase(suffix, "lu") == 0 || + cmp_nocase(suffix, "ll") == 0 || + cmp_nocase(suffix, "ull") == 0 || cmp_nocase(suffix, "llu") == 0) { + // These are built-in integer suffixes. Right now, we don't try to + // distinguish between them. + return CPPToken(INTEGER, loc, str, value); + } + } else if (token == REAL) { + if (suffix == "f" || suffix == "F" || + suffix == "l" || suffix == "L") { + return CPPToken(REAL, loc, str, value); + } + } + + // Find the literal operator for this literal. + CPPIdentifier *ident = new CPPIdentifier("operator \"\" " + suffix); + CPPDeclaration *decl = ident->find_symbol(current_scope, global_scope, this); + + if (decl == NULL || decl->get_subtype() != CPPDeclaration::ST_function_group) { + error("unknown literal suffix " + suffix, loc); + return CPPToken(token, loc, str, value); + } + + // Find the overload with the appropriate signature. + CPPExpression *expr = NULL; + CPPInstance *instance = NULL; + CPPInstance *raw_instance = NULL; + CPPFunctionGroup *fgroup = decl->as_function_group(); + CPPFunctionGroup::Instances::iterator it; + for (it = fgroup->_instances.begin(); it != fgroup->_instances.end(); ++it) { + if ((*it)->_type == NULL) { + continue; + } + + CPPFunctionType *ftype = (*it)->_type->as_function_type(); + if (ftype == NULL || ftype->_parameters == NULL) { + continue; + } + + CPPParameterList::Parameters ¶ms = ftype->_parameters->_parameters; + if (token == STRING_LITERAL || token == SIMPLE_STRING) { + // A custom string literal must take a second size_t argument. + if (params.size() != 2) continue; + } else { + if (params.size() != 1) continue; + } + + CPPInstance *param = params[0]; + if (param == NULL || param->_type == NULL) { + continue; + } + + CPPType *type = param->_type; + while (type->get_subtype() == CPPDeclaration::ST_const) { + type = type->as_const_type()->_wrapped_around; + } + if (type->get_subtype() == CPPDeclaration::ST_simple) { + // It's a primitive type. Check that it matches the appropriate token. + CPPSimpleType::Type simple = type->as_simple_type()->_type; + + if (token == INTEGER && simple == CPPSimpleType::T_int) { + expr = new CPPExpression(value.u.integer); + instance = (*it); + break; + } else if (token == REAL && simple == CPPSimpleType::T_double) { + expr = new CPPExpression(value.u.real); + instance = (*it); + break; + } else if (token == CHAR_TOK && (simple == CPPSimpleType::T_char || + simple == CPPSimpleType::T_wchar_t || + simple == CPPSimpleType::T_char16_t || + simple == CPPSimpleType::T_char32_t)) { + // We currently don't have the means to check the exact character type. + expr = new CPPExpression(value.u.integer); + instance = (*it); + break; + } + + } else if (type->get_subtype() == CPPDeclaration::ST_pointer) { + // Must be a const pointer. Unwrap it. + type = type->as_pointer_type()->_pointing_at; + if (type == NULL || type->get_subtype() != CPPDeclaration::ST_const) { + continue; + } + type = type->as_const_type()->_wrapped_around; + if (type == NULL || type->get_subtype() != CPPDeclaration::ST_simple) { + continue; + } + + CPPSimpleType::Type simple = type->as_simple_type()->_type; + if (simple == CPPSimpleType::T_char && params.size() == 1) { + // This is the raw literal operator. Store it, but don't break; + // a non-raw version of the operator might follow, which we'd prefer. + raw_instance = (*it); + + } else if (token == SIMPLE_STRING && simple == CPPSimpleType::T_char) { + expr = new CPPExpression(str); + instance = (*it); + break; + + } else if (token == STRING_LITERAL) { + // Verify that the character type of the string literal matches + // the character type of the parameter. + CPPExpression::Type str_type = value.u.expr->_type; + if ((str_type == CPPExpression::T_string && simple == CPPSimpleType::T_char) || + (str_type == CPPExpression::T_wstring && simple == CPPSimpleType::T_wchar_t) || + (str_type == CPPExpression::T_u8string && simple == CPPSimpleType::T_char) || + (str_type == CPPExpression::T_u16string && simple == CPPSimpleType::T_char16_t) || + (str_type == CPPExpression::T_u32string && simple == CPPSimpleType::T_char32_t)) { + expr = value.u.expr; + instance = (*it); + break; + } + } + } + } + + YYSTYPE result; + if (instance != NULL) { + result.u.expr = new CPPExpression(CPPExpression::literal(expr, instance)); + return CPPToken(CUSTOM_LITERAL, loc, str, result); + } + + if ((token == REAL || token == INTEGER) && raw_instance != NULL) { + // For numeric constants, we can fall back to a raw literal operator. + result.u.expr = new CPPExpression(CPPExpression::raw_literal(str, instance)); + return CPPToken(CUSTOM_LITERAL, loc, str, result); + } + + error(fgroup->_name + " has no suitable overload for literal of this type", loc); + result.u.expr = NULL; + return CPPToken(CUSTOM_LITERAL, loc, str, result); +} + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::expand_manifest // Access: Private @@ -2196,20 +2385,13 @@ get_number(int c) { c = peek(); } - while (c == 'L' || c == 'U' || c == 'l' || c == 'u') { - // We allow (and ignore) an 'L' and/or 'U' following the number. - get(); - c = peek(); - } - loc.last_line = get_line_number(); loc.last_column = get_col_number(); - _last_c = 0; - YYSTYPE result; result.u.integer = strtol(num.c_str(), (char **)NULL, 16); - return CPPToken(INTEGER, loc, num, result); + + return get_literal(INTEGER, loc, num, result); } while (c != EOF && isdigit(c)) { @@ -2229,7 +2411,7 @@ get_number(int c) { } } - if (decimal_point) { + if (decimal_point || c == 'e' || c == 'E') { if (tolower(c) == 'e') { // An exponent is allowed. num += get(); @@ -2244,28 +2426,17 @@ get_number(int c) { } } - if (c == 'f') { - // We allow (and ignore) an 'f' following the number. - get(); - c = peek(); - } - loc.last_line = get_line_number(); loc.last_column = get_col_number(); YYSTYPE result; result.u.real = pstrtod(num.c_str(), (char **)NULL); - return CPPToken(REAL, loc, num, result); + + return get_literal(REAL, loc, num, result); } // This is a decimal or octal integer number. - while (c == 'L' || c == 'U') { - // We allow (and ignore) an 'L' and/or 'U' following the number. - get(); - c = peek(); - } - loc.last_line = get_line_number(); loc.last_column = get_col_number(); @@ -2282,7 +2453,7 @@ get_number(int c) { result.u.integer = strtol(num.c_str(), (char **)NULL, 10); } - return CPPToken(INTEGER, loc, num, result); + return get_literal(INTEGER, loc, num, result); } //////////////////////////////////////////////////////////////////// @@ -2292,6 +2463,11 @@ get_number(int c) { //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: check_keyword(const string &name) { + if (name == "alignas") return KW_ALIGNAS; + if (name == "alignof") return KW_ALIGNOF; + if (name == "__alignof") return KW_ALIGNOF; + if (name == "__alignof__") return KW_ALIGNOF; + if (name == "auto") return KW_AUTO; if (name == "__begin_publish") return KW_BEGIN_PUBLISH; if (name == "__blocking") return KW_BLOCKING; if (name == "bool") return KW_BOOL; @@ -2303,6 +2479,9 @@ check_keyword(const string &name) { if (name == "const") return KW_CONST; if (name == "__const") return KW_CONST; if (name == "__const__") return KW_CONST; + if (name == "constexpr") return KW_CONSTEXPR; + if (name == "decltype") return KW_DECLTYPE; + if (name == "default") return KW_DEFAULT; if (name == "delete") return KW_DELETE; if (name == "double") return KW_DOUBLE; if (name == "dynamic_cast") return KW_DYNAMIC_CAST; @@ -2329,6 +2508,7 @@ check_keyword(const string &name) { if (name == "mutable") return KW_MUTABLE; if (name == "namespace") return KW_NAMESPACE; if (name == "noexcept") return KW_NOEXCEPT; + if (name == "nullptr") return KW_NULLPTR; if (name == "new") return KW_NEW; if (name == "operator") return KW_OPERATOR; if (name == "private") return KW_PRIVATE; diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 4d8e025682..6e9ef54f7d 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -142,6 +142,8 @@ private: CPPToken get_quoted_char(int c); CPPToken get_quoted_string(int c); CPPToken get_identifier(int c); + CPPToken get_literal(int token, YYLTYPE loc, const string &str, + const YYSTYPE &result = YYSTYPE()); CPPToken expand_manifest(const CPPManifest *manifest); void extract_manifest_args(const string &name, int num_args, int va_arg, vector_string &args); diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index e365c3e6d6..3a514a4648 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -313,7 +313,7 @@ add_using(CPPUsing *using_decl, CPPScope *global_scope, _using.insert(scope); } else { if (error_sink != NULL) { - error_sink->warning("Attempt to use undefined namespace: " + using_decl->_ident->get_fully_scoped_name()); + error_sink->warning("Attempt to use undefined namespace: " + using_decl->_ident->get_fully_scoped_name(), using_decl->_ident->_loc); } } } else { @@ -322,7 +322,7 @@ add_using(CPPUsing *using_decl, CPPScope *global_scope, handle_declaration(decl, global_scope, error_sink); } else { if (error_sink != NULL) { - error_sink->warning("Attempt to use unknown symbol: " + using_decl->_ident->get_fully_scoped_name()); + error_sink->warning("Attempt to use unknown symbol: " + using_decl->_ident->get_fully_scoped_name(), using_decl->_ident->_loc); } } } diff --git a/dtool/src/cppparser/cppSimpleType.cxx b/dtool/src/cppparser/cppSimpleType.cxx index ac4e633d6d..d104c98881 100644 --- a/dtool/src/cppparser/cppSimpleType.cxx +++ b/dtool/src/cppparser/cppSimpleType.cxx @@ -150,6 +150,10 @@ output(ostream &out, int, CPPScope *, bool) const { out << "void"; break; + case T_nullptr: + out << "decltype(nullptr)"; + break; + case T_parameter: out << "parameter"; break; diff --git a/dtool/src/cppparser/cppSimpleType.h b/dtool/src/cppparser/cppSimpleType.h index 27a1b89206..eceb8afe26 100644 --- a/dtool/src/cppparser/cppSimpleType.h +++ b/dtool/src/cppparser/cppSimpleType.h @@ -37,6 +37,11 @@ public: T_double, T_void, + // We need something to represent the type of nullptr so that we + // can return it from decltype(nullptr). Note that this is not + // the same as nullptr_t, which is a typedef of decltype(nullptr). + T_nullptr, + // T_parameter is a special type which is assigned to expressions // that are discovered where a formal parameter was expected. // This is a special case for handling cases like this: diff --git a/dtool/src/cppparser/cppToken.cxx b/dtool/src/cppparser/cppToken.cxx index cfaf4057ed..56b215ad22 100644 --- a/dtool/src/cppparser/cppToken.cxx +++ b/dtool/src/cppparser/cppToken.cxx @@ -119,8 +119,12 @@ output(ostream &out) const { out << "CHAR_TOK " << _lval.u.integer << " = " << _lval.str; break; - case STRING: - out << "STRING " << _lval.str; + case SIMPLE_STRING: + out << "SIMPLE_STRING " << _lval.str; + break; + + case STRING_LITERAL: + out << "STRING_LITERAL " << *_lval.u.expr; break; case SIMPLE_IDENTIFIER: diff --git a/dtool/src/parser-inc/stddef.h b/dtool/src/parser-inc/stddef.h index fe0fec599d..a1b0f59c31 100644 --- a/dtool/src/parser-inc/stddef.h +++ b/dtool/src/parser-inc/stddef.h @@ -22,5 +22,9 @@ #include +#define offsetof(type,member) ((size_t) &(((type*)0)->member)) + +typedef decltype(nullptr) nullptr_t; + #endif diff --git a/dtool/src/parser-inc/string b/dtool/src/parser-inc/string index 0ec8e184ba..52098c3f51 100644 --- a/dtool/src/parser-inc/string +++ b/dtool/src/parser-inc/string @@ -44,5 +44,26 @@ public: typedef basic_string string; typedef basic_string wstring; +typedef basic_string u16string; +typedef basic_string u32string; + +namespace std { + template struct hash; + template<> struct hash; + template<> struct hash; + template<> struct hash; + template<> struct hash; + + namespace string_literals { + string operator "" s(const char *str, size_t len); + wstring operator "" s(const wchar_t *str, size_t len); + u16string operator "" s(const char16_t *str, size_t len); + u32string operator "" s(const char32_t *str, size_t len); + } + + namespace literals { + using namespace string_literals; + } +} #endif From 6a0c98d54e748117417a2b607f99378f47544787 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 13 Oct 2015 15:15:03 +0200 Subject: [PATCH 165/200] Work around strange interrogate issues --- dtool/src/cppparser/cppExpression.cxx | 26 ++++++++++++++++++++----- dtool/src/cppparser/cppPreprocessor.cxx | 15 ++++++++------ dtool/src/cppparser/cppScope.cxx | 4 ---- dtool/src/dtoolutil/filename.I | 10 ++++++++++ dtool/src/dtoolutil/filename.h | 3 ++- dtool/src/parser-inc/string | 2 +- 6 files changed, 43 insertions(+), 17 deletions(-) diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index fe28c3a044..430f9388d8 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -617,23 +617,39 @@ evaluate() const { // long as we can evaluate the second one *and* that comes out // to be true. if (_u._op._operator == OROR && r2._type == RT_integer && - r2.as_integer() != 0) { + r2.as_boolean()) { return r2; } // Ditto for the operator being && and the second one coming out // false. if (_u._op._operator == ANDAND && r2._type == RT_integer && - r2.as_integer() == 0) { + !r2.as_boolean()) { return r2; } + // Also for the operator being [] and the operand being a string. + if (_u._op._operator == '[' && r2._type == RT_integer && + (_u._op._op1->_type == T_string || + _u._op._op1->_type == T_u8string)) { + + int index = r2.as_integer(); + if (index == _u._op._op1->_str.size()) { + return Result(0); + } else if (index >= 0 && index < _u._op._op1->_str.size()) { + return Result(_u._op._op1->_str[index]); + } else { + cerr << "array index " << index << " out of bounds of string literal " + << *_u._op._op1 << "\n"; + } + } + return r1; } switch (_u._op._operator) { case UNARY_NOT: - return Result(!r1.as_integer()); + return Result(!r1.as_boolean()); case UNARY_NEGATE: return Result(~r1.as_integer()); @@ -683,14 +699,14 @@ evaluate() const { return Result(r1.as_integer() & r2.as_integer()); case OROR: - if (r1.as_integer()) { + if (r1.as_boolean()) { return r1; } else { return r2; } case ANDAND: - if (r1.as_integer()) { + if (r1.as_boolean()) { return r2; } else { return r1; diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index e09c7bfeec..4def9695ae 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -904,7 +904,7 @@ expand_manifests(const string &input_expr, bool expand_undefined) { CPPExpression *CPPPreprocessor:: parse_expr(const string &input_expr, CPPScope *current_scope, CPPScope *global_scope) { - string expr = expand_manifests(input_expr, true); + string expr = expand_manifests(input_expr, false); CPPExpressionParser ep(current_scope, global_scope); ep._verbose = 0; @@ -1552,15 +1552,18 @@ handle_ifndef_directive(const string &args, const YYLTYPE &loc) { //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: handle_if_directive(const string &args, const YYLTYPE &loc) { - CPPExpression *expr = parse_expr(args, global_scope, global_scope); + // When expanding manifests, we should replace unknown macros + // with 0. + string expr = expand_manifests(args, true); int expression_result = 0; - - if (expr != (CPPExpression *)NULL) { - CPPExpression::Result result = expr->evaluate(); + CPPExpressionParser ep(current_scope, global_scope); + ep._verbose = 0; + if (ep.parse_expr(expr, *this)) { + CPPExpression::Result result = ep._expr->evaluate(); if (result._type == CPPExpression::RT_error) { ostringstream strm; - strm << *expr; + strm << *ep._expr; warning("Ignoring invalid expression " + strm.str(), loc); } else { expression_result = result.as_integer(); diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index 3a514a4648..3e346394cb 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -1059,10 +1059,6 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, (*vi).second->substitute_decl(subst, to_scope, global_scope)->as_instance(); to_scope->_variables.insert(Variables::value_type((*vi).first, inst)); if (inst != (*vi).second) { - // I don't know if this _native_scope assignment is right, but it - // fixes some issues with variables in instantiated template scopes - // being printed out with an uninstantiated template scope prefix. ~rdb - inst->_ident->_native_scope = to_scope; anything_changed = true; } } diff --git a/dtool/src/dtoolutil/filename.I b/dtool/src/dtoolutil/filename.I index f8fa8fff4e..130eaf2973 100644 --- a/dtool/src/dtoolutil/filename.I +++ b/dtool/src/dtoolutil/filename.I @@ -337,6 +337,16 @@ operator [] (size_t n) const { return _filename[n]; } +//////////////////////////////////////////////////////////////////// +// Function: Filename::substr +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE string Filename:: +substr(size_t begin) const { + return _filename.substr(begin); +} + //////////////////////////////////////////////////////////////////// // Function: Filename::substr // Access: Published diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index 127e9dcbcc..2058d3f45c 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -125,7 +125,8 @@ PUBLISHED: EXTENSION(PyObject *__repr__() const); - INLINE string substr(size_t begin, size_t end = string::npos) const; + INLINE string substr(size_t begin) const; + INLINE string substr(size_t begin, size_t end) const; INLINE void operator += (const string &other); INLINE Filename operator + (const string &other) const; diff --git a/dtool/src/parser-inc/string b/dtool/src/parser-inc/string index 52098c3f51..0372b88f5a 100644 --- a/dtool/src/parser-inc/string +++ b/dtool/src/parser-inc/string @@ -26,7 +26,7 @@ template class basic_string { public: typedef typename size_t size_type; - static const size_t npos; + static const size_t npos = -1; basic_string(); basic_string(const basic_string ©); From 920210c999977f2f654af646363b46ba2ac311a2 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 16 Oct 2015 14:57:40 +0200 Subject: [PATCH 166/200] Fix the vast majority of Interrogate parse issues and warnings, add support for inline namespace and constexpr --- contrib/src/ai/p3ai_composite.cxx | 1 - dtool/metalibs/dtoolconfig/pydtool.cxx | 4 +- dtool/src/cppparser/cppBison.cxx.prebuilt | 5103 +++++++++-------- dtool/src/cppparser/cppBison.yxx | 96 +- dtool/src/cppparser/cppEnumType.cxx | 1 + dtool/src/cppparser/cppExpression.cxx | 12 +- dtool/src/cppparser/cppIdentifier.cxx | 20 +- dtool/src/cppparser/cppInstance.cxx | 3 + dtool/src/cppparser/cppInstance.h | 7 +- dtool/src/cppparser/cppNamespace.cxx | 7 +- dtool/src/cppparser/cppNamespace.h | 2 + dtool/src/cppparser/cppScope.cxx | 11 +- dtool/src/cppparser/cppStructType.cxx | 20 + dtool/src/cppparser/cppStructType.h | 1 + dtool/src/dtoolbase/dtoolbase.h | 2 - dtool/src/dtoolbase/dtoolbase_cc.h | 2 +- dtool/src/dtoolbase/selectThreadImpl.h | 2 +- dtool/src/interrogate/interfaceMaker.cxx | 10 + .../interfaceMakerPythonSimple.cxx | 4 +- dtool/src/interrogate/interrogateBuilder.cxx | 3 + dtool/src/interrogate/typeManager.cxx | 4 +- dtool/src/parser-inc/Dense | 6 +- dtool/src/parser-inc/alloca.h | 0 dtool/src/parser-inc/btBulletDynamicsCommon.h | 2 + dtool/src/parser-inc/cfloat | 1 + dtool/src/parser-inc/cmath | 4 + dtool/src/parser-inc/errno.h | 7 + dtool/src/parser-inc/fcntl.h | 7 + dtool/src/parser-inc/float.h | 18 + dtool/src/parser-inc/ft2build.h | 1 + dtool/src/parser-inc/iterator | 6 + dtool/src/parser-inc/limits | 5 + dtool/src/parser-inc/list | 33 +- dtool/src/parser-inc/locale.h | 9 + dtool/src/parser-inc/memory | 20 +- dtool/src/parser-inc/ode.h | 1 - dtool/src/parser-inc/ode/ode.h | 1 - dtool/src/parser-inc/ogg/ogg.h | 14 + dtool/src/parser-inc/squish.h | 9 + dtool/src/parser-inc/sstream | 23 + dtool/src/parser-inc/stdio.h | 4 + dtool/src/parser-inc/stdtypedefs.h | 23 +- dtool/src/parser-inc/string | 74 +- dtool/src/parser-inc/sys/stat.h | 3 + dtool/src/parser-inc/sys/time.h | 4 + dtool/src/parser-inc/sys/types.h | 17 + dtool/src/parser-inc/typeinfo | 5 + dtool/src/parser-inc/unistd.h | 10 + dtool/src/parser-inc/vorbis/codec.h | 1 + dtool/src/parser-inc/vorbis/vorbisfile.h | 10 +- dtool/src/parser-inc/zconf.h | 19 + dtool/src/parser-inc/zlib.h | 2 + panda/src/downloader/bioPtr.h | 3 + panda/src/downloader/bioStreamBuf.h | 3 + panda/src/downloader/bioStreamPtr.h | 3 + panda/src/downloader/httpChannel.h | 3 + panda/src/express/openSSLWrapper.h | 3 + panda/src/linmath/lmatrix3_src.I | 7 + panda/src/linmath/lmatrix4_src.I | 4 + panda/src/nativenet/socket_portable.h | 7 +- panda/src/net/connectionManager.cxx | 2 +- panda/src/putil/config_util.N | 3 - panda/src/rocket/rocketInputHandler.cxx | 2 + panda/src/vision/webcamVideoCursorV4L.cxx | 2 +- panda/src/vision/webcamVideoCursorV4L.h | 2 +- panda/src/vision/webcamVideoV4L.cxx | 2 +- panda/src/vision/webcamVideoV4L.h | 2 +- 67 files changed, 3067 insertions(+), 2635 deletions(-) delete mode 100644 contrib/src/ai/p3ai_composite.cxx create mode 100644 dtool/src/parser-inc/alloca.h create mode 100644 dtool/src/parser-inc/cfloat create mode 100644 dtool/src/parser-inc/cmath create mode 100644 dtool/src/parser-inc/errno.h create mode 100644 dtool/src/parser-inc/fcntl.h create mode 100644 dtool/src/parser-inc/float.h create mode 100644 dtool/src/parser-inc/iterator create mode 100644 dtool/src/parser-inc/limits create mode 100644 dtool/src/parser-inc/locale.h create mode 100644 dtool/src/parser-inc/ogg/ogg.h create mode 100644 dtool/src/parser-inc/squish.h create mode 100644 dtool/src/parser-inc/sstream create mode 100644 dtool/src/parser-inc/sys/stat.h create mode 100644 dtool/src/parser-inc/sys/time.h create mode 100644 dtool/src/parser-inc/sys/types.h create mode 100644 dtool/src/parser-inc/typeinfo create mode 100644 dtool/src/parser-inc/unistd.h create mode 100644 dtool/src/parser-inc/vorbis/codec.h create mode 100644 dtool/src/parser-inc/zconf.h diff --git a/contrib/src/ai/p3ai_composite.cxx b/contrib/src/ai/p3ai_composite.cxx deleted file mode 100644 index cd584a1060..0000000000 --- a/contrib/src/ai/p3ai_composite.cxx +++ /dev/null @@ -1 +0,0 @@ -#include "ai_composite1.cxx" \ No newline at end of file diff --git a/dtool/metalibs/dtoolconfig/pydtool.cxx b/dtool/metalibs/dtoolconfig/pydtool.cxx index 77a162c7ec..83250cd092 100644 --- a/dtool/metalibs/dtoolconfig/pydtool.cxx +++ b/dtool/metalibs/dtoolconfig/pydtool.cxx @@ -2359,8 +2359,8 @@ _inP07yte_7S(PyObject *, PyObject *args) { */ static PyObject * _inP07ytw_15(PyObject *, PyObject *args) { - int param0; - if (PyArg_ParseTuple(args, "i", ¶m0)) { + Py_ssize_t param0; + if (PyArg_ParseTuple(args, "n", ¶m0)) { interrogate_request_module((InterrogateModuleDef *)param0); return Py_BuildValue(""); } diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index 863abcd1d4..45982424b6 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -797,16 +797,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 78 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 4093 +#define YYLAST 4444 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 141 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 93 +#define YYNNTS 94 /* YYNRULES -- Number of rules. */ -#define YYNRULES 579 +#define YYNRULES 583 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1053 +#define YYNSTATES 1074 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -867,246 +867,249 @@ static const yytype_uint16 yyprhs[] = 26, 31, 32, 38, 40, 42, 44, 46, 48, 50, 53, 55, 57, 60, 63, 66, 69, 77, 87, 97, 104, 109, 110, 114, 116, 119, 123, 126, 129, 132, - 135, 138, 141, 144, 147, 150, 152, 156, 160, 161, - 166, 167, 173, 176, 181, 184, 189, 190, 195, 196, - 202, 206, 209, 214, 217, 222, 223, 230, 231, 238, - 239, 247, 248, 259, 260, 272, 273, 282, 283, 293, - 295, 297, 299, 302, 307, 313, 315, 317, 319, 321, - 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, - 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, - 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, - 383, 386, 389, 391, 393, 395, 397, 398, 405, 408, - 410, 412, 414, 418, 421, 426, 429, 434, 438, 443, - 445, 447, 449, 451, 454, 458, 461, 464, 467, 470, - 473, 477, 482, 486, 490, 491, 498, 500, 502, 504, - 508, 511, 513, 517, 519, 522, 524, 527, 529, 533, - 539, 543, 548, 550, 552, 555, 557, 561, 565, 571, - 575, 579, 584, 590, 593, 595, 597, 599, 601, 604, - 607, 610, 613, 616, 620, 625, 627, 629, 631, 634, - 637, 640, 643, 646, 650, 655, 663, 667, 669, 672, - 675, 678, 681, 684, 688, 693, 701, 703, 705, 708, - 710, 712, 714, 717, 722, 727, 729, 731, 734, 736, - 738, 740, 743, 748, 751, 756, 758, 760, 763, 766, - 769, 772, 776, 777, 783, 784, 792, 794, 796, 799, - 803, 806, 809, 812, 816, 820, 824, 828, 832, 836, - 841, 846, 849, 853, 855, 857, 859, 861, 865, 871, - 873, 876, 881, 883, 885, 887, 889, 890, 897, 902, - 905, 909, 911, 913, 915, 917, 919, 921, 923, 925, - 927, 929, 931, 933, 935, 937, 940, 943, 946, 949, - 951, 954, 956, 960, 963, 965, 966, 969, 971, 974, - 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, - 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, - 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, - 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, - 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, - 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, - 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, - 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, - 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, - 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, - 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, - 1196, 1198, 1200, 1202, 1204, 1208, 1210, 1212, 1214, 1216, - 1218, 1222, 1224, 1229, 1237, 1245, 1250, 1255, 1258, 1261, - 1264, 1267, 1270, 1274, 1278, 1282, 1286, 1290, 1294, 1298, - 1302, 1306, 1310, 1314, 1318, 1322, 1326, 1330, 1334, 1340, - 1345, 1350, 1354, 1358, 1362, 1366, 1368, 1373, 1381, 1389, - 1394, 1399, 1404, 1409, 1414, 1419, 1424, 1429, 1434, 1439, - 1444, 1449, 1454, 1459, 1464, 1467, 1473, 1476, 1479, 1482, - 1485, 1488, 1492, 1496, 1500, 1504, 1508, 1512, 1516, 1520, - 1524, 1528, 1532, 1536, 1540, 1544, 1548, 1552, 1556, 1560, - 1566, 1571, 1576, 1580, 1584, 1588, 1592, 1594, 1596, 1598, - 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1617, 1625, 1633, - 1638, 1643, 1646, 1652, 1655, 1658, 1661, 1664, 1668, 1672, - 1676, 1680, 1684, 1688, 1692, 1696, 1700, 1704, 1708, 1712, - 1716, 1720, 1724, 1728, 1732, 1736, 1742, 1747, 1752, 1756, - 1760, 1764, 1768, 1770, 1772, 1774, 1776, 1778, 1780, 1782, - 1784, 1786, 1789, 1792, 1794, 1796, 1798, 1800, 1803, 1806 + 135, 138, 141, 144, 147, 150, 153, 155, 159, 163, + 164, 169, 170, 176, 179, 184, 187, 192, 193, 198, + 199, 205, 209, 212, 217, 220, 225, 226, 233, 234, + 241, 242, 250, 251, 262, 263, 275, 276, 285, 286, + 296, 298, 300, 302, 305, 310, 316, 318, 320, 322, + 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, + 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, + 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, + 384, 386, 389, 392, 394, 396, 398, 400, 401, 408, + 411, 413, 415, 417, 421, 424, 429, 432, 437, 441, + 446, 448, 450, 452, 454, 457, 461, 464, 467, 470, + 473, 476, 480, 485, 489, 493, 494, 501, 503, 505, + 507, 511, 514, 516, 520, 522, 525, 527, 530, 532, + 536, 542, 546, 551, 553, 555, 558, 560, 564, 568, + 574, 578, 583, 589, 592, 594, 596, 598, 600, 603, + 606, 609, 612, 615, 619, 624, 626, 628, 630, 633, + 636, 639, 642, 645, 649, 654, 662, 666, 668, 671, + 674, 677, 680, 683, 687, 692, 700, 702, 704, 707, + 709, 711, 713, 716, 721, 726, 728, 730, 733, 735, + 737, 739, 742, 747, 750, 755, 757, 759, 762, 765, + 768, 771, 775, 776, 782, 783, 791, 793, 795, 798, + 802, 805, 808, 811, 815, 819, 823, 827, 831, 835, + 840, 845, 848, 852, 854, 856, 858, 860, 864, 870, + 872, 875, 880, 882, 884, 886, 888, 889, 896, 897, + 905, 910, 916, 919, 923, 925, 927, 929, 931, 933, + 935, 937, 939, 941, 943, 945, 947, 949, 951, 954, + 957, 960, 963, 965, 968, 970, 974, 977, 979, 980, + 983, 985, 988, 990, 992, 994, 996, 998, 1000, 1002, + 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, + 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, + 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, + 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, + 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, + 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, + 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, + 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, + 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, + 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, + 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1222, 1224, + 1226, 1228, 1230, 1232, 1236, 1238, 1243, 1251, 1259, 1264, + 1269, 1272, 1275, 1278, 1281, 1284, 1288, 1292, 1296, 1300, + 1304, 1308, 1312, 1316, 1320, 1324, 1328, 1332, 1336, 1340, + 1344, 1348, 1354, 1359, 1364, 1368, 1372, 1376, 1380, 1382, + 1387, 1395, 1403, 1408, 1413, 1418, 1423, 1428, 1433, 1438, + 1443, 1448, 1453, 1458, 1463, 1468, 1473, 1478, 1481, 1487, + 1490, 1493, 1496, 1499, 1502, 1506, 1510, 1514, 1518, 1522, + 1526, 1530, 1534, 1538, 1542, 1546, 1550, 1554, 1558, 1562, + 1566, 1570, 1574, 1580, 1585, 1590, 1594, 1598, 1602, 1606, + 1608, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, + 1631, 1639, 1647, 1652, 1657, 1660, 1666, 1669, 1672, 1675, + 1678, 1682, 1686, 1690, 1694, 1698, 1702, 1706, 1710, 1714, + 1718, 1722, 1726, 1730, 1734, 1738, 1742, 1746, 1750, 1756, + 1761, 1766, 1770, 1774, 1778, 1782, 1784, 1786, 1788, 1790, + 1792, 1794, 1796, 1798, 1800, 1802, 1805, 1808, 1810, 1812, + 1814, 1816, 1819, 1822 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 142, 0, -1, 114, 143, -1, 115, 226, -1, 116, - 196, -1, 233, -1, 143, 119, -1, 143, 148, -1, - 145, -1, 144, 118, 145, -1, 231, 135, 223, 137, + 142, 0, -1, 114, 143, -1, 115, 227, -1, 116, + 196, -1, 234, -1, 143, 119, -1, 143, 148, -1, + 145, -1, 144, 118, 145, -1, 232, 135, 224, 137, -1, -1, 151, 117, 147, 143, 138, -1, 152, -1, - 174, -1, 146, -1, 211, -1, 213, -1, 149, -1, + 174, -1, 146, -1, 211, -1, 214, -1, 149, -1, 104, 158, -1, 48, -1, 64, -1, 69, 120, -1, 90, 120, -1, 89, 120, -1, 88, 120, -1, 80, 135, 10, 118, 10, 137, 119, -1, 80, 135, 10, - 118, 10, 118, 10, 137, 119, -1, 81, 135, 231, - 118, 231, 118, 231, 137, 119, -1, 97, 135, 226, - 118, 232, 137, -1, 97, 135, 226, 137, -1, -1, - 72, 150, 148, -1, 233, -1, 151, 67, -1, 151, - 67, 6, -1, 151, 96, -1, 151, 76, -1, 151, - 109, -1, 151, 68, -1, 151, 111, -1, 151, 82, - -1, 151, 91, -1, 151, 49, -1, 151, 66, -1, - 153, -1, 151, 194, 119, -1, 151, 163, 186, -1, - -1, 151, 194, 154, 156, -1, -1, 151, 56, 193, - 155, 157, -1, 180, 186, -1, 180, 185, 118, 156, - -1, 180, 186, -1, 180, 185, 118, 157, -1, -1, - 151, 194, 159, 161, -1, -1, 151, 56, 193, 160, - 162, -1, 151, 163, 186, -1, 180, 186, -1, 180, - 185, 118, 161, -1, 180, 186, -1, 180, 185, 118, - 162, -1, -1, 10, 135, 164, 182, 137, 171, -1, - -1, 11, 135, 165, 182, 137, 171, -1, -1, 133, - 231, 135, 166, 182, 137, 171, -1, -1, 11, 135, - 130, 180, 137, 135, 167, 182, 137, 171, -1, -1, - 11, 135, 12, 130, 180, 137, 135, 168, 182, 137, - 171, -1, -1, 87, 193, 190, 135, 169, 182, 137, - 171, -1, -1, 87, 56, 193, 190, 135, 170, 182, - 137, 171, -1, 10, -1, 233, -1, 56, -1, 171, - 85, -1, 171, 101, 135, 137, -1, 171, 101, 135, - 231, 137, -1, 139, -1, 133, -1, 130, -1, 131, - -1, 132, -1, 128, -1, 129, -1, 123, -1, 125, - -1, 124, -1, 15, -1, 16, -1, 17, -1, 18, - -1, 19, -1, 20, -1, 126, -1, 127, -1, 21, - -1, 22, -1, 121, -1, 118, -1, 33, -1, 34, - -1, 35, -1, 36, -1, 37, -1, 38, -1, 39, - -1, 40, -1, 41, -1, 42, -1, 43, -1, 44, - -1, 31, -1, 136, 140, -1, 135, 137, -1, 84, - -1, 60, -1, 152, -1, 174, -1, -1, 100, 175, - 126, 176, 127, 173, -1, 100, 152, -1, 233, -1, - 177, -1, 178, -1, 177, 118, 178, -1, 55, 231, - -1, 55, 231, 121, 196, -1, 105, 231, -1, 105, - 231, 121, 196, -1, 179, 191, 184, -1, 56, 179, - 191, 184, -1, 214, -1, 10, -1, 11, -1, 231, - -1, 87, 172, -1, 87, 6, 10, -1, 56, 180, - -1, 111, 180, -1, 130, 180, -1, 125, 180, -1, - 16, 180, -1, 12, 130, 180, -1, 180, 136, 222, - 140, -1, 180, 120, 4, -1, 135, 180, 137, -1, - -1, 180, 135, 181, 182, 137, 171, -1, 233, -1, - 14, -1, 183, -1, 183, 118, 14, -1, 183, 14, - -1, 189, -1, 183, 118, 189, -1, 233, -1, 121, - 225, -1, 233, -1, 121, 226, -1, 119, -1, 117, - 218, 138, -1, 120, 144, 117, 218, 138, -1, 121, - 226, 119, -1, 121, 117, 187, 138, -1, 233, -1, - 188, -1, 188, 118, -1, 226, -1, 117, 187, 138, - -1, 188, 118, 226, -1, 188, 118, 117, 187, 138, - -1, 193, 191, 185, -1, 10, 191, 185, -1, 56, - 193, 191, 185, -1, 56, 91, 193, 191, 185, -1, - 91, 189, -1, 228, -1, 233, -1, 10, -1, 11, - -1, 56, 190, -1, 111, 190, -1, 130, 190, -1, - 125, 190, -1, 16, 190, -1, 12, 130, 190, -1, - 190, 136, 222, 140, -1, 233, -1, 10, -1, 11, - -1, 56, 191, -1, 111, 191, -1, 130, 191, -1, - 125, 191, -1, 16, 191, -1, 12, 130, 191, -1, - 191, 136, 222, 140, -1, 135, 191, 137, 135, 182, - 137, 171, -1, 135, 191, 137, -1, 233, -1, 56, - 192, -1, 111, 192, -1, 130, 192, -1, 125, 192, - -1, 16, 192, -1, 12, 130, 192, -1, 192, 136, - 222, 140, -1, 135, 192, 137, 135, 182, 137, 171, - -1, 214, -1, 11, -1, 105, 231, -1, 197, -1, - 199, -1, 204, -1, 210, 231, -1, 209, 231, 120, - 206, -1, 58, 135, 226, 137, -1, 214, -1, 11, - -1, 105, 231, -1, 197, -1, 199, -1, 204, -1, - 210, 231, -1, 209, 231, 120, 206, -1, 209, 231, - -1, 58, 135, 226, 137, -1, 214, -1, 11, -1, - 105, 231, -1, 210, 231, -1, 209, 231, -1, 193, - 192, -1, 56, 193, 192, -1, -1, 210, 117, 198, - 143, 138, -1, -1, 210, 231, 200, 201, 117, 143, - 138, -1, 233, -1, 202, -1, 120, 203, -1, 202, - 118, 203, -1, 90, 230, -1, 89, 230, -1, 88, - 230, -1, 109, 90, 230, -1, 109, 89, 230, -1, - 109, 88, 230, -1, 90, 109, 230, -1, 89, 109, - 230, -1, 88, 109, 230, -1, 205, 117, 208, 138, - -1, 209, 231, 120, 206, -1, 209, 231, -1, 209, - 120, 206, -1, 209, -1, 215, -1, 11, -1, 233, - -1, 207, 231, 118, -1, 207, 231, 121, 226, 118, - -1, 207, -1, 207, 231, -1, 207, 231, 121, 226, - -1, 65, -1, 55, -1, 99, -1, 106, -1, -1, - 83, 231, 117, 212, 143, 138, -1, 83, 117, 143, - 138, -1, 108, 231, -1, 108, 83, 231, -1, 215, - -1, 216, -1, 217, -1, 50, -1, 52, -1, 112, - -1, 53, -1, 54, -1, 93, -1, 78, -1, 79, - -1, 107, -1, 94, -1, 77, -1, 93, 215, -1, - 78, 215, -1, 107, 215, -1, 94, 215, -1, 71, - -1, 78, 71, -1, 61, -1, 78, 78, 71, -1, - 78, 61, -1, 110, -1, -1, 219, 220, -1, 233, - -1, 220, 221, -1, 3, -1, 4, -1, 6, -1, - 8, -1, 9, -1, 5, -1, 10, -1, 11, -1, - 12, -1, 7, -1, 14, -1, 15, -1, 16, -1, - 17, -1, 18, -1, 19, -1, 20, -1, 21, -1, - 22, -1, 23, -1, 24, -1, 31, -1, 32, -1, + 118, 10, 118, 10, 137, 119, -1, 81, 135, 232, + 118, 232, 118, 232, 137, 119, -1, 97, 135, 227, + 118, 233, 137, -1, 97, 135, 227, 137, -1, -1, + 72, 150, 148, -1, 234, -1, 67, 151, -1, 67, + 6, 151, -1, 96, 151, -1, 76, 151, -1, 109, + 151, -1, 68, 151, -1, 91, 151, -1, 111, 151, + -1, 82, 151, -1, 57, 151, -1, 49, 151, -1, + 66, 151, -1, 153, -1, 151, 194, 119, -1, 151, + 163, 186, -1, -1, 151, 194, 154, 156, -1, -1, + 151, 56, 193, 155, 157, -1, 180, 186, -1, 180, + 185, 118, 156, -1, 180, 186, -1, 180, 185, 118, + 157, -1, -1, 151, 194, 159, 161, -1, -1, 151, + 56, 193, 160, 162, -1, 151, 163, 186, -1, 180, + 186, -1, 180, 185, 118, 161, -1, 180, 186, -1, + 180, 185, 118, 162, -1, -1, 10, 135, 164, 182, + 137, 171, -1, -1, 11, 135, 165, 182, 137, 171, + -1, -1, 133, 232, 135, 166, 182, 137, 171, -1, + -1, 11, 135, 130, 180, 137, 135, 167, 182, 137, + 171, -1, -1, 11, 135, 12, 130, 180, 137, 135, + 168, 182, 137, 171, -1, -1, 87, 193, 190, 135, + 169, 182, 137, 171, -1, -1, 87, 56, 193, 190, + 135, 170, 182, 137, 171, -1, 10, -1, 234, -1, + 56, -1, 171, 85, -1, 171, 101, 135, 137, -1, + 171, 101, 135, 232, 137, -1, 139, -1, 133, -1, + 130, -1, 131, -1, 132, -1, 128, -1, 129, -1, + 123, -1, 125, -1, 124, -1, 15, -1, 16, -1, + 17, -1, 18, -1, 19, -1, 20, -1, 126, -1, + 127, -1, 21, -1, 22, -1, 121, -1, 118, -1, 33, -1, 34, -1, 35, -1, 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, 41, -1, 42, -1, - 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, - 50, -1, 51, -1, 52, -1, 53, -1, 54, -1, - 55, -1, 56, -1, 57, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 62, -1, 63, -1, 65, -1, - 67, -1, 68, -1, 70, -1, 71, -1, 72, -1, - 73, -1, 74, -1, 75, -1, 76, -1, 77, -1, - 78, -1, 82, -1, 84, -1, 86, -1, 87, -1, - 88, -1, 89, -1, 90, -1, 69, -1, 91, -1, - 92, -1, 93, -1, 94, -1, 95, -1, 96, -1, - 97, -1, 98, -1, 99, -1, 101, -1, 102, -1, - 103, -1, 104, -1, 105, -1, 106, -1, 107, -1, - 109, -1, 110, -1, 111, -1, 112, -1, 113, -1, - 128, -1, 129, -1, 130, -1, 131, -1, 125, -1, - 123, -1, 124, -1, 139, -1, 133, -1, 121, -1, - 132, -1, 126, -1, 127, -1, 135, -1, 137, -1, - 134, -1, 118, -1, 119, -1, 120, -1, 136, -1, - 140, -1, 122, -1, 117, 220, 138, -1, 233, -1, - 226, -1, 233, -1, 224, -1, 226, -1, 224, 118, - 226, -1, 227, -1, 135, 196, 137, 225, -1, 98, - 126, 196, 127, 135, 224, 137, -1, 62, 126, 196, - 127, 135, 224, 137, -1, 95, 135, 196, 137, -1, - 46, 135, 196, 137, -1, 139, 225, -1, 133, 225, - -1, 129, 225, -1, 130, 225, -1, 125, 225, -1, - 225, 130, 225, -1, 225, 131, 225, -1, 225, 132, - 225, -1, 225, 128, 225, -1, 225, 129, 225, -1, - 225, 123, 225, -1, 225, 124, 225, -1, 225, 125, - 225, -1, 225, 15, 225, -1, 225, 16, 225, -1, - 225, 17, 225, -1, 225, 18, 225, -1, 225, 19, - 225, -1, 225, 20, 225, -1, 225, 21, 225, -1, - 225, 22, 225, -1, 225, 122, 225, 120, 225, -1, - 225, 136, 226, 140, -1, 225, 135, 224, 137, -1, - 225, 135, 137, -1, 225, 134, 225, -1, 225, 31, - 225, -1, 135, 224, 137, -1, 227, -1, 135, 196, - 137, 226, -1, 98, 126, 196, 127, 135, 224, 137, - -1, 62, 126, 196, 127, 135, 224, 137, -1, 11, - 135, 223, 137, -1, 77, 135, 223, 137, -1, 52, - 135, 223, 137, -1, 112, 135, 223, 137, -1, 53, - 135, 223, 137, -1, 54, 135, 223, 137, -1, 50, - 135, 223, 137, -1, 93, 135, 223, 137, -1, 78, - 135, 223, 137, -1, 107, 135, 223, 137, -1, 94, - 135, 223, 137, -1, 71, 135, 223, 137, -1, 61, - 135, 223, 137, -1, 95, 135, 196, 137, -1, 46, - 135, 196, 137, -1, 84, 195, -1, 84, 195, 135, - 223, 137, -1, 139, 226, -1, 133, 226, -1, 129, - 226, -1, 130, 226, -1, 125, 226, -1, 226, 130, - 226, -1, 226, 131, 226, -1, 226, 132, 226, -1, - 226, 128, 226, -1, 226, 129, 226, -1, 226, 123, - 226, -1, 226, 124, 226, -1, 226, 125, 226, -1, - 226, 15, 226, -1, 226, 16, 226, -1, 226, 17, - 226, -1, 226, 18, 226, -1, 226, 19, 226, -1, - 226, 20, 226, -1, 226, 126, 226, -1, 226, 127, - 226, -1, 226, 21, 226, -1, 226, 22, 226, -1, - 226, 122, 226, 120, 226, -1, 226, 136, 226, 140, - -1, 226, 135, 224, 137, -1, 226, 135, 137, -1, - 226, 134, 226, -1, 226, 31, 226, -1, 135, 224, + 43, -1, 44, -1, 31, -1, 136, 140, -1, 135, + 137, -1, 84, -1, 60, -1, 152, -1, 174, -1, + -1, 100, 175, 126, 176, 127, 173, -1, 100, 152, + -1, 234, -1, 177, -1, 178, -1, 177, 118, 178, + -1, 55, 232, -1, 55, 232, 121, 196, -1, 105, + 232, -1, 105, 232, 121, 196, -1, 179, 191, 184, + -1, 56, 179, 191, 184, -1, 215, -1, 10, -1, + 11, -1, 232, -1, 87, 172, -1, 87, 6, 10, + -1, 56, 180, -1, 111, 180, -1, 130, 180, -1, + 125, 180, -1, 16, 180, -1, 12, 130, 180, -1, + 180, 136, 223, 140, -1, 180, 120, 4, -1, 135, + 180, 137, -1, -1, 180, 135, 181, 182, 137, 171, + -1, 234, -1, 14, -1, 183, -1, 183, 118, 14, + -1, 183, 14, -1, 189, -1, 183, 118, 189, -1, + 234, -1, 121, 226, -1, 234, -1, 121, 227, -1, + 119, -1, 117, 219, 138, -1, 120, 144, 117, 219, + 138, -1, 121, 227, 119, -1, 121, 117, 187, 138, + -1, 234, -1, 188, -1, 188, 118, -1, 227, -1, + 117, 187, 138, -1, 188, 118, 227, -1, 188, 118, + 117, 187, 138, -1, 193, 191, 185, -1, 56, 193, + 191, 185, -1, 56, 91, 193, 191, 185, -1, 91, + 189, -1, 229, -1, 234, -1, 10, -1, 11, -1, + 56, 190, -1, 111, 190, -1, 130, 190, -1, 125, + 190, -1, 16, 190, -1, 12, 130, 190, -1, 190, + 136, 223, 140, -1, 234, -1, 10, -1, 11, -1, + 56, 191, -1, 111, 191, -1, 130, 191, -1, 125, + 191, -1, 16, 191, -1, 12, 130, 191, -1, 191, + 136, 223, 140, -1, 135, 191, 137, 135, 182, 137, + 171, -1, 135, 191, 137, -1, 234, -1, 56, 192, + -1, 111, 192, -1, 130, 192, -1, 125, 192, -1, + 16, 192, -1, 12, 130, 192, -1, 192, 136, 223, + 140, -1, 135, 192, 137, 135, 182, 137, 171, -1, + 215, -1, 11, -1, 105, 232, -1, 197, -1, 199, + -1, 204, -1, 210, 232, -1, 209, 232, 120, 206, + -1, 58, 135, 227, 137, -1, 215, -1, 11, -1, + 105, 232, -1, 197, -1, 199, -1, 204, -1, 210, + 232, -1, 209, 232, 120, 206, -1, 209, 232, -1, + 58, 135, 227, 137, -1, 215, -1, 11, -1, 105, + 232, -1, 210, 232, -1, 209, 232, -1, 193, 192, + -1, 56, 193, 192, -1, -1, 210, 117, 198, 143, + 138, -1, -1, 210, 232, 200, 201, 117, 143, 138, + -1, 234, -1, 202, -1, 120, 203, -1, 202, 118, + 203, -1, 90, 231, -1, 89, 231, -1, 88, 231, + -1, 109, 90, 231, -1, 109, 89, 231, -1, 109, + 88, 231, -1, 90, 109, 231, -1, 89, 109, 231, + -1, 88, 109, 231, -1, 205, 117, 208, 138, -1, + 209, 232, 120, 206, -1, 209, 232, -1, 209, 120, + 206, -1, 209, -1, 216, -1, 11, -1, 234, -1, + 207, 232, 118, -1, 207, 232, 121, 227, 118, -1, + 207, -1, 207, 232, -1, 207, 232, 121, 227, -1, + 65, -1, 55, -1, 99, -1, 106, -1, -1, 83, + 232, 117, 212, 143, 138, -1, -1, 76, 83, 232, + 117, 213, 143, 138, -1, 83, 117, 143, 138, -1, + 76, 83, 117, 143, 138, -1, 108, 232, -1, 108, + 83, 232, -1, 216, -1, 217, -1, 218, -1, 50, + -1, 52, -1, 112, -1, 53, -1, 54, -1, 93, + -1, 78, -1, 79, -1, 107, -1, 94, -1, 77, + -1, 93, 216, -1, 78, 216, -1, 107, 216, -1, + 94, 216, -1, 71, -1, 78, 71, -1, 61, -1, + 78, 78, 71, -1, 78, 61, -1, 110, -1, -1, + 220, 221, -1, 234, -1, 221, 222, -1, 3, -1, + 4, -1, 6, -1, 8, -1, 9, -1, 5, -1, + 10, -1, 11, -1, 12, -1, 7, -1, 14, -1, + 15, -1, 16, -1, 17, -1, 18, -1, 19, -1, + 20, -1, 21, -1, 22, -1, 23, -1, 24, -1, + 31, -1, 32, -1, 33, -1, 34, -1, 35, -1, + 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, + 41, -1, 42, -1, 43, -1, 44, -1, 45, -1, + 46, -1, 47, -1, 50, -1, 51, -1, 52, -1, + 53, -1, 54, -1, 55, -1, 56, -1, 57, -1, + 58, -1, 59, -1, 60, -1, 61, -1, 62, -1, + 63, -1, 65, -1, 67, -1, 68, -1, 70, -1, + 71, -1, 72, -1, 73, -1, 74, -1, 75, -1, + 76, -1, 77, -1, 78, -1, 82, -1, 84, -1, + 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, + 69, -1, 91, -1, 92, -1, 93, -1, 94, -1, + 95, -1, 96, -1, 97, -1, 98, -1, 99, -1, + 101, -1, 102, -1, 103, -1, 104, -1, 105, -1, + 106, -1, 107, -1, 109, -1, 110, -1, 111, -1, + 112, -1, 113, -1, 128, -1, 129, -1, 130, -1, + 131, -1, 125, -1, 123, -1, 124, -1, 139, -1, + 133, -1, 121, -1, 132, -1, 126, -1, 127, -1, + 135, -1, 137, -1, 134, -1, 118, -1, 119, -1, + 120, -1, 136, -1, 140, -1, 122, -1, 117, 221, + 138, -1, 234, -1, 227, -1, 234, -1, 225, -1, + 227, -1, 225, 118, 227, -1, 228, -1, 135, 196, + 137, 226, -1, 98, 126, 196, 127, 135, 225, 137, + -1, 62, 126, 196, 127, 135, 225, 137, -1, 95, + 135, 196, 137, -1, 46, 135, 196, 137, -1, 139, + 226, -1, 133, 226, -1, 129, 226, -1, 130, 226, + -1, 125, 226, -1, 226, 130, 226, -1, 226, 131, + 226, -1, 226, 132, 226, -1, 226, 128, 226, -1, + 226, 129, 226, -1, 226, 123, 226, -1, 226, 124, + 226, -1, 226, 125, 226, -1, 226, 15, 226, -1, + 226, 16, 226, -1, 226, 17, 226, -1, 226, 18, + 226, -1, 226, 19, 226, -1, 226, 20, 226, -1, + 226, 21, 226, -1, 226, 22, 226, -1, 226, 122, + 226, 120, 226, -1, 226, 136, 227, 140, -1, 226, + 135, 225, 137, -1, 226, 135, 137, -1, 226, 134, + 226, -1, 226, 31, 226, -1, 135, 225, 137, -1, + 228, -1, 135, 196, 137, 227, -1, 98, 126, 196, + 127, 135, 225, 137, -1, 62, 126, 196, 127, 135, + 225, 137, -1, 11, 135, 224, 137, -1, 77, 135, + 224, 137, -1, 52, 135, 224, 137, -1, 112, 135, + 224, 137, -1, 53, 135, 224, 137, -1, 54, 135, + 224, 137, -1, 50, 135, 224, 137, -1, 93, 135, + 224, 137, -1, 78, 135, 224, 137, -1, 107, 135, + 224, 137, -1, 94, 135, 224, 137, -1, 71, 135, + 224, 137, -1, 61, 135, 224, 137, -1, 95, 135, + 196, 137, -1, 46, 135, 196, 137, -1, 84, 195, + -1, 84, 195, 135, 224, 137, -1, 139, 227, -1, + 133, 227, -1, 129, 227, -1, 130, 227, -1, 125, + 227, -1, 227, 130, 227, -1, 227, 131, 227, -1, + 227, 132, 227, -1, 227, 128, 227, -1, 227, 129, + 227, -1, 227, 123, 227, -1, 227, 124, 227, -1, + 227, 125, 227, -1, 227, 15, 227, -1, 227, 16, + 227, -1, 227, 17, 227, -1, 227, 18, 227, -1, + 227, 19, 227, -1, 227, 20, 227, -1, 227, 126, + 227, -1, 227, 127, 227, -1, 227, 21, 227, -1, + 227, 22, 227, -1, 227, 122, 227, 120, 227, -1, + 227, 136, 227, 140, -1, 227, 135, 225, 137, -1, + 227, 135, 137, -1, 227, 134, 227, -1, 227, 31, + 227, -1, 135, 225, 137, -1, 4, -1, 102, -1, + 70, -1, 5, -1, 3, -1, 233, -1, 9, -1, + 10, -1, 86, -1, 230, -1, 135, 196, 137, 227, + -1, 98, 126, 196, 127, 135, 225, 137, -1, 62, + 126, 196, 127, 135, 225, 137, -1, 95, 135, 196, + 137, -1, 46, 135, 196, 137, -1, 84, 195, -1, + 84, 195, 135, 224, 137, -1, 139, 227, -1, 133, + 227, -1, 129, 227, -1, 125, 227, -1, 229, 130, + 227, -1, 229, 131, 227, -1, 229, 132, 227, -1, + 229, 128, 227, -1, 229, 129, 227, -1, 229, 123, + 227, -1, 229, 124, 227, -1, 229, 125, 227, -1, + 229, 15, 227, -1, 229, 16, 227, -1, 229, 17, + 227, -1, 229, 18, 227, -1, 229, 19, 227, -1, + 229, 20, 227, -1, 229, 126, 227, -1, 229, 127, + 227, -1, 229, 21, 227, -1, 229, 22, 227, -1, + 229, 122, 227, 120, 227, -1, 229, 136, 227, 140, + -1, 229, 135, 225, 137, -1, 229, 135, 137, -1, + 229, 134, 227, -1, 229, 31, 227, -1, 135, 225, 137, -1, 4, -1, 102, -1, 70, -1, 5, -1, - 3, -1, 232, -1, 9, -1, 10, -1, 86, -1, - 229, -1, 135, 196, 137, 226, -1, 98, 126, 196, - 127, 135, 224, 137, -1, 62, 126, 196, 127, 135, - 224, 137, -1, 95, 135, 196, 137, -1, 46, 135, - 196, 137, -1, 84, 195, -1, 84, 195, 135, 223, - 137, -1, 139, 226, -1, 133, 226, -1, 129, 226, - -1, 125, 226, -1, 228, 130, 226, -1, 228, 131, - 226, -1, 228, 132, 226, -1, 228, 128, 226, -1, - 228, 129, 226, -1, 228, 123, 226, -1, 228, 124, - 226, -1, 228, 125, 226, -1, 228, 15, 226, -1, - 228, 16, 226, -1, 228, 17, 226, -1, 228, 18, - 226, -1, 228, 19, 226, -1, 228, 20, 226, -1, - 228, 126, 226, -1, 228, 127, 226, -1, 228, 21, - 226, -1, 228, 22, 226, -1, 228, 122, 226, 120, - 226, -1, 228, 136, 226, 140, -1, 228, 135, 224, - 137, -1, 228, 135, 137, -1, 228, 134, 226, -1, - 228, 31, 226, -1, 135, 224, 137, -1, 4, -1, - 102, -1, 70, -1, 5, -1, 3, -1, 232, -1, - 9, -1, 86, -1, 231, -1, 210, 231, -1, 105, - 231, -1, 10, -1, 11, -1, 6, -1, 8, -1, - 232, 6, -1, 232, 8, -1, -1 + 3, -1, 233, -1, 9, -1, 10, -1, 86, -1, + 232, -1, 210, 232, -1, 105, 232, -1, 10, -1, + 11, -1, 6, -1, 8, -1, 233, 6, -1, 233, + 8, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1116,60 +1119,61 @@ static const yytype_uint16 yyrline[] = 427, 440, 439, 451, 452, 453, 454, 455, 456, 457, 458, 471, 480, 484, 492, 496, 500, 511, 532, 537, 548, 562, 561, 576, 580, 584, 595, 599, 603, 607, - 611, 615, 619, 623, 627, 634, 638, 647, 659, 658, - 674, 673, 691, 699, 710, 719, 733, 732, 748, 747, - 758, 773, 779, 788, 795, 808, 807, 830, 829, 854, - 853, 884, 883, 902, 901, 922, 921, 953, 952, 978, - 991, 995, 999, 1003, 1007, 1014, 1018, 1022, 1026, 1030, - 1034, 1038, 1042, 1046, 1050, 1054, 1058, 1062, 1066, 1070, - 1074, 1078, 1082, 1086, 1090, 1094, 1098, 1102, 1106, 1110, - 1114, 1118, 1122, 1126, 1130, 1134, 1138, 1142, 1146, 1150, - 1154, 1158, 1162, 1166, 1173, 1174, 1179, 1178, 1186, 1190, - 1191, 1195, 1201, 1210, 1214, 1218, 1222, 1226, 1232, 1242, - 1246, 1251, 1263, 1267, 1281, 1296, 1301, 1306, 1311, 1316, - 1321, 1326, 1331, 1336, 1342, 1341, 1363, 1367, 1372, 1376, - 1381, 1389, 1394, 1402, 1406, 1413, 1417, 1424, 1428, 1432, - 1436, 1440, 1447, 1448, 1449, 1453, 1456, 1457, 1458, 1462, - 1467, 1475, 1481, 1487, 1491, 1501, 1505, 1509, 1513, 1518, - 1523, 1528, 1533, 1538, 1543, 1551, 1555, 1559, 1563, 1568, - 1573, 1578, 1583, 1588, 1593, 1598, 1604, 1612, 1616, 1621, - 1626, 1631, 1636, 1641, 1646, 1651, 1660, 1664, 1672, 1676, - 1680, 1684, 1688, 1704, 1720, 1732, 1736, 1744, 1748, 1752, - 1756, 1760, 1776, 1792, 1810, 1822, 1826, 1834, 1838, 1854, - 1873, 1879, 1890, 1889, 1914, 1913, 1943, 1944, 1948, 1949, - 1953, 1957, 1961, 1965, 1969, 1973, 1977, 1981, 1985, 1992, - 2000, 2004, 2008, 2012, 2019, 2023, 2030, 2031, 2037, 2045, - 2046, 2052, 2061, 2068, 2072, 2076, 2084, 2083, 2105, 2109, - 2115, 2124, 2125, 2126, 2130, 2134, 2138, 2142, 2146, 2150, - 2155, 2160, 2165, 2170, 2175, 2179, 2184, 2193, 2198, 2206, - 2210, 2215, 2219, 2224, 2232, 2242, 2242, 2252, 2253, 2257, - 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, - 2267, 2267, 2268, 2268, 2268, 2268, 2269, 2269, 2269, 2269, - 2269, 2270, 2270, 2270, 2271, 2271, 2271, 2271, 2271, 2272, - 2272, 2272, 2272, 2272, 2273, 2273, 2273, 2273, 2273, 2274, - 2274, 2274, 2275, 2275, 2275, 2275, 2275, 2276, 2276, 2276, - 2276, 2276, 2277, 2277, 2277, 2278, 2278, 2278, 2278, 2279, - 2279, 2279, 2279, 2279, 2280, 2280, 2280, 2280, 2280, 2281, - 2281, 2281, 2281, 2282, 2282, 2282, 2282, 2282, 2283, 2283, - 2283, 2283, 2283, 2284, 2284, 2284, 2284, 2284, 2285, 2285, - 2285, 2285, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, - 2288, 2288, 2288, 2289, 2289, 2289, 2289, 2289, 2289, 2289, - 2289, 2289, 2289, 2290, 2290, 2294, 2298, 2305, 2309, 2316, - 2320, 2327, 2331, 2335, 2339, 2343, 2347, 2351, 2355, 2359, - 2363, 2367, 2371, 2375, 2379, 2383, 2387, 2391, 2395, 2399, - 2403, 2407, 2411, 2415, 2419, 2423, 2427, 2431, 2435, 2439, - 2443, 2447, 2451, 2455, 2459, 2467, 2471, 2475, 2479, 2483, - 2493, 2499, 2505, 2511, 2517, 2523, 2529, 2536, 2543, 2550, - 2557, 2563, 2569, 2573, 2577, 2581, 2585, 2589, 2593, 2597, - 2601, 2605, 2609, 2613, 2617, 2621, 2625, 2629, 2633, 2637, - 2641, 2645, 2649, 2653, 2657, 2661, 2665, 2669, 2673, 2677, - 2681, 2685, 2689, 2693, 2697, 2701, 2708, 2712, 2716, 2720, - 2724, 2728, 2732, 2736, 2740, 2754, 2758, 2762, 2766, 2770, - 2774, 2778, 2782, 2786, 2790, 2794, 2798, 2802, 2806, 2810, - 2814, 2818, 2822, 2826, 2830, 2834, 2838, 2842, 2846, 2850, - 2854, 2858, 2862, 2866, 2870, 2874, 2878, 2882, 2886, 2890, - 2894, 2898, 2905, 2909, 2913, 2917, 2921, 2925, 2929, 2933, - 2940, 2948, 2956, 2982, 2986, 2993, 2997, 3001, 3007, 3018 + 611, 615, 619, 623, 627, 631, 638, 642, 651, 663, + 662, 678, 677, 695, 703, 714, 723, 737, 736, 752, + 751, 762, 777, 783, 792, 799, 812, 811, 836, 835, + 860, 859, 890, 889, 908, 907, 928, 927, 959, 958, + 984, 997, 1001, 1005, 1009, 1013, 1020, 1024, 1028, 1032, + 1036, 1040, 1044, 1048, 1052, 1056, 1060, 1064, 1068, 1072, + 1076, 1080, 1084, 1088, 1092, 1096, 1100, 1104, 1108, 1112, + 1116, 1120, 1124, 1128, 1132, 1136, 1140, 1144, 1148, 1152, + 1156, 1160, 1164, 1168, 1172, 1179, 1180, 1185, 1184, 1192, + 1196, 1197, 1201, 1207, 1216, 1220, 1224, 1228, 1232, 1238, + 1248, 1252, 1257, 1269, 1273, 1287, 1302, 1307, 1312, 1317, + 1322, 1327, 1332, 1337, 1342, 1348, 1347, 1369, 1373, 1378, + 1382, 1387, 1395, 1400, 1408, 1412, 1419, 1423, 1430, 1434, + 1438, 1442, 1446, 1453, 1454, 1455, 1459, 1462, 1463, 1464, + 1468, 1473, 1479, 1485, 1489, 1499, 1503, 1507, 1511, 1516, + 1521, 1526, 1531, 1536, 1541, 1549, 1553, 1557, 1561, 1566, + 1571, 1576, 1581, 1586, 1591, 1596, 1602, 1610, 1614, 1619, + 1624, 1629, 1634, 1639, 1644, 1649, 1658, 1662, 1670, 1674, + 1678, 1682, 1686, 1702, 1718, 1730, 1734, 1742, 1746, 1750, + 1754, 1758, 1774, 1790, 1808, 1820, 1824, 1832, 1836, 1852, + 1871, 1877, 1888, 1887, 1912, 1911, 1941, 1942, 1946, 1947, + 1951, 1955, 1959, 1963, 1967, 1971, 1975, 1979, 1983, 1990, + 1998, 2002, 2006, 2010, 2017, 2021, 2028, 2029, 2035, 2043, + 2044, 2050, 2059, 2066, 2070, 2074, 2082, 2081, 2104, 2103, + 2126, 2127, 2131, 2137, 2146, 2147, 2148, 2152, 2156, 2160, + 2164, 2168, 2172, 2177, 2182, 2187, 2192, 2197, 2201, 2206, + 2215, 2220, 2228, 2232, 2237, 2241, 2246, 2254, 2264, 2264, + 2274, 2275, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, + 2287, 2288, 2289, 2289, 2289, 2290, 2290, 2290, 2290, 2291, + 2291, 2291, 2291, 2291, 2292, 2292, 2292, 2293, 2293, 2293, + 2293, 2293, 2294, 2294, 2294, 2294, 2294, 2295, 2295, 2295, + 2295, 2295, 2296, 2296, 2296, 2297, 2297, 2297, 2297, 2297, + 2298, 2298, 2298, 2298, 2298, 2299, 2299, 2299, 2300, 2300, + 2300, 2300, 2301, 2301, 2301, 2301, 2301, 2302, 2302, 2302, + 2302, 2302, 2303, 2303, 2303, 2303, 2304, 2304, 2304, 2304, + 2304, 2305, 2305, 2305, 2305, 2305, 2306, 2306, 2306, 2306, + 2306, 2307, 2307, 2307, 2307, 2310, 2310, 2310, 2310, 2310, + 2310, 2310, 2310, 2310, 2310, 2310, 2311, 2311, 2311, 2311, + 2311, 2311, 2311, 2311, 2311, 2311, 2312, 2312, 2316, 2320, + 2327, 2331, 2338, 2342, 2349, 2353, 2357, 2361, 2365, 2369, + 2373, 2377, 2381, 2385, 2389, 2393, 2397, 2401, 2405, 2409, + 2413, 2417, 2421, 2425, 2429, 2433, 2437, 2441, 2445, 2449, + 2453, 2457, 2461, 2465, 2469, 2473, 2477, 2481, 2489, 2493, + 2497, 2501, 2505, 2515, 2521, 2527, 2533, 2539, 2545, 2551, + 2558, 2565, 2572, 2579, 2585, 2591, 2595, 2599, 2603, 2607, + 2611, 2615, 2619, 2623, 2627, 2631, 2635, 2639, 2643, 2647, + 2651, 2655, 2659, 2663, 2667, 2671, 2675, 2679, 2683, 2687, + 2691, 2695, 2699, 2703, 2707, 2711, 2715, 2719, 2723, 2730, + 2734, 2738, 2742, 2746, 2750, 2754, 2758, 2762, 2776, 2780, + 2784, 2788, 2792, 2796, 2800, 2804, 2808, 2812, 2816, 2820, + 2824, 2828, 2832, 2836, 2840, 2844, 2848, 2852, 2856, 2860, + 2864, 2868, 2872, 2876, 2880, 2884, 2888, 2892, 2896, 2900, + 2904, 2908, 2912, 2916, 2920, 2927, 2931, 2935, 2939, 2943, + 2947, 2951, 2955, 2959, 2966, 2974, 2982, 3008, 3012, 3019, + 3023, 3027, 3033, 3044 }; #endif @@ -1225,8 +1229,8 @@ static const char *const yytname[] = "maybe_class_derivation", "class_derivation", "base_specification", "enum", "enum_decl", "enum_element_type", "enum_body_trailing_comma", "enum_body", "enum_keyword", "struct_keyword", "namespace_declaration", - "$@18", "using_declaration", "simple_type", "simple_int_type", - "simple_float_type", "simple_void_type", "code", "$@19", "code_block", + "$@18", "$@19", "using_declaration", "simple_type", "simple_int_type", + "simple_float_type", "simple_void_type", "code", "$@20", "code_block", "element", "optional_const_expr", "optional_const_expr_comma", "const_expr_comma", "no_angle_bracket_const_expr", "const_expr", "const_operand", "formal_const_expr", "formal_const_operand", @@ -1264,20 +1268,20 @@ static const yytype_uint8 yyr1[] = 145, 147, 146, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 150, 149, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 152, 152, 152, 154, 153, - 155, 153, 156, 156, 157, 157, 159, 158, 160, 158, - 158, 161, 161, 162, 162, 164, 163, 165, 163, 166, - 163, 167, 163, 168, 163, 169, 163, 170, 163, 163, - 171, 171, 171, 171, 171, 172, 172, 172, 172, 172, + 151, 151, 151, 151, 151, 151, 152, 152, 152, 154, + 153, 155, 153, 156, 156, 157, 157, 159, 158, 160, + 158, 158, 161, 161, 162, 162, 164, 163, 165, 163, + 166, 163, 167, 163, 168, 163, 169, 163, 170, 163, + 163, 171, 171, 171, 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 173, 173, 175, 174, 174, 176, - 176, 177, 177, 178, 178, 178, 178, 178, 178, 179, - 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 181, 180, 182, 182, 182, 182, - 182, 183, 183, 184, 184, 185, 185, 186, 186, 186, - 186, 186, 187, 187, 187, 188, 188, 188, 188, 189, + 172, 172, 172, 172, 172, 173, 173, 175, 174, 174, + 176, 176, 177, 177, 178, 178, 178, 178, 178, 178, + 179, 179, 179, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 181, 180, 182, 182, 182, + 182, 182, 183, 183, 184, 184, 185, 185, 186, 186, + 186, 186, 186, 187, 187, 187, 188, 188, 188, 188, 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 192, 192, 192, @@ -1287,37 +1291,38 @@ static const yytype_uint8 yyr1[] = 196, 196, 198, 197, 200, 199, 201, 201, 202, 202, 203, 203, 203, 203, 203, 203, 203, 203, 203, 204, 205, 205, 205, 205, 206, 206, 207, 207, 207, 208, - 208, 208, 209, 210, 210, 210, 212, 211, 211, 213, - 213, 214, 214, 214, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, - 216, 216, 216, 216, 217, 219, 218, 220, 220, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 226, 226, 226, 226, 226, + 208, 208, 209, 210, 210, 210, 212, 211, 213, 211, + 211, 211, 214, 214, 215, 215, 215, 216, 216, 216, + 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, + 216, 216, 217, 217, 217, 217, 217, 218, 220, 219, + 221, 221, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 223, 223, + 224, 224, 225, 225, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 229, 229, 229, 229, 229, 229, 229, 229, - 230, 230, 230, 231, 231, 232, 232, 232, 232, 233 + 226, 226, 226, 226, 226, 226, 226, 226, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 231, 231, 231, 232, 232, 233, + 233, 233, 233, 234 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1327,20 +1332,20 @@ static const yytype_uint8 yyr2[] = 4, 0, 5, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 7, 9, 9, 6, 4, 0, 3, 1, 2, 3, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 3, 0, 4, - 0, 5, 2, 4, 2, 4, 0, 4, 0, 5, - 3, 2, 4, 2, 4, 0, 6, 0, 6, 0, - 7, 0, 10, 0, 11, 0, 8, 0, 9, 1, - 1, 1, 2, 4, 5, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 1, 3, 3, 0, + 4, 0, 5, 2, 4, 2, 4, 0, 4, 0, + 5, 3, 2, 4, 2, 4, 0, 6, 0, 6, + 0, 7, 0, 10, 0, 11, 0, 8, 0, 9, + 1, 1, 1, 2, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 1, 1, 1, 1, 0, 6, 2, 1, - 1, 1, 3, 2, 4, 2, 4, 3, 4, 1, - 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, - 3, 4, 3, 3, 0, 6, 1, 1, 1, 3, - 2, 1, 3, 1, 2, 1, 2, 1, 3, 5, - 3, 4, 1, 1, 2, 1, 3, 3, 5, 3, + 1, 2, 2, 1, 1, 1, 1, 0, 6, 2, + 1, 1, 1, 3, 2, 4, 2, 4, 3, 4, + 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, + 2, 3, 4, 3, 3, 0, 6, 1, 1, 1, + 3, 2, 1, 3, 1, 2, 1, 2, 1, 3, + 5, 3, 4, 1, 1, 2, 1, 3, 3, 5, 3, 4, 5, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 7, 3, 1, 2, 2, @@ -1350,10 +1355,11 @@ static const yytype_uint8 yyr2[] = 2, 3, 0, 5, 0, 7, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 2, 3, 1, 1, 1, 1, 3, 5, 1, - 2, 4, 1, 1, 1, 1, 0, 6, 4, 2, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, - 2, 1, 3, 2, 1, 0, 2, 1, 2, 1, + 2, 4, 1, 1, 1, 1, 0, 6, 0, 7, + 4, 5, 2, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 1, 2, 1, 3, 2, 1, 0, 2, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1364,23 +1370,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 1, 4, 7, 7, 4, 4, 2, 2, 2, - 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, - 4, 3, 3, 3, 3, 1, 4, 7, 7, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 2, 5, 2, 2, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, - 4, 4, 3, 3, 3, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 7, 7, 4, - 4, 2, 5, 2, 2, 2, 2, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 1, 4, 7, 7, 4, 4, + 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 1, 1, 1, 1, 2, 2, 0 + 3, 5, 4, 4, 3, 3, 3, 3, 1, 4, + 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 2, 5, 2, + 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 7, 7, 4, 4, 2, 5, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, + 4, 3, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, + 1, 2, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1388,255 +1394,259 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 579, 0, 0, 0, 579, 5, 520, 516, 519, - 575, 576, 522, 523, 0, 0, 0, 0, 0, 0, - 0, 0, 518, 0, 0, 0, 0, 524, 0, 0, - 0, 0, 517, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 465, 521, 217, 284, 285, 287, 288, 273, - 0, 0, 301, 272, 299, 294, 290, 291, 289, 293, - 274, 0, 275, 292, 304, 286, 579, 4, 219, 220, - 221, 0, 263, 0, 216, 281, 282, 283, 1, 20, - 21, 0, 31, 0, 0, 0, 0, 0, 0, 0, - 579, 579, 0, 6, 15, 7, 18, 0, 13, 45, - 14, 16, 17, 33, 579, 0, 579, 579, 579, 579, - 579, 0, 579, 579, 579, 236, 0, 484, 0, 0, - 235, 579, 579, 0, 0, 579, 579, 490, 488, 489, - 487, 217, 284, 285, 287, 288, 301, 299, 294, 290, - 289, 293, 292, 286, 0, 0, 429, 486, 0, 0, + 0, 583, 0, 0, 0, 583, 5, 523, 519, 522, + 579, 580, 525, 526, 0, 0, 0, 0, 0, 0, + 0, 0, 521, 0, 0, 0, 0, 527, 0, 0, + 0, 0, 520, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 468, 524, 217, 287, 288, 290, 291, 273, + 0, 0, 304, 272, 302, 297, 293, 294, 292, 296, + 274, 0, 275, 295, 307, 289, 583, 4, 219, 220, + 221, 0, 263, 0, 216, 284, 285, 286, 1, 20, + 583, 583, 21, 583, 583, 583, 0, 31, 583, 0, + 0, 583, 0, 0, 0, 0, 583, 583, 0, 583, + 583, 0, 583, 583, 6, 15, 7, 18, 0, 13, + 46, 14, 16, 17, 33, 583, 0, 583, 583, 583, + 583, 583, 0, 583, 583, 583, 236, 0, 487, 0, + 0, 235, 583, 583, 0, 0, 583, 583, 493, 491, + 492, 490, 217, 287, 288, 290, 291, 304, 302, 297, + 293, 292, 296, 295, 289, 0, 0, 432, 489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 577, 578, 579, 0, 303, 300, 290, 296, 290, - 295, 298, 573, 574, 218, 297, 0, 579, 579, 579, - 579, 579, 579, 240, 207, 579, 0, 261, 242, 222, - 22, 579, 0, 0, 579, 0, 25, 24, 23, 0, - 0, 128, 0, 0, 19, 0, 279, 79, 226, 43, - 0, 0, 44, 34, 39, 37, 41, 0, 42, 36, - 0, 38, 40, 11, 0, 0, 48, 228, 229, 230, - 263, 0, 225, 0, 428, 427, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 237, 579, 239, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 515, 499, - 500, 501, 502, 503, 504, 507, 508, 514, 0, 496, - 497, 498, 505, 506, 494, 495, 491, 492, 493, 513, - 512, 0, 0, 241, 0, 302, 579, 212, 208, 209, - 211, 210, 0, 579, 269, 0, 266, 265, 262, 264, - 0, 579, 579, 32, 0, 0, 579, 276, 0, 579, - 0, 0, 56, 280, 65, 67, 50, 0, 35, 0, - 579, 227, 579, 0, 305, 167, 0, 0, 47, 46, - 0, 233, 231, 469, 483, 475, 471, 473, 474, 481, - 0, 480, 470, 477, 0, 476, 479, 482, 0, 478, - 472, 466, 430, 0, 511, 510, 224, 213, 0, 0, - 426, 425, 270, 259, 223, 579, 0, 0, 247, 246, - 0, 0, 278, 579, 0, 30, 140, 141, 0, 0, - 0, 0, 130, 131, 579, 139, 129, 58, 60, 0, - 579, 0, 0, 579, 0, 0, 579, 186, 187, 0, - 579, 579, 579, 579, 579, 0, 185, 579, 69, 0, - 579, 0, 8, 0, 579, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 49, 579, 142, 0, 0, 485, - 0, 509, 579, 214, 267, 0, 243, 0, 0, 0, - 0, 248, 579, 0, 0, 0, 579, 0, 133, 579, - 135, 579, 0, 196, 197, 0, 579, 579, 579, 579, - 579, 579, 579, 195, 0, 57, 579, 566, 562, 565, - 568, 579, 157, 0, 0, 0, 564, 0, 569, 0, - 0, 0, 563, 0, 0, 0, 0, 0, 0, 158, - 161, 579, 184, 525, 567, 156, 0, 0, 0, 51, - 579, 234, 0, 579, 192, 188, 189, 191, 190, 75, - 579, 12, 579, 168, 306, 307, 305, 0, 579, 579, - 0, 173, 175, 172, 170, 0, 149, 145, 0, 95, - 96, 97, 98, 99, 100, 103, 104, 119, 107, 108, + 0, 0, 581, 582, 583, 0, 306, 303, 293, 299, + 293, 298, 301, 577, 578, 218, 300, 0, 583, 583, + 583, 583, 583, 583, 240, 207, 583, 0, 261, 242, + 222, 583, 44, 43, 45, 583, 34, 39, 22, 583, + 0, 37, 0, 0, 42, 583, 0, 25, 24, 23, + 40, 36, 0, 0, 129, 0, 0, 19, 0, 282, + 38, 41, 80, 226, 0, 0, 0, 0, 11, 0, + 0, 49, 228, 229, 230, 263, 0, 225, 0, 431, + 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 237, 583, 239, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 518, 502, 503, 504, 505, 506, 507, + 510, 511, 517, 0, 499, 500, 501, 508, 509, 497, + 498, 494, 495, 496, 516, 515, 0, 0, 241, 0, + 305, 583, 212, 208, 209, 211, 210, 0, 583, 269, + 0, 266, 265, 262, 264, 0, 583, 583, 35, 32, + 583, 0, 0, 0, 583, 276, 0, 583, 0, 0, + 57, 283, 66, 68, 51, 0, 0, 583, 227, 583, + 0, 308, 168, 0, 0, 48, 47, 0, 233, 231, + 472, 486, 478, 474, 476, 477, 484, 0, 483, 473, + 480, 0, 479, 482, 485, 0, 481, 475, 469, 433, + 0, 514, 513, 224, 213, 0, 0, 429, 428, 270, + 259, 223, 583, 0, 0, 247, 246, 583, 278, 0, + 0, 280, 583, 0, 30, 141, 142, 0, 0, 0, + 0, 131, 132, 583, 140, 130, 59, 61, 0, 583, + 0, 0, 583, 0, 0, 583, 186, 187, 0, 583, + 583, 583, 583, 583, 0, 185, 583, 70, 0, 583, + 0, 8, 0, 583, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 583, 143, 0, 0, 488, 0, + 512, 583, 214, 267, 0, 243, 0, 0, 0, 0, + 248, 583, 0, 281, 583, 0, 0, 583, 0, 134, + 583, 136, 583, 0, 196, 197, 0, 583, 583, 583, + 583, 583, 583, 583, 195, 0, 58, 583, 569, 565, + 568, 571, 572, 158, 0, 0, 0, 567, 0, 573, + 0, 0, 0, 566, 0, 0, 0, 0, 0, 0, + 159, 162, 583, 184, 528, 570, 157, 0, 0, 0, + 52, 583, 234, 0, 583, 192, 188, 189, 191, 190, + 76, 583, 12, 583, 169, 309, 310, 308, 0, 583, + 583, 0, 174, 176, 173, 171, 0, 150, 146, 0, + 96, 97, 98, 99, 100, 101, 104, 105, 120, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 123, 122, 106, 105, 92, 94, 93, 101, 102, 90, - 91, 87, 88, 89, 86, 0, 0, 85, 143, 146, - 148, 147, 0, 0, 0, 154, 579, 0, 52, 165, - 232, 0, 0, 0, 271, 0, 0, 0, 252, 570, - 0, 251, 0, 250, 0, 0, 0, 579, 249, 0, - 0, 0, 277, 29, 0, 579, 0, 124, 127, 125, - 132, 579, 202, 198, 199, 201, 200, 0, 0, 579, - 137, 163, 59, 579, 0, 61, 579, 0, 0, 579, - 0, 531, 183, 0, 0, 536, 535, 534, 0, 0, - 533, 579, 160, 0, 579, 0, 0, 0, 0, 0, + 119, 124, 123, 107, 106, 93, 95, 94, 102, 103, + 91, 92, 88, 89, 90, 87, 0, 0, 86, 144, + 147, 149, 148, 0, 0, 0, 155, 583, 0, 53, + 166, 232, 0, 0, 0, 271, 0, 0, 0, 252, + 574, 0, 251, 0, 250, 0, 0, 0, 583, 249, + 583, 0, 0, 0, 277, 29, 0, 583, 0, 125, + 128, 126, 133, 583, 202, 198, 199, 201, 200, 0, + 0, 583, 138, 164, 60, 583, 0, 62, 0, 0, + 583, 0, 534, 183, 0, 0, 539, 538, 537, 0, + 0, 536, 583, 161, 0, 583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 579, 0, 54, 77, 193, 579, 0, 0, 309, - 310, 314, 311, 318, 312, 313, 315, 316, 317, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 380, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, - 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, - 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 579, 418, 419, 420, 411, 423, 407, 408, - 406, 413, 414, 402, 403, 404, 405, 412, 410, 417, - 415, 421, 416, 409, 422, 308, 0, 9, 0, 0, - 171, 174, 150, 144, 121, 120, 153, 152, 166, 579, - 0, 0, 468, 467, 579, 268, 572, 258, 571, 257, - 256, 255, 254, 253, 245, 0, 26, 0, 134, 138, - 136, 203, 206, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 164, 431, 0, 0, 63, 0, 0, - 180, 0, 579, 579, 0, 579, 0, 0, 0, 561, - 81, 66, 80, 159, 162, 179, 545, 546, 547, 548, - 549, 550, 553, 554, 560, 0, 542, 543, 544, 551, - 552, 540, 541, 537, 538, 539, 559, 558, 0, 0, - 0, 71, 68, 0, 579, 0, 194, 579, 0, 169, - 10, 176, 579, 177, 0, 151, 53, 215, 0, 0, - 579, 0, 0, 0, 0, 441, 439, 440, 438, 0, - 0, 437, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 583, 0, 55, 78, 193, 583, 0, 0, + 312, 313, 317, 314, 321, 315, 316, 318, 319, 320, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 383, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 384, 385, 386, 387, 388, 389, 390, 391, + 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, + 402, 403, 404, 583, 421, 422, 423, 414, 426, 410, + 411, 409, 416, 417, 405, 406, 407, 408, 415, 413, + 420, 418, 424, 419, 412, 425, 311, 0, 9, 0, + 0, 172, 175, 151, 145, 122, 121, 154, 153, 167, + 583, 0, 0, 471, 470, 583, 268, 576, 258, 575, + 257, 256, 255, 254, 253, 245, 279, 0, 26, 0, + 135, 139, 137, 203, 206, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 434, 0, 0, 64, + 0, 0, 583, 583, 0, 583, 0, 0, 0, 564, + 82, 67, 81, 160, 163, 0, 180, 548, 549, 550, + 551, 552, 553, 556, 557, 563, 0, 545, 546, 547, + 554, 555, 543, 544, 540, 541, 542, 562, 561, 0, + 0, 0, 72, 69, 0, 583, 0, 194, 583, 0, + 170, 10, 177, 583, 178, 0, 152, 54, 215, 0, + 0, 583, 0, 0, 0, 0, 444, 442, 443, 441, + 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 204, 0, 62, 166, 530, 579, 181, - 0, 0, 529, 0, 526, 82, 0, 0, 557, 556, - 73, 579, 55, 0, 579, 70, 424, 0, 579, 27, - 28, 0, 0, 0, 0, 0, 0, 464, 450, 451, - 452, 453, 454, 455, 456, 457, 463, 0, 447, 448, - 449, 445, 446, 442, 443, 444, 462, 461, 0, 0, - 64, 182, 0, 532, 0, 0, 555, 579, 0, 579, - 76, 178, 155, 579, 436, 0, 435, 0, 432, 0, - 460, 459, 0, 0, 83, 0, 0, 579, 78, 205, - 0, 0, 458, 528, 527, 84, 579, 72, 0, 0, - 74, 434, 433 + 0, 0, 0, 0, 204, 0, 63, 533, 583, 181, + 0, 0, 532, 0, 529, 83, 0, 167, 0, 560, + 559, 74, 583, 56, 0, 583, 71, 427, 0, 583, + 27, 28, 0, 0, 0, 0, 0, 0, 467, 453, + 454, 455, 456, 457, 458, 459, 460, 466, 0, 450, + 451, 452, 448, 449, 445, 446, 447, 465, 464, 0, + 0, 65, 182, 0, 535, 0, 0, 558, 583, 0, + 583, 77, 179, 156, 583, 439, 0, 438, 0, 435, + 0, 463, 462, 0, 0, 84, 0, 0, 583, 79, + 205, 0, 0, 461, 531, 530, 85, 583, 73, 0, + 0, 75, 437, 436 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 421, 422, 94, 332, 95, 96, 201, - 97, 98, 99, 340, 404, 434, 509, 214, 399, 474, - 475, 632, 235, 400, 403, 522, 971, 1017, 686, 904, - 871, 578, 618, 100, 212, 391, 392, 393, 394, 435, - 819, 498, 499, 630, 587, 338, 530, 531, 500, 415, - 472, 193, 66, 236, 117, 67, 68, 311, 69, 312, - 377, 378, 451, 70, 71, 308, 304, 305, 72, 73, - 101, 383, 102, 74, 75, 76, 77, 419, 420, 524, - 805, 369, 243, 244, 853, 146, 42, 502, 503, 598, - 436, 43, 245 + -1, 4, 5, 440, 441, 105, 349, 106, 107, 219, + 108, 109, 110, 357, 423, 453, 530, 237, 418, 495, + 496, 654, 250, 419, 422, 543, 992, 1038, 707, 925, + 891, 599, 640, 111, 235, 410, 411, 412, 413, 454, + 840, 519, 520, 652, 608, 355, 551, 552, 521, 434, + 493, 204, 66, 251, 128, 67, 68, 326, 69, 327, + 394, 395, 470, 70, 71, 323, 319, 320, 72, 73, + 112, 402, 474, 113, 74, 75, 76, 77, 438, 439, + 545, 826, 386, 258, 259, 875, 157, 42, 523, 524, + 619, 455, 43, 114 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -594 +#define YYPACT_NINF -642 static const yytype_int16 yypact[] = { - 272, -594, 2401, 3534, 18, 1969, -594, -594, -594, -594, - -594, -594, -594, -594, -91, -79, -33, -24, -11, -2, - 3, 47, -594, 62, 70, 75, 3730, -594, 78, 82, - 119, 131, -594, 138, 158, 2401, 2401, 2401, 2401, 1581, - 2401, 3091, -594, 46, -594, -594, -594, -594, -594, -594, - 3693, 161, -594, -594, -594, -594, 3981, -594, 3584, 3584, - -594, 76, -594, 3584, -594, -594, 427, -594, -594, -594, - -594, 192, 14, 99, -594, -594, -594, -594, -594, -594, - -594, 200, -594, 177, 189, 112, 208, 210, 213, 206, - 236, -594, 63, -594, -594, -594, -594, 2629, -594, -594, - -594, -594, -594, -594, 2401, 3534, 2401, 2401, 2401, 2401, - 2401, 3534, 2401, 2401, 2401, -594, 76, 229, 76, 76, - -594, 2401, 2401, 3534, 3534, 2401, 2401, 114, 114, 114, - 114, -91, -33, -24, -11, -2, 3, 62, 70, 3950, - 1790, 3253, 3439, 158, -17, -87, 3091, 114, 2401, 2401, - 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, - 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 1801, - 2401, -594, -594, 427, 2401, -594, -594, 3523, -594, 3584, - -594, -594, -594, -594, -594, -594, 237, 427, 427, 427, - 427, 427, 427, 235, -594, -594, 897, 255, -594, -41, - -594, 2069, 368, 76, -594, 277, -594, -594, -594, 2401, - 2699, -594, 254, 2763, -594, 76, -594, 261, 266, -594, - 3693, 268, -594, 383, -594, -594, -594, 3595, -594, -594, - 76, -594, -594, -594, 76, 365, 279, -594, -594, -594, - 14, 99, -594, 278, 304, -594, 298, 299, 305, 309, - 310, 313, 325, 320, 322, 324, -594, 2401, -594, -594, - 326, 327, 336, 347, 341, 342, 2401, 2401, -594, 3141, - 2471, 2445, 2445, 668, 668, 566, 566, -594, 2917, 3277, - 3292, 3322, 668, 668, 759, 759, 114, 114, 114, -594, - -594, -71, 1379, 235, 2882, -594, 427, 235, 235, 235, - 235, 235, 147, 2401, 76, 338, -594, -594, -594, -594, - 897, -594, 369, -594, 378, 380, 3758, -594, 2861, 3449, - 3693, 365, -594, -594, -594, 1, -594, 2401, -594, 3693, - 676, -594, -594, 364, -594, -594, 76, 1901, -594, -594, - 421, -36, -41, -594, -594, -594, -594, -594, -594, -594, - 366, -594, -594, -594, 367, -594, -594, -594, 370, -594, - -594, 114, 3091, 2401, -594, -594, -594, 235, 371, 375, - 3091, -594, 11, -594, 385, 3795, -26, 390, 393, -594, - 506, 76, -594, -594, 263, -594, -594, -594, 76, 3486, - 76, 391, 399, -594, 265, -594, -594, -594, -594, 421, - 1361, 392, 421, 1361, 421, 2899, 676, -594, -594, 394, - 676, 676, 676, 676, 676, 151, -594, 3838, -594, 387, - -594, 183, -594, 398, 2001, 2935, 397, 421, 421, 2526, - 421, 421, 421, 421, -594, 187, -594, 897, 2401, -594, - 2401, 3091, 1361, -594, -594, 2401, -594, 233, 503, 525, - 339, -594, -594, -26, -69, 416, 3875, 45, 419, 265, - 420, 442, 3449, -594, -594, 413, 265, 265, 265, 265, - 265, 265, -78, -594, 421, -594, 187, -594, -594, -594, - -594, 265, -594, 409, 3632, 424, -594, 3730, -594, 1691, - 410, 428, -594, 2401, 2401, 2401, 1581, 2401, 418, 66, - -594, 265, 3108, -594, 46, -594, 421, 154, 422, -594, - 187, -594, 181, 676, 411, 411, 411, 411, 411, -594, - 2401, -594, 1361, -594, 1223, -594, -594, 76, 2401, 2001, - 415, 445, 3091, -594, -594, 421, 256, 256, 550, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, 429, 425, -594, -594, 256, - 256, 256, 162, 362, 1901, -594, 2401, 446, -594, -594, - 385, -59, -19, 430, 3057, 76, 315, 76, -594, -594, - 315, -594, 315, -594, 315, 315, 315, 3918, -594, 559, - 451, 76, -594, -594, 3534, -78, 3534, -594, -594, -594, - -594, 265, 435, 435, 435, 435, 435, 281, 925, 2401, - -594, -594, -594, 187, 454, -594, 98, 3534, 3693, 265, - 3534, 438, -594, 3534, 3534, 114, 114, 114, 437, 7, - 114, 519, -594, 1471, 98, 2401, 2401, 2401, 2401, 2401, - 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, - 2401, 2401, 2401, 2401, 2401, 2401, 2101, 2401, 199, 574, - 444, 519, 463, -594, -594, 411, 1361, 443, 452, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, -594, 450, -594, 456, 453, - -594, 2201, 256, -594, -594, -594, -594, -594, 2935, 1361, - 459, 421, -594, -594, 519, -594, -594, -594, -594, -594, - -594, -594, -594, -594, -594, 467, -594, 470, -594, -594, - -594, 435, 447, 461, 484, 478, 485, 925, 925, 925, - 925, 1581, 925, 3125, -594, 475, 498, -594, 421, 2401, - -594, 480, 265, 98, 492, 2401, 488, 494, 2401, -594, - -594, 167, -594, -594, -594, -594, 3141, 2471, 2445, 2445, - 668, 668, 566, 566, -594, 3074, 3277, 3292, 3322, 668, - 668, 759, 759, 114, 114, 114, -594, -594, 83, 1599, - 487, -594, 167, 421, 1361, 489, -594, 519, 1085, -594, - -594, -594, 2001, 3091, 496, -594, -594, 167, 518, 521, - 1361, 3534, 3534, 3534, 3534, 144, 144, 144, 144, 504, - 88, 144, 925, 925, 925, 925, 925, 925, 925, 925, - 925, 925, 925, 925, 925, 925, 925, 925, 925, 925, - 925, 2301, 2401, -594, 421, -594, 3091, -594, 98, -594, - 509, 517, -594, 511, 114, -594, 541, 2401, -594, -594, - -594, 1361, -594, 556, 519, 167, -594, 540, 519, -594, - -594, 567, 571, 576, 572, 584, 925, -594, 3262, 3307, - 2485, 2485, 715, 715, 621, 621, -594, 752, 3337, 1814, - 3352, 824, 824, 144, 144, 144, -594, -594, 93, 2502, - -594, -594, 2401, -594, 2401, 6, 3091, 1361, 575, 519, - 167, -594, 167, 519, -594, 578, -594, 579, 144, 925, - -594, -594, 105, 118, -594, 581, 583, 519, 167, 167, - 2401, 2401, 3125, -594, -594, -594, 519, 167, 127, 133, - 167, -594, -594 + 204, -642, 2639, 3671, 43, 3382, -642, -642, -642, -642, + -642, -642, -642, -642, -75, -53, -44, -40, -30, -9, + -2, -11, -642, 24, 28, 32, 3867, -642, 40, 52, + 78, 103, -642, 116, 129, 2639, 2639, 2639, 2639, 1819, + 2639, 3105, -642, 217, -642, -642, -642, -642, -642, -642, + 3830, 176, -642, -642, -642, -642, 4325, -642, 3482, 3482, + -642, 61, -642, 3482, -642, -642, 236, -642, -642, -642, + -642, 169, 48, 86, -642, -642, -642, -642, -642, -642, + 2662, 2662, -642, 2662, 741, 2662, 170, -642, 4333, 189, + 195, 2662, 118, 229, 233, 250, 2662, 2662, 200, 2631, + 2662, 30, 2662, 2662, -642, -642, -642, -642, 2863, -642, + -642, -642, -642, -642, -642, 2639, 3671, 2639, 2639, 2639, + 2639, 2639, 3671, 2639, 2639, 2639, -642, 61, 202, 61, + 61, -642, 2639, 2639, 3671, 3671, 2639, 2639, 59, 59, + 59, 59, -75, -44, -40, -30, -9, -2, 24, 28, + 4239, 2028, 3253, 3602, 129, 203, -71, 3105, 59, 2639, + 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, + 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, + 2039, 2639, -642, -642, 236, 2639, -642, -642, 909, -642, + 3482, -642, -642, -642, -642, -642, -642, 226, 236, 236, + 236, 236, 236, 236, 237, -642, -642, 2924, 254, -642, + -28, 2662, -642, -642, -642, 2662, -642, -642, -642, 4272, + 133, -642, 366, 61, -642, -642, 265, -642, -642, -642, + -642, -642, 2639, 2776, -642, 257, 2933, -642, 61, -642, + -642, -642, 251, 252, 3830, 256, 3732, 61, -642, 61, + 324, 270, -642, -642, -642, 48, 86, -642, 255, 279, + -642, 261, 271, 276, 277, 282, 283, 280, 288, 296, + 310, -642, 2639, -642, -642, 325, 326, 329, 308, 331, + 335, 2639, 2639, -642, 3277, 3416, 3003, 3003, 320, 320, + 503, 503, -642, 3031, 3477, 3492, 924, 320, 320, 110, + 110, 59, 59, 59, -642, -642, -63, 564, 237, 1617, + -642, 236, 237, 237, 237, 237, 237, 136, 2639, 61, + 323, -642, -642, -642, -642, 2924, -642, 355, -642, -642, + -642, 360, 367, 385, 3914, -642, 1133, 1116, 3830, 324, + -642, -642, -642, 20, -642, 2639, 3830, 353, -642, -642, + 349, -642, -642, 61, 2139, -642, -642, 220, 100, -28, + -642, -642, -642, -642, -642, -642, -642, 370, -642, -642, + -642, 374, -642, -642, -642, 371, -642, -642, 59, 3105, + 2639, -642, -642, -642, 237, 372, 364, 3105, -642, 37, + -642, 400, 3960, 172, 406, 409, -642, 4006, -642, 519, + 61, -642, -642, 289, -642, -642, -642, 61, 3623, 61, + 410, 417, -642, 227, -642, -642, -642, -642, 220, 1599, + 411, 220, 1599, 220, 1837, 353, -642, -642, 416, 353, + 353, 353, 353, 353, 164, -642, 4052, -642, 398, -642, + 215, -642, 403, 2239, 3052, 420, 220, 220, 2775, 220, + 220, 220, 220, -642, 260, -642, 2924, 2639, -642, 2639, + 3105, 1599, -642, -642, 2639, -642, 657, 830, 901, 369, + -642, -642, 172, -642, -642, -54, 421, 4098, 25, 430, + 227, 433, 1108, 1116, -642, -642, 435, 227, 227, 227, + 227, 227, 227, 113, -642, 220, -642, 260, -642, -642, + -642, -642, -642, -642, 428, 3769, 441, -642, 3867, -642, + 1929, 434, 444, -642, 2639, 2639, 2639, 1819, 2639, 436, + 38, -642, 227, 3227, -642, 217, -642, 220, 345, 437, + -642, 260, -642, 208, 353, 439, 439, 439, 439, 439, + -642, 2639, -642, 1599, -642, 1461, -642, -642, 61, 2639, + 2239, 440, 454, 3105, -642, -642, 220, 224, 224, 567, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, 451, 453, -642, -642, + 224, 224, 224, 408, 298, 2139, -642, 2639, 478, -642, + -642, 400, -50, -12, 460, 3071, 61, 317, 61, -642, + -642, 317, -642, 317, -642, 317, 317, 317, 4144, -642, + 4190, 589, 481, 61, -642, -642, 3671, 113, 3671, -642, + -642, -642, -642, 227, 465, 465, 465, 465, 465, 231, + 2650, 2639, -642, -642, -642, 260, 487, -642, 3671, 3830, + 227, 3671, 477, -642, 3671, 3671, 59, 59, 59, 480, + 72, 59, 560, -642, 1709, 185, 2639, 2639, 2639, 2639, + 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, + 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2339, 2639, 467, + 614, 485, 560, 506, -642, -642, 439, 1599, 486, 491, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, 492, -642, 508, + 509, -642, 2439, 224, -642, -642, -642, -642, -642, 3052, + 1599, 489, 220, -642, -642, 560, -642, -642, -642, -642, + -642, -642, -642, -642, -642, -642, -642, 511, -642, 512, + -642, -642, -642, 465, 516, 517, 520, 518, 529, 2650, + 2650, 2650, 2650, 1819, 2650, 3261, -642, 521, 538, -642, + 220, 523, 227, 185, 530, 2639, 527, 531, 2639, -642, + -642, -16, -642, -642, -642, 2639, -642, 3277, 3416, 3003, + 3003, 320, 320, 503, 503, -642, 3088, 3477, 3492, 924, + 320, 320, 110, 110, 59, 59, 59, -642, -642, 89, + 733, 537, -642, -16, 220, 1599, 539, -642, 560, 1270, + -642, -642, -642, 2239, 3105, 541, -642, -642, -16, 561, + 563, 1599, 3671, 3671, 3671, 3671, 180, 180, 180, 180, + 565, 96, 180, 2650, 2650, 2650, 2650, 2650, 2650, 2650, + 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, + 2650, 2650, 2539, 2639, -642, 220, -642, -642, 185, -642, + 562, 568, -642, 572, 59, -642, 573, 3105, 2639, -642, + -642, -642, 1599, -642, 574, 560, -16, -642, 571, 560, + -642, -642, 597, 599, 583, 600, 611, 2650, -642, 3293, + 3507, 479, 479, 384, 384, 758, 758, -642, 3244, 3536, + 2052, 900, 123, 123, 180, 180, 180, -642, -642, 151, + 951, -642, -642, 2639, -642, 2639, 14, 3105, 1599, 603, + 560, -16, -642, -16, 560, -642, 606, -642, 607, 180, + 2650, -642, -642, 152, 156, -642, 608, 609, 560, -16, + -16, 2639, 2639, 3261, -642, -642, -642, 560, -16, 159, + 161, -16, -642, -642 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -594, -594, -190, -594, 188, -594, -594, 522, -594, -594, - -84, -82, -594, -594, -594, -99, -179, -594, -594, -594, - -133, -228, 514, -594, -594, -594, -594, -594, -594, -594, - -593, -594, -594, 269, -594, -594, -594, 267, 344, -327, - -594, -394, -594, 128, -455, -264, -528, -594, -477, -173, - -374, -75, -35, 532, 260, 91, -74, -594, -30, -594, - -594, -594, 295, 22, -594, -300, -594, -594, -15, 43, - -594, -594, -594, -6, 542, -594, -594, 228, -594, -23, - -594, -460, -80, -34, -108, 0, -589, -594, -594, -378, - 476, -381, -1 + -642, -642, -196, -642, 196, -642, -642, 524, -642, -642, + -46, -98, -642, -642, -642, -85, -166, -642, -642, -642, + -120, -214, 532, -642, -642, -642, -642, -642, -642, -642, + -641, -642, -642, 285, -642, -642, -642, 286, 357, -348, + -642, -394, -642, 137, -483, -316, -543, -642, -497, 128, + -380, -122, -34, 543, 267, 5, -88, -642, -72, -642, + -642, -642, 305, -45, -642, -310, -642, -642, -15, 58, + -642, -642, -642, -642, -14, 115, -642, -642, 238, -642, + -19, -642, -455, -115, -20, 175, 554, 153, -642, -642, + -441, 155, -373, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1645,948 +1655,1020 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -262 static const yytype_int16 yytable[] = { - 6, 809, 41, 457, 103, 145, 210, 213, 211, 508, - 374, 118, 642, 401, 316, 173, 182, 183, 78, 504, - 120, 634, 504, 237, 182, 183, 247, 248, 249, 250, - 251, 267, 253, 254, 255, 127, 128, 129, 130, 854, - 147, 260, 261, 628, 104, 264, 265, 267, 593, 609, - 268, 171, 171, 172, 172, 682, 105, 398, 629, 267, - 687, 504, 447, 448, 449, 194, 364, 238, 610, 119, - 601, 603, 476, 182, 183, 507, -244, 510, 822, -244, - 652, -261, 240, 450, 437, 615, 182, 183, 902, 103, - 103, 242, 622, 623, 624, 625, 626, 627, 293, 267, - 536, 537, 106, 579, 580, 581, 582, 636, 504, 182, - 183, 107, 297, 298, 299, 300, 301, 302, 823, 239, - 266, 375, 182, 183, 108, 267, 820, 654, 688, 444, - 144, 402, 445, 109, 196, 291, 237, 590, 110, 237, - 241, 504, 417, 1034, 869, 156, 215, 633, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 855, - 292, 588, 194, 111, 294, 940, 874, 354, 856, 678, - 238, 860, 613, 238, 653, 326, 194, 194, 194, 194, - 194, 194, 330, 456, 306, 240, 246, 112, 240, 875, - 103, 267, 252, 6, 242, 113, 267, 242, 812, 318, - 114, 267, 635, 121, 262, 263, 198, 122, 827, 859, - 968, 367, 829, 267, 830, 987, 831, 832, 833, 204, - 1030, 917, 239, 512, 629, 239, 267, 514, 515, 516, - 517, 518, 1043, 182, 183, 267, 683, 841, 168, 169, - 170, 267, 965, 241, 123, 1044, 241, 124, 854, 854, - 854, 854, 607, 854, 1051, 863, 361, 362, 966, 10, - 1052, 11, 504, 125, 679, 463, 464, 465, 950, 951, - 952, 466, 679, 303, 368, 397, 519, 520, 49, 585, - 586, 680, 905, 126, 406, 194, 174, 585, 586, 816, - 526, 527, 371, 370, 334, 504, 335, 583, 584, 195, - 6, 379, 202, 395, 975, 103, 684, 520, 396, 679, - 200, 467, 585, 586, 203, 182, 183, 405, 206, 416, - 207, 6, 60, 208, 585, 586, 900, 425, 595, 62, - 685, 209, 596, 854, 854, 854, 854, 854, 854, 854, - 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, - 854, 854, -126, 441, 257, 501, 817, 296, 501, 857, - 49, 303, 182, 183, 103, 310, 468, 210, 314, 617, - 319, 1020, 6, 395, 977, 1022, 1, 2, 3, 328, - 469, 585, 586, 473, 317, 470, 324, 854, 339, 505, - 471, 325, 505, 327, 591, 416, 592, 501, 959, 416, - 416, 416, 416, 416, 60, 343, 103, 629, 842, 525, - 595, 62, 267, 533, 532, 914, 1038, 604, 605, 606, - 1039, 182, 183, 426, 589, 344, 345, 427, 504, 186, - 854, 505, 346, 187, 1047, 594, 347, 348, 808, 639, - 349, 6, 350, 1050, 501, 103, 395, 351, 473, 352, - 103, 353, 649, 355, 356, 473, 473, 473, 473, 473, - 473, 631, 118, 357, 358, 589, 373, 428, 359, 360, - 473, 120, 334, 188, 335, 336, 337, 501, 958, 376, - 597, 597, 597, 645, 646, 647, 380, 650, 381, 418, - 473, 438, -260, 1011, 439, 440, 442, 452, 429, 589, - 973, 453, 416, 182, 183, 443, 454, 462, 461, 371, - 370, 505, 506, 504, 513, 523, 981, 535, 533, 532, - 119, 476, 430, 528, 611, 182, 183, 184, 189, 504, - 614, 616, 90, 621, 637, 643, 431, 520, 197, 199, - 640, 432, 190, 810, 644, 651, 433, 191, 49, 681, - 813, 205, 192, 811, 821, 815, 814, 824, 216, 835, - 836, 629, 858, 865, 868, 870, 510, 1018, 817, 901, - 49, 903, 920, 906, 818, 371, 370, 648, 909, 907, - 504, 911, 256, 910, 258, 259, 921, 156, 178, 915, - 180, 181, 60, 862, 918, 185, 103, 919, 595, 62, - 922, 924, 600, 923, 631, 953, 954, 957, 501, 960, - 473, 963, 970, 1036, 60, 962, 974, 633, 371, 370, - 595, 62, 589, 978, 602, 589, 504, 979, 473, 597, - 980, 986, 898, 597, 1012, 597, 1014, 597, 597, 597, - 872, 501, 940, 589, 1013, 876, 877, 878, 879, 880, - 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, - 891, 892, 893, 894, 895, 896, 1015, 899, 1021, 315, - 872, 178, 180, 181, 185, 505, 407, 408, 409, 154, - 155, 323, 410, 1019, 163, 164, 165, 166, 167, 156, - 168, 169, 170, 1025, 1023, 838, 331, 840, 1024, 1026, - 333, 1027, 1037, 1040, 1041, 807, 341, 342, 1045, 178, - 1046, 178, 916, 313, 972, 955, 1010, 321, 861, 620, - 619, 864, 411, 459, 866, 867, 938, 939, 309, 925, - 926, 927, 928, 839, 931, 322, 940, 641, 608, 945, - 946, 947, 948, 949, 806, 950, 951, 952, 0, 908, - 0, 0, 0, 0, 0, 0, 0, 932, 933, 934, - 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, - 372, 525, 0, 940, 501, 961, 0, 412, 0, 0, - 156, 0, 0, 0, 0, 0, 163, 164, 165, 166, - 167, 413, 168, 169, 170, 0, 414, 0, 0, 0, - 0, 913, 423, 0, 0, 0, 0, 930, 505, 0, - 0, 0, 0, 872, 988, 989, 990, 991, 992, 993, - 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, - 1004, 1005, 1006, 945, 946, 947, 948, 949, 0, 950, - 951, 952, 309, 0, 0, 940, 0, 455, 0, 956, - 0, 473, 589, 0, 458, 0, 460, 0, 964, 501, - 0, 0, 1029, 0, 941, 942, 943, 944, 1028, 0, - 945, 946, 947, 948, 949, 501, 950, 951, 952, 165, - 166, 167, 0, 168, 169, 170, 0, 0, 0, 0, - 0, 0, 0, 505, 0, 0, 872, 0, 307, 0, - 0, 533, 532, 0, 0, 0, 0, 1008, 0, 505, - 0, 1042, 0, 599, 599, 599, 0, 0, 7, 8, - 9, 10, 0, 11, 12, 13, 501, 0, 0, 0, - 0, 0, 929, 0, 0, 0, 0, 45, 0, 46, - 47, 48, 1009, 0, 947, 948, 949, 589, 950, 951, - 952, 0, 0, 0, 0, 0, 0, 1016, 0, 0, - 505, 843, 0, 872, 55, 179, 57, 872, 1032, 309, - 1033, 0, 501, 0, 0, 0, 0, 844, 0, 0, - 58, 59, 0, 0, 0, 22, 0, 0, 0, 0, - 0, 0, 0, 423, 63, 0, 1048, 1049, 0, 65, - 0, 27, 982, 983, 984, 985, 505, 0, 872, 0, - 845, 0, 872, 846, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 872, 0, 0, 0, - 0, 0, 0, 0, 0, 872, 0, 0, 0, 0, - 847, 0, 0, 0, 848, 849, 0, 0, 850, 423, - 851, 0, 0, 0, 852, 0, 0, 0, 0, 0, - 0, 826, 599, 828, 0, 0, 599, 0, 599, 0, - 599, 599, 599, 0, 0, 0, 0, 837, 689, 690, - 691, 692, 693, 694, 695, 696, 697, 698, 0, 699, - 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, - 0, 0, 0, 0, 0, 0, 710, 711, 712, 713, - 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, - 724, 725, 726, 0, 0, 727, 728, 729, 730, 731, - 732, 733, 734, 735, 736, 737, 738, 739, 740, 0, - 741, 0, 742, 743, 744, 745, 746, 747, 748, 749, - 750, 751, 752, 753, 0, 0, 0, 754, 0, 755, - 0, 756, 757, 758, 759, 760, 761, 762, 763, 764, - 765, 766, 767, 768, 769, 0, 770, 771, 772, 773, - 774, 775, 776, 0, 777, 778, 779, 780, 781, 0, - 0, 0, 782, 783, 784, 785, 786, 787, 788, 789, - 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, - 800, 801, 802, 976, 803, 804, 689, 690, 691, 692, - 693, 694, 695, 696, 697, 698, 0, 699, 700, 701, - 702, 703, 704, 705, 706, 707, 708, 709, 0, 0, + 6, 234, 262, 263, 264, 265, 266, 830, 268, 269, + 270, 129, 131, 663, 656, 391, 184, 275, 276, 156, + 252, 279, 280, 417, 193, 194, 622, 624, 529, 334, + 478, 182, 420, 183, 212, 213, 253, 214, 216, 217, + 193, 194, 221, 78, 155, 224, 525, 282, 703, 525, + 230, 231, 673, 233, 236, 282, 240, 241, 193, 194, + 115, 923, 308, 254, 631, 205, 283, 614, 282, 985, + 497, 193, 194, 528, 381, 531, 312, 313, 314, 315, + 316, 317, 116, 632, 130, 986, 708, 843, 525, -244, + 167, 117, -244, 255, 257, 118, 193, 194, 557, 558, + 637, 600, 601, 602, 603, 119, 282, 644, 645, 646, + 647, 648, 649, 238, 260, 122, 260, 260, 260, 260, + 260, 261, 260, 260, 260, 844, 120, 267, 193, 194, + 392, 260, 260, 121, 397, 260, 260, 525, 609, 277, + 278, 167, 675, 193, 194, 252, 611, 655, 252, 709, + 421, 1055, 841, 436, 961, 463, 674, 371, 464, 123, + 306, 253, 635, 124, 253, 221, 256, 125, 207, 328, + 525, 189, 878, 191, 192, 132, 848, 894, 196, 699, + 850, 657, 851, 205, 852, 853, 854, 133, 254, 384, + 282, 254, 896, 179, 180, 181, 877, 205, 205, 205, + 205, 205, 205, 209, 938, 321, 477, 282, 833, 889, + 344, 961, 347, 134, 282, 704, 195, -261, 255, 257, + 456, 255, 257, 182, 6, 183, 989, 208, 210, 135, + 193, 194, 445, 1008, 650, 225, 446, 484, 485, 486, + 176, 177, 178, 487, 179, 180, 181, 226, 197, 651, + 330, 136, 198, 968, 969, 970, 239, 971, 972, 973, + 466, 467, 468, 863, 137, 189, 191, 192, 196, 282, + 282, 260, 318, 385, 282, 628, 447, 282, 630, 282, + 883, 469, 271, 488, 273, 274, 206, 996, 1051, 1064, + 218, 256, 199, 1065, 256, 10, 1072, 11, 1073, 540, + 541, 525, 838, 189, 416, 189, 895, 448, 193, 194, + 205, 185, 425, 926, 971, 972, 973, 388, 1, 2, + 3, 651, 324, 414, 222, 6, 396, 193, 194, 6, + 223, 449, 547, 548, 525, 232, 415, 272, 489, 879, + 281, 165, 166, 705, 541, 450, 435, 200, 6, 227, + 451, 167, 490, 228, 1041, 452, 311, 491, 1043, 606, + 607, 201, 492, 426, 427, 428, 202, 651, 864, 429, + 229, 203, 49, 318, 325, 331, 332, 351, 333, 352, + 604, 605, 335, 337, 639, 522, 342, 343, 522, 356, + 998, 345, 360, 341, 414, 606, 607, 282, 361, 1059, + 979, 6, 348, 1060, 350, 959, 960, 367, 362, 430, + 358, 359, 494, 363, 364, 961, 60, 1068, 526, 365, + 366, 526, 616, 62, 435, 368, 1071, 522, 435, 435, + 435, 435, 435, 369, 829, 375, 233, 612, 546, 613, + 324, 351, 554, 352, 353, 354, 935, 370, 174, 175, + 176, 177, 178, 610, 179, 180, 181, 625, 626, 627, + 526, 390, 372, 373, 431, 700, 374, 525, 376, 414, + 6, 660, 377, 6, 389, 393, 522, 398, 432, 494, + 606, 607, 701, 433, 437, 399, 494, 494, 494, 494, + 494, 494, 653, 129, 131, 1032, 610, 670, 957, 958, + 959, 960, 978, 400, 462, 457, 459, 461, 442, 522, + 961, 458, 966, 967, 968, 969, 970, -260, 971, 972, + 973, 494, 669, 471, 618, 618, 618, 472, 700, 475, + 610, 994, 497, 435, 167, 483, 544, 482, 549, 633, + 388, 527, 526, 606, 607, 837, 534, 1002, 260, 554, + 556, 636, 525, 533, 638, 476, 41, 535, 536, 537, + 538, 539, 479, 658, 481, 643, 130, 661, 525, 664, + 665, 324, 832, 672, 702, 541, 531, 834, 831, 159, + 160, 161, 162, 163, 164, 165, 166, 700, 835, 138, + 139, 140, 141, 836, 158, 167, 842, 845, 1039, 857, + 858, 651, 606, 607, 921, 880, 388, 966, 967, 968, + 969, 970, 885, 971, 972, 973, 890, 888, 838, 525, + 922, 620, 620, 620, 924, 882, 927, 655, 928, 936, + 930, 174, 175, 176, 177, 178, 653, 179, 180, 181, + 522, 860, 494, 862, 1057, 931, 943, 932, 939, 940, + 388, 941, 942, 944, 610, 945, 975, 980, 983, 494, + 977, 974, 706, 881, 982, 525, 884, 193, 194, 886, + 887, 892, 991, 522, 610, 618, 995, 919, 999, 618, + 1000, 618, 1001, 618, 618, 618, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 1033, 179, 180, + 181, 892, 1007, 442, 382, 1034, 526, 1035, 1036, 1042, + 1046, 1040, 49, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 1044, 307, 1045, 1047, 1048, 309, + 1058, 1061, 1062, 329, 828, 1066, 1067, 215, 159, 160, + 161, 162, 163, 164, 165, 166, 60, 937, 993, 442, + 976, 1031, 616, 62, 167, 480, 617, 641, 339, 642, + 981, 847, 620, 849, 861, 662, 620, 629, 620, 340, + 620, 620, 620, 0, 929, 827, 336, 0, 859, 961, + 80, 0, 0, 0, 0, 0, 0, 0, 81, 0, + 0, 0, 546, 876, 0, 0, 522, 83, 84, 85, + 0, 0, 0, 0, 0, 0, 0, 211, 0, 0, + 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, + 0, 0, 96, 0, 0, 378, 379, 97, 0, 526, + 193, 194, 0, 0, 892, 0, 0, 0, 0, 0, + 102, 0, 103, 951, 0, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 0, 179, 180, 181, + 0, 0, 387, 990, 0, 0, 0, 0, 950, 0, + 0, 494, 610, 0, 260, 49, 966, 967, 968, 969, + 970, 522, 971, 972, 973, 0, 0, 0, 0, 424, + 0, 0, 0, 0, 0, 0, 0, 522, 444, 0, + 0, 193, 194, 0, 0, 0, 0, 955, 956, 957, + 958, 959, 960, 0, 526, 0, 0, 892, 0, 60, + 0, 961, 554, 0, 460, 616, 62, 0, 0, 621, + 526, 161, 162, 163, 164, 165, 166, 1003, 1004, 1005, + 1006, 0, 1029, 0, 0, 167, 49, 0, 522, 45, + 0, 46, 47, 48, 0, 0, 159, 160, 161, 162, + 163, 164, 165, 166, 0, 0, 0, 610, 0, 0, + 310, 0, 167, 0, 0, 0, 55, 190, 57, 0, + 0, 526, 0, 0, 892, 0, 0, 553, 892, 0, + 60, 0, 58, 59, 522, 0, 616, 62, 0, 0, + 623, 0, 0, 1053, 0, 1054, 63, 0, 615, 0, + 0, 65, 876, 876, 876, 876, 0, 876, 966, 967, + 968, 969, 970, 0, 971, 972, 973, 526, 0, 892, + 0, 1069, 1070, 892, 946, 947, 948, 949, 0, 952, + 172, 173, 174, 175, 176, 177, 178, 892, 179, 180, + 181, 0, 0, 0, 0, 0, 892, 0, 666, 667, + 668, 0, 671, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 0, 179, 180, 181, 0, 0, + 0, 1052, 0, 0, 0, 387, 0, 0, 0, 0, + 0, 0, 0, 0, 553, 0, 876, 876, 876, 876, + 876, 876, 876, 876, 876, 876, 876, 876, 876, 876, + 876, 876, 876, 876, 876, 0, 405, 406, 1009, 1010, + 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, + 1021, 1022, 1023, 1024, 1025, 1026, 1027, 0, 159, 160, + 161, 162, 163, 164, 165, 166, 0, 80, 0, 839, + 876, 387, 0, 0, 167, 81, 45, 0, 46, 47, + 48, 407, 408, 0, 83, 84, 85, 52, 0, 0, + 0, 0, 1049, 0, 211, 0, 0, 54, 0, 0, + 91, 1056, 0, 55, 56, 57, 0, 0, 0, 96, + 0, 0, 0, 876, 97, 387, 0, 0, 99, 58, + 59, 0, 0, 0, 0, 0, 0, 102, 0, 103, + 0, 409, 0, 63, 0, 1063, 64, 0, 65, 0, + 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, + 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, + 917, 403, 920, 0, 0, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 0, 179, 180, 181, + 404, 0, 0, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 0, 720, 721, 722, 723, 724, 725, + 726, 727, 728, 729, 730, 0, 0, 0, 0, 0, + 0, 731, 732, 733, 734, 735, 736, 737, 738, 739, + 740, 741, 742, 743, 744, 745, 746, 747, 0, 0, + 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 0, 762, 0, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 772, 773, 774, 0, + 0, 0, 775, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, + 0, 791, 792, 793, 794, 795, 796, 797, 0, 798, + 799, 800, 801, 802, 0, 0, 934, 803, 804, 805, + 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, + 816, 817, 818, 819, 820, 821, 822, 823, 997, 824, + 825, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 984, 0, 0, 0, 0, 0, 0, 987, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 710, 711, 712, 713, 714, 715, - 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, - 726, 0, 0, 727, 728, 729, 730, 731, 732, 733, - 734, 735, 736, 737, 738, 739, 740, 0, 741, 0, - 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, - 752, 753, 0, 0, 0, 754, 0, 755, 0, 756, - 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, - 767, 768, 769, 0, 770, 771, 772, 773, 774, 775, - 776, 0, 777, 778, 779, 780, 781, 0, 0, 0, - 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, - 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, - 802, 0, 803, 804, 477, 478, 479, 10, 0, 11, - 480, 481, 44, 0, 0, 482, 0, 0, 0, 0, + 716, 717, 718, 719, 0, 720, 721, 722, 723, 724, + 725, 726, 727, 728, 729, 730, 0, 553, 0, 0, + 0, 0, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 0, + 0, 748, 749, 750, 751, 752, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 0, 762, 1030, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 0, 0, 1037, 775, 0, 776, 0, 777, 778, 779, + 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, + 790, 0, 791, 792, 793, 794, 795, 796, 797, 0, + 798, 799, 800, 801, 802, 0, 0, 0, 803, 804, + 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, + 815, 816, 817, 818, 819, 820, 821, 822, 823, 0, + 824, 825, 498, 499, 500, 10, 0, 11, 501, 502, + 44, 0, 0, 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 149, 150, 151, 152, 153, - 154, 155, 0, 0, 0, 0, 0, 483, 0, 0, - 156, 45, 0, 46, 47, 48, 49, 484, 0, 51, - 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, - 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, - 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, - 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, - 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, - 0, 64, 0, 65, 477, 478, 479, 10, 0, 11, - 480, 481, 44, 0, 0, 873, 493, 0, 0, 0, - 494, 1035, 0, 0, 495, 0, 496, 0, 0, 0, - 497, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 0, 168, 169, 170, 0, 483, 0, 365, - 0, 45, 0, 46, 47, 48, 49, 484, 0, 51, - 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, - 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, - 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, - 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, - 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, - 0, 64, 0, 65, 7, 8, 9, 10, 0, 11, - 12, 13, 131, 0, 0, 0, 493, 0, 0, 0, - 494, 0, 0, 0, 495, 0, 496, 0, 0, 0, - 497, 0, 0, 0, 148, 149, 150, 151, 152, 153, - 154, 155, 0, 0, 0, 0, 0, 15, 0, 0, - 156, 132, 0, 133, 134, 135, 49, 50, 0, 51, - 0, 0, 136, 21, 0, 0, 53, 0, 0, 0, - 0, 22, 137, 0, 0, 0, 0, 0, 138, 139, - 57, 0, 0, 0, 0, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 140, 141, 30, 0, 0, 31, - 60, 0, 0, 32, 0, 0, 61, 62, 142, 0, - 0, 64, 0, 143, 477, 478, 479, 10, 0, 11, - 480, 481, 44, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 0, 38, 0, 39, 0, 0, 0, - 40, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 0, 168, 169, 170, 0, 483, 0, 969, - 0, 45, 0, 46, 47, 48, 49, 484, 0, 51, - 0, 0, 52, 485, 0, 0, 53, 0, 0, 0, - 0, 486, 54, 0, 0, 0, 0, 0, 55, 56, - 57, 0, 0, 0, 0, 487, 0, 488, 0, 0, - 0, 0, 489, 0, 58, 59, 490, 0, 0, 491, - 60, 0, 0, 492, 0, 0, 61, 62, 63, 0, - 0, 64, 0, 65, 7, 8, 9, 10, 0, 11, - 12, 13, 14, 0, 0, 0, 493, 0, 0, 0, - 494, 0, 0, 0, 495, 0, 496, 0, 0, 0, - 497, 934, 935, 936, 937, 938, 939, 0, 0, 0, - 45, 0, 46, 47, 48, 940, 0, 15, 0, 0, - 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 20, 21, 0, 0, 0, 55, 179, 57, - 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, - 0, 0, 0, 58, 59, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 28, 29, 30, 63, 0, 31, - 0, 0, 65, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 121, 35, 0, 0, 0, - 36, 37, 0, 0, 38, 0, 39, 0, 290, 944, - 40, 0, 945, 946, 947, 948, 949, 15, 950, 951, - 952, 16, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 20, 21, 0, 0, 0, 0, 0, -2, - 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, - 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 79, 424, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 80, 38, 0, 39, 0, 81, 0, - 40, 82, 0, 0, 0, 0, 0, 15, 0, 83, - 84, 16, 85, 17, 18, 19, 0, 86, 87, 88, - 0, 0, 20, 21, 0, 0, 89, 0, 0, 90, - 0, 22, 23, 91, 0, 0, 0, 92, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 93, 0, - 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, - 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 79, 529, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 80, 38, 0, 39, 0, 81, 0, - 40, 82, 0, 0, 0, 0, 0, 15, 0, 83, - 84, 16, 85, 17, 18, 19, 0, 86, 87, 88, - 0, 0, 20, 21, 0, 0, 89, 0, 0, 90, - 0, 22, 23, 91, 0, 0, 0, 92, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, - 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 0, 38, 0, 39, 0, 897, 0, - 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, - 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, - 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 0, 912, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 0, 38, 0, 39, 0, 0, 0, - 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, - 0, 22, 23, 0, 0, 0, 0, 0, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, - 0, 0, 0, 0, 28, 29, 30, 0, 0, 31, - 0, 0, 0, 32, 7, 8, 9, 10, 33, 11, - 12, 13, 14, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 36, 37, 0, 0, 38, 0, 39, 0, 1007, 0, - 40, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 20, 21, 152, 153, 154, 155, 0, 0, - 0, 22, 23, 0, 0, 0, 156, 0, 24, 25, - 0, 0, 0, 0, 0, 26, 0, 27, 150, 151, - 152, 153, 154, 155, 28, 29, 30, 0, 0, 31, - 0, 0, 156, 32, 936, 937, 938, 939, 33, 0, - 0, 0, 0, 34, 0, 0, 940, 148, 149, 150, - 151, 152, 153, 154, 155, 0, 35, 0, 0, 0, - 36, 37, 538, 156, 38, 0, 39, 0, 0, 0, - 40, 539, 540, 541, 542, 543, 544, 545, 546, 0, - 0, 0, 0, 0, 0, 0, 0, 547, 0, 548, - 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, - 559, 161, 162, 163, 164, 165, 166, 167, 0, 168, - 169, 170, 0, 0, 0, 0, 560, 0, 0, 0, - 0, 0, 0, 0, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 0, 168, 169, 170, 0, 0, - 561, 0, 0, 945, 946, 947, 948, 949, 0, 950, - 951, 952, 0, 0, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 0, 168, 169, 170, 217, - 218, 0, 1031, 0, 562, 0, 0, 563, 0, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 0, 575, 576, 0, 0, 577, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 219, 45, - 0, 46, 47, 48, 49, 220, 0, 221, 0, 0, - 52, 0, 0, 0, 53, 222, 223, 224, 0, 0, - 54, 0, 0, 0, 0, 225, 55, 56, 57, 217, - 218, 226, 0, 0, 0, 0, 227, 0, 0, 0, - 228, 0, 58, 59, 0, 229, 0, 0, 60, 0, - 0, 0, 0, 0, 230, 62, 63, 0, 231, 64, - 232, 65, 0, 0, 0, 0, 233, 0, 219, 45, - 0, 46, 47, 48, 49, 220, 0, 221, 0, 0, - 52, 0, 234, 0, 53, 222, 223, 224, 0, 0, - 54, 0, 0, 217, 218, 225, 55, 56, 57, 0, - 0, 226, 0, 0, 0, 0, 227, 0, 0, 0, - 228, 0, 58, 59, 0, 229, 0, 0, 60, 0, - 0, 0, 0, 0, 230, 62, 63, 0, 231, 64, - 232, 65, 219, 45, 0, 46, 47, 48, 49, 320, - 0, 221, 0, 0, 52, 0, 0, 0, 53, 222, - 223, 224, 234, 0, 54, 0, 0, 0, 0, 225, - 55, 56, 57, 0, 0, 226, 0, 0, 0, 0, - 227, 0, 0, 0, 228, 0, 58, 59, 0, 229, - 0, 0, 60, 0, 0, 0, 0, 0, 230, 62, - 63, 0, 231, 64, 232, 65, 148, 149, 150, 151, - 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 156, 0, 0, 0, 234, 148, 149, 150, - 151, 152, 153, 154, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 156, 148, 149, 150, 151, 152, 153, - 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, - 156, 0, 148, 149, 150, 151, 152, 153, 154, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, - 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, - 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, - 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 0, 168, 169, 170, 385, 0, - 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 0, 168, 169, 170, 366, - 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 0, 168, 169, 170, 511, 363, 0, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 0, 168, 169, 170, 534, 0, 0, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 0, 168, - 169, 170, 148, 149, 150, 151, 152, 153, 154, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 156, 148, - 149, 150, 151, 152, 153, 154, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 156, 148, 149, 150, 151, - 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 156, 655, 656, 657, 658, 659, 660, 661, - 662, 0, 0, 0, 0, 0, 0, 0, 0, 663, - 932, 933, 934, 935, 936, 937, 938, 939, 0, 0, - 0, 0, 0, 0, 0, 0, 940, 149, 150, 151, - 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 156, 0, 0, 825, 0, 0, 0, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 0, 168, 169, 170, 967, 0, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 0, 168, 169, - 170, 0, 0, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 0, 168, 169, 170, 0, 0, - 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, - 674, 0, 675, 676, 677, 0, 0, 941, 942, 943, - 944, 0, 0, 945, 946, 947, 948, 949, 0, 950, - 951, 952, 0, 0, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 0, 168, 169, 170, 933, 934, - 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, - 0, 0, 0, 940, 150, 151, 152, 153, 154, 155, - 0, 0, 0, 45, 0, 46, 47, 48, 156, 150, - 151, 152, 153, 154, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 156, 934, 935, 936, 937, 938, 939, - 55, 179, 57, 0, 0, 0, 0, 0, 940, 150, - 151, 152, 153, 154, 155, 0, 58, 59, 0, 0, - 0, 0, 0, 156, 934, 935, 936, 937, 938, 939, - 63, 0, 0, 0, 0, 65, 0, 0, 940, 934, - 935, 936, 937, 938, 939, 0, 0, 0, 0, 0, - 0, 0, 0, 940, 0, 942, 943, 944, 122, 0, - 945, 946, 947, 948, 949, 0, 950, 951, 952, 0, - 0, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 0, 168, 169, 170, 0, 0, 0, 160, 161, 162, - 163, 164, 165, 166, 167, 0, 168, 169, 170, 0, - 942, 943, 944, 0, 0, 945, 946, 947, 948, 949, - 0, 950, 951, 952, 0, 0, 0, 0, 161, 162, - 163, 164, 165, 166, 167, 0, 168, 169, 170, 386, - 387, 943, 944, 0, 0, 945, 946, 947, 948, 949, - 0, 950, 951, 952, 0, 0, 0, 0, 0, 0, - 945, 946, 947, 948, 949, 0, 950, 951, 952, 45, - 0, 46, 47, 48, 0, 0, 386, 387, 0, 45, - 0, 46, 47, 48, 388, 389, 0, 0, 0, 0, - 52, 0, 0, 0, 0, 0, 55, 179, 57, 0, + 0, 0, 159, 160, 161, 162, 163, 164, 165, 166, + 0, 0, 0, 0, 0, 504, 0, 0, 167, 45, + 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, + 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 58, 59, 0, 0, 45, 0, 46, 47, - 48, 0, 58, 59, 0, 44, 63, 52, 0, 0, - 0, 65, 0, 0, 390, 0, 63, 54, 0, 64, - 0, 65, 0, 55, 56, 57, 0, 0, 0, 0, - 0, 0, 0, 45, 125, 46, 47, 48, 0, 58, - 59, 0, 0, 0, 45, 0, 46, 47, 48, 49, - 50, 0, 51, 63, 295, 52, 64, 0, 65, 53, - 55, 179, 57, 0, 0, 54, 44, 0, 0, 0, - 0, 55, 56, 57, 0, 0, 58, 59, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 59, 0, - 63, 0, 0, 60, 45, 65, 46, 47, 48, 61, - 62, 63, 0, 44, 64, 45, 65, 46, 47, 48, - 49, 329, 0, 51, 0, 0, 52, 0, 0, 0, - 53, 55, 179, 57, 0, 0, 54, 0, 0, 0, - 0, 0, 55, 56, 57, 0, 0, 58, 59, 0, - 0, 0, 45, 0, 46, 47, 48, 49, 58, 59, - 51, 63, 0, 52, 60, 0, 65, 53, 0, 0, - 61, 62, 63, 54, 44, 64, 0, 65, 0, 55, - 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 638, 0, 58, 59, 0, 0, 0, - 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, - 0, 115, 64, 45, 65, 46, 47, 48, 49, 0, - 0, 51, 0, 0, 52, 0, 0, 0, 53, 0, - 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, - 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, - 45, 0, 46, 47, 48, 49, 58, 59, 0, 0, - 0, 52, 60, 0, 0, 53, 0, 0, 61, 62, - 63, 54, 0, 64, 0, 65, 79, 55, 56, 57, + 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, + 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, + 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, + 0, 65, 498, 499, 500, 10, 0, 11, 501, 502, + 44, 0, 0, 893, 514, 0, 0, 0, 515, 0, + 0, 0, 516, 0, 517, 0, 0, 0, 518, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 0, 179, 180, 181, 383, 504, 0, 0, 0, 45, + 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, + 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, + 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, + 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, + 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, + 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, + 0, 65, 7, 8, 9, 10, 0, 11, 12, 13, + 142, 0, 0, 0, 514, 0, 0, 0, 515, 0, + 0, 0, 516, 0, 517, 0, 0, 0, 518, 0, + 0, 0, 159, 160, 161, 162, 163, 164, 165, 166, + 0, 0, 0, 0, 0, 15, 0, 0, 167, 143, + 0, 144, 145, 146, 49, 50, 0, 51, 0, 0, + 147, 21, 0, 0, 53, 0, 0, 0, 0, 22, + 148, 0, 0, 0, 0, 0, 149, 150, 57, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 151, 152, 30, 0, 0, 31, 60, 0, + 0, 32, 0, 0, 61, 62, 153, 0, 0, 64, + 0, 154, 498, 499, 500, 10, 0, 11, 501, 502, + 44, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 0, 0, 40, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 0, 179, 180, 181, 532, 504, 0, 0, 0, 45, + 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, + 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, + 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, + 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, + 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, + 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, + 0, 65, 7, 8, 9, 10, 0, 11, 12, 13, + 14, 0, 0, 0, 514, 0, 0, 0, 515, 0, + 0, 0, 516, 0, 517, 0, 0, 0, 518, 955, + 956, 957, 958, 959, 960, 0, 0, 0, 45, 0, + 46, 47, 48, 961, 0, 15, 0, 0, 0, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 55, 190, 57, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 58, 59, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 63, 0, 31, 0, 0, + 65, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 305, 965, 40, 0, + 966, 967, 968, 969, 970, 15, 971, 972, 973, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, + 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 0, 0, 0, 443, 0, 0, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, + 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 0, 0, 0, 550, 0, 0, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, + 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 918, 0, 40, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, + 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 0, 0, 0, 933, 0, 0, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, + 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, + 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, + 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, + 14, 34, 0, 7, 8, 9, 10, 0, 11, 12, + 13, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 0, 38, 0, 39, 0, 1028, 0, 40, 0, + 80, 0, 0, 0, 0, 15, 0, 0, 81, 16, + 0, 17, 18, 19, 0, 0, 865, 83, 84, 85, + 20, 21, 0, 0, 0, 0, 0, 211, 0, 22, + 23, 80, 866, 91, 0, 0, 24, 25, 0, 81, + 22, 0, 96, 26, 0, 27, 0, 97, 83, 84, + 85, 0, 28, 29, 30, 0, 27, 31, 211, 0, + 102, 32, 103, 0, 91, 867, 33, 0, 868, 0, + 0, 34, 32, 96, 0, 0, 0, -127, 97, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 102, 38, 103, 39, 869, 0, 0, 40, 870, + 871, 559, 0, 872, 0, 873, 242, 243, 0, 874, + 560, 561, 562, 563, 564, 565, 566, 567, 0, 0, + 0, 0, 0, 0, 0, 0, 568, 0, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, + 0, 0, 0, 0, 0, 0, 45, 0, 46, 47, + 48, 49, 244, 0, 245, 581, 0, 52, 0, 0, + 0, 53, 0, 0, 0, 0, 0, 54, 0, 0, + 0, 0, 0, 55, 56, 57, 0, 0, 0, 582, + 0, 0, 0, 246, 0, 0, 0, 0, 0, 58, + 59, 0, 0, 242, 243, 60, 0, 0, 0, 0, + 0, 247, 62, 63, 0, 0, 64, 0, 65, 0, + 0, 0, 0, 583, 0, 0, 584, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 249, + 596, 597, 0, 45, 598, 46, 47, 48, 49, 244, + 0, 245, 0, 0, 52, 0, 0, 0, 53, 0, + 0, 0, 0, 0, 54, 322, 0, 0, 0, 0, + 55, 56, 57, 242, 243, 0, 0, 0, 0, 0, + 246, 0, 0, 0, 0, 0, 58, 59, 0, 0, + 0, 0, 60, 0, 0, 0, 0, 0, 247, 62, + 63, 0, 0, 64, 45, 65, 46, 47, 48, 0, + 248, 0, 0, 45, 0, 46, 47, 48, 49, 338, + 0, 245, 0, 0, 52, 0, 249, 0, 53, 0, + 0, 55, 190, 57, 54, 0, 0, 0, 0, 0, + 55, 56, 57, 0, 0, 0, 0, 58, 59, 0, + 246, 0, 163, 164, 165, 166, 58, 59, 0, 0, + 0, 63, 60, 0, 167, 0, 65, 0, 247, 62, + 63, 0, 0, 64, 0, 65, 159, 160, 161, 162, + 163, 164, 165, 166, 0, 0, 0, 0, 0, 0, + 0, 0, 167, 0, 0, 0, 249, 159, 160, 161, + 162, 163, 164, 165, 166, 0, 0, 0, 0, 0, + 0, 0, 0, 167, 0, 0, 159, 160, 161, 162, + 163, 164, 165, 166, 0, 0, 0, 0, 0, 0, + 0, 0, 167, 159, 160, 161, 162, 163, 164, 165, + 166, 0, 0, 0, 0, 0, 0, 0, 0, 167, + 159, 160, 161, 162, 163, 164, 165, 166, 0, 172, + 173, 174, 175, 176, 177, 178, 167, 179, 180, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 80, 58, 59, 0, 0, 81, 0, 60, - 82, 0, 0, 0, 0, 116, 62, 63, 83, 84, - 64, 85, 65, 79, 0, 0, 86, 87, 88, 0, - 0, 0, 0, 0, 0, 89, 0, 0, 90, 80, - 0, 0, 91, 0, 81, 0, 92, 82, 0, 0, - 0, 0, 0, 0, 0, 83, 84, 93, 85, 0, - 0, 0, 0, 86, 87, 88, 79, 0, 0, 0, - 0, 0, 89, 0, 0, 90, 382, 0, 0, 91, - 0, 0, 80, 92, 0, 0, 0, 81, 0, 0, - 82, 0, 0, 0, 93, 0, 0, 0, 83, 84, - 0, 85, 0, 79, 0, 0, 86, 87, 88, 0, - 0, 0, 0, 446, 0, 89, 0, 0, 90, 80, - 0, 0, 91, 0, 81, 0, 92, 82, 0, 0, - 0, 0, 0, 0, 0, 83, 84, 93, 85, 0, - 0, 0, 0, 86, 87, 88, 79, 0, 0, 0, - 0, 0, 89, 0, 0, 90, 521, 0, 0, 91, - 0, 0, 80, 92, 0, 0, 0, 81, 0, 0, - 82, 0, 0, 0, 93, 0, 0, 0, 83, 84, - 45, 85, 46, 47, 48, 0, 86, 87, 88, 0, - 0, 175, 0, 612, 0, 89, 0, 0, 90, 0, - 0, 176, 91, 0, 0, 0, 92, 55, 177, 57, - 0, 45, 0, 46, 47, 48, 0, 93, 0, 0, - 0, 0, 175, 58, 59, 0, 0, 0, 0, 0, - 0, 0, 176, 0, 0, 0, 834, 63, 55, 177, - 57, 0, 65, 0, 0, 0, 0, 0, 0, 0, + 0, 380, 0, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 0, 179, 180, 181, 0, 0, + 0, 555, 0, 0, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 0, 179, 180, 181, 846, + 0, 0, 0, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 0, 179, 180, 181, 988, 0, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 0, 179, 180, 181, 0, 0, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 0, 179, + 180, 181, 676, 677, 678, 679, 680, 681, 682, 683, + 0, 0, 0, 0, 0, 0, 0, 0, 684, 953, + 954, 955, 956, 957, 958, 959, 960, 0, 0, 0, + 0, 0, 0, 0, 0, 961, 953, 954, 955, 956, + 957, 958, 959, 960, 0, 0, 0, 0, 0, 0, + 0, 0, 961, 160, 161, 162, 163, 164, 165, 166, + 0, 0, 0, 45, 0, 46, 47, 48, 167, 954, + 955, 956, 957, 958, 959, 960, 0, 0, 0, 0, + 0, 0, 0, 0, 961, 0, 0, 0, 0, 0, + 55, 190, 57, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 59, 0, 685, + 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, + 63, 696, 697, 698, 1050, 65, 962, 963, 964, 965, + 0, 0, 966, 967, 968, 969, 970, 0, 971, 972, + 973, 0, -2, 962, 963, 964, 965, 0, 133, 966, + 967, 968, 969, 970, 0, 971, 972, 973, 0, 0, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 0, 179, 180, 181, 0, 0, 963, 964, 965, 0, + 0, 966, 967, 968, 969, 970, 0, 971, 972, 973, + 79, 80, 0, 161, 162, 163, 164, 165, 166, 81, + 0, 0, 0, 0, 0, 0, 82, 167, 83, 84, + 85, 86, 0, 0, 87, 0, 0, 0, 88, 0, + 0, 0, 89, 90, 91, 92, 0, 0, 0, 0, + 93, 94, 95, 96, 0, 0, 0, 0, 97, 98, + 0, 0, 99, 0, 0, 0, 100, 0, 0, 0, + 101, 102, 0, 103, 161, 162, 163, 164, 165, 166, + 0, 104, 0, 0, 0, 0, 0, 0, 167, 161, + 162, 163, 164, 165, 166, 0, 0, 0, 0, 0, + 0, 0, 0, 167, 955, 956, 957, 958, 959, 960, + 0, 0, 45, 0, 46, 47, 48, 0, 961, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, + 179, 180, 181, 955, 956, 957, 958, 959, 960, 55, + 190, 57, 0, 0, 0, 0, 0, 961, 0, 0, + 0, 0, 0, 0, 0, 58, 59, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 0, 179, 180, 181, 0, 0, 0, 171, 172, 173, + 174, 175, 176, 177, 178, 0, 179, 180, 181, 0, + 963, 964, 965, 405, 406, 966, 967, 968, 969, 970, + 0, 971, 972, 973, 0, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 46, 47, 48, 0, 0, 0, + 964, 965, 0, 0, 966, 967, 968, 969, 970, 0, + 971, 972, 973, 45, 0, 46, 47, 48, 0, 55, + 190, 57, 44, 0, 52, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 54, 58, 59, 0, 0, 0, + 55, 56, 57, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 0, 65, 0, 58, 59, 0, 0, + 0, 45, 0, 46, 47, 48, 49, 50, 0, 51, + 63, 0, 52, 64, 0, 65, 53, 136, 0, 0, + 0, 0, 54, 44, 0, 0, 0, 0, 55, 56, + 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 114, 0, 0, 63, 0, - 0, 0, 0, 65 + 60, 0, 0, 0, 0, 0, 61, 62, 63, 0, + 44, 64, 45, 65, 46, 47, 48, 49, 346, 0, + 51, 0, 0, 52, 0, 0, 0, 53, 0, 0, + 0, 0, 0, 54, 0, 0, 0, 0, 0, 55, + 56, 57, 0, 0, 0, 0, 0, 0, 0, 45, + 0, 46, 47, 48, 49, 58, 59, 51, 0, 0, + 52, 60, 0, 0, 53, 0, 0, 61, 62, 63, + 54, 44, 64, 0, 65, 0, 55, 56, 57, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 659, 0, 58, 59, 0, 0, 0, 0, 60, 0, + 0, 0, 0, 0, 61, 62, 63, 0, 126, 64, + 45, 65, 46, 47, 48, 49, 0, 0, 51, 0, + 0, 52, 0, 0, 0, 53, 0, 0, 0, 0, + 0, 54, 0, 0, 0, 0, 0, 55, 56, 57, + 0, 0, 0, 0, 0, 0, 0, 45, 0, 46, + 47, 48, 49, 58, 59, 0, 0, 0, 52, 60, + 0, 0, 53, 0, 0, 61, 62, 63, 54, 0, + 64, 0, 65, 0, 55, 56, 57, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 58, 59, 79, 80, 0, 0, 60, 0, 0, 0, + 0, 81, 127, 62, 63, 0, 0, 64, 82, 65, + 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, + 88, 0, 0, 0, 89, 90, 91, 92, 0, 0, + 0, 0, 93, 94, 95, 96, 0, 0, 79, 80, + 97, 98, 0, 0, 99, 0, 0, 81, 100, 0, + 0, 0, 101, 102, 82, 103, 83, 84, 85, 86, + 0, 0, 87, 104, 0, 0, 88, 0, 0, 0, + 89, 90, 91, 92, 0, 0, 0, 0, 93, 94, + 95, 96, 401, 0, 79, 80, 97, 98, 0, 0, + 99, 0, 0, 81, 100, 0, 0, 0, 101, 102, + 82, 103, 83, 84, 85, 86, 0, 0, 87, 104, + 0, 0, 88, 0, 0, 0, 89, 90, 91, 92, + 0, 0, 0, 0, 93, 94, 95, 96, 465, 0, + 79, 80, 97, 98, 0, 0, 99, 0, 0, 81, + 100, 0, 0, 0, 101, 102, 82, 103, 83, 84, + 85, 86, 0, 0, 87, 104, 0, 0, 88, 0, + 0, 0, 89, 90, 91, 92, 0, 0, 0, 0, + 93, 94, 95, 96, 473, 0, 79, 80, 97, 98, + 0, 0, 99, 0, 0, 81, 100, 0, 0, 0, + 101, 102, 82, 103, 83, 84, 85, 86, 0, 0, + 87, 104, 0, 0, 88, 0, 0, 0, 89, 90, + 91, 92, 0, 0, 0, 0, 93, 94, 95, 96, + 542, 0, 79, 80, 97, 98, 0, 0, 99, 0, + 0, 81, 100, 0, 0, 0, 101, 102, 82, 103, + 83, 84, 85, 86, 0, 0, 87, 104, 0, 0, + 88, 0, 0, 0, 89, 90, 91, 92, 0, 0, + 0, 0, 93, 94, 95, 96, 634, 0, 79, 80, + 97, 98, 0, 0, 99, 0, 0, 81, 100, 0, + 0, 0, 101, 102, 82, 103, 83, 84, 85, 86, + 0, 0, 87, 104, 0, 0, 88, 0, 0, 0, + 89, 90, 91, 92, 0, 0, 0, 0, 93, 94, + 95, 96, 855, 0, 0, 0, 97, 98, 0, 45, + 99, 46, 47, 48, 100, 0, 0, 0, 101, 102, + 186, 103, 0, 0, 0, 0, 0, 0, 0, 104, + 187, 0, 0, 0, 0, 0, 55, 188, 57, 0, + 79, 80, 0, 0, 0, 0, 0, 0, 856, 81, + 0, 0, 58, 59, 0, 0, 82, 0, 83, 84, + 85, 86, 0, 0, 87, 0, 63, 0, 88, 0, + 0, 65, 89, 90, 91, 92, 0, 0, 0, 0, + 93, 94, 95, 96, 0, 0, 0, 0, 97, 98, + 0, 0, 99, 0, 125, 45, 100, 46, 47, 48, + 101, 102, 80, 103, 0, 0, 186, 0, 0, 0, + 81, 0, 0, 0, 0, 0, 187, 0, 0, 83, + 84, 85, 55, 188, 57, 0, 0, 0, 0, 211, + 0, 0, 0, 0, 0, 91, 220, 0, 58, 59, + 0, 0, 0, 0, 96, 0, 0, 0, 0, 97, + 0, 0, 63, 0, 0, 0, 0, 65, 0, 0, + 0, 0, 102, 0, 103 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-594))) + (!!((Yystate) == (-642))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 529, 2, 384, 5, 39, 90, 91, 90, 403, - 310, 26, 489, 12, 204, 50, 10, 11, 0, 400, - 26, 476, 403, 97, 10, 11, 106, 107, 108, 109, - 110, 118, 112, 113, 114, 35, 36, 37, 38, 628, - 40, 121, 122, 121, 135, 125, 126, 118, 442, 118, - 137, 6, 6, 8, 8, 510, 135, 321, 136, 118, - 520, 442, 88, 89, 90, 66, 137, 97, 137, 26, - 448, 449, 399, 10, 11, 402, 117, 404, 137, 120, - 14, 117, 97, 109, 120, 459, 10, 11, 681, 90, - 91, 97, 466, 467, 468, 469, 470, 471, 173, 118, - 427, 428, 135, 430, 431, 432, 433, 481, 489, 10, - 11, 135, 187, 188, 189, 190, 191, 192, 137, 97, - 137, 311, 10, 11, 135, 118, 586, 501, 522, 118, - 39, 130, 121, 135, 120, 169, 210, 437, 135, 213, - 97, 522, 332, 137, 137, 31, 83, 474, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 629, - 170, 435, 173, 126, 174, 31, 653, 257, 633, 506, - 210, 636, 137, 213, 118, 220, 187, 188, 189, 190, - 191, 192, 227, 383, 195, 210, 105, 135, 213, 654, - 201, 118, 111, 204, 210, 135, 118, 213, 535, 209, - 135, 118, 476, 135, 123, 124, 117, 135, 596, 121, - 137, 296, 600, 118, 602, 137, 604, 605, 606, 117, - 137, 824, 210, 406, 136, 213, 118, 410, 411, 412, - 413, 414, 137, 10, 11, 118, 510, 621, 134, 135, - 136, 118, 85, 210, 135, 137, 213, 126, 847, 848, - 849, 850, 452, 852, 137, 639, 266, 267, 101, 6, - 137, 8, 653, 135, 120, 10, 11, 12, 134, 135, - 136, 16, 120, 136, 137, 320, 135, 136, 55, 135, - 136, 137, 686, 135, 329, 296, 135, 135, 136, 137, - 117, 118, 303, 303, 117, 686, 119, 120, 121, 117, - 311, 312, 135, 319, 907, 316, 135, 136, 319, 120, - 120, 56, 135, 136, 135, 10, 11, 327, 120, 330, - 120, 332, 99, 120, 135, 136, 137, 337, 105, 106, - 513, 135, 109, 932, 933, 934, 935, 936, 937, 938, - 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, - 949, 950, 126, 363, 135, 400, 4, 130, 403, 633, - 55, 136, 10, 11, 375, 120, 111, 461, 10, 461, - 126, 974, 383, 389, 912, 978, 114, 115, 116, 6, - 125, 135, 136, 394, 117, 130, 135, 986, 119, 400, - 135, 135, 403, 135, 438, 406, 440, 442, 863, 410, - 411, 412, 413, 414, 99, 137, 417, 136, 137, 420, - 105, 106, 118, 424, 424, 819, 1019, 88, 89, 90, - 1023, 10, 11, 12, 435, 137, 137, 16, 819, 12, - 1029, 442, 137, 16, 1037, 445, 137, 137, 528, 484, - 137, 452, 127, 1046, 489, 456, 462, 137, 459, 137, - 461, 137, 496, 137, 137, 466, 467, 468, 469, 470, - 471, 472, 487, 137, 127, 476, 138, 56, 137, 137, - 481, 487, 117, 56, 119, 120, 121, 522, 862, 120, - 447, 448, 449, 493, 494, 495, 118, 497, 118, 135, - 501, 135, 117, 958, 137, 135, 135, 117, 87, 510, - 904, 118, 513, 10, 11, 140, 10, 118, 127, 520, - 520, 522, 130, 904, 130, 138, 920, 130, 529, 529, - 487, 858, 111, 135, 118, 10, 11, 61, 111, 920, - 121, 121, 100, 130, 135, 135, 125, 136, 72, 73, - 126, 130, 125, 138, 126, 137, 135, 130, 55, 137, - 10, 85, 135, 118, 118, 140, 137, 137, 92, 10, - 119, 136, 118, 135, 137, 56, 903, 971, 4, 135, - 55, 118, 135, 140, 584, 586, 586, 496, 138, 137, - 971, 138, 116, 137, 118, 119, 135, 31, 56, 140, - 58, 59, 99, 638, 137, 63, 607, 137, 105, 106, - 126, 126, 109, 135, 615, 140, 118, 137, 653, 127, - 621, 127, 135, 1017, 99, 137, 137, 954, 629, 629, - 105, 106, 633, 137, 109, 636, 1017, 119, 639, 596, - 119, 137, 676, 600, 135, 602, 135, 604, 605, 606, - 651, 686, 31, 654, 137, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, - 670, 671, 672, 673, 674, 675, 135, 677, 138, 203, - 681, 139, 140, 141, 142, 686, 10, 11, 12, 21, - 22, 215, 16, 137, 128, 129, 130, 131, 132, 31, - 134, 135, 136, 127, 137, 614, 230, 616, 137, 137, - 234, 127, 137, 135, 135, 527, 240, 241, 137, 177, - 137, 179, 821, 201, 903, 858, 954, 213, 637, 462, - 461, 640, 56, 389, 643, 644, 21, 22, 196, 847, - 848, 849, 850, 615, 852, 213, 31, 487, 453, 128, - 129, 130, 131, 132, 526, 134, 135, 136, -1, 782, - -1, -1, -1, -1, -1, -1, -1, 15, 16, 17, - 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - 304, 782, -1, 31, 819, 865, -1, 111, -1, -1, - 31, -1, -1, -1, -1, -1, 128, 129, 130, 131, - 132, 125, 134, 135, 136, -1, 130, -1, -1, -1, - -1, 811, 336, -1, -1, -1, -1, 851, 819, -1, - -1, -1, -1, 824, 932, 933, 934, 935, 936, 937, - 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, - 948, 949, 950, 128, 129, 130, 131, 132, -1, 134, - 135, 136, 310, -1, -1, 31, -1, 381, -1, 859, - -1, 862, 863, -1, 388, -1, 390, -1, 868, 904, - -1, -1, 120, -1, 122, 123, 124, 125, 986, -1, - 128, 129, 130, 131, 132, 920, 134, 135, 136, 130, - 131, 132, -1, 134, 135, 136, -1, -1, -1, -1, - -1, -1, -1, 904, -1, -1, 907, -1, 11, -1, - -1, 912, 912, -1, -1, -1, -1, 951, -1, 920, - -1, 1029, -1, 447, 448, 449, -1, -1, 3, 4, - 5, 6, -1, 8, 9, 10, 971, -1, -1, -1, - -1, -1, 851, -1, -1, -1, -1, 50, -1, 52, - 53, 54, 952, -1, 130, 131, 132, 958, 134, 135, - 136, -1, -1, -1, -1, -1, -1, 967, -1, -1, - 971, 46, -1, 974, 77, 78, 79, 978, 1012, 437, - 1014, -1, 1017, -1, -1, -1, -1, 62, -1, -1, - 93, 94, -1, -1, -1, 70, -1, -1, -1, -1, - -1, -1, -1, 527, 107, -1, 1040, 1041, -1, 112, - -1, 86, 921, 922, 923, 924, 1017, -1, 1019, -1, - 95, -1, 1023, 98, -1, -1, -1, 102, -1, -1, - -1, -1, -1, -1, -1, -1, 1037, -1, -1, -1, - -1, -1, -1, -1, -1, 1046, -1, -1, -1, -1, - 125, -1, -1, -1, 129, 130, -1, -1, 133, 583, - 135, -1, -1, -1, 139, -1, -1, -1, -1, -1, - -1, 595, 596, 597, -1, -1, 600, -1, 602, -1, - 604, 605, 606, -1, -1, -1, -1, 611, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - -1, -1, -1, -1, -1, -1, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, -1, -1, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, - 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, -1, -1, -1, 82, -1, 84, - -1, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, -1, 101, 102, 103, 104, - 105, 106, 107, -1, 109, 110, 111, 112, 113, -1, - -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, -1, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, - -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, -1, -1, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, -1, 65, -1, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, -1, -1, -1, 82, -1, 84, -1, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, -1, 101, 102, 103, 104, 105, 106, - 107, -1, 109, 110, 111, 112, 113, -1, -1, -1, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, -1, 139, 140, 3, 4, 5, 6, -1, 8, - 9, 10, 11, -1, -1, 14, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 15, 16, 17, 18, 19, 20, - 21, 22, -1, -1, -1, -1, -1, 46, -1, -1, - 31, 50, -1, 52, 53, 54, 55, 56, -1, 58, - -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, - 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, - -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, - 9, 10, 11, -1, -1, 14, 125, -1, -1, -1, - 129, 1015, -1, -1, 133, -1, 135, -1, -1, -1, - 139, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, -1, 134, 135, 136, -1, 46, -1, 140, - -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, - -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, - 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, - -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, - 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, - 129, -1, -1, -1, 133, -1, 135, -1, -1, -1, - 139, -1, -1, -1, 15, 16, 17, 18, 19, 20, - 21, 22, -1, -1, -1, -1, -1, 46, -1, -1, - 31, 50, -1, 52, 53, 54, 55, 56, -1, 58, - -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, - -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, - 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, -1, 133, -1, 135, -1, -1, -1, - 139, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, -1, 134, 135, 136, -1, 46, -1, 140, - -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, - -1, -1, 61, 62, -1, -1, 65, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - 79, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, 91, -1, 93, 94, 95, -1, -1, 98, - 99, -1, -1, 102, -1, -1, 105, 106, 107, -1, - -1, 110, -1, 112, 3, 4, 5, 6, -1, 8, - 9, 10, 11, -1, -1, -1, 125, -1, -1, -1, - 129, -1, -1, -1, 133, -1, 135, -1, -1, -1, - 139, 17, 18, 19, 20, 21, 22, -1, -1, -1, - 50, -1, 52, 53, 54, 31, -1, 46, -1, -1, - -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, - -1, -1, 61, 62, -1, -1, -1, 77, 78, 79, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - -1, -1, -1, 93, 94, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, 107, -1, 98, - -1, -1, 112, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 135, 125, -1, -1, -1, - 129, 130, -1, -1, 133, -1, 135, -1, 137, 125, - 139, -1, 128, 129, 130, 131, 132, 46, 134, 135, - 136, 50, -1, 52, 53, 54, -1, -1, -1, -1, - -1, -1, 61, 62, -1, -1, -1, -1, -1, 0, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, 48, 117, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, 64, 133, -1, 135, -1, 69, -1, - 139, 72, -1, -1, -1, -1, -1, 46, -1, 80, - 81, 50, 83, 52, 53, 54, -1, 88, 89, 90, - -1, -1, 61, 62, -1, -1, 97, -1, -1, 100, - -1, 70, 71, 104, -1, -1, -1, 108, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, 119, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, 48, 117, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, 64, 133, -1, 135, -1, 69, -1, - 139, 72, -1, -1, -1, -1, -1, 46, -1, 80, - 81, 50, 83, 52, 53, 54, -1, 88, 89, 90, - -1, -1, 61, 62, -1, -1, 97, -1, -1, 100, - -1, 70, 71, 104, -1, -1, -1, 108, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, -1, 133, -1, 135, -1, 137, -1, - 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, - -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, - -1, -1, 61, 62, -1, -1, -1, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, -1, 117, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, -1, 133, -1, 135, -1, -1, -1, - 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, - -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, - -1, -1, 61, 62, -1, -1, -1, -1, -1, -1, - -1, 70, 71, -1, -1, -1, -1, -1, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, -1, -1, - -1, -1, -1, -1, 93, 94, 95, -1, -1, 98, - -1, -1, -1, 102, 3, 4, 5, 6, 107, 8, - 9, 10, 11, 112, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - 129, 130, -1, -1, 133, -1, 135, -1, 137, -1, - 139, -1, -1, -1, -1, -1, -1, 46, -1, -1, - -1, 50, -1, 52, 53, 54, -1, -1, -1, -1, - -1, -1, 61, 62, 19, 20, 21, 22, -1, -1, - -1, 70, 71, -1, -1, -1, 31, -1, 77, 78, - -1, -1, -1, -1, -1, 84, -1, 86, 17, 18, - 19, 20, 21, 22, 93, 94, 95, -1, -1, 98, - -1, -1, 31, 102, 19, 20, 21, 22, 107, -1, - -1, -1, -1, 112, -1, -1, 31, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 125, -1, -1, -1, - 129, 130, 6, 31, 133, -1, 135, -1, -1, -1, - 139, 15, 16, 17, 18, 19, 20, 21, 22, -1, - -1, -1, -1, -1, -1, -1, -1, 31, -1, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 126, 127, 128, 129, 130, 131, 132, -1, 134, - 135, 136, -1, -1, -1, -1, 60, -1, -1, -1, - -1, -1, -1, -1, 123, 124, 125, 126, 127, 128, + 1, 99, 117, 118, 119, 120, 121, 550, 123, 124, + 125, 26, 26, 510, 497, 325, 50, 132, 133, 39, + 108, 136, 137, 339, 10, 11, 467, 468, 422, 225, + 403, 6, 12, 8, 80, 81, 108, 83, 84, 85, + 10, 11, 88, 0, 39, 91, 419, 118, 531, 422, + 96, 97, 14, 99, 100, 118, 102, 103, 10, 11, + 135, 702, 184, 108, 118, 66, 137, 461, 118, 85, + 418, 10, 11, 421, 137, 423, 198, 199, 200, 201, + 202, 203, 135, 137, 26, 101, 541, 137, 461, 117, + 31, 135, 120, 108, 108, 135, 10, 11, 446, 447, + 480, 449, 450, 451, 452, 135, 118, 487, 488, 489, + 490, 491, 492, 83, 115, 126, 117, 118, 119, 120, + 121, 116, 123, 124, 125, 137, 135, 122, 10, 11, + 326, 132, 133, 135, 330, 136, 137, 510, 454, 134, + 135, 31, 522, 10, 11, 233, 456, 495, 236, 543, + 130, 137, 607, 349, 31, 118, 118, 272, 121, 135, + 180, 233, 137, 135, 236, 211, 108, 135, 120, 215, + 543, 56, 655, 58, 59, 135, 617, 674, 63, 527, + 621, 497, 623, 184, 625, 626, 627, 135, 233, 311, + 118, 236, 675, 134, 135, 136, 651, 198, 199, 200, + 201, 202, 203, 117, 845, 206, 402, 118, 556, 137, + 244, 31, 246, 135, 118, 531, 61, 117, 233, 233, + 120, 236, 236, 6, 225, 8, 137, 72, 73, 126, + 10, 11, 12, 137, 121, 117, 16, 10, 11, 12, + 130, 131, 132, 16, 134, 135, 136, 92, 12, 136, + 117, 135, 16, 130, 131, 132, 101, 134, 135, 136, + 88, 89, 90, 643, 135, 150, 151, 152, 153, 118, + 118, 272, 136, 137, 118, 471, 56, 118, 474, 118, + 660, 109, 127, 56, 129, 130, 117, 928, 137, 137, + 120, 233, 56, 137, 236, 6, 137, 8, 137, 135, + 136, 674, 4, 188, 338, 190, 121, 87, 10, 11, + 311, 135, 346, 707, 134, 135, 136, 318, 114, 115, + 116, 136, 207, 337, 135, 326, 327, 10, 11, 330, + 135, 111, 117, 118, 707, 135, 337, 135, 111, 655, + 137, 21, 22, 135, 136, 125, 347, 111, 349, 120, + 130, 31, 125, 120, 995, 135, 130, 130, 999, 135, + 136, 125, 135, 10, 11, 12, 130, 136, 137, 16, + 120, 135, 55, 136, 120, 220, 10, 117, 223, 119, + 120, 121, 117, 126, 482, 419, 135, 135, 422, 119, + 933, 135, 137, 238, 408, 135, 136, 118, 137, 1040, + 883, 402, 247, 1044, 249, 21, 22, 127, 137, 56, + 255, 256, 413, 137, 137, 31, 99, 1058, 419, 137, + 137, 422, 105, 106, 425, 137, 1067, 461, 429, 430, + 431, 432, 433, 137, 549, 127, 482, 457, 439, 459, + 325, 117, 443, 119, 120, 121, 840, 137, 128, 129, + 130, 131, 132, 454, 134, 135, 136, 88, 89, 90, + 461, 138, 137, 137, 111, 120, 137, 840, 137, 483, + 471, 505, 137, 474, 319, 120, 510, 117, 125, 480, + 135, 136, 137, 130, 135, 118, 487, 488, 489, 490, + 491, 492, 493, 508, 508, 978, 497, 517, 19, 20, + 21, 22, 882, 118, 140, 135, 135, 135, 353, 543, + 31, 137, 128, 129, 130, 131, 132, 117, 134, 135, + 136, 522, 517, 117, 466, 467, 468, 118, 120, 10, + 531, 925, 880, 534, 31, 118, 138, 127, 135, 118, + 541, 130, 543, 135, 136, 137, 130, 941, 549, 550, + 130, 121, 925, 425, 121, 400, 2, 429, 430, 431, + 432, 433, 407, 135, 409, 130, 508, 126, 941, 135, + 126, 456, 118, 137, 137, 136, 924, 10, 138, 15, + 16, 17, 18, 19, 20, 21, 22, 120, 137, 35, + 36, 37, 38, 140, 40, 31, 118, 137, 992, 10, + 119, 136, 135, 136, 137, 118, 607, 128, 129, 130, + 131, 132, 135, 134, 135, 136, 56, 137, 4, 992, + 135, 466, 467, 468, 118, 659, 140, 975, 137, 140, + 138, 128, 129, 130, 131, 132, 637, 134, 135, 136, + 674, 636, 643, 638, 1038, 137, 126, 138, 137, 137, + 651, 135, 135, 135, 655, 126, 118, 127, 127, 660, + 137, 140, 534, 658, 137, 1038, 661, 10, 11, 664, + 665, 672, 135, 707, 675, 617, 137, 697, 137, 621, + 119, 623, 119, 625, 626, 627, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 135, 134, 135, + 136, 702, 137, 548, 140, 137, 707, 135, 135, 138, + 127, 137, 55, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 137, 181, 137, 137, 127, 185, + 137, 135, 135, 219, 548, 137, 137, 6, 15, 16, + 17, 18, 19, 20, 21, 22, 99, 842, 924, 604, + 880, 975, 105, 106, 31, 408, 109, 482, 236, 483, + 885, 616, 617, 618, 637, 508, 621, 472, 623, 236, + 625, 626, 627, -1, 803, 547, 232, -1, 633, 31, + 49, -1, -1, -1, -1, -1, -1, -1, 57, -1, + -1, -1, 803, 650, -1, -1, 840, 66, 67, 68, + -1, -1, -1, -1, -1, -1, -1, 76, -1, -1, + -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, + -1, -1, 91, -1, -1, 281, 282, 96, -1, 840, + 10, 11, -1, -1, 845, -1, -1, -1, -1, -1, + 109, -1, 111, 873, -1, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, + -1, -1, 318, 140, -1, -1, -1, -1, 873, -1, + -1, 882, 883, -1, 885, 55, 128, 129, 130, 131, + 132, 925, 134, 135, 136, -1, -1, -1, -1, 345, + -1, -1, -1, -1, -1, -1, -1, 941, 354, -1, + -1, 10, 11, -1, -1, -1, -1, 17, 18, 19, + 20, 21, 22, -1, 925, -1, -1, 928, -1, 99, + -1, 31, 933, -1, 380, 105, 106, -1, -1, 109, + 941, 17, 18, 19, 20, 21, 22, 942, 943, 944, + 945, -1, 972, -1, -1, 31, 55, -1, 992, 50, + -1, 52, 53, 54, -1, -1, 15, 16, 17, 18, + 19, 20, 21, 22, -1, -1, -1, 978, -1, -1, + 71, -1, 31, -1, -1, -1, 77, 78, 79, -1, + -1, 992, -1, -1, 995, -1, -1, 443, 999, -1, + 99, -1, 93, 94, 1038, -1, 105, 106, -1, -1, + 109, -1, -1, 1033, -1, 1035, 107, -1, 464, -1, + -1, 112, 869, 870, 871, 872, -1, 874, 128, 129, + 130, 131, 132, -1, 134, 135, 136, 1038, -1, 1040, + -1, 1061, 1062, 1044, 869, 870, 871, 872, -1, 874, + 126, 127, 128, 129, 130, 131, 132, 1058, 134, 135, + 136, -1, -1, -1, -1, -1, 1067, -1, 514, 515, + 516, -1, 518, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, - 84, -1, -1, 128, 129, 130, 131, 132, -1, 134, - 135, 136, -1, -1, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, -1, 134, 135, 136, 10, - 11, -1, 140, -1, 118, -1, -1, 121, -1, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - -1, 135, 136, -1, -1, 139, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 49, 50, + -1, 140, -1, -1, -1, 541, -1, -1, -1, -1, + -1, -1, -1, -1, 550, -1, 953, 954, 955, 956, + 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, + 967, 968, 969, 970, 971, -1, 10, 11, 953, 954, + 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, + 965, 966, 967, 968, 969, 970, 971, -1, 15, 16, + 17, 18, 19, 20, 21, 22, -1, 49, -1, 605, + 1007, 607, -1, -1, 31, 57, 50, -1, 52, 53, + 54, 55, 56, -1, 66, 67, 68, 61, -1, -1, + -1, -1, 1007, -1, 76, -1, -1, 71, -1, -1, + 82, 1036, -1, 77, 78, 79, -1, -1, -1, 91, + -1, -1, -1, 1050, 96, 651, -1, -1, 100, 93, + 94, -1, -1, -1, -1, -1, -1, 109, -1, 111, + -1, 105, -1, 107, -1, 1050, 110, -1, 112, -1, + 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, + 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, + 696, 118, 698, -1, -1, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, + 137, -1, -1, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, -1, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, -1, -1, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, -1, 65, -1, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, + -1, -1, 82, -1, 84, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + -1, 101, 102, 103, 104, 105, 106, 107, -1, 109, + 110, 111, 112, 113, -1, -1, 832, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 888, -1, -1, -1, -1, -1, -1, 895, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, -1, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, 933, -1, -1, + -1, -1, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, -1, + -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, -1, 65, 973, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + -1, -1, 988, 82, -1, 84, -1, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, -1, 101, 102, 103, 104, 105, 106, 107, -1, + 109, 110, 111, 112, 113, -1, -1, -1, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, -1, + 139, 140, 3, 4, 5, 6, -1, 8, 9, 10, + 11, -1, -1, 14, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, + -1, -1, -1, -1, -1, 46, -1, -1, 31, 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, -1, -1, -1, 65, 66, 67, 68, -1, -1, - 71, -1, -1, -1, -1, 76, 77, 78, 79, 10, - 11, 82, -1, -1, -1, -1, 87, -1, -1, -1, - 91, -1, 93, 94, -1, 96, -1, -1, 99, -1, - -1, -1, -1, -1, 105, 106, 107, -1, 109, 110, - 111, 112, -1, -1, -1, -1, 117, -1, 49, 50, + 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, + -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, + -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, + 11, -1, -1, 14, 125, -1, -1, -1, 129, -1, + -1, -1, 133, -1, 135, -1, -1, -1, 139, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, 137, 46, -1, -1, -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, -1, 133, -1, 65, 66, 67, 68, -1, -1, - 71, -1, -1, 10, 11, 76, 77, 78, 79, -1, - -1, 82, -1, -1, -1, -1, 87, -1, -1, -1, - 91, -1, 93, 94, -1, 96, -1, -1, 99, -1, - -1, -1, -1, -1, 105, 106, 107, -1, 109, 110, - 111, 112, 49, 50, -1, 52, 53, 54, 55, 56, - -1, 58, -1, -1, 61, -1, -1, -1, 65, 66, - 67, 68, 133, -1, 71, -1, -1, -1, -1, 76, - 77, 78, 79, -1, -1, 82, -1, -1, -1, -1, - 87, -1, -1, -1, 91, -1, 93, 94, -1, 96, + 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, + -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, + -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, + 11, -1, -1, -1, 125, -1, -1, -1, 129, -1, + -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, + -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, + -1, -1, -1, -1, -1, 46, -1, -1, 31, 50, + -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, + 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, 99, -1, + -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, + -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, + 11, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, -1, -1, 139, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, 137, 46, -1, -1, -1, 50, + -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, + 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, + -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, + -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, + 11, -1, -1, -1, 125, -1, -1, -1, 129, -1, + -1, -1, 133, -1, 135, -1, -1, -1, 139, 17, + 18, 19, 20, 21, 22, -1, -1, -1, 50, -1, + 52, 53, 54, 31, -1, 46, -1, -1, -1, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, 77, 78, 79, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, 93, 94, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, 107, -1, 98, -1, -1, + 112, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 135, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, 137, 125, 139, -1, + 128, 129, 130, 131, 132, 46, 134, 135, 136, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, + -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, + -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, + -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, + -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, + -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, + -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, + -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, 137, -1, 139, -1, + -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, + -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, + -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, + -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, + -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, + 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, + -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, + -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, + 11, 112, -1, 3, 4, 5, 6, -1, 8, 9, + 10, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, -1, 133, -1, 135, -1, 137, -1, 139, -1, + 49, -1, -1, -1, -1, 46, -1, -1, 57, 50, + -1, 52, 53, 54, -1, -1, 46, 66, 67, 68, + 61, 62, -1, -1, -1, -1, -1, 76, -1, 70, + 71, 49, 62, 82, -1, -1, 77, 78, -1, 57, + 70, -1, 91, 84, -1, 86, -1, 96, 66, 67, + 68, -1, 93, 94, 95, -1, 86, 98, 76, -1, + 109, 102, 111, -1, 82, 95, 107, -1, 98, -1, + -1, 112, 102, 91, -1, -1, -1, 126, 96, -1, + -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, + -1, 109, 133, 111, 135, 125, -1, -1, 139, 129, + 130, 6, -1, 133, -1, 135, 10, 11, -1, 139, + 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, + -1, -1, -1, -1, -1, -1, 31, -1, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + -1, -1, -1, -1, -1, -1, 50, -1, 52, 53, + 54, 55, 56, -1, 58, 60, -1, 61, -1, -1, + -1, 65, -1, -1, -1, -1, -1, 71, -1, -1, + -1, -1, -1, 77, 78, 79, -1, -1, -1, 84, + -1, -1, -1, 87, -1, -1, -1, -1, -1, 93, + 94, -1, -1, 10, 11, 99, -1, -1, -1, -1, + -1, 105, 106, 107, -1, -1, 110, -1, 112, -1, + -1, -1, -1, 118, -1, -1, 121, -1, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, + 135, 136, -1, 50, 139, 52, 53, 54, 55, 56, + -1, 58, -1, -1, 61, -1, -1, -1, 65, -1, + -1, -1, -1, -1, 71, 11, -1, -1, -1, -1, + 77, 78, 79, 10, 11, -1, -1, -1, -1, -1, + 87, -1, -1, -1, -1, -1, 93, 94, -1, -1, -1, -1, 99, -1, -1, -1, -1, -1, 105, 106, - 107, -1, 109, 110, 111, 112, 15, 16, 17, 18, + 107, -1, -1, 110, 50, 112, 52, 53, 54, -1, + 117, -1, -1, 50, -1, 52, 53, 54, 55, 56, + -1, 58, -1, -1, 61, -1, 133, -1, 65, -1, + -1, 77, 78, 79, 71, -1, -1, -1, -1, -1, + 77, 78, 79, -1, -1, -1, -1, 93, 94, -1, + 87, -1, 19, 20, 21, 22, 93, 94, -1, -1, + -1, 107, 99, -1, 31, -1, 112, -1, 105, 106, + 107, -1, -1, 110, -1, 112, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, -1, -1, 133, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, - 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, - 31, -1, 15, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, - 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, - -1, -1, -1, -1, -1, -1, 31, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 118, + -1, -1, -1, 31, -1, -1, 15, 16, 17, 18, + 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, + 15, 16, 17, 18, 19, 20, 21, 22, -1, 126, + 127, 128, 129, 130, 131, 132, 31, 134, 135, 136, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 120, -1, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, + -1, 119, -1, -1, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 118, -1, -1, -1, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, -1, 134, 135, 136, 137, -1, - -1, -1, -1, -1, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, -1, 134, 135, 136, 137, - -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, -1, 134, 135, 136, 137, 120, -1, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, 119, -1, -1, 122, 123, 124, + 129, 130, 131, 132, -1, 134, 135, 136, 120, -1, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, -1, 134, 135, 136, -1, -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, - 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, - 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, - -1, -1, -1, -1, -1, -1, 31, 16, 17, 18, - 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, 31, -1, -1, 118, -1, -1, -1, 122, + -1, -1, 31, 16, 17, 18, 19, 20, 21, 22, + -1, -1, -1, 50, -1, 52, 53, 54, 31, 16, + 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, + -1, -1, -1, -1, 31, -1, -1, -1, -1, -1, + 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, 94, -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, 120, -1, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, - 136, -1, -1, 122, 123, 124, 125, 126, 127, 128, + 107, 134, 135, 136, 120, 112, 122, 123, 124, 125, + -1, -1, 128, 129, 130, 131, 132, -1, 134, 135, + 136, -1, 0, 122, 123, 124, 125, -1, 135, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, -1, 134, 135, 136, -1, -1, 122, 123, 124, - 125, -1, -1, 128, 129, 130, 131, 132, -1, 134, - 135, 136, -1, -1, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, -1, 134, 135, 136, 16, 17, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + -1, 134, 135, 136, -1, -1, 123, 124, 125, -1, + -1, 128, 129, 130, 131, 132, -1, 134, 135, 136, + 48, 49, -1, 17, 18, 19, 20, 21, 22, 57, + -1, -1, -1, -1, -1, -1, 64, 31, 66, 67, + 68, 69, -1, -1, 72, -1, -1, -1, 76, -1, + -1, -1, 80, 81, 82, 83, -1, -1, -1, -1, + 88, 89, 90, 91, -1, -1, -1, -1, 96, 97, + -1, -1, 100, -1, -1, -1, 104, -1, -1, -1, + 108, 109, -1, 111, 17, 18, 19, 20, 21, 22, + -1, 119, -1, -1, -1, -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, - -1, -1, -1, 50, -1, 52, 53, 54, 31, 17, - 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, - 77, 78, 79, -1, -1, -1, -1, -1, 31, 17, - 18, 19, 20, 21, 22, -1, 93, 94, -1, -1, - -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, - 107, -1, -1, -1, -1, 112, -1, -1, 31, 17, - 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, 31, -1, 123, 124, 125, 135, -1, - 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, + -1, -1, 50, -1, 52, 53, 54, -1, 31, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, + 134, 135, 136, 17, 18, 19, 20, 21, 22, 77, + 78, 79, -1, -1, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 93, 94, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, + -1, -1, -1, -1, 112, -1, -1, -1, -1, -1, -1, 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, -1, 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, - 123, 124, 125, -1, -1, 128, 129, 130, 131, 132, - -1, 134, 135, 136, -1, -1, -1, -1, 126, 127, - 128, 129, 130, 131, 132, -1, 134, 135, 136, 10, - 11, 124, 125, -1, -1, 128, 129, 130, 131, 132, + 123, 124, 125, 10, 11, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, -1, -1, -1, -1, - 128, 129, 130, 131, 132, -1, 134, 135, 136, 50, - -1, 52, 53, 54, -1, -1, 10, 11, -1, 50, - -1, 52, 53, 54, 55, 56, -1, -1, -1, -1, - 61, -1, -1, -1, -1, -1, 77, 78, 79, -1, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - -1, -1, 93, 94, -1, -1, 50, -1, 52, 53, - 54, -1, 93, 94, -1, 11, 107, 61, -1, -1, - -1, 112, -1, -1, 105, -1, 107, 71, -1, 110, - -1, 112, -1, 77, 78, 79, -1, -1, -1, -1, - -1, -1, -1, 50, 135, 52, 53, 54, -1, 93, - 94, -1, -1, -1, 50, -1, 52, 53, 54, 55, - 56, -1, 58, 107, 71, 61, 110, -1, 112, 65, - 77, 78, 79, -1, -1, 71, 11, -1, -1, -1, - -1, 77, 78, 79, -1, -1, 93, 94, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, 94, -1, - 107, -1, -1, 99, 50, 112, 52, 53, 54, 105, - 106, 107, -1, 11, 110, 50, 112, 52, 53, 54, - 55, 56, -1, 58, -1, -1, 61, -1, -1, -1, - 65, 77, 78, 79, -1, -1, 71, -1, -1, -1, - -1, -1, 77, 78, 79, -1, -1, 93, 94, -1, - -1, -1, 50, -1, 52, 53, 54, 55, 93, 94, - 58, 107, -1, 61, 99, -1, 112, 65, -1, -1, - 105, 106, 107, 71, 11, 110, -1, 112, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, - -1, 99, -1, -1, -1, -1, -1, 105, 106, 107, - -1, 11, 110, 50, 112, 52, 53, 54, 55, -1, - -1, 58, -1, -1, 61, -1, -1, -1, 65, -1, - -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, - 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, - 50, -1, 52, 53, 54, 55, 93, 94, -1, -1, - -1, 61, 99, -1, -1, 65, -1, -1, 105, 106, - 107, 71, -1, 110, -1, 112, 48, 77, 78, 79, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, 93, 94, -1, -1, 69, -1, 99, - 72, -1, -1, -1, -1, 105, 106, 107, 80, 81, - 110, 83, 112, 48, -1, -1, 88, 89, 90, -1, - -1, -1, -1, -1, -1, 97, -1, -1, 100, 64, - -1, -1, 104, -1, 69, -1, 108, 72, -1, -1, - -1, -1, -1, -1, -1, 80, 81, 119, 83, -1, - -1, -1, -1, 88, 89, 90, 48, -1, -1, -1, - -1, -1, 97, -1, -1, 100, 138, -1, -1, 104, - -1, -1, 64, 108, -1, -1, -1, 69, -1, -1, - 72, -1, -1, -1, 119, -1, -1, -1, 80, 81, - -1, 83, -1, 48, -1, -1, 88, 89, 90, -1, - -1, -1, -1, 138, -1, 97, -1, -1, 100, 64, - -1, -1, 104, -1, 69, -1, 108, 72, -1, -1, - -1, -1, -1, -1, -1, 80, 81, 119, 83, -1, - -1, -1, -1, 88, 89, 90, 48, -1, -1, -1, - -1, -1, 97, -1, -1, 100, 138, -1, -1, 104, - -1, -1, 64, 108, -1, -1, -1, 69, -1, -1, - 72, -1, -1, -1, 119, -1, -1, -1, 80, 81, - 50, 83, 52, 53, 54, -1, 88, 89, 90, -1, - -1, 61, -1, 138, -1, 97, -1, -1, 100, -1, - -1, 71, 104, -1, -1, -1, 108, 77, 78, 79, - -1, 50, -1, 52, 53, 54, -1, 119, -1, -1, - -1, -1, 61, 93, 94, -1, -1, -1, -1, -1, - -1, -1, 71, -1, -1, -1, 138, 107, 77, 78, - 79, -1, 112, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 50, -1, 52, 53, 54, -1, -1, -1, + 124, 125, -1, -1, 128, 129, 130, 131, 132, -1, + 134, 135, 136, 50, -1, 52, 53, 54, -1, 77, + 78, 79, 11, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 71, 93, 94, -1, -1, -1, + 77, 78, 79, -1, -1, -1, -1, -1, -1, 107, + -1, -1, -1, -1, 112, -1, 93, 94, -1, -1, + -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, + 107, -1, 61, 110, -1, 112, 65, 135, -1, -1, + -1, -1, 71, 11, -1, -1, -1, -1, 77, 78, + 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, 94, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 135, -1, -1, 107, -1, - -1, -1, -1, 112 + 99, -1, -1, -1, -1, -1, 105, 106, 107, -1, + 11, 110, 50, 112, 52, 53, 54, 55, 56, -1, + 58, -1, -1, 61, -1, -1, -1, 65, -1, -1, + -1, -1, -1, 71, -1, -1, -1, -1, -1, 77, + 78, 79, -1, -1, -1, -1, -1, -1, -1, 50, + -1, 52, 53, 54, 55, 93, 94, 58, -1, -1, + 61, 99, -1, -1, 65, -1, -1, 105, 106, 107, + 71, 11, 110, -1, 112, -1, 77, 78, 79, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, -1, 93, 94, -1, -1, -1, -1, 99, -1, + -1, -1, -1, -1, 105, 106, 107, -1, 11, 110, + 50, 112, 52, 53, 54, 55, -1, -1, 58, -1, + -1, 61, -1, -1, -1, 65, -1, -1, -1, -1, + -1, 71, -1, -1, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, -1, -1, -1, 50, -1, 52, + 53, 54, 55, 93, 94, -1, -1, -1, 61, 99, + -1, -1, 65, -1, -1, 105, 106, 107, 71, -1, + 110, -1, 112, -1, 77, 78, 79, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, 94, 48, 49, -1, -1, 99, -1, -1, -1, + -1, 57, 105, 106, 107, -1, -1, 110, 64, 112, + 66, 67, 68, 69, -1, -1, 72, -1, -1, -1, + 76, -1, -1, -1, 80, 81, 82, 83, -1, -1, + -1, -1, 88, 89, 90, 91, -1, -1, 48, 49, + 96, 97, -1, -1, 100, -1, -1, 57, 104, -1, + -1, -1, 108, 109, 64, 111, 66, 67, 68, 69, + -1, -1, 72, 119, -1, -1, 76, -1, -1, -1, + 80, 81, 82, 83, -1, -1, -1, -1, 88, 89, + 90, 91, 138, -1, 48, 49, 96, 97, -1, -1, + 100, -1, -1, 57, 104, -1, -1, -1, 108, 109, + 64, 111, 66, 67, 68, 69, -1, -1, 72, 119, + -1, -1, 76, -1, -1, -1, 80, 81, 82, 83, + -1, -1, -1, -1, 88, 89, 90, 91, 138, -1, + 48, 49, 96, 97, -1, -1, 100, -1, -1, 57, + 104, -1, -1, -1, 108, 109, 64, 111, 66, 67, + 68, 69, -1, -1, 72, 119, -1, -1, 76, -1, + -1, -1, 80, 81, 82, 83, -1, -1, -1, -1, + 88, 89, 90, 91, 138, -1, 48, 49, 96, 97, + -1, -1, 100, -1, -1, 57, 104, -1, -1, -1, + 108, 109, 64, 111, 66, 67, 68, 69, -1, -1, + 72, 119, -1, -1, 76, -1, -1, -1, 80, 81, + 82, 83, -1, -1, -1, -1, 88, 89, 90, 91, + 138, -1, 48, 49, 96, 97, -1, -1, 100, -1, + -1, 57, 104, -1, -1, -1, 108, 109, 64, 111, + 66, 67, 68, 69, -1, -1, 72, 119, -1, -1, + 76, -1, -1, -1, 80, 81, 82, 83, -1, -1, + -1, -1, 88, 89, 90, 91, 138, -1, 48, 49, + 96, 97, -1, -1, 100, -1, -1, 57, 104, -1, + -1, -1, 108, 109, 64, 111, 66, 67, 68, 69, + -1, -1, 72, 119, -1, -1, 76, -1, -1, -1, + 80, 81, 82, 83, -1, -1, -1, -1, 88, 89, + 90, 91, 138, -1, -1, -1, 96, 97, -1, 50, + 100, 52, 53, 54, 104, -1, -1, -1, 108, 109, + 61, 111, -1, -1, -1, -1, -1, -1, -1, 119, + 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, + 48, 49, -1, -1, -1, -1, -1, -1, 138, 57, + -1, -1, 93, 94, -1, -1, 64, -1, 66, 67, + 68, 69, -1, -1, 72, -1, 107, -1, 76, -1, + -1, 112, 80, 81, 82, 83, -1, -1, -1, -1, + 88, 89, 90, 91, -1, -1, -1, -1, 96, 97, + -1, -1, 100, -1, 135, 50, 104, 52, 53, 54, + 108, 109, 49, 111, -1, -1, 61, -1, -1, -1, + 57, -1, -1, -1, -1, -1, 71, -1, -1, 66, + 67, 68, 77, 78, 79, -1, -1, -1, -1, 76, + -1, -1, -1, -1, -1, 82, 83, -1, 93, 94, + -1, -1, -1, -1, 91, -1, -1, -1, -1, 96, + -1, -1, 107, -1, -1, -1, -1, 112, -1, -1, + -1, -1, 109, -1, 111 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 114, 115, 116, 142, 143, 233, 3, 4, 5, + 0, 114, 115, 116, 142, 143, 234, 3, 4, 5, 6, 8, 9, 10, 11, 46, 50, 52, 53, 54, 61, 62, 70, 71, 77, 78, 84, 86, 93, 94, 95, 98, 102, 107, 112, 125, 129, 130, 133, 135, - 139, 226, 227, 232, 11, 50, 52, 53, 54, 55, + 139, 227, 228, 233, 11, 50, 52, 53, 54, 55, 56, 58, 61, 65, 71, 77, 78, 79, 93, 94, 99, 105, 106, 107, 110, 112, 193, 196, 197, 199, - 204, 205, 209, 210, 214, 215, 216, 217, 0, 48, - 64, 69, 72, 80, 81, 83, 88, 89, 90, 97, - 100, 104, 108, 119, 146, 148, 149, 151, 152, 153, - 174, 211, 213, 233, 135, 135, 135, 135, 135, 135, - 135, 126, 135, 135, 135, 11, 105, 195, 209, 210, - 214, 135, 135, 135, 126, 135, 135, 226, 226, 226, - 226, 11, 50, 52, 53, 54, 61, 71, 77, 78, - 93, 94, 107, 112, 196, 224, 226, 226, 15, 16, - 17, 18, 19, 20, 21, 22, 31, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, - 136, 6, 8, 193, 135, 61, 71, 78, 215, 78, - 215, 215, 10, 11, 231, 215, 12, 16, 56, 111, - 125, 130, 135, 192, 233, 117, 120, 231, 117, 231, - 120, 150, 135, 135, 117, 231, 120, 120, 120, 135, - 151, 152, 175, 151, 158, 83, 231, 10, 11, 49, - 56, 58, 66, 67, 68, 76, 82, 87, 91, 96, - 105, 109, 111, 117, 133, 163, 194, 197, 199, 204, - 209, 210, 214, 223, 224, 233, 196, 223, 223, 223, - 223, 223, 196, 223, 223, 223, 231, 135, 231, 231, - 223, 223, 196, 196, 223, 223, 137, 118, 137, 226, + 204, 205, 209, 210, 215, 216, 217, 218, 0, 48, + 49, 57, 64, 66, 67, 68, 69, 72, 76, 80, + 81, 82, 83, 88, 89, 90, 91, 96, 97, 100, + 104, 108, 109, 111, 119, 146, 148, 149, 151, 152, + 153, 174, 211, 214, 234, 135, 135, 135, 135, 135, + 135, 135, 126, 135, 135, 135, 11, 105, 195, 209, + 210, 215, 135, 135, 135, 126, 135, 135, 227, 227, + 227, 227, 11, 50, 52, 53, 54, 61, 71, 77, + 78, 93, 94, 107, 112, 196, 225, 227, 227, 15, + 16, 17, 18, 19, 20, 21, 22, 31, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, + 135, 136, 6, 8, 193, 135, 61, 71, 78, 216, + 78, 216, 216, 10, 11, 232, 216, 12, 16, 56, + 111, 125, 130, 135, 192, 234, 117, 120, 232, 117, + 232, 76, 151, 151, 151, 6, 151, 151, 120, 150, + 83, 151, 135, 135, 151, 117, 232, 120, 120, 120, + 151, 151, 135, 151, 152, 175, 151, 158, 83, 232, + 151, 151, 10, 11, 56, 58, 87, 105, 117, 133, + 163, 194, 197, 199, 204, 209, 210, 215, 224, 225, + 234, 196, 224, 224, 224, 224, 224, 196, 224, 224, + 224, 232, 135, 232, 232, 224, 224, 196, 196, 224, + 224, 137, 118, 137, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 137, 225, 227, 192, 227, + 71, 130, 192, 192, 192, 192, 192, 192, 136, 207, + 208, 234, 11, 206, 216, 120, 198, 200, 151, 148, + 117, 232, 10, 232, 143, 117, 227, 126, 56, 163, + 194, 232, 135, 135, 193, 135, 56, 193, 232, 147, + 232, 117, 119, 120, 121, 186, 119, 154, 232, 232, + 137, 137, 137, 137, 137, 137, 137, 127, 137, 137, + 137, 224, 137, 137, 137, 127, 137, 137, 227, 227, + 120, 137, 140, 137, 192, 137, 223, 227, 234, 232, + 138, 206, 143, 120, 201, 202, 234, 143, 117, 118, + 118, 138, 212, 118, 137, 10, 11, 55, 56, 105, + 176, 177, 178, 179, 215, 234, 193, 186, 159, 164, + 12, 130, 165, 155, 227, 193, 10, 11, 12, 16, + 56, 111, 125, 130, 190, 234, 143, 135, 219, 220, + 144, 145, 232, 117, 227, 12, 16, 56, 87, 111, + 125, 130, 135, 156, 180, 232, 120, 135, 137, 135, + 227, 135, 140, 118, 121, 138, 88, 89, 90, 109, + 203, 117, 118, 138, 213, 10, 232, 143, 233, 232, + 179, 232, 127, 118, 10, 11, 12, 16, 56, 111, + 125, 130, 135, 191, 234, 160, 161, 180, 3, 4, + 5, 9, 10, 14, 46, 56, 62, 70, 84, 86, + 91, 95, 98, 102, 125, 129, 133, 135, 139, 182, + 183, 189, 193, 229, 230, 233, 234, 130, 180, 182, + 157, 180, 137, 190, 130, 190, 190, 190, 190, 190, + 135, 136, 138, 166, 138, 221, 234, 117, 118, 135, + 117, 187, 188, 227, 234, 119, 130, 180, 180, 6, + 15, 16, 17, 18, 19, 20, 21, 22, 31, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 60, 84, 118, 121, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 135, 136, 139, 172, + 180, 180, 180, 180, 120, 121, 135, 136, 185, 186, + 234, 206, 225, 225, 182, 227, 105, 109, 210, 231, + 232, 109, 231, 109, 231, 88, 89, 90, 143, 203, + 143, 118, 137, 118, 138, 137, 121, 191, 121, 152, + 173, 174, 178, 130, 191, 191, 191, 191, 191, 191, + 121, 136, 184, 234, 162, 180, 185, 186, 135, 91, + 193, 126, 195, 189, 135, 126, 227, 227, 227, 196, + 225, 227, 137, 14, 118, 191, 15, 16, 17, 18, + 19, 20, 21, 22, 31, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 134, 135, 136, 180, + 120, 137, 137, 185, 186, 135, 190, 169, 223, 182, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 82, 84, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 101, 102, 103, 104, 105, 106, 107, 109, 110, + 111, 112, 113, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 139, 140, 222, 219, 145, 224, + 187, 138, 118, 180, 10, 137, 140, 137, 4, 227, + 181, 223, 118, 137, 137, 137, 118, 232, 231, 232, + 231, 231, 231, 231, 231, 138, 138, 10, 119, 232, + 196, 184, 196, 191, 137, 46, 62, 95, 98, 125, + 129, 130, 133, 135, 139, 226, 228, 223, 185, 186, + 118, 196, 193, 191, 196, 135, 196, 196, 137, 137, + 56, 171, 234, 14, 189, 121, 185, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 137, 225, + 227, 137, 135, 171, 118, 170, 182, 140, 137, 221, + 138, 137, 138, 117, 227, 182, 140, 156, 171, 137, + 137, 135, 135, 126, 135, 126, 226, 226, 226, 226, + 196, 225, 226, 15, 16, 17, 18, 19, 20, 21, + 22, 31, 122, 123, 124, 125, 128, 129, 130, 131, + 132, 134, 135, 136, 140, 118, 161, 137, 191, 185, + 127, 224, 137, 127, 227, 85, 101, 227, 120, 137, + 140, 135, 167, 157, 182, 137, 171, 138, 187, 137, + 119, 119, 182, 196, 196, 196, 196, 137, 137, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 137, 224, 226, 192, 226, 71, 130, 192, 192, 192, - 192, 192, 192, 136, 207, 208, 233, 11, 206, 215, - 120, 198, 200, 148, 10, 231, 143, 117, 226, 126, - 56, 163, 194, 231, 135, 135, 193, 135, 6, 56, - 193, 231, 147, 231, 117, 119, 120, 121, 186, 119, - 154, 231, 231, 137, 137, 137, 137, 137, 137, 137, - 127, 137, 137, 137, 223, 137, 137, 137, 127, 137, - 137, 226, 226, 120, 137, 140, 137, 192, 137, 222, - 226, 233, 231, 138, 206, 143, 120, 201, 202, 233, - 118, 118, 138, 212, 118, 137, 10, 11, 55, 56, - 105, 176, 177, 178, 179, 214, 233, 193, 186, 159, - 164, 12, 130, 165, 155, 226, 193, 10, 11, 12, - 16, 56, 111, 125, 130, 190, 233, 143, 135, 218, - 219, 144, 145, 231, 117, 226, 12, 16, 56, 87, - 111, 125, 130, 135, 156, 180, 231, 120, 135, 137, - 135, 226, 135, 140, 118, 121, 138, 88, 89, 90, - 109, 203, 117, 118, 10, 231, 143, 232, 231, 179, - 231, 127, 118, 10, 11, 12, 16, 56, 111, 125, - 130, 135, 191, 233, 160, 161, 180, 3, 4, 5, - 9, 10, 14, 46, 56, 62, 70, 84, 86, 91, - 95, 98, 102, 125, 129, 133, 135, 139, 182, 183, - 189, 193, 228, 229, 232, 233, 130, 180, 182, 157, - 180, 137, 190, 130, 190, 190, 190, 190, 190, 135, - 136, 138, 166, 138, 220, 233, 117, 118, 135, 117, - 187, 188, 226, 233, 119, 130, 180, 180, 6, 15, - 16, 17, 18, 19, 20, 21, 22, 31, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 60, 84, 118, 121, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 135, 136, 139, 172, 180, - 180, 180, 180, 120, 121, 135, 136, 185, 186, 233, - 206, 224, 224, 182, 226, 105, 109, 210, 230, 231, - 109, 230, 109, 230, 88, 89, 90, 143, 203, 118, - 137, 118, 138, 137, 121, 191, 121, 152, 173, 174, - 178, 130, 191, 191, 191, 191, 191, 191, 121, 136, - 184, 233, 162, 180, 185, 186, 191, 135, 91, 193, - 126, 195, 189, 135, 126, 226, 226, 226, 196, 224, - 226, 137, 14, 118, 191, 15, 16, 17, 18, 19, - 20, 21, 22, 31, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 134, 135, 136, 180, 120, - 137, 137, 185, 186, 135, 190, 169, 222, 182, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 82, 84, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, - 112, 113, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 139, 140, 221, 218, 145, 223, 187, - 138, 118, 180, 10, 137, 140, 137, 4, 226, 181, - 222, 118, 137, 137, 137, 118, 231, 230, 231, 230, - 230, 230, 230, 230, 138, 10, 119, 231, 196, 184, - 196, 191, 137, 46, 62, 95, 98, 125, 129, 130, - 133, 135, 139, 225, 227, 222, 185, 186, 118, 121, - 185, 196, 193, 191, 196, 135, 196, 196, 137, 137, - 56, 171, 233, 14, 189, 185, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 137, 224, 226, - 137, 135, 171, 118, 170, 182, 140, 137, 220, 138, - 137, 138, 117, 226, 182, 140, 156, 171, 137, 137, - 135, 135, 126, 135, 126, 225, 225, 225, 225, 196, - 224, 225, 15, 16, 17, 18, 19, 20, 21, 22, - 31, 122, 123, 124, 125, 128, 129, 130, 131, 132, - 134, 135, 136, 140, 118, 161, 226, 137, 191, 185, - 127, 223, 137, 127, 226, 85, 101, 120, 137, 140, - 135, 167, 157, 182, 137, 171, 138, 187, 137, 119, - 119, 182, 196, 196, 196, 196, 137, 137, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 137, 224, 226, - 162, 185, 135, 137, 135, 135, 226, 168, 182, 137, - 171, 138, 171, 137, 137, 127, 137, 127, 225, 120, - 137, 140, 224, 224, 137, 231, 182, 137, 171, 171, - 135, 135, 225, 137, 137, 137, 137, 171, 224, 224, - 171, 137, 137 + 226, 226, 226, 226, 226, 226, 226, 226, 137, 225, + 227, 162, 185, 135, 137, 135, 135, 227, 168, 182, + 137, 171, 138, 171, 137, 137, 127, 137, 127, 226, + 120, 137, 140, 225, 225, 137, 232, 182, 137, 171, + 171, 135, 135, 226, 137, 137, 137, 137, 171, 225, + 225, 171, 137, 137 }; #define yyerrok (yyerrstatus = 0) @@ -3723,7 +3805,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 581 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extern; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_extern; } break; @@ -3731,13 +3813,13 @@ yyreduce: /* Line 1792 of yacc.c */ #line 585 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (3)].u.integer) | (int)CPPInstance::SC_extern; - if ((yyvsp[(3) - (3)].str) == "C") { + (yyval.u.integer) = (yyvsp[(3) - (3)].u.integer) | (int)CPPInstance::SC_extern; + if ((yyvsp[(2) - (3)].str) == "C") { (yyval.u.integer) |= (int)CPPInstance::SC_c_binding; - } else if ((yyvsp[(3) - (3)].str) == "C++") { + } else if ((yyvsp[(2) - (3)].str) == "C++") { (yyval.u.integer) &= ~(int)CPPInstance::SC_c_binding; } else { - yywarning("Ignoring unknown linkage type \"" + (yyvsp[(3) - (3)].str) + "\"", (yylsp[(3) - (3)])); + yywarning("Ignoring unknown linkage type \"" + (yyvsp[(2) - (3)].str) + "\"", (yylsp[(2) - (3)])); } } break; @@ -3746,7 +3828,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 596 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_static; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_static; } break; @@ -3754,7 +3836,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 600 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_inline; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_inline; } break; @@ -3762,7 +3844,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 604 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_virtual; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_virtual; } break; @@ -3770,7 +3852,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 608 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_explicit; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_explicit; } break; @@ -3778,7 +3860,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 612 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_volatile; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_register; } break; @@ -3786,7 +3868,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 616 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_mutable; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_volatile; } break; @@ -3794,7 +3876,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 620 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_register; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_mutable; } break; @@ -3802,7 +3884,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 624 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_blocking; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_constexpr; } break; @@ -3810,15 +3892,15 @@ yyreduce: /* Line 1792 of yacc.c */ #line 628 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.integer) = (yyvsp[(1) - (2)].u.integer) | (int)CPPInstance::SC_extension; + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_blocking; } break; case 45: /* Line 1792 of yacc.c */ -#line 635 "dtool/src/cppparser/cppBison.yxx" +#line 632 "dtool/src/cppparser/cppBison.yxx" { - /* multiple_var_declaration adds itself to the scope. */ + (yyval.u.integer) = (yyvsp[(2) - (2)].u.integer) | (int)CPPInstance::SC_extension; } break; @@ -3826,6 +3908,14 @@ yyreduce: /* Line 1792 of yacc.c */ #line 639 "dtool/src/cppparser/cppBison.yxx" { + /* multiple_var_declaration adds itself to the scope. */ +} + break; + + case 47: +/* Line 1792 of yacc.c */ +#line 643 "dtool/src/cppparser/cppBison.yxx" + { // We don't really care about the storage class here. In fact, it's // not actually legal to define a class or struct using a particular // storage class, but we require it just to help yacc out in its @@ -3835,9 +3925,9 @@ yyreduce: } break; - case 47: + case 48: /* Line 1792 of yacc.c */ -#line 648 "dtool/src/cppparser/cppBison.yxx" +#line 652 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPInstance *)NULL) { (yyvsp[(2) - (3)].u.instance)->_storage_class |= (current_storage_class | (yyvsp[(1) - (3)].u.integer)); @@ -3847,9 +3937,9 @@ yyreduce: } break; - case 48: + case 49: /* Line 1792 of yacc.c */ -#line 659 "dtool/src/cppparser/cppBison.yxx" +#line 663 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3862,17 +3952,17 @@ yyreduce: } break; - case 49: + case 50: /* Line 1792 of yacc.c */ -#line 670 "dtool/src/cppparser/cppBison.yxx" +#line 674 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 50: + case 51: /* Line 1792 of yacc.c */ -#line 674 "dtool/src/cppparser/cppBison.yxx" +#line 678 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3881,17 +3971,17 @@ yyreduce: } break; - case 51: + case 52: /* Line 1792 of yacc.c */ -#line 681 "dtool/src/cppparser/cppBison.yxx" +#line 685 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 52: + case 53: /* Line 1792 of yacc.c */ -#line 692 "dtool/src/cppparser/cppBison.yxx" +#line 696 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), current_storage_class, @@ -3901,9 +3991,9 @@ yyreduce: } break; - case 53: + case 54: /* Line 1792 of yacc.c */ -#line 700 "dtool/src/cppparser/cppBison.yxx" +#line 704 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), current_storage_class, @@ -3913,9 +4003,9 @@ yyreduce: } break; - case 54: + case 55: /* Line 1792 of yacc.c */ -#line 711 "dtool/src/cppparser/cppBison.yxx" +#line 715 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (2)].u.inst_ident), @@ -3926,9 +4016,9 @@ yyreduce: } break; - case 55: + case 56: /* Line 1792 of yacc.c */ -#line 720 "dtool/src/cppparser/cppBison.yxx" +#line 724 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance(current_type, (yyvsp[(1) - (4)].u.inst_ident), @@ -3939,9 +4029,9 @@ yyreduce: } break; - case 56: + case 57: /* Line 1792 of yacc.c */ -#line 733 "dtool/src/cppparser/cppBison.yxx" +#line 737 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3954,17 +4044,17 @@ yyreduce: } break; - case 57: + case 58: /* Line 1792 of yacc.c */ -#line 744 "dtool/src/cppparser/cppBison.yxx" +#line 748 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 58: + case 59: /* Line 1792 of yacc.c */ -#line 748 "dtool/src/cppparser/cppBison.yxx" +#line 752 "dtool/src/cppparser/cppBison.yxx" { // We don't need to push/pop type, because we can't nest // multiple_var_declarations. @@ -3973,17 +4063,17 @@ yyreduce: } break; - case 59: + case 60: /* Line 1792 of yacc.c */ -#line 755 "dtool/src/cppparser/cppBison.yxx" +#line 759 "dtool/src/cppparser/cppBison.yxx" { pop_storage_class(); } break; - case 60: + case 61: /* Line 1792 of yacc.c */ -#line 759 "dtool/src/cppparser/cppBison.yxx" +#line 763 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(2) - (3)].u.instance) != (CPPDeclaration *)NULL) { CPPInstance *inst = (yyvsp[(2) - (3)].u.instance)->as_instance(); @@ -3997,9 +4087,9 @@ yyreduce: } break; - case 61: + case 62: /* Line 1792 of yacc.c */ -#line 774 "dtool/src/cppparser/cppBison.yxx" +#line 778 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (2)].u.inst_ident), current_scope, (yylsp[(1) - (2)]).file); @@ -4007,9 +4097,9 @@ yyreduce: } break; - case 62: + case 63: /* Line 1792 of yacc.c */ -#line 780 "dtool/src/cppparser/cppBison.yxx" +#line 784 "dtool/src/cppparser/cppBison.yxx" { CPPType *target_type = current_type; CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[(1) - (4)].u.inst_ident), current_scope, (yylsp[(1) - (4)]).file); @@ -4017,9 +4107,9 @@ yyreduce: } break; - case 63: + case 64: /* Line 1792 of yacc.c */ -#line 789 "dtool/src/cppparser/cppBison.yxx" +#line 793 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (2)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -4028,9 +4118,9 @@ yyreduce: } break; - case 64: + case 65: /* Line 1792 of yacc.c */ -#line 796 "dtool/src/cppparser/cppBison.yxx" +#line 800 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(1) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPType *target_type = current_type; @@ -4039,47 +4129,49 @@ yyreduce: } break; - case 65: -/* Line 1792 of yacc.c */ -#line 808 "dtool/src/cppparser/cppBison.yxx" - { - push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); -} - break; - case 66: /* Line 1792 of yacc.c */ #line 812 "dtool/src/cppparser/cppBison.yxx" { - pop_scope(); - CPPType *type; - if ((yyvsp[(1) - (6)].u.identifier)->get_simple_name() == current_scope->get_simple_name()) { - // This is a constructor, and has no return. - type = new CPPSimpleType(CPPSimpleType::T_void); - } else { - // This isn't a constructor, so it has an implicit return type of - // int. - type = new CPPSimpleType(CPPSimpleType::T_int); - } - - CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[(1) - (6)].u.identifier)); - ii->add_func_modifier((yyvsp[(4) - (6)].u.param_list), (yyvsp[(6) - (6)].u.integer)); - - (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[(1) - (6)]).file); + push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); } break; case 67: /* Line 1792 of yacc.c */ -#line 830 "dtool/src/cppparser/cppBison.yxx" +#line 816 "dtool/src/cppparser/cppBison.yxx" { - push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); + CPPType *type; + if ((yyvsp[(1) - (6)].u.identifier)->get_simple_name() == current_scope->get_simple_name() || + (yyvsp[(1) - (6)].u.identifier)->get_simple_name() == string("~") + current_scope->get_simple_name()) { + // This is a constructor, and has no return. + type = new CPPSimpleType(CPPSimpleType::T_void); + } else { + // This isn't a constructor, so it has an implicit return type of + // int. + yywarning("function has no return type, assuming int", (yylsp[(1) - (6)])); + type = new CPPSimpleType(CPPSimpleType::T_int); + } + pop_scope(); + + CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[(1) - (6)].u.identifier)); + ii->add_func_modifier((yyvsp[(4) - (6)].u.param_list), (yyvsp[(6) - (6)].u.integer)); + + (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[(1) - (6)]).file); } break; case 68: /* Line 1792 of yacc.c */ -#line 834 "dtool/src/cppparser/cppBison.yxx" +#line 836 "dtool/src/cppparser/cppBison.yxx" + { + push_scope((yyvsp[(1) - (2)].u.identifier)->get_scope(current_scope, global_scope)); +} + break; + + case 69: +/* Line 1792 of yacc.c */ +#line 840 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type; @@ -4099,17 +4191,17 @@ yyreduce: } break; - case 69: + case 70: /* Line 1792 of yacc.c */ -#line 854 "dtool/src/cppparser/cppBison.yxx" +#line 860 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(2) - (3)].u.identifier)->get_scope(current_scope, global_scope)); } break; - case 70: + case 71: /* Line 1792 of yacc.c */ -#line 858 "dtool/src/cppparser/cppBison.yxx" +#line 864 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); if ((yyvsp[(2) - (7)].u.identifier)->is_scoped()) { @@ -4130,17 +4222,17 @@ yyreduce: } break; - case 71: + case 72: /* Line 1792 of yacc.c */ -#line 884 "dtool/src/cppparser/cppBison.yxx" +#line 890 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(4) - (6)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 72: + case 73: /* Line 1792 of yacc.c */ -#line 888 "dtool/src/cppparser/cppBison.yxx" +#line 894 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (10)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -4156,17 +4248,17 @@ yyreduce: } break; - case 73: + case 74: /* Line 1792 of yacc.c */ -#line 902 "dtool/src/cppparser/cppBison.yxx" +#line 908 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(5) - (7)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 74: + case 75: /* Line 1792 of yacc.c */ -#line 906 "dtool/src/cppparser/cppBison.yxx" +#line 912 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); CPPType *type = (yyvsp[(1) - (11)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -4182,9 +4274,9 @@ yyreduce: } break; - case 75: + case 76: /* Line 1792 of yacc.c */ -#line 922 "dtool/src/cppparser/cppBison.yxx" +#line 928 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (4)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (4)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4192,9 +4284,9 @@ yyreduce: } break; - case 76: + case 77: /* Line 1792 of yacc.c */ -#line 928 "dtool/src/cppparser/cppBison.yxx" +#line 934 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (8)].u.identifier) != NULL) { pop_scope(); @@ -4221,9 +4313,9 @@ yyreduce: } break; - case 77: + case 78: /* Line 1792 of yacc.c */ -#line 953 "dtool/src/cppparser/cppBison.yxx" +#line 959 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (5)].u.identifier) != NULL) { push_scope((yyvsp[(1) - (5)].u.identifier)->get_scope(current_scope, global_scope)); @@ -4231,9 +4323,9 @@ yyreduce: } break; - case 78: + case 79: /* Line 1792 of yacc.c */ -#line 959 "dtool/src/cppparser/cppBison.yxx" +#line 965 "dtool/src/cppparser/cppBison.yxx" { if ((yyvsp[(1) - (9)].u.identifier) != NULL) { pop_scope(); @@ -4251,9 +4343,9 @@ yyreduce: } break; - case 79: + case 80: /* Line 1792 of yacc.c */ -#line 979 "dtool/src/cppparser/cppBison.yxx" +#line 985 "dtool/src/cppparser/cppBison.yxx" { CPPDeclaration *decl = (yyvsp[(1) - (1)].u.identifier)->find_symbol(current_scope, global_scope, current_lexer); @@ -4265,429 +4357,429 @@ yyreduce: } break; - case 80: + case 81: /* Line 1792 of yacc.c */ -#line 992 "dtool/src/cppparser/cppBison.yxx" +#line 998 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = 0; } break; - case 81: + case 82: /* Line 1792 of yacc.c */ -#line 996 "dtool/src/cppparser/cppBison.yxx" +#line 1002 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_const_method; } break; - case 82: + case 83: /* Line 1792 of yacc.c */ -#line 1000 "dtool/src/cppparser/cppBison.yxx" +#line 1006 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (int)CPPFunctionType::F_noexcept; } break; - case 83: + case 84: /* Line 1792 of yacc.c */ -#line 1004 "dtool/src/cppparser/cppBison.yxx" +#line 1010 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (4)].u.integer); } break; - case 84: + case 85: /* Line 1792 of yacc.c */ -#line 1008 "dtool/src/cppparser/cppBison.yxx" +#line 1014 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.integer) = (yyvsp[(1) - (5)].u.integer); } break; - case 85: + case 86: /* Line 1792 of yacc.c */ -#line 1015 "dtool/src/cppparser/cppBison.yxx" +#line 1021 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!"; } break; - case 86: + case 87: /* Line 1792 of yacc.c */ -#line 1019 "dtool/src/cppparser/cppBison.yxx" +#line 1025 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "~"; } break; - case 87: + case 88: /* Line 1792 of yacc.c */ -#line 1023 "dtool/src/cppparser/cppBison.yxx" +#line 1029 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*"; } break; - case 88: + case 89: /* Line 1792 of yacc.c */ -#line 1027 "dtool/src/cppparser/cppBison.yxx" +#line 1033 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/"; } break; - case 89: + case 90: /* Line 1792 of yacc.c */ -#line 1031 "dtool/src/cppparser/cppBison.yxx" +#line 1037 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%"; } break; - case 90: + case 91: /* Line 1792 of yacc.c */ -#line 1035 "dtool/src/cppparser/cppBison.yxx" +#line 1041 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+"; } break; - case 91: + case 92: /* Line 1792 of yacc.c */ -#line 1039 "dtool/src/cppparser/cppBison.yxx" +#line 1045 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-"; } break; - case 92: + case 93: /* Line 1792 of yacc.c */ -#line 1043 "dtool/src/cppparser/cppBison.yxx" +#line 1049 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|"; } break; - case 93: + case 94: /* Line 1792 of yacc.c */ -#line 1047 "dtool/src/cppparser/cppBison.yxx" +#line 1053 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&"; } break; - case 94: + case 95: /* Line 1792 of yacc.c */ -#line 1051 "dtool/src/cppparser/cppBison.yxx" +#line 1057 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^"; } break; - case 95: + case 96: /* Line 1792 of yacc.c */ -#line 1055 "dtool/src/cppparser/cppBison.yxx" +#line 1061 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "||"; } break; - case 96: + case 97: /* Line 1792 of yacc.c */ -#line 1059 "dtool/src/cppparser/cppBison.yxx" +#line 1065 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&&"; } break; - case 97: + case 98: /* Line 1792 of yacc.c */ -#line 1063 "dtool/src/cppparser/cppBison.yxx" +#line 1069 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "=="; } break; - case 98: + case 99: /* Line 1792 of yacc.c */ -#line 1067 "dtool/src/cppparser/cppBison.yxx" +#line 1073 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "!="; } break; - case 99: + case 100: /* Line 1792 of yacc.c */ -#line 1071 "dtool/src/cppparser/cppBison.yxx" +#line 1077 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<="; } break; - case 100: + case 101: /* Line 1792 of yacc.c */ -#line 1075 "dtool/src/cppparser/cppBison.yxx" +#line 1081 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">="; } break; - case 101: + case 102: /* Line 1792 of yacc.c */ -#line 1079 "dtool/src/cppparser/cppBison.yxx" +#line 1085 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<"; } break; - case 102: + case 103: /* Line 1792 of yacc.c */ -#line 1083 "dtool/src/cppparser/cppBison.yxx" +#line 1089 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">"; } break; - case 103: + case 104: /* Line 1792 of yacc.c */ -#line 1087 "dtool/src/cppparser/cppBison.yxx" +#line 1093 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<"; } break; - case 104: + case 105: /* Line 1792 of yacc.c */ -#line 1091 "dtool/src/cppparser/cppBison.yxx" +#line 1097 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>"; } break; - case 105: + case 106: /* Line 1792 of yacc.c */ -#line 1095 "dtool/src/cppparser/cppBison.yxx" +#line 1101 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "="; } break; - case 106: + case 107: /* Line 1792 of yacc.c */ -#line 1099 "dtool/src/cppparser/cppBison.yxx" +#line 1105 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ","; } break; - case 107: + case 108: /* Line 1792 of yacc.c */ -#line 1103 "dtool/src/cppparser/cppBison.yxx" +#line 1109 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "++"; } break; - case 108: + case 109: /* Line 1792 of yacc.c */ -#line 1107 "dtool/src/cppparser/cppBison.yxx" +#line 1113 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "--"; } break; - case 109: + case 110: /* Line 1792 of yacc.c */ -#line 1111 "dtool/src/cppparser/cppBison.yxx" +#line 1117 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "*="; } break; - case 110: + case 111: /* Line 1792 of yacc.c */ -#line 1115 "dtool/src/cppparser/cppBison.yxx" +#line 1121 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "/="; } break; - case 111: + case 112: /* Line 1792 of yacc.c */ -#line 1119 "dtool/src/cppparser/cppBison.yxx" +#line 1125 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "%="; } break; - case 112: + case 113: /* Line 1792 of yacc.c */ -#line 1123 "dtool/src/cppparser/cppBison.yxx" +#line 1129 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "+="; } break; - case 113: + case 114: /* Line 1792 of yacc.c */ -#line 1127 "dtool/src/cppparser/cppBison.yxx" +#line 1133 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "-="; } break; - case 114: + case 115: /* Line 1792 of yacc.c */ -#line 1131 "dtool/src/cppparser/cppBison.yxx" +#line 1137 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "|="; } break; - case 115: + case 116: /* Line 1792 of yacc.c */ -#line 1135 "dtool/src/cppparser/cppBison.yxx" +#line 1141 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "&="; } break; - case 116: + case 117: /* Line 1792 of yacc.c */ -#line 1139 "dtool/src/cppparser/cppBison.yxx" +#line 1145 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "^="; } break; - case 117: + case 118: /* Line 1792 of yacc.c */ -#line 1143 "dtool/src/cppparser/cppBison.yxx" +#line 1149 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "<<="; } break; - case 118: + case 119: /* Line 1792 of yacc.c */ -#line 1147 "dtool/src/cppparser/cppBison.yxx" +#line 1153 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = ">>="; } break; - case 119: + case 120: /* Line 1792 of yacc.c */ -#line 1151 "dtool/src/cppparser/cppBison.yxx" +#line 1157 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "->"; } break; - case 120: + case 121: /* Line 1792 of yacc.c */ -#line 1155 "dtool/src/cppparser/cppBison.yxx" +#line 1161 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "[]"; } break; - case 121: + case 122: /* Line 1792 of yacc.c */ -#line 1159 "dtool/src/cppparser/cppBison.yxx" +#line 1165 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "()"; } break; - case 122: + case 123: /* Line 1792 of yacc.c */ -#line 1163 "dtool/src/cppparser/cppBison.yxx" +#line 1169 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "new"; } break; - case 123: + case 124: /* Line 1792 of yacc.c */ -#line 1167 "dtool/src/cppparser/cppBison.yxx" +#line 1173 "dtool/src/cppparser/cppBison.yxx" { (yyval.str) = "delete"; } break; - case 126: + case 127: /* Line 1792 of yacc.c */ -#line 1179 "dtool/src/cppparser/cppBison.yxx" +#line 1185 "dtool/src/cppparser/cppBison.yxx" { push_scope(new CPPTemplateScope(current_scope)); } break; - case 127: + case 128: /* Line 1792 of yacc.c */ -#line 1183 "dtool/src/cppparser/cppBison.yxx" +#line 1189 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 131: -/* Line 1792 of yacc.c */ -#line 1196 "dtool/src/cppparser/cppBison.yxx" - { - CPPTemplateScope *ts = current_scope->as_template_scope(); - assert(ts != NULL); - ts->add_template_parameter((yyvsp[(1) - (1)].u.decl)); -} - break; - case 132: /* Line 1792 of yacc.c */ #line 1202 "dtool/src/cppparser/cppBison.yxx" { CPPTemplateScope *ts = current_scope->as_template_scope(); assert(ts != NULL); - ts->add_template_parameter((yyvsp[(3) - (3)].u.decl)); + ts->add_template_parameter((yyvsp[(1) - (1)].u.decl)); } break; case 133: /* Line 1792 of yacc.c */ -#line 1211 "dtool/src/cppparser/cppBison.yxx" +#line 1208 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); + CPPTemplateScope *ts = current_scope->as_template_scope(); + assert(ts != NULL); + ts->add_template_parameter((yyvsp[(3) - (3)].u.decl)); } break; case 134: /* Line 1792 of yacc.c */ -#line 1215 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); -} - break; - - case 135: -/* Line 1792 of yacc.c */ -#line 1219 "dtool/src/cppparser/cppBison.yxx" +#line 1217 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); } break; - case 136: + case 135: /* Line 1792 of yacc.c */ -#line 1223 "dtool/src/cppparser/cppBison.yxx" +#line 1221 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); } break; + case 136: +/* Line 1792 of yacc.c */ +#line 1225 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (2)].u.identifier))); +} + break; + case 137: /* Line 1792 of yacc.c */ -#line 1227 "dtool/src/cppparser/cppBison.yxx" +#line 1229 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type))); +} + break; + + case 138: +/* Line 1792 of yacc.c */ +#line 1233 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); inst->set_initializer((yyvsp[(3) - (3)].u.expr)); @@ -4695,9 +4787,9 @@ yyreduce: } break; - case 138: + case 139: /* Line 1792 of yacc.c */ -#line 1233 "dtool/src/cppparser/cppBison.yxx" +#line 1239 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -4706,26 +4798,26 @@ yyreduce: } break; - case 139: + case 140: /* Line 1792 of yacc.c */ -#line 1243 "dtool/src/cppparser/cppBison.yxx" +#line 1249 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 140: + case 141: /* Line 1792 of yacc.c */ -#line 1247 "dtool/src/cppparser/cppBison.yxx" +#line 1253 "dtool/src/cppparser/cppBison.yxx" { yywarning("Not a type: " + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } break; - case 141: + case 142: /* Line 1792 of yacc.c */ -#line 1252 "dtool/src/cppparser/cppBison.yxx" +#line 1258 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -4735,17 +4827,17 @@ yyreduce: } break; - case 142: + case 143: /* Line 1792 of yacc.c */ -#line 1264 "dtool/src/cppparser/cppBison.yxx" +#line 1270 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } break; - case 143: + case 144: /* Line 1792 of yacc.c */ -#line 1268 "dtool/src/cppparser/cppBison.yxx" +#line 1274 "dtool/src/cppparser/cppBison.yxx" { // For an operator function. We implement this simply by building a // ficticious name for the function; in other respects it's just @@ -4761,9 +4853,9 @@ yyreduce: } break; - case 144: + case 145: /* Line 1792 of yacc.c */ -#line 1282 "dtool/src/cppparser/cppBison.yxx" +#line 1288 "dtool/src/cppparser/cppBison.yxx" { // A C++11 literal operator. if (!(yyvsp[(2) - (3)].str).empty()) { @@ -4780,98 +4872,98 @@ yyreduce: } break; - case 145: + case 146: /* Line 1792 of yacc.c */ -#line 1297 "dtool/src/cppparser/cppBison.yxx" +#line 1303 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } break; - case 146: + case 147: /* Line 1792 of yacc.c */ -#line 1302 "dtool/src/cppparser/cppBison.yxx" +#line 1308 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } break; - case 147: + case 148: /* Line 1792 of yacc.c */ -#line 1307 "dtool/src/cppparser/cppBison.yxx" +#line 1313 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } break; - case 148: + case 149: /* Line 1792 of yacc.c */ -#line 1312 "dtool/src/cppparser/cppBison.yxx" +#line 1318 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } break; - case 149: + case 150: /* Line 1792 of yacc.c */ -#line 1317 "dtool/src/cppparser/cppBison.yxx" +#line 1323 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } break; - case 150: + case 151: /* Line 1792 of yacc.c */ -#line 1322 "dtool/src/cppparser/cppBison.yxx" +#line 1328 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); } break; - case 151: + case 152: /* Line 1792 of yacc.c */ -#line 1327 "dtool/src/cppparser/cppBison.yxx" +#line 1333 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); } break; - case 152: + case 153: /* Line 1792 of yacc.c */ -#line 1332 "dtool/src/cppparser/cppBison.yxx" +#line 1338 "dtool/src/cppparser/cppBison.yxx" { // bitfield definition. We ignore the bitfield for now. (yyval.u.inst_ident) = (yyvsp[(1) - (3)].u.inst_ident); } break; - case 153: + case 154: /* Line 1792 of yacc.c */ -#line 1337 "dtool/src/cppparser/cppBison.yxx" +#line 1343 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } break; - case 154: + case 155: /* Line 1792 of yacc.c */ -#line 1342 "dtool/src/cppparser/cppBison.yxx" +#line 1348 "dtool/src/cppparser/cppBison.yxx" { push_scope((yyvsp[(1) - (2)].u.inst_ident)->get_scope(current_scope, global_scope)); } break; - case 155: + case 156: /* Line 1792 of yacc.c */ -#line 1346 "dtool/src/cppparser/cppBison.yxx" +#line 1352 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); (yyval.u.inst_ident) = (yyvsp[(1) - (6)].u.inst_ident); @@ -4887,110 +4979,102 @@ yyreduce: } break; - case 156: -/* Line 1792 of yacc.c */ -#line 1364 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.param_list) = new CPPParameterList; -} - break; - case 157: /* Line 1792 of yacc.c */ -#line 1368 "dtool/src/cppparser/cppBison.yxx" +#line 1370 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; - (yyval.u.param_list)->_includes_ellipsis = true; } break; case 158: /* Line 1792 of yacc.c */ -#line 1373 "dtool/src/cppparser/cppBison.yxx" +#line 1374 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); + (yyval.u.param_list) = new CPPParameterList; + (yyval.u.param_list)->_includes_ellipsis = true; } break; case 159: /* Line 1792 of yacc.c */ -#line 1377 "dtool/src/cppparser/cppBison.yxx" +#line 1379 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); - (yyval.u.param_list)->_includes_ellipsis = true; + (yyval.u.param_list) = (yyvsp[(1) - (1)].u.param_list); } break; case 160: /* Line 1792 of yacc.c */ -#line 1382 "dtool/src/cppparser/cppBison.yxx" +#line 1383 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); + (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } break; case 161: /* Line 1792 of yacc.c */ -#line 1390 "dtool/src/cppparser/cppBison.yxx" +#line 1388 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.param_list) = (yyvsp[(1) - (2)].u.param_list); + (yyval.u.param_list)->_includes_ellipsis = true; +} + break; + + case 162: +/* Line 1792 of yacc.c */ +#line 1396 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[(1) - (1)].u.instance)); } break; - case 162: + case 163: /* Line 1792 of yacc.c */ -#line 1395 "dtool/src/cppparser/cppBison.yxx" +#line 1401 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.param_list) = (yyvsp[(1) - (3)].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[(3) - (3)].u.instance)); } break; - case 163: -/* Line 1792 of yacc.c */ -#line 1403 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - case 164: /* Line 1792 of yacc.c */ -#line 1407 "dtool/src/cppparser/cppBison.yxx" +#line 1409 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 165: /* Line 1792 of yacc.c */ -#line 1414 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 166: -/* Line 1792 of yacc.c */ -#line 1418 "dtool/src/cppparser/cppBison.yxx" +#line 1413 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); } break; - case 167: + case 166: /* Line 1792 of yacc.c */ -#line 1425 "dtool/src/cppparser/cppBison.yxx" +#line 1420 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; + case 167: +/* Line 1792 of yacc.c */ +#line 1424 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (2)].u.expr); +} + break; + case 168: /* Line 1792 of yacc.c */ -#line 1429 "dtool/src/cppparser/cppBison.yxx" +#line 1431 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -4998,7 +5082,7 @@ yyreduce: case 169: /* Line 1792 of yacc.c */ -#line 1433 "dtool/src/cppparser/cppBison.yxx" +#line 1435 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -5006,51 +5090,47 @@ yyreduce: case 170: /* Line 1792 of yacc.c */ -#line 1437 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 171: -/* Line 1792 of yacc.c */ -#line 1441 "dtool/src/cppparser/cppBison.yxx" +#line 1439 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } break; - case 175: + case 171: /* Line 1792 of yacc.c */ -#line 1454 "dtool/src/cppparser/cppBison.yxx" +#line 1443 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + + case 172: +/* Line 1792 of yacc.c */ +#line 1447 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (CPPExpression *)NULL; +} + break; + + case 176: +/* Line 1792 of yacc.c */ +#line 1460 "dtool/src/cppparser/cppBison.yxx" { } break; - case 179: + case 180: /* Line 1792 of yacc.c */ -#line 1463 "dtool/src/cppparser/cppBison.yxx" +#line 1469 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = new CPPInstance((yyvsp[(1) - (3)].u.type), (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); } break; - case 180: -/* Line 1792 of yacc.c */ -#line 1468 "dtool/src/cppparser/cppBison.yxx" - { - yywarning("Not a type: " + (yyvsp[(1) - (3)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (3)])); - CPPType *type = - CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); - (yyval.u.instance) = new CPPInstance(type, (yyvsp[(2) - (3)].u.inst_ident), 0, (yylsp[(2) - (3)]).file); - (yyval.u.instance)->set_initializer((yyvsp[(3) - (3)].u.expr)); -} - break; - case 181: /* Line 1792 of yacc.c */ -#line 1476 "dtool/src/cppparser/cppBison.yxx" +#line 1474 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (4)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(2) - (4)].u.type), (yyvsp[(3) - (4)].u.inst_ident), 0, (yylsp[(3) - (4)]).file); @@ -5060,7 +5140,7 @@ yyreduce: case 182: /* Line 1792 of yacc.c */ -#line 1482 "dtool/src/cppparser/cppBison.yxx" +#line 1480 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(4) - (5)].u.inst_ident)->add_modifier(IIT_const); (yyval.u.instance) = new CPPInstance((yyvsp[(3) - (5)].u.type), (yyvsp[(4) - (5)].u.inst_ident), 0, (yylsp[(3) - (5)]).file); @@ -5070,7 +5150,7 @@ yyreduce: case 183: /* Line 1792 of yacc.c */ -#line 1488 "dtool/src/cppparser/cppBison.yxx" +#line 1486 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.instance) = (yyvsp[(2) - (2)].u.instance); } @@ -5078,7 +5158,7 @@ yyreduce: case 184: /* Line 1792 of yacc.c */ -#line 1492 "dtool/src/cppparser/cppBison.yxx" +#line 1490 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter)); @@ -5089,7 +5169,7 @@ yyreduce: case 185: /* Line 1792 of yacc.c */ -#line 1502 "dtool/src/cppparser/cppBison.yxx" +#line 1500 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } @@ -5097,7 +5177,7 @@ yyreduce: case 186: /* Line 1792 of yacc.c */ -#line 1506 "dtool/src/cppparser/cppBison.yxx" +#line 1504 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -5105,7 +5185,7 @@ yyreduce: case 187: /* Line 1792 of yacc.c */ -#line 1510 "dtool/src/cppparser/cppBison.yxx" +#line 1508 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -5113,7 +5193,7 @@ yyreduce: case 188: /* Line 1792 of yacc.c */ -#line 1514 "dtool/src/cppparser/cppBison.yxx" +#line 1512 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); @@ -5122,7 +5202,7 @@ yyreduce: case 189: /* Line 1792 of yacc.c */ -#line 1519 "dtool/src/cppparser/cppBison.yxx" +#line 1517 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); @@ -5131,7 +5211,7 @@ yyreduce: case 190: /* Line 1792 of yacc.c */ -#line 1524 "dtool/src/cppparser/cppBison.yxx" +#line 1522 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); @@ -5140,7 +5220,7 @@ yyreduce: case 191: /* Line 1792 of yacc.c */ -#line 1529 "dtool/src/cppparser/cppBison.yxx" +#line 1527 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); @@ -5149,7 +5229,7 @@ yyreduce: case 192: /* Line 1792 of yacc.c */ -#line 1534 "dtool/src/cppparser/cppBison.yxx" +#line 1532 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); @@ -5158,7 +5238,7 @@ yyreduce: case 193: /* Line 1792 of yacc.c */ -#line 1539 "dtool/src/cppparser/cppBison.yxx" +#line 1537 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); @@ -5167,7 +5247,7 @@ yyreduce: case 194: /* Line 1792 of yacc.c */ -#line 1544 "dtool/src/cppparser/cppBison.yxx" +#line 1542 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); @@ -5176,7 +5256,7 @@ yyreduce: case 195: /* Line 1792 of yacc.c */ -#line 1552 "dtool/src/cppparser/cppBison.yxx" +#line 1550 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } @@ -5184,7 +5264,7 @@ yyreduce: case 196: /* Line 1792 of yacc.c */ -#line 1556 "dtool/src/cppparser/cppBison.yxx" +#line 1554 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -5192,7 +5272,7 @@ yyreduce: case 197: /* Line 1792 of yacc.c */ -#line 1560 "dtool/src/cppparser/cppBison.yxx" +#line 1558 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[(1) - (1)].u.identifier)); } @@ -5200,7 +5280,7 @@ yyreduce: case 198: /* Line 1792 of yacc.c */ -#line 1564 "dtool/src/cppparser/cppBison.yxx" +#line 1562 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); @@ -5209,7 +5289,7 @@ yyreduce: case 199: /* Line 1792 of yacc.c */ -#line 1569 "dtool/src/cppparser/cppBison.yxx" +#line 1567 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); @@ -5218,7 +5298,7 @@ yyreduce: case 200: /* Line 1792 of yacc.c */ -#line 1574 "dtool/src/cppparser/cppBison.yxx" +#line 1572 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); @@ -5227,7 +5307,7 @@ yyreduce: case 201: /* Line 1792 of yacc.c */ -#line 1579 "dtool/src/cppparser/cppBison.yxx" +#line 1577 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); @@ -5236,7 +5316,7 @@ yyreduce: case 202: /* Line 1792 of yacc.c */ -#line 1584 "dtool/src/cppparser/cppBison.yxx" +#line 1582 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); @@ -5245,7 +5325,7 @@ yyreduce: case 203: /* Line 1792 of yacc.c */ -#line 1589 "dtool/src/cppparser/cppBison.yxx" +#line 1587 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); @@ -5254,7 +5334,7 @@ yyreduce: case 204: /* Line 1792 of yacc.c */ -#line 1594 "dtool/src/cppparser/cppBison.yxx" +#line 1592 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); @@ -5263,7 +5343,7 @@ yyreduce: case 205: /* Line 1792 of yacc.c */ -#line 1599 "dtool/src/cppparser/cppBison.yxx" +#line 1597 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5273,7 +5353,7 @@ yyreduce: case 206: /* Line 1792 of yacc.c */ -#line 1605 "dtool/src/cppparser/cppBison.yxx" +#line 1603 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5282,7 +5362,7 @@ yyreduce: case 207: /* Line 1792 of yacc.c */ -#line 1613 "dtool/src/cppparser/cppBison.yxx" +#line 1611 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } @@ -5290,7 +5370,7 @@ yyreduce: case 208: /* Line 1792 of yacc.c */ -#line 1617 "dtool/src/cppparser/cppBison.yxx" +#line 1615 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); @@ -5299,7 +5379,7 @@ yyreduce: case 209: /* Line 1792 of yacc.c */ -#line 1622 "dtool/src/cppparser/cppBison.yxx" +#line 1620 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); @@ -5308,7 +5388,7 @@ yyreduce: case 210: /* Line 1792 of yacc.c */ -#line 1627 "dtool/src/cppparser/cppBison.yxx" +#line 1625 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); @@ -5317,7 +5397,7 @@ yyreduce: case 211: /* Line 1792 of yacc.c */ -#line 1632 "dtool/src/cppparser/cppBison.yxx" +#line 1630 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); @@ -5326,7 +5406,7 @@ yyreduce: case 212: /* Line 1792 of yacc.c */ -#line 1637 "dtool/src/cppparser/cppBison.yxx" +#line 1635 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (2)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); @@ -5335,7 +5415,7 @@ yyreduce: case 213: /* Line 1792 of yacc.c */ -#line 1642 "dtool/src/cppparser/cppBison.yxx" +#line 1640 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(3) - (3)].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[(1) - (3)].u.identifier)); @@ -5344,7 +5424,7 @@ yyreduce: case 214: /* Line 1792 of yacc.c */ -#line 1647 "dtool/src/cppparser/cppBison.yxx" +#line 1645 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(1) - (4)].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[(3) - (4)].u.expr)); @@ -5353,7 +5433,7 @@ yyreduce: case 215: /* Line 1792 of yacc.c */ -#line 1652 "dtool/src/cppparser/cppBison.yxx" +#line 1650 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.inst_ident) = (yyvsp[(2) - (7)].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); @@ -5363,7 +5443,7 @@ yyreduce: case 216: /* Line 1792 of yacc.c */ -#line 1661 "dtool/src/cppparser/cppBison.yxx" +#line 1659 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -5371,7 +5451,7 @@ yyreduce: case 217: /* Line 1792 of yacc.c */ -#line 1665 "dtool/src/cppparser/cppBison.yxx" +#line 1663 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -5383,7 +5463,7 @@ yyreduce: case 218: /* Line 1792 of yacc.c */ -#line 1673 "dtool/src/cppparser/cppBison.yxx" +#line 1671 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } @@ -5391,7 +5471,7 @@ yyreduce: case 219: /* Line 1792 of yacc.c */ -#line 1677 "dtool/src/cppparser/cppBison.yxx" +#line 1675 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } @@ -5399,7 +5479,7 @@ yyreduce: case 220: /* Line 1792 of yacc.c */ -#line 1681 "dtool/src/cppparser/cppBison.yxx" +#line 1679 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } @@ -5407,7 +5487,7 @@ yyreduce: case 221: /* Line 1792 of yacc.c */ -#line 1685 "dtool/src/cppparser/cppBison.yxx" +#line 1683 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.enum_type)); } @@ -5415,7 +5495,7 @@ yyreduce: case 222: /* Line 1792 of yacc.c */ -#line 1689 "dtool/src/cppparser/cppBison.yxx" +#line 1687 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5435,7 +5515,7 @@ yyreduce: case 223: /* Line 1792 of yacc.c */ -#line 1705 "dtool/src/cppparser/cppBison.yxx" +#line 1703 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5455,7 +5535,7 @@ yyreduce: case 224: /* Line 1792 of yacc.c */ -#line 1721 "dtool/src/cppparser/cppBison.yxx" +#line 1719 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(3) - (4)].u.expr)->determine_type(); if ((yyval.u.type) == (CPPType *)NULL) { @@ -5468,7 +5548,7 @@ yyreduce: case 225: /* Line 1792 of yacc.c */ -#line 1733 "dtool/src/cppparser/cppBison.yxx" +#line 1731 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -5476,7 +5556,7 @@ yyreduce: case 226: /* Line 1792 of yacc.c */ -#line 1737 "dtool/src/cppparser/cppBison.yxx" +#line 1735 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.decl) == NULL) { @@ -5488,7 +5568,7 @@ yyreduce: case 227: /* Line 1792 of yacc.c */ -#line 1745 "dtool/src/cppparser/cppBison.yxx" +#line 1743 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } @@ -5496,7 +5576,7 @@ yyreduce: case 228: /* Line 1792 of yacc.c */ -#line 1749 "dtool/src/cppparser/cppBison.yxx" +#line 1747 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } @@ -5504,7 +5584,7 @@ yyreduce: case 229: /* Line 1792 of yacc.c */ -#line 1753 "dtool/src/cppparser/cppBison.yxx" +#line 1751 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); } @@ -5512,7 +5592,7 @@ yyreduce: case 230: /* Line 1792 of yacc.c */ -#line 1757 "dtool/src/cppparser/cppBison.yxx" +#line 1755 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); } @@ -5520,7 +5600,7 @@ yyreduce: case 231: /* Line 1792 of yacc.c */ -#line 1761 "dtool/src/cppparser/cppBison.yxx" +#line 1759 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5540,7 +5620,7 @@ yyreduce: case 232: /* Line 1792 of yacc.c */ -#line 1777 "dtool/src/cppparser/cppBison.yxx" +#line 1775 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5560,7 +5640,7 @@ yyreduce: case 233: /* Line 1792 of yacc.c */ -#line 1793 "dtool/src/cppparser/cppBison.yxx" +#line 1791 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5582,7 +5662,7 @@ yyreduce: case 234: /* Line 1792 of yacc.c */ -#line 1811 "dtool/src/cppparser/cppBison.yxx" +#line 1809 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = (yyvsp[(3) - (4)].u.expr)->determine_type(); if ((yyval.u.decl) == (CPPType *)NULL) { @@ -5595,7 +5675,7 @@ yyreduce: case 235: /* Line 1792 of yacc.c */ -#line 1823 "dtool/src/cppparser/cppBison.yxx" +#line 1821 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -5603,7 +5683,7 @@ yyreduce: case 236: /* Line 1792 of yacc.c */ -#line 1827 "dtool/src/cppparser/cppBison.yxx" +#line 1825 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -5615,7 +5695,7 @@ yyreduce: case 237: /* Line 1792 of yacc.c */ -#line 1835 "dtool/src/cppparser/cppBison.yxx" +#line 1833 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } @@ -5623,7 +5703,7 @@ yyreduce: case 238: /* Line 1792 of yacc.c */ -#line 1839 "dtool/src/cppparser/cppBison.yxx" +#line 1837 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5643,7 +5723,7 @@ yyreduce: case 239: /* Line 1792 of yacc.c */ -#line 1855 "dtool/src/cppparser/cppBison.yxx" +#line 1853 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5663,7 +5743,7 @@ yyreduce: case 240: /* Line 1792 of yacc.c */ -#line 1874 "dtool/src/cppparser/cppBison.yxx" +#line 1872 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5673,7 +5753,7 @@ yyreduce: case 241: /* Line 1792 of yacc.c */ -#line 1880 "dtool/src/cppparser/cppBison.yxx" +#line 1878 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5684,7 +5764,7 @@ yyreduce: case 242: /* Line 1792 of yacc.c */ -#line 1890 "dtool/src/cppparser/cppBison.yxx" +#line 1888 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5702,7 +5782,7 @@ yyreduce: case 243: /* Line 1792 of yacc.c */ -#line 1904 "dtool/src/cppparser/cppBison.yxx" +#line 1902 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5713,7 +5793,7 @@ yyreduce: case 244: /* Line 1792 of yacc.c */ -#line 1914 "dtool/src/cppparser/cppBison.yxx" +#line 1912 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5737,7 +5817,7 @@ yyreduce: case 245: /* Line 1792 of yacc.c */ -#line 1934 "dtool/src/cppparser/cppBison.yxx" +#line 1932 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5748,7 +5828,7 @@ yyreduce: case 250: /* Line 1792 of yacc.c */ -#line 1954 "dtool/src/cppparser/cppBison.yxx" +#line 1952 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } @@ -5756,7 +5836,7 @@ yyreduce: case 251: /* Line 1792 of yacc.c */ -#line 1958 "dtool/src/cppparser/cppBison.yxx" +#line 1956 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } @@ -5764,7 +5844,7 @@ yyreduce: case 252: /* Line 1792 of yacc.c */ -#line 1962 "dtool/src/cppparser/cppBison.yxx" +#line 1960 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } @@ -5772,7 +5852,7 @@ yyreduce: case 253: /* Line 1792 of yacc.c */ -#line 1966 "dtool/src/cppparser/cppBison.yxx" +#line 1964 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } @@ -5780,7 +5860,7 @@ yyreduce: case 254: /* Line 1792 of yacc.c */ -#line 1970 "dtool/src/cppparser/cppBison.yxx" +#line 1968 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } @@ -5788,7 +5868,7 @@ yyreduce: case 255: /* Line 1792 of yacc.c */ -#line 1974 "dtool/src/cppparser/cppBison.yxx" +#line 1972 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } @@ -5796,7 +5876,7 @@ yyreduce: case 256: /* Line 1792 of yacc.c */ -#line 1978 "dtool/src/cppparser/cppBison.yxx" +#line 1976 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } @@ -5804,7 +5884,7 @@ yyreduce: case 257: /* Line 1792 of yacc.c */ -#line 1982 "dtool/src/cppparser/cppBison.yxx" +#line 1980 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } @@ -5812,7 +5892,7 @@ yyreduce: case 258: /* Line 1792 of yacc.c */ -#line 1986 "dtool/src/cppparser/cppBison.yxx" +#line 1984 "dtool/src/cppparser/cppBison.yxx" { current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } @@ -5820,7 +5900,7 @@ yyreduce: case 259: /* Line 1792 of yacc.c */ -#line 1993 "dtool/src/cppparser/cppBison.yxx" +#line 1991 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.enum_type) = current_enum; current_enum = NULL; @@ -5829,7 +5909,7 @@ yyreduce: case 260: /* Line 1792 of yacc.c */ -#line 2001 "dtool/src/cppparser/cppBison.yxx" +#line 1999 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } @@ -5837,7 +5917,7 @@ yyreduce: case 261: /* Line 1792 of yacc.c */ -#line 2005 "dtool/src/cppparser/cppBison.yxx" +#line 2003 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } @@ -5845,7 +5925,7 @@ yyreduce: case 262: /* Line 1792 of yacc.c */ -#line 2009 "dtool/src/cppparser/cppBison.yxx" +#line 2007 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } @@ -5853,7 +5933,7 @@ yyreduce: case 263: /* Line 1792 of yacc.c */ -#line 2013 "dtool/src/cppparser/cppBison.yxx" +#line 2011 "dtool/src/cppparser/cppBison.yxx" { current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); } @@ -5861,7 +5941,7 @@ yyreduce: case 264: /* Line 1792 of yacc.c */ -#line 2020 "dtool/src/cppparser/cppBison.yxx" +#line 2018 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } @@ -5869,7 +5949,7 @@ yyreduce: case 265: /* Line 1792 of yacc.c */ -#line 2024 "dtool/src/cppparser/cppBison.yxx" +#line 2022 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } @@ -5877,7 +5957,7 @@ yyreduce: case 267: /* Line 1792 of yacc.c */ -#line 2032 "dtool/src/cppparser/cppBison.yxx" +#line 2030 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); @@ -5887,7 +5967,7 @@ yyreduce: case 268: /* Line 1792 of yacc.c */ -#line 2038 "dtool/src/cppparser/cppBison.yxx" +#line 2036 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5897,7 +5977,7 @@ yyreduce: case 270: /* Line 1792 of yacc.c */ -#line 2047 "dtool/src/cppparser/cppBison.yxx" +#line 2045 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5907,7 +5987,7 @@ yyreduce: case 271: /* Line 1792 of yacc.c */ -#line 2053 "dtool/src/cppparser/cppBison.yxx" +#line 2051 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5917,7 +5997,7 @@ yyreduce: case 272: /* Line 1792 of yacc.c */ -#line 2062 "dtool/src/cppparser/cppBison.yxx" +#line 2060 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } @@ -5925,7 +6005,7 @@ yyreduce: case 273: /* Line 1792 of yacc.c */ -#line 2069 "dtool/src/cppparser/cppBison.yxx" +#line 2067 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_class; } @@ -5933,7 +6013,7 @@ yyreduce: case 274: /* Line 1792 of yacc.c */ -#line 2073 "dtool/src/cppparser/cppBison.yxx" +#line 2071 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } @@ -5941,7 +6021,7 @@ yyreduce: case 275: /* Line 1792 of yacc.c */ -#line 2077 "dtool/src/cppparser/cppBison.yxx" +#line 2075 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.extension_enum) = CPPExtensionType::T_union; } @@ -5949,7 +6029,7 @@ yyreduce: case 276: /* Line 1792 of yacc.c */ -#line 2084 "dtool/src/cppparser/cppBison.yxx" +#line 2082 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -5971,15 +6051,46 @@ yyreduce: case 277: /* Line 1792 of yacc.c */ -#line 2102 "dtool/src/cppparser/cppBison.yxx" +#line 2100 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; + case 278: +/* Line 1792 of yacc.c */ +#line 2104 "dtool/src/cppparser/cppBison.yxx" + { + CPPScope *scope = (yyvsp[(3) - (4)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); + if (scope == NULL) { + // This must be a new namespace declaration. + CPPScope *parent_scope = + (yyvsp[(3) - (4)].u.identifier)->get_scope(current_scope, global_scope, current_lexer); + if (parent_scope == NULL) { + parent_scope = current_scope; + } + scope = new CPPScope(parent_scope, (yyvsp[(3) - (4)].u.identifier)->_names.back(), V_public); + } + + CPPNamespace *nspace = new CPPNamespace((yyvsp[(3) - (4)].u.identifier), scope, (yylsp[(2) - (4)]).file); + nspace->_inline = true; + current_scope->add_declaration(nspace, global_scope, current_lexer, (yylsp[(2) - (4)])); + current_scope->define_namespace(nspace); + push_scope(scope); +} + break; + case 279: /* Line 1792 of yacc.c */ -#line 2110 "dtool/src/cppparser/cppBison.yxx" +#line 2123 "dtool/src/cppparser/cppBison.yxx" + { + pop_scope(); +} + break; + + case 282: +/* Line 1792 of yacc.c */ +#line 2132 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -5987,9 +6098,9 @@ yyreduce: } break; - case 280: + case 283: /* Line 1792 of yacc.c */ -#line 2116 "dtool/src/cppparser/cppBison.yxx" +#line 2138 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); @@ -5997,111 +6108,111 @@ yyreduce: } break; - case 284: + case 287: /* Line 1792 of yacc.c */ -#line 2131 "dtool/src/cppparser/cppBison.yxx" +#line 2153 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; - case 285: + case 288: /* Line 1792 of yacc.c */ -#line 2135 "dtool/src/cppparser/cppBison.yxx" +#line 2157 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; - case 286: + case 289: /* Line 1792 of yacc.c */ -#line 2139 "dtool/src/cppparser/cppBison.yxx" +#line 2161 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } break; - case 287: + case 290: /* Line 1792 of yacc.c */ -#line 2143 "dtool/src/cppparser/cppBison.yxx" +#line 2165 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } break; - case 288: + case 291: /* Line 1792 of yacc.c */ -#line 2147 "dtool/src/cppparser/cppBison.yxx" +#line 2169 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); } break; - case 289: + case 292: /* Line 1792 of yacc.c */ -#line 2151 "dtool/src/cppparser/cppBison.yxx" +#line 2173 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_short); } break; - case 290: + case 293: /* Line 1792 of yacc.c */ -#line 2156 "dtool/src/cppparser/cppBison.yxx" +#line 2178 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } break; - case 291: + case 294: /* Line 1792 of yacc.c */ -#line 2161 "dtool/src/cppparser/cppBison.yxx" +#line 2183 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 292: + case 295: /* Line 1792 of yacc.c */ -#line 2166 "dtool/src/cppparser/cppBison.yxx" +#line 2188 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 293: + case 296: /* Line 1792 of yacc.c */ -#line 2171 "dtool/src/cppparser/cppBison.yxx" +#line 2193 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 294: + case 297: /* Line 1792 of yacc.c */ -#line 2176 "dtool/src/cppparser/cppBison.yxx" +#line 2198 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 295: + case 298: /* Line 1792 of yacc.c */ -#line 2180 "dtool/src/cppparser/cppBison.yxx" +#line 2202 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 296: + case 299: /* Line 1792 of yacc.c */ -#line 2185 "dtool/src/cppparser/cppBison.yxx" +#line 2207 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -6112,72 +6223,46 @@ yyreduce: } break; - case 297: + case 300: /* Line 1792 of yacc.c */ -#line 2194 "dtool/src/cppparser/cppBison.yxx" +#line 2216 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 298: + case 301: /* Line 1792 of yacc.c */ -#line 2199 "dtool/src/cppparser/cppBison.yxx" +#line 2221 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 299: + case 302: /* Line 1792 of yacc.c */ -#line 2207 "dtool/src/cppparser/cppBison.yxx" +#line 2229 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 300: -/* Line 1792 of yacc.c */ -#line 2211 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, - CPPSimpleType::F_long); -} - break; - - case 301: -/* Line 1792 of yacc.c */ -#line 2216 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); -} - break; - - case 302: -/* Line 1792 of yacc.c */ -#line 2220 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, - CPPSimpleType::F_longlong); -} - break; - case 303: /* Line 1792 of yacc.c */ -#line 2225 "dtool/src/cppparser/cppBison.yxx" +#line 2233 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; case 304: /* Line 1792 of yacc.c */ -#line 2233 "dtool/src/cppparser/cppBison.yxx" +#line 2238 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; @@ -6185,60 +6270,62 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2242 "dtool/src/cppparser/cppBison.yxx" { - current_lexer->_resolve_identifiers = false; + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, + CPPSimpleType::F_longlong); } break; case 306: /* Line 1792 of yacc.c */ -#line 2246 "dtool/src/cppparser/cppBison.yxx" +#line 2247 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, + CPPSimpleType::F_long); +} + break; + + case 307: +/* Line 1792 of yacc.c */ +#line 2255 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); +} + break; + + case 308: +/* Line 1792 of yacc.c */ +#line 2264 "dtool/src/cppparser/cppBison.yxx" + { + current_lexer->_resolve_identifiers = false; +} + break; + + case 309: +/* Line 1792 of yacc.c */ +#line 2268 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = true; } break; - case 401: + case 404: /* Line 1792 of yacc.c */ -#line 2286 "dtool/src/cppparser/cppBison.yxx" +#line 2308 "dtool/src/cppparser/cppBison.yxx" { } break; - case 425: -/* Line 1792 of yacc.c */ -#line 2295 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 426: -/* Line 1792 of yacc.c */ -#line 2299 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - - case 427: -/* Line 1792 of yacc.c */ -#line 2306 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - case 428: /* Line 1792 of yacc.c */ -#line 2310 "dtool/src/cppparser/cppBison.yxx" +#line 2317 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 429: /* Line 1792 of yacc.c */ -#line 2317 "dtool/src/cppparser/cppBison.yxx" +#line 2321 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6246,15 +6333,15 @@ yyreduce: case 430: /* Line 1792 of yacc.c */ -#line 2321 "dtool/src/cppparser/cppBison.yxx" +#line 2328 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 431: /* Line 1792 of yacc.c */ -#line 2328 "dtool/src/cppparser/cppBison.yxx" +#line 2332 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6262,303 +6349,327 @@ yyreduce: case 432: /* Line 1792 of yacc.c */ -#line 2332 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); -} - break; - - case 433: -/* Line 1792 of yacc.c */ -#line 2336 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 434: -/* Line 1792 of yacc.c */ -#line 2340 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); -} - break; - - case 435: -/* Line 1792 of yacc.c */ -#line 2344 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 436: -/* Line 1792 of yacc.c */ -#line 2348 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 437: -/* Line 1792 of yacc.c */ -#line 2352 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 438: -/* Line 1792 of yacc.c */ -#line 2356 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 439: -/* Line 1792 of yacc.c */ -#line 2360 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 440: -/* Line 1792 of yacc.c */ -#line 2364 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 441: -/* Line 1792 of yacc.c */ -#line 2368 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); -} - break; - - case 442: -/* Line 1792 of yacc.c */ -#line 2372 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 443: -/* Line 1792 of yacc.c */ -#line 2376 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 444: -/* Line 1792 of yacc.c */ -#line 2380 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 445: -/* Line 1792 of yacc.c */ -#line 2384 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 446: -/* Line 1792 of yacc.c */ -#line 2388 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 447: -/* Line 1792 of yacc.c */ -#line 2392 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 448: -/* Line 1792 of yacc.c */ -#line 2396 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 449: -/* Line 1792 of yacc.c */ -#line 2400 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 450: -/* Line 1792 of yacc.c */ -#line 2404 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 451: -/* Line 1792 of yacc.c */ -#line 2408 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 452: -/* Line 1792 of yacc.c */ -#line 2412 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 453: -/* Line 1792 of yacc.c */ -#line 2416 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 454: -/* Line 1792 of yacc.c */ -#line 2420 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 455: -/* Line 1792 of yacc.c */ -#line 2424 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 456: -/* Line 1792 of yacc.c */ -#line 2428 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 457: -/* Line 1792 of yacc.c */ -#line 2432 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 458: -/* Line 1792 of yacc.c */ -#line 2436 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); -} - break; - - case 459: -/* Line 1792 of yacc.c */ -#line 2440 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 460: -/* Line 1792 of yacc.c */ -#line 2444 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); -} - break; - - case 461: -/* Line 1792 of yacc.c */ -#line 2448 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); -} - break; - - case 462: -/* Line 1792 of yacc.c */ -#line 2452 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 463: -/* Line 1792 of yacc.c */ -#line 2456 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); -} - break; - - case 464: -/* Line 1792 of yacc.c */ -#line 2460 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); -} - break; - - case 465: -/* Line 1792 of yacc.c */ -#line 2468 "dtool/src/cppparser/cppBison.yxx" +#line 2339 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 466: + case 433: /* Line 1792 of yacc.c */ -#line 2472 "dtool/src/cppparser/cppBison.yxx" +#line 2343 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 434: +/* Line 1792 of yacc.c */ +#line 2350 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 435: +/* Line 1792 of yacc.c */ +#line 2354 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; - case 467: + case 436: /* Line 1792 of yacc.c */ -#line 2476 "dtool/src/cppparser/cppBison.yxx" +#line 2358 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; + case 437: +/* Line 1792 of yacc.c */ +#line 2362 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 438: +/* Line 1792 of yacc.c */ +#line 2366 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 439: +/* Line 1792 of yacc.c */ +#line 2370 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); +} + break; + + case 440: +/* Line 1792 of yacc.c */ +#line 2374 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 441: +/* Line 1792 of yacc.c */ +#line 2378 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 442: +/* Line 1792 of yacc.c */ +#line 2382 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 443: +/* Line 1792 of yacc.c */ +#line 2386 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 444: +/* Line 1792 of yacc.c */ +#line 2390 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); +} + break; + + case 445: +/* Line 1792 of yacc.c */ +#line 2394 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 446: +/* Line 1792 of yacc.c */ +#line 2398 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 447: +/* Line 1792 of yacc.c */ +#line 2402 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 448: +/* Line 1792 of yacc.c */ +#line 2406 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 449: +/* Line 1792 of yacc.c */ +#line 2410 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 450: +/* Line 1792 of yacc.c */ +#line 2414 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 451: +/* Line 1792 of yacc.c */ +#line 2418 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 452: +/* Line 1792 of yacc.c */ +#line 2422 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 453: +/* Line 1792 of yacc.c */ +#line 2426 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 454: +/* Line 1792 of yacc.c */ +#line 2430 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 455: +/* Line 1792 of yacc.c */ +#line 2434 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 456: +/* Line 1792 of yacc.c */ +#line 2438 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 457: +/* Line 1792 of yacc.c */ +#line 2442 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 458: +/* Line 1792 of yacc.c */ +#line 2446 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 459: +/* Line 1792 of yacc.c */ +#line 2450 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 460: +/* Line 1792 of yacc.c */ +#line 2454 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 461: +/* Line 1792 of yacc.c */ +#line 2458 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); +} + break; + + case 462: +/* Line 1792 of yacc.c */ +#line 2462 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 463: +/* Line 1792 of yacc.c */ +#line 2466 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); +} + break; + + case 464: +/* Line 1792 of yacc.c */ +#line 2470 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); +} + break; + + case 465: +/* Line 1792 of yacc.c */ +#line 2474 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 466: +/* Line 1792 of yacc.c */ +#line 2478 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); +} + break; + + case 467: +/* Line 1792 of yacc.c */ +#line 2482 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); +} + break; + case 468: /* Line 1792 of yacc.c */ -#line 2480 "dtool/src/cppparser/cppBison.yxx" +#line 2490 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 469: /* Line 1792 of yacc.c */ -#line 2484 "dtool/src/cppparser/cppBison.yxx" +#line 2494 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); +} + break; + + case 470: +/* Line 1792 of yacc.c */ +#line 2498 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 471: +/* Line 1792 of yacc.c */ +#line 2502 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 472: +/* Line 1792 of yacc.c */ +#line 2506 "dtool/src/cppparser/cppBison.yxx" { // A constructor call. CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); @@ -6570,9 +6681,9 @@ yyreduce: } break; - case 470: + case 473: /* Line 1792 of yacc.c */ -#line 2494 "dtool/src/cppparser/cppBison.yxx" +#line 2516 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6580,9 +6691,9 @@ yyreduce: } break; - case 471: + case 474: /* Line 1792 of yacc.c */ -#line 2500 "dtool/src/cppparser/cppBison.yxx" +#line 2522 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6590,9 +6701,9 @@ yyreduce: } break; - case 472: + case 475: /* Line 1792 of yacc.c */ -#line 2506 "dtool/src/cppparser/cppBison.yxx" +#line 2528 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6600,9 +6711,9 @@ yyreduce: } break; - case 473: + case 476: /* Line 1792 of yacc.c */ -#line 2512 "dtool/src/cppparser/cppBison.yxx" +#line 2534 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6610,9 +6721,9 @@ yyreduce: } break; - case 474: + case 477: /* Line 1792 of yacc.c */ -#line 2518 "dtool/src/cppparser/cppBison.yxx" +#line 2540 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6620,9 +6731,9 @@ yyreduce: } break; - case 475: + case 478: /* Line 1792 of yacc.c */ -#line 2524 "dtool/src/cppparser/cppBison.yxx" +#line 2546 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6630,9 +6741,9 @@ yyreduce: } break; - case 476: + case 479: /* Line 1792 of yacc.c */ -#line 2530 "dtool/src/cppparser/cppBison.yxx" +#line 2552 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6641,9 +6752,9 @@ yyreduce: } break; - case 477: + case 480: /* Line 1792 of yacc.c */ -#line 2537 "dtool/src/cppparser/cppBison.yxx" +#line 2559 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6652,9 +6763,9 @@ yyreduce: } break; - case 478: + case 481: /* Line 1792 of yacc.c */ -#line 2544 "dtool/src/cppparser/cppBison.yxx" +#line 2566 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6663,9 +6774,9 @@ yyreduce: } break; - case 479: + case 482: /* Line 1792 of yacc.c */ -#line 2551 "dtool/src/cppparser/cppBison.yxx" +#line 2573 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6674,9 +6785,9 @@ yyreduce: } break; - case 480: + case 483: /* Line 1792 of yacc.c */ -#line 2558 "dtool/src/cppparser/cppBison.yxx" +#line 2580 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6684,9 +6795,9 @@ yyreduce: } break; - case 481: + case 484: /* Line 1792 of yacc.c */ -#line 2564 "dtool/src/cppparser/cppBison.yxx" +#line 2586 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6694,305 +6805,281 @@ yyreduce: } break; - case 482: + case 485: /* Line 1792 of yacc.c */ -#line 2570 "dtool/src/cppparser/cppBison.yxx" +#line 2592 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; - case 483: + case 486: /* Line 1792 of yacc.c */ -#line 2574 "dtool/src/cppparser/cppBison.yxx" +#line 2596 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; - case 484: + case 487: /* Line 1792 of yacc.c */ -#line 2578 "dtool/src/cppparser/cppBison.yxx" +#line 2600 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; - case 485: + case 488: /* Line 1792 of yacc.c */ -#line 2582 "dtool/src/cppparser/cppBison.yxx" +#line 2604 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; - case 486: + case 489: /* Line 1792 of yacc.c */ -#line 2586 "dtool/src/cppparser/cppBison.yxx" +#line 2608 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; - case 487: + case 490: /* Line 1792 of yacc.c */ -#line 2590 "dtool/src/cppparser/cppBison.yxx" +#line 2612 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; - case 488: + case 491: /* Line 1792 of yacc.c */ -#line 2594 "dtool/src/cppparser/cppBison.yxx" +#line 2616 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; - case 489: + case 492: /* Line 1792 of yacc.c */ -#line 2598 "dtool/src/cppparser/cppBison.yxx" +#line 2620 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; - case 490: + case 493: /* Line 1792 of yacc.c */ -#line 2602 "dtool/src/cppparser/cppBison.yxx" +#line 2624 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; - case 491: + case 494: /* Line 1792 of yacc.c */ -#line 2606 "dtool/src/cppparser/cppBison.yxx" +#line 2628 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 492: + case 495: /* Line 1792 of yacc.c */ -#line 2610 "dtool/src/cppparser/cppBison.yxx" +#line 2632 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 493: + case 496: /* Line 1792 of yacc.c */ -#line 2614 "dtool/src/cppparser/cppBison.yxx" +#line 2636 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 494: + case 497: /* Line 1792 of yacc.c */ -#line 2618 "dtool/src/cppparser/cppBison.yxx" +#line 2640 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 495: + case 498: /* Line 1792 of yacc.c */ -#line 2622 "dtool/src/cppparser/cppBison.yxx" +#line 2644 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 496: + case 499: /* Line 1792 of yacc.c */ -#line 2626 "dtool/src/cppparser/cppBison.yxx" +#line 2648 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 497: + case 500: /* Line 1792 of yacc.c */ -#line 2630 "dtool/src/cppparser/cppBison.yxx" +#line 2652 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 498: + case 501: /* Line 1792 of yacc.c */ -#line 2634 "dtool/src/cppparser/cppBison.yxx" +#line 2656 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 499: + case 502: /* Line 1792 of yacc.c */ -#line 2638 "dtool/src/cppparser/cppBison.yxx" +#line 2660 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 500: + case 503: /* Line 1792 of yacc.c */ -#line 2642 "dtool/src/cppparser/cppBison.yxx" +#line 2664 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 501: + case 504: /* Line 1792 of yacc.c */ -#line 2646 "dtool/src/cppparser/cppBison.yxx" +#line 2668 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 502: + case 505: /* Line 1792 of yacc.c */ -#line 2650 "dtool/src/cppparser/cppBison.yxx" +#line 2672 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 503: + case 506: /* Line 1792 of yacc.c */ -#line 2654 "dtool/src/cppparser/cppBison.yxx" +#line 2676 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 504: + case 507: /* Line 1792 of yacc.c */ -#line 2658 "dtool/src/cppparser/cppBison.yxx" +#line 2680 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 505: + case 508: /* Line 1792 of yacc.c */ -#line 2662 "dtool/src/cppparser/cppBison.yxx" +#line 2684 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 506: + case 509: /* Line 1792 of yacc.c */ -#line 2666 "dtool/src/cppparser/cppBison.yxx" +#line 2688 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 507: + case 510: /* Line 1792 of yacc.c */ -#line 2670 "dtool/src/cppparser/cppBison.yxx" +#line 2692 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 508: + case 511: /* Line 1792 of yacc.c */ -#line 2674 "dtool/src/cppparser/cppBison.yxx" +#line 2696 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 509: + case 512: /* Line 1792 of yacc.c */ -#line 2678 "dtool/src/cppparser/cppBison.yxx" +#line 2700 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; - case 510: + case 513: /* Line 1792 of yacc.c */ -#line 2682 "dtool/src/cppparser/cppBison.yxx" +#line 2704 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 511: + case 514: /* Line 1792 of yacc.c */ -#line 2686 "dtool/src/cppparser/cppBison.yxx" +#line 2708 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; - case 512: + case 515: /* Line 1792 of yacc.c */ -#line 2690 "dtool/src/cppparser/cppBison.yxx" +#line 2712 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; - case 513: + case 516: /* Line 1792 of yacc.c */ -#line 2694 "dtool/src/cppparser/cppBison.yxx" +#line 2716 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 514: + case 517: /* Line 1792 of yacc.c */ -#line 2698 "dtool/src/cppparser/cppBison.yxx" +#line 2720 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; - case 515: + case 518: /* Line 1792 of yacc.c */ -#line 2702 "dtool/src/cppparser/cppBison.yxx" +#line 2724 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; - case 516: -/* Line 1792 of yacc.c */ -#line 2709 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); -} - break; - - case 517: -/* Line 1792 of yacc.c */ -#line 2713 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(true); -} - break; - - case 518: -/* Line 1792 of yacc.c */ -#line 2717 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(false); -} - break; - case 519: /* Line 1792 of yacc.c */ -#line 2721 "dtool/src/cppparser/cppBison.yxx" +#line 2731 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } @@ -7000,41 +7087,41 @@ yyreduce: case 520: /* Line 1792 of yacc.c */ -#line 2725 "dtool/src/cppparser/cppBison.yxx" +#line 2735 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); + (yyval.u.expr) = new CPPExpression(true); } break; case 521: /* Line 1792 of yacc.c */ -#line 2729 "dtool/src/cppparser/cppBison.yxx" +#line 2739 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression(false); } break; case 522: /* Line 1792 of yacc.c */ -#line 2733 "dtool/src/cppparser/cppBison.yxx" +#line 2743 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; case 523: /* Line 1792 of yacc.c */ -#line 2737 "dtool/src/cppparser/cppBison.yxx" +#line 2747 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; case 524: /* Line 1792 of yacc.c */ -#line 2741 "dtool/src/cppparser/cppBison.yxx" +#line 2751 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -7050,7 +7137,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2759 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); } break; @@ -7058,309 +7145,309 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2763 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); } break; case 528: /* Line 1792 of yacc.c */ -#line 2767 "dtool/src/cppparser/cppBison.yxx" +#line 2777 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 529: /* Line 1792 of yacc.c */ -#line 2771 "dtool/src/cppparser/cppBison.yxx" +#line 2781 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; case 530: /* Line 1792 of yacc.c */ -#line 2775 "dtool/src/cppparser/cppBison.yxx" +#line 2785 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 531: /* Line 1792 of yacc.c */ -#line 2779 "dtool/src/cppparser/cppBison.yxx" +#line 2789 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; case 532: /* Line 1792 of yacc.c */ -#line 2783 "dtool/src/cppparser/cppBison.yxx" +#line 2793 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; case 533: /* Line 1792 of yacc.c */ -#line 2787 "dtool/src/cppparser/cppBison.yxx" +#line 2797 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; case 534: /* Line 1792 of yacc.c */ -#line 2791 "dtool/src/cppparser/cppBison.yxx" +#line 2801 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; case 535: /* Line 1792 of yacc.c */ -#line 2795 "dtool/src/cppparser/cppBison.yxx" +#line 2805 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; case 536: /* Line 1792 of yacc.c */ -#line 2799 "dtool/src/cppparser/cppBison.yxx" +#line 2809 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; case 537: /* Line 1792 of yacc.c */ -#line 2803 "dtool/src/cppparser/cppBison.yxx" +#line 2813 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; case 538: /* Line 1792 of yacc.c */ -#line 2807 "dtool/src/cppparser/cppBison.yxx" +#line 2817 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; case 539: /* Line 1792 of yacc.c */ -#line 2811 "dtool/src/cppparser/cppBison.yxx" +#line 2821 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; case 540: /* Line 1792 of yacc.c */ -#line 2815 "dtool/src/cppparser/cppBison.yxx" +#line 2825 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 541: /* Line 1792 of yacc.c */ -#line 2819 "dtool/src/cppparser/cppBison.yxx" +#line 2829 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 542: /* Line 1792 of yacc.c */ -#line 2823 "dtool/src/cppparser/cppBison.yxx" +#line 2833 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 543: /* Line 1792 of yacc.c */ -#line 2827 "dtool/src/cppparser/cppBison.yxx" +#line 2837 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 544: /* Line 1792 of yacc.c */ -#line 2831 "dtool/src/cppparser/cppBison.yxx" +#line 2841 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 545: /* Line 1792 of yacc.c */ -#line 2835 "dtool/src/cppparser/cppBison.yxx" +#line 2845 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 546: /* Line 1792 of yacc.c */ -#line 2839 "dtool/src/cppparser/cppBison.yxx" +#line 2849 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 547: /* Line 1792 of yacc.c */ -#line 2843 "dtool/src/cppparser/cppBison.yxx" +#line 2853 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 548: /* Line 1792 of yacc.c */ -#line 2847 "dtool/src/cppparser/cppBison.yxx" +#line 2857 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 549: /* Line 1792 of yacc.c */ -#line 2851 "dtool/src/cppparser/cppBison.yxx" +#line 2861 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 550: /* Line 1792 of yacc.c */ -#line 2855 "dtool/src/cppparser/cppBison.yxx" +#line 2865 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 551: /* Line 1792 of yacc.c */ -#line 2859 "dtool/src/cppparser/cppBison.yxx" +#line 2869 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 552: /* Line 1792 of yacc.c */ -#line 2863 "dtool/src/cppparser/cppBison.yxx" +#line 2873 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 553: /* Line 1792 of yacc.c */ -#line 2867 "dtool/src/cppparser/cppBison.yxx" +#line 2877 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 554: /* Line 1792 of yacc.c */ -#line 2871 "dtool/src/cppparser/cppBison.yxx" +#line 2881 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 555: /* Line 1792 of yacc.c */ -#line 2875 "dtool/src/cppparser/cppBison.yxx" +#line 2885 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 556: /* Line 1792 of yacc.c */ -#line 2879 "dtool/src/cppparser/cppBison.yxx" +#line 2889 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 557: /* Line 1792 of yacc.c */ -#line 2883 "dtool/src/cppparser/cppBison.yxx" +#line 2893 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 558: /* Line 1792 of yacc.c */ -#line 2887 "dtool/src/cppparser/cppBison.yxx" +#line 2897 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; case 559: /* Line 1792 of yacc.c */ -#line 2891 "dtool/src/cppparser/cppBison.yxx" +#line 2901 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; case 560: /* Line 1792 of yacc.c */ -#line 2895 "dtool/src/cppparser/cppBison.yxx" +#line 2905 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; case 561: /* Line 1792 of yacc.c */ -#line 2899 "dtool/src/cppparser/cppBison.yxx" +#line 2909 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; case 562: /* Line 1792 of yacc.c */ -#line 2906 "dtool/src/cppparser/cppBison.yxx" +#line 2913 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 563: /* Line 1792 of yacc.c */ -#line 2910 "dtool/src/cppparser/cppBison.yxx" +#line 2917 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(true); + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 564: /* Line 1792 of yacc.c */ -#line 2914 "dtool/src/cppparser/cppBison.yxx" +#line 2921 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(false); + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; case 565: /* Line 1792 of yacc.c */ -#line 2918 "dtool/src/cppparser/cppBison.yxx" +#line 2928 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } @@ -7368,39 +7455,71 @@ yyreduce: case 566: /* Line 1792 of yacc.c */ -#line 2922 "dtool/src/cppparser/cppBison.yxx" +#line 2932 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); + (yyval.u.expr) = new CPPExpression(true); } break; case 567: /* Line 1792 of yacc.c */ -#line 2926 "dtool/src/cppparser/cppBison.yxx" +#line 2936 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression(false); } break; case 568: /* Line 1792 of yacc.c */ -#line 2930 "dtool/src/cppparser/cppBison.yxx" +#line 2940 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; case 569: /* Line 1792 of yacc.c */ -#line 2934 "dtool/src/cppparser/cppBison.yxx" +#line 2944 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; case 570: /* Line 1792 of yacc.c */ -#line 2941 "dtool/src/cppparser/cppBison.yxx" +#line 2948 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 571: +/* Line 1792 of yacc.c */ +#line 2952 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 572: +/* Line 1792 of yacc.c */ +#line 2956 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 573: +/* Line 1792 of yacc.c */ +#line 2960 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); +} + break; + + case 574: +/* Line 1792 of yacc.c */ +#line 2967 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7410,9 +7529,9 @@ yyreduce: } break; - case 571: + case 575: /* Line 1792 of yacc.c */ -#line 2949 "dtool/src/cppparser/cppBison.yxx" +#line 2975 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7422,49 +7541,49 @@ yyreduce: } break; - case 572: + case 576: /* Line 1792 of yacc.c */ -#line 2957 "dtool/src/cppparser/cppBison.yxx" +#line 2983 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 573: + case 577: /* Line 1792 of yacc.c */ -#line 2983 "dtool/src/cppparser/cppBison.yxx" +#line 3009 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 574: + case 578: /* Line 1792 of yacc.c */ -#line 2987 "dtool/src/cppparser/cppBison.yxx" +#line 3013 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; - case 575: + case 579: /* Line 1792 of yacc.c */ -#line 2994 "dtool/src/cppparser/cppBison.yxx" +#line 3020 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); } break; - case 576: + case 580: /* Line 1792 of yacc.c */ -#line 2998 "dtool/src/cppparser/cppBison.yxx" +#line 3024 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; - case 577: + case 581: /* Line 1792 of yacc.c */ -#line 3002 "dtool/src/cppparser/cppBison.yxx" +#line 3028 "dtool/src/cppparser/cppBison.yxx" { // The right string takes on the literal type of the left. (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); @@ -7472,9 +7591,9 @@ yyreduce: } break; - case 578: + case 582: /* Line 1792 of yacc.c */ -#line 3008 "dtool/src/cppparser/cppBison.yxx" +#line 3034 "dtool/src/cppparser/cppBison.yxx" { // We have to check that the two literal types match up. (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); @@ -7487,7 +7606,7 @@ yyreduce: /* Line 1792 of yacc.c */ -#line 7491 "built/tmp/cppBison.yxx.c" +#line 7610 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 6221bd8507..0cca93bef7 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -577,56 +577,60 @@ storage_class: { $$ = 0; } - | storage_class KW_EXTERN + | KW_EXTERN storage_class { - $$ = $1 | (int)CPPInstance::SC_extern; + $$ = $2 | (int)CPPInstance::SC_extern; } - | storage_class KW_EXTERN SIMPLE_STRING + | KW_EXTERN SIMPLE_STRING storage_class { - $$ = $1 | (int)CPPInstance::SC_extern; - if ($3 == "C") { + $$ = $3 | (int)CPPInstance::SC_extern; + if ($2 == "C") { $$ |= (int)CPPInstance::SC_c_binding; - } else if ($3 == "C++") { + } else if ($2 == "C++") { $$ &= ~(int)CPPInstance::SC_c_binding; } else { - yywarning("Ignoring unknown linkage type \"" + $3 + "\"", @3); + yywarning("Ignoring unknown linkage type \"" + $2 + "\"", @2); } } - | storage_class KW_STATIC + | KW_STATIC storage_class { - $$ = $1 | (int)CPPInstance::SC_static; + $$ = $2 | (int)CPPInstance::SC_static; } - | storage_class KW_INLINE + | KW_INLINE storage_class { - $$ = $1 | (int)CPPInstance::SC_inline; + $$ = $2 | (int)CPPInstance::SC_inline; } - | storage_class KW_VIRTUAL + | KW_VIRTUAL storage_class { - $$ = $1 | (int)CPPInstance::SC_virtual; + $$ = $2 | (int)CPPInstance::SC_virtual; } - | storage_class KW_EXPLICIT + | KW_EXPLICIT storage_class { - $$ = $1 | (int)CPPInstance::SC_explicit; + $$ = $2 | (int)CPPInstance::SC_explicit; } - | storage_class KW_VOLATILE + | KW_REGISTER storage_class { - $$ = $1 | (int)CPPInstance::SC_volatile; + $$ = $2 | (int)CPPInstance::SC_register; } - | storage_class KW_MUTABLE + | KW_VOLATILE storage_class { - $$ = $1 | (int)CPPInstance::SC_mutable; + $$ = $2 | (int)CPPInstance::SC_volatile; } - | storage_class KW_REGISTER + | KW_MUTABLE storage_class { - $$ = $1 | (int)CPPInstance::SC_register; + $$ = $2 | (int)CPPInstance::SC_mutable; } - | storage_class KW_BLOCKING + | KW_CONSTEXPR storage_class { - $$ = $1 | (int)CPPInstance::SC_blocking; + $$ = $2 | (int)CPPInstance::SC_constexpr; } - | storage_class KW_EXTENSION + | KW_BLOCKING storage_class { - $$ = $1 | (int)CPPInstance::SC_extension; + $$ = $2 | (int)CPPInstance::SC_blocking; +} + | KW_EXTENSION storage_class +{ + $$ = $2 | (int)CPPInstance::SC_extension; } ; @@ -810,16 +814,18 @@ function_prototype: } formal_parameter_list ')' function_post { - pop_scope(); CPPType *type; - if ($1->get_simple_name() == current_scope->get_simple_name()) { + if ($1->get_simple_name() == current_scope->get_simple_name() || + $1->get_simple_name() == string("~") + current_scope->get_simple_name()) { // This is a constructor, and has no return. type = new CPPSimpleType(CPPSimpleType::T_void); } else { // This isn't a constructor, so it has an implicit return type of // int. + yywarning("function has no return type, assuming int", @1); type = new CPPSimpleType(CPPSimpleType::T_int); } + pop_scope(); CPPInstanceIdentifier *ii = new CPPInstanceIdentifier($1); ii->add_func_modifier($4, $6); @@ -1463,14 +1469,6 @@ formal_parameter: { $$ = new CPPInstance($1, $2, 0, @2.file); $$->set_initializer($3); -} - | IDENTIFIER formal_parameter_identifier maybe_initialize -{ - yywarning("Not a type: " + $1->get_fully_scoped_name(), @1); - CPPType *type = - CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); - $$ = new CPPInstance(type, $2, 0, @2.file); - $$->set_initializer($3); } | KW_CONST type formal_parameter_identifier maybe_initialize { @@ -2101,8 +2099,32 @@ namespace_declaration: cpp '}' { pop_scope(); +} + | KW_INLINE KW_NAMESPACE name '{' +{ + CPPScope *scope = $3->find_scope(current_scope, global_scope, current_lexer); + if (scope == NULL) { + // This must be a new namespace declaration. + CPPScope *parent_scope = + $3->get_scope(current_scope, global_scope, current_lexer); + if (parent_scope == NULL) { + parent_scope = current_scope; + } + scope = new CPPScope(parent_scope, $3->_names.back(), V_public); + } + + CPPNamespace *nspace = new CPPNamespace($3, scope, @2.file); + nspace->_inline = true; + current_scope->add_declaration(nspace, global_scope, current_lexer, @2); + current_scope->define_namespace(nspace); + push_scope(scope); +} + cpp '}' +{ + pop_scope(); } | KW_NAMESPACE '{' cpp '}' + | KW_INLINE KW_NAMESPACE '{' cpp '}' ; using_declaration: @@ -2929,6 +2951,10 @@ formal_const_operand: | CUSTOM_LITERAL { $$ = $1; +} + | IDENTIFIER +{ + $$ = new CPPExpression($1, current_scope, global_scope, current_lexer); } | KW_NULLPTR { diff --git a/dtool/src/cppparser/cppEnumType.cxx b/dtool/src/cppparser/cppEnumType.cxx index 5a79d8aabb..8a3684a777 100644 --- a/dtool/src/cppparser/cppEnumType.cxx +++ b/dtool/src/cppparser/cppEnumType.cxx @@ -82,6 +82,7 @@ add_element(const string &name, CPPExpression *value) { inst = new CPPInstance(CPPType::new_type(new CPPConstType(_element_type)), ident); } + inst->_storage_class |= CPPInstance::SC_constexpr; _elements.push_back(inst); if (value == (CPPExpression *)NULL) { diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index 430f9388d8..91bab50d03 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -531,6 +531,10 @@ evaluate() const { case T_variable: if (_u._variable->_type != NULL && _u._variable->_initializer != NULL) { + // A constexpr variable, which is treated as const. + if (_u._variable->_storage_class & CPPInstance::SC_constexpr) { + return _u._variable->_initializer->evaluate(); + } // A const variable. Fetch its assigned value. CPPConstType *const_type = _u._variable->_type->as_const_type(); if (const_type != NULL) { @@ -1227,6 +1231,9 @@ is_tbd() const { case T_variable: if (_u._variable->_type != NULL && _u._variable->_initializer != NULL) { + if (_u._variable->_storage_class & CPPInstance::SC_constexpr) { + return false; + } CPPConstType *const_type = _u._variable->_type->as_const_type(); if (const_type != NULL) { return false; @@ -1363,9 +1370,10 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { if (_u._variable->_type != NULL && _u._variable->_initializer != NULL && _u._variable->_vis > V_public) { - // A const variable. Fetch its assigned value. + // A constexpr or const variable. Fetch its assigned value. CPPConstType *const_type = _u._variable->_type->as_const_type(); - if (const_type != NULL) { + if ((_u._variable->_storage_class & CPPInstance::SC_constexpr) != 0 || + const_type != NULL) { _u._variable->_initializer->output(out, indent_level, scope, false); break; } diff --git a/dtool/src/cppparser/cppIdentifier.cxx b/dtool/src/cppparser/cppIdentifier.cxx index e19345cd2a..f3c5985ed9 100644 --- a/dtool/src/cppparser/cppIdentifier.cxx +++ b/dtool/src/cppparser/cppIdentifier.cxx @@ -187,6 +187,12 @@ get_local_name(CPPScope *scope) const { // last name. CPPScope *my_scope = get_scope(scope, NULL); + // Strip off template scopes, since they don't add anything + // particularly meaningful to the local name. + while (my_scope->as_template_scope() != NULL) { + my_scope = my_scope->get_parent_scope(); + } + if (my_scope == NULL) { result = get_fully_scoped_name(); } else if (my_scope == scope) { @@ -463,7 +469,12 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope, CPPDeclaration *sym; if (!_names.back().has_templ()) { - sym = scope->find_symbol(get_simple_name()); + if (_names.size() > 1 && scope->get_simple_name() == get_simple_name()) { + // An identifier like Class::Class always refers to the class constructor. + sym = scope->get_struct_type()->get_constructor(); + } else { + sym = scope->find_symbol(get_simple_name()); + } } else { sym = scope->find_template(get_simple_name()); @@ -499,7 +510,12 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope, CPPDeclaration *sym; if (!_names.back().has_templ()) { - sym = scope->find_symbol(get_simple_name()); + if (_names.size() > 1 && scope->get_simple_name() == get_simple_name()) { + // An identifier like Class::Class always refers to the class constructor. + sym = scope->get_struct_type()->get_constructor(); + } else { + sym = scope->find_symbol(get_simple_name()); + } } else { sym = scope->find_template(get_simple_name()); diff --git a/dtool/src/cppparser/cppInstance.cxx b/dtool/src/cppparser/cppInstance.cxx index 7e969dfad2..5cbe0696af 100644 --- a/dtool/src/cppparser/cppInstance.cxx +++ b/dtool/src/cppparser/cppInstance.cxx @@ -601,6 +601,9 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete, if (_storage_class & SC_mutable) { out << "mutable "; } + if (_storage_class & SC_constexpr) { + out << "constexpr "; + } string name; if (_ident != NULL) { diff --git a/dtool/src/cppparser/cppInstance.h b/dtool/src/cppparser/cppInstance.h index bf5843196f..d22342730f 100644 --- a/dtool/src/cppparser/cppInstance.h +++ b/dtool/src/cppparser/cppInstance.h @@ -46,19 +46,20 @@ public: SC_pure_virtual = 0x0080, SC_volatile = 0x0100, SC_mutable = 0x0200, + SC_constexpr = 0x0400, // This bit is only set by CPPStructType::check_virtual(). - SC_inherited_virtual = 0x0400, + SC_inherited_virtual = 0x0800, // This is a special "storage class" for methods tagged with the // BLOCKING macro (i.e. the special __blocking keyword). These // are methods that might block and therefore need to release // Python threads for their duration. - SC_blocking = 0x0800, + SC_blocking = 0x1000, // And this is for methods tagged with __extension, which declares // extension methods defined separately from the source code. - SC_extension = 0x1000, + SC_extension = 0x2000, }; CPPInstance(CPPType *type, const string &name, int storage_class = 0); diff --git a/dtool/src/cppparser/cppNamespace.cxx b/dtool/src/cppparser/cppNamespace.cxx index 6cb0165b51..dc7871d8ea 100644 --- a/dtool/src/cppparser/cppNamespace.cxx +++ b/dtool/src/cppparser/cppNamespace.cxx @@ -26,7 +26,9 @@ CPPNamespace:: CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) : CPPDeclaration(file), - _ident(ident), _scope(scope) + _ident(ident), + _scope(scope), + _inline(false) { } @@ -86,6 +88,9 @@ get_scope() const { //////////////////////////////////////////////////////////////////// void CPPNamespace:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { + if (_inline) { + out << "inline "; + } if (!complete && _ident != NULL) { // If we have a name, use it. out << "namespace " << _ident->get_local_name(scope); diff --git a/dtool/src/cppparser/cppNamespace.h b/dtool/src/cppparser/cppNamespace.h index f5a64b8616..9791194419 100644 --- a/dtool/src/cppparser/cppNamespace.h +++ b/dtool/src/cppparser/cppNamespace.h @@ -42,6 +42,8 @@ public: virtual CPPNamespace *as_namespace(); + bool _inline; + private: CPPIdentifier *_ident; CPPScope *_scope; diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index 3e346394cb..ded976708d 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -292,10 +292,15 @@ define_extension_type(CPPExtensionType *type, CPPPreprocessor *error_sink) { // Description: //////////////////////////////////////////////////////////////////// void CPPScope:: -define_namespace(CPPNamespace *scope) { - string name = scope->get_simple_name(); +define_namespace(CPPNamespace *ns) { + string name = ns->get_simple_name(); - _namespaces[name] = scope; + _namespaces[name] = ns; + + if (ns->_inline) { + // Add an implicit using declaration for an inline namespace. + _using.insert(ns->get_scope()); + } } //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/cppparser/cppStructType.cxx b/dtool/src/cppparser/cppStructType.cxx index c0a8aa7448..c6188ada30 100644 --- a/dtool/src/cppparser/cppStructType.cxx +++ b/dtool/src/cppparser/cppStructType.cxx @@ -277,6 +277,26 @@ is_incomplete() const { return _incomplete; } +//////////////////////////////////////////////////////////////////// +// Function: CPPStructType::get_constructor +// Access: Public +// Description: Returns the constructor defined for the struct type, +// if any, or NULL if no constructor is found. +//////////////////////////////////////////////////////////////////// +CPPFunctionGroup *CPPStructType:: +get_constructor() const { + // Iterate through all the functions that begin with '~' until we + // find one that claims to be a destructor. In theory, there should + // only be one such function. + CPPScope::Functions::const_iterator fi; + fi = _scope->_functions.find(get_simple_name()); + if (fi != _scope->_functions.end()) { + return fi->second; + } else { + return (CPPFunctionGroup *)NULL; + } +} + //////////////////////////////////////////////////////////////////// // Function: CPPStructType::get_destructor // Access: Public diff --git a/dtool/src/cppparser/cppStructType.h b/dtool/src/cppparser/cppStructType.h index 9a650320d2..bbbbaa324a 100644 --- a/dtool/src/cppparser/cppStructType.h +++ b/dtool/src/cppparser/cppStructType.h @@ -49,6 +49,7 @@ public: virtual bool is_incomplete() const; virtual bool is_trivial() const; + CPPFunctionGroup *get_constructor() const; CPPInstance *get_destructor() const; virtual CPPDeclaration * diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 392997cb5b..68975b5877 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -254,8 +254,6 @@ #define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MEMORY() #define TAU_DISABLE_TRACKING_MEMORY() -#define TAU_TRACK_MEMORY() -#define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() #define TAU_TRACK_MUSE_EVENTS() diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index abcf7ad3f5..2f722b7d22 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -34,7 +34,7 @@ using namespace std; #define INLINE inline #define ALWAYS_INLINE inline #define TYPENAME typename -#define CONSTEXPR +#define CONSTEXPR constexpr #define NOEXCEPT noexcept #define FINAL #define OVERRIDE diff --git a/dtool/src/dtoolbase/selectThreadImpl.h b/dtool/src/dtoolbase/selectThreadImpl.h index 9dcde6acc8..9a774ecb82 100644 --- a/dtool/src/dtoolbase/selectThreadImpl.h +++ b/dtool/src/dtoolbase/selectThreadImpl.h @@ -36,7 +36,7 @@ // regular volatile keyword. #define TVOLATILE volatile -#if !defined(HAVE_THREADS) +#if !defined(HAVE_THREADS) || defined(CPPPARSER) // With threading disabled, use the do-nothing implementation. #define THREAD_DUMMY_IMPL 1 diff --git a/dtool/src/interrogate/interfaceMaker.cxx b/dtool/src/interrogate/interfaceMaker.cxx index b8ec0c7c7f..a9ef73f7dc 100644 --- a/dtool/src/interrogate/interfaceMaker.cxx +++ b/dtool/src/interrogate/interfaceMaker.cxx @@ -412,6 +412,16 @@ remap_parameter(CPPType *struct_type, CPPType *param_type) { } else if (TypeManager::is_const_ptr_to_basic_string_wchar(param_type)) { return new ParameterRemapBasicWStringPtrToWString(param_type); + + } else if (TypeManager::is_reference(param_type) || + TypeManager::is_pointer(param_type)) { + // Python strings are immutable, so we can't wrap a non-const + // pointer or reference to a string. + CPPType *pt_type = TypeManager::unwrap(param_type); + if (TypeManager::is_basic_string_char(pt_type) || + TypeManager::is_basic_string_wchar(pt_type)) { + return (ParameterRemap *)NULL; + } } } } diff --git a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx index 9b04103af2..17391e2226 100644 --- a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx @@ -360,8 +360,8 @@ void InterfaceMakerPythonSimple::write_function_instance(ostream &out, Interface pexpr_string = param_name; } else if (TypeManager::is_pointer(type)) { - out << "int " << param_name; - format_specifiers += "i"; + out << "Py_ssize_t " << param_name; + format_specifiers += "n"; parameter_list += ", &" + param_name; } else { diff --git a/dtool/src/interrogate/interrogateBuilder.cxx b/dtool/src/interrogate/interrogateBuilder.cxx index f16143c413..d164b80fc7 100644 --- a/dtool/src/interrogate/interrogateBuilder.cxx +++ b/dtool/src/interrogate/interrogateBuilder.cxx @@ -264,6 +264,9 @@ build() { ci != _forcetype.end(); ++ci) { CPPType *type = parser.parse_type(*ci); + if (type == NULL) { + cerr << "Failure to parse forcetype " << *ci << "\n"; + } assert(type != (CPPType *)NULL); get_type(type, true); } diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index 314e2d447a..f96cae5e6f 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -2295,7 +2295,7 @@ get_basic_string_char_type() { static bool got_type = false; static CPPType *type = (CPPType *)NULL; if (!got_type) { - type = parser.parse_type("basic_string"); + type = parser.parse_type("std::basic_string"); got_type = true; } return type; @@ -2312,7 +2312,7 @@ get_basic_string_wchar_type() { static bool got_type = false; static CPPType *type = (CPPType *)NULL; if (!got_type) { - type = parser.parse_type("basic_string"); + type = parser.parse_type("std::basic_string"); got_type = true; } return type; diff --git a/dtool/src/parser-inc/Dense b/dtool/src/parser-inc/Dense index d2b297889d..ab3fac8475 100644 --- a/dtool/src/parser-inc/Dense +++ b/dtool/src/parser-inc/Dense @@ -1,6 +1,4 @@ namespace Eigen { - template - class Matrix { - }; + template + class Matrix; }; - diff --git a/dtool/src/parser-inc/alloca.h b/dtool/src/parser-inc/alloca.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/btBulletDynamicsCommon.h b/dtool/src/parser-inc/btBulletDynamicsCommon.h index e0086678f2..f62fc5bee6 100644 --- a/dtool/src/parser-inc/btBulletDynamicsCommon.h +++ b/dtool/src/parser-inc/btBulletDynamicsCommon.h @@ -1,9 +1,11 @@ +#pragma once class bt32BitAxisSweep3; class btActionInterface; class btAxisSweep3; class btBoxShape; class btBroadphaseInterface; +class btBroadphaseProxy; class btBulletWorldImporter; class btBvhTriangleMeshShape; class btCapsuleShape; diff --git a/dtool/src/parser-inc/cfloat b/dtool/src/parser-inc/cfloat new file mode 100644 index 0000000000..13298efce8 --- /dev/null +++ b/dtool/src/parser-inc/cfloat @@ -0,0 +1 @@ +#include diff --git a/dtool/src/parser-inc/cmath b/dtool/src/parser-inc/cmath new file mode 100644 index 0000000000..b0ed8fc324 --- /dev/null +++ b/dtool/src/parser-inc/cmath @@ -0,0 +1,4 @@ +#pragma once + +typedef float float_t; +typedef double double_t; diff --git a/dtool/src/parser-inc/errno.h b/dtool/src/parser-inc/errno.h new file mode 100644 index 0000000000..5608e6f609 --- /dev/null +++ b/dtool/src/parser-inc/errno.h @@ -0,0 +1,7 @@ +#pragma once + +#define EDOM 33 +#define EILSEQ 84 +#define ERANGE 34 + +extern int errno; diff --git a/dtool/src/parser-inc/fcntl.h b/dtool/src/parser-inc/fcntl.h new file mode 100644 index 0000000000..dd87d6afa3 --- /dev/null +++ b/dtool/src/parser-inc/fcntl.h @@ -0,0 +1,7 @@ +#pragma once + +typedef int pid_t; +typedef long int off_t; +typedef unsigned int mode_t; + +struct flock; diff --git a/dtool/src/parser-inc/float.h b/dtool/src/parser-inc/float.h new file mode 100644 index 0000000000..d44c70cc92 --- /dev/null +++ b/dtool/src/parser-inc/float.h @@ -0,0 +1,18 @@ +#pragma once + +#define FLT_RADIX 2 +#define DECIMAL_DIG 21 + +#define FLT_MIN 1.17549435e-38F +#define DBL_MIN 2.2250738585072014e-308 +#define LDBL_MIN 3.36210314311209350626e-4932L + +#define FLT_MAX 3.40282347e+38F +#define DBL_MAX 1.7976931348623157e+308 +#define LDBL_MAX 1.18973149535723176502e+4932L + +#define FLT_DIG 6 +#define DBL_DIG 15 +#define LDBL_DIG 18 + +#define FLT_EVAL_METHOD -1 diff --git a/dtool/src/parser-inc/ft2build.h b/dtool/src/parser-inc/ft2build.h index f529e624f0..88dc8d645a 100644 --- a/dtool/src/parser-inc/ft2build.h +++ b/dtool/src/parser-inc/ft2build.h @@ -23,6 +23,7 @@ // This definition is intentionally recursive. Why complicate things // with multiple files? #define FT_FREETYPE_H +#define FT_OUTLINE_H class FT_Face; class FT_Library; diff --git a/dtool/src/parser-inc/iterator b/dtool/src/parser-inc/iterator new file mode 100644 index 0000000000..40b8e2f479 --- /dev/null +++ b/dtool/src/parser-inc/iterator @@ -0,0 +1,6 @@ +#pragma once + +namespace std { + template class iterator; + template class reverse_iterator; +}; diff --git a/dtool/src/parser-inc/limits b/dtool/src/parser-inc/limits new file mode 100644 index 0000000000..3729e2111e --- /dev/null +++ b/dtool/src/parser-inc/limits @@ -0,0 +1,5 @@ +#pragma once + +namespace std { + template class numeric_limits; +}; diff --git a/dtool/src/parser-inc/list b/dtool/src/parser-inc/list index 03b1df796f..f8e687c643 100644 --- a/dtool/src/parser-inc/list +++ b/dtool/src/parser-inc/list @@ -21,23 +21,26 @@ #define LIST_H #include +#include -template -class list { -public: - typedef element value_type; +namespace std { + template> + class list { + public: + typedef element value_type; - typedef element *pointer; - typedef const element *const_pointer; - typedef element &reference; - typedef const element &const_reference; + typedef element *pointer; + typedef const element *const_pointer; + typedef element &reference; + typedef const element &const_reference; - class iterator; - class const_iterator; - class reverse_iterator; - class const_reverse_iterator; - typedef size_t size_type; - class difference_type; -}; + class iterator; + class const_iterator; + class reverse_iterator; + class const_reverse_iterator; + typedef size_t size_type; + class difference_type; + }; +} #endif diff --git a/dtool/src/parser-inc/locale.h b/dtool/src/parser-inc/locale.h new file mode 100644 index 0000000000..8bbdb60164 --- /dev/null +++ b/dtool/src/parser-inc/locale.h @@ -0,0 +1,9 @@ +#pragma once + +#define LC_CTYPE 0 +#define LC_NUMERIC 1 +#define LC_TIME 2 +#define LC_COLLATE 3 +#define LC_MONETARY 4 +#define LC_MESSAGES 5 +#define LC_ALL 6 diff --git a/dtool/src/parser-inc/memory b/dtool/src/parser-inc/memory index 07f62a9043..1f76249963 100644 --- a/dtool/src/parser-inc/memory +++ b/dtool/src/parser-inc/memory @@ -32,16 +32,18 @@ public: #else // GCC_STYLE_ALLOCATOR -template -class allocator { -public: - typedef Type *pointer; - typedef const Type *const_pointer; - typedef size_t size_type; +namespace std { + template + class allocator { + public: + typedef Type *pointer; + typedef const Type *const_pointer; + typedef size_t size_type; - INLINE pointer allocate(size_type n, allocator::const_pointer hint = 0); - INLINE void deallocate(pointer p, size_type n); -}; + pointer allocate(size_type n, allocator::const_pointer hint = 0); + void deallocate(pointer p, size_type n); + }; +} #endif // GCC_STYLE_ALLOCATOR diff --git a/dtool/src/parser-inc/ode.h b/dtool/src/parser-inc/ode.h index 867ce8eb2f..6f9d0a0f6a 100644 --- a/dtool/src/parser-inc/ode.h +++ b/dtool/src/parser-inc/ode.h @@ -20,7 +20,6 @@ #define _ODE_CONFIG_H_ #define dSINGLE 1 -#define _MSC_VER 1 #define ODE_PLATFORM_WINDOWS #if !defined(ODE_API) diff --git a/dtool/src/parser-inc/ode/ode.h b/dtool/src/parser-inc/ode/ode.h index 867ce8eb2f..6f9d0a0f6a 100755 --- a/dtool/src/parser-inc/ode/ode.h +++ b/dtool/src/parser-inc/ode/ode.h @@ -20,7 +20,6 @@ #define _ODE_CONFIG_H_ #define dSINGLE 1 -#define _MSC_VER 1 #define ODE_PLATFORM_WINDOWS #if !defined(ODE_API) diff --git a/dtool/src/parser-inc/ogg/ogg.h b/dtool/src/parser-inc/ogg/ogg.h new file mode 100644 index 0000000000..5c65eb3866 --- /dev/null +++ b/dtool/src/parser-inc/ogg/ogg.h @@ -0,0 +1,14 @@ +#ifndef _OGG_H +#define _OGG_H + +#include +#include + +typedef struct {} ogg_iovec_t; +typedef struct {} oggpack_buffer; +typedef struct {} ogg_page; +typedef struct {} ogg_stream_state; +typedef struct {} ogg_packet; +typedef struct {} ogg_sync_state; + +#endif diff --git a/dtool/src/parser-inc/squish.h b/dtool/src/parser-inc/squish.h new file mode 100644 index 0000000000..6790d9bf17 --- /dev/null +++ b/dtool/src/parser-inc/squish.h @@ -0,0 +1,9 @@ +#ifndef SQUISH_H +#define SQUISH_H + +namespace squish { + typedef unsigned char u8; +}; + +#endif + diff --git a/dtool/src/parser-inc/sstream b/dtool/src/parser-inc/sstream new file mode 100644 index 0000000000..e2747422fe --- /dev/null +++ b/dtool/src/parser-inc/sstream @@ -0,0 +1,23 @@ +#pragma once + +namespace std { + template , + class Allocator = allocator > + class basic_stringbuf; + + template , + class Allocator = allocator > + class basic_istringstream; + + template , + class Allocator = allocator > + class basic_ostringstream; + + template , + class Allocator = allocator > + class basic_stringstream; +}; diff --git a/dtool/src/parser-inc/stdio.h b/dtool/src/parser-inc/stdio.h index 0986ee733b..87d7393351 100644 --- a/dtool/src/parser-inc/stdio.h +++ b/dtool/src/parser-inc/stdio.h @@ -5,4 +5,8 @@ struct FILE; +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + #endif diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 290f97c699..3c2b9d6d28 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -19,27 +19,26 @@ #ifndef STDTYPEDEFS_H #define STDTYPEDEFS_H -typedef int off_t; -typedef long time_t; -typedef long clock_t; - -namespace std { -} typedef unsigned int uint; typedef unsigned long ulong; typedef unsigned short ushort; typedef unsigned char uchar; +inline namespace std { + typedef long time_t; + typedef long clock_t; + #ifdef _WIN64 -typedef unsigned long long size_t; -typedef long long ssize_t; -typedef long long ptrdiff_t; + typedef unsigned long long size_t; + typedef long long ssize_t; + typedef long long ptrdiff_t; #else -typedef unsigned long size_t; -typedef long ssize_t; -typedef long ptrdiff_t; + typedef unsigned long size_t; + typedef long ssize_t; + typedef long ptrdiff_t; #endif +} #ifdef __cplusplus #define NULL 0L diff --git a/dtool/src/parser-inc/string b/dtool/src/parser-inc/string index 0372b88f5a..4ca8f3fa12 100644 --- a/dtool/src/parser-inc/string +++ b/dtool/src/parser-inc/string @@ -22,47 +22,53 @@ #include -template -class basic_string { -public: - typedef typename size_t size_type; - static const size_t npos = -1; - - basic_string(); - basic_string(const basic_string ©); - void operator = (const basic_string ©); - basic_string(const ctype *string); - ~basic_string(); - - const ctype *c_str() const; - size_t length() const; - - ctype at(size_t pos) const; - ctype operator[](size_t pos) const; - ctype &operator[](size_t pos); -}; - -typedef basic_string string; -typedef basic_string wstring; -typedef basic_string u16string; -typedef basic_string u32string; - namespace std { + template + class char_traits; + + template + class basic_string { + public: + struct iterator; + struct const_iterator; + struct reverse_iterator; + struct const_reverse_iterator; + + typedef typename size_t size_type; + static const size_t npos = -1; + + basic_string(); + basic_string(const basic_string ©); + void operator = (const basic_string ©); + basic_string(const ctype *string); + ~basic_string(); + + const ctype *c_str() const; + size_t length() const; + + ctype at(size_t pos) const; + ctype operator[](size_t pos) const; + ctype &operator[](size_t pos); + }; + + typedef basic_string string; + typedef basic_string wstring; + typedef basic_string u16string; + typedef basic_string u32string; + template struct hash; template<> struct hash; template<> struct hash; template<> struct hash; template<> struct hash; - namespace string_literals { - string operator "" s(const char *str, size_t len); - wstring operator "" s(const wchar_t *str, size_t len); - u16string operator "" s(const char16_t *str, size_t len); - u32string operator "" s(const char32_t *str, size_t len); - } - - namespace literals { - using namespace string_literals; + inline namespace literals { + inline namespace string_literals { + string operator "" s(const char *str, size_t len); + wstring operator "" s(const wchar_t *str, size_t len); + u16string operator "" s(const char16_t *str, size_t len); + u32string operator "" s(const char32_t *str, size_t len); + } } } diff --git a/dtool/src/parser-inc/sys/stat.h b/dtool/src/parser-inc/sys/stat.h new file mode 100644 index 0000000000..29ebbf9bf4 --- /dev/null +++ b/dtool/src/parser-inc/sys/stat.h @@ -0,0 +1,3 @@ +#pragma once + +struct stat; diff --git a/dtool/src/parser-inc/sys/time.h b/dtool/src/parser-inc/sys/time.h new file mode 100644 index 0000000000..98d3ef73ad --- /dev/null +++ b/dtool/src/parser-inc/sys/time.h @@ -0,0 +1,4 @@ +#pragma once + +struct timeval; +struct fd_set; diff --git a/dtool/src/parser-inc/sys/types.h b/dtool/src/parser-inc/sys/types.h new file mode 100644 index 0000000000..61aa533863 --- /dev/null +++ b/dtool/src/parser-inc/sys/types.h @@ -0,0 +1,17 @@ +#pragma once + +#include + +typedef unsigned int id_t; +typedef unsigned int gid_t; +typedef unsigned int uid_t; +typedef int pid_t; +typedef long int off_t; +typedef unsigned int mode_t; +typedef unsigned long ino_t; +typedef long int dev_t; + +typedef void *timer_t; +typedef int clockid_t; +typedef unsigned int useconds_t; +typedef long int suseconds_t; diff --git a/dtool/src/parser-inc/typeinfo b/dtool/src/parser-inc/typeinfo new file mode 100644 index 0000000000..9144890d5a --- /dev/null +++ b/dtool/src/parser-inc/typeinfo @@ -0,0 +1,5 @@ +#pragma once + +class type_info; +class bad_cast; +class bad_typeid; diff --git a/dtool/src/parser-inc/unistd.h b/dtool/src/parser-inc/unistd.h new file mode 100644 index 0000000000..ebf021ba1a --- /dev/null +++ b/dtool/src/parser-inc/unistd.h @@ -0,0 +1,10 @@ +#pragma once + +#include + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +extern char *optarg; +extern int optind, opterr, optopt; diff --git a/dtool/src/parser-inc/vorbis/codec.h b/dtool/src/parser-inc/vorbis/codec.h new file mode 100644 index 0000000000..e8bd4f5563 --- /dev/null +++ b/dtool/src/parser-inc/vorbis/codec.h @@ -0,0 +1 @@ +#include diff --git a/dtool/src/parser-inc/vorbis/vorbisfile.h b/dtool/src/parser-inc/vorbis/vorbisfile.h index f71cc23e89..6fa02846d3 100644 --- a/dtool/src/parser-inc/vorbis/vorbisfile.h +++ b/dtool/src/parser-inc/vorbis/vorbisfile.h @@ -1 +1,9 @@ -struct OggVorbis_File; +#ifndef _OV_FILE_H +#define _OV_FILE_H + +#include +#include "codec.h" + +typedef struct OggVorbis_File OggVorbis_File; + +#endif diff --git a/dtool/src/parser-inc/zconf.h b/dtool/src/parser-inc/zconf.h new file mode 100644 index 0000000000..c6842b7177 --- /dev/null +++ b/dtool/src/parser-inc/zconf.h @@ -0,0 +1,19 @@ +#ifndef ZCONF_H +#define ZCONF_H + +typedef unsigned char Byte; +typedef unsigned int uInt; +typedef unsigned long uLong; + +typedef char charf; +typedef int intf; +typedef uInt uIntf; +typedef uLong uLongf; + +typedef void const *voidpc; +typedef void *voidpf; +typedef void *voidp; + +typedef unsigned long z_crc_t; + +#endif diff --git a/dtool/src/parser-inc/zlib.h b/dtool/src/parser-inc/zlib.h index 34328a7605..b7d777850a 100644 --- a/dtool/src/parser-inc/zlib.h +++ b/dtool/src/parser-inc/zlib.h @@ -20,6 +20,8 @@ #ifndef ZLIB_H #define ZLIB_H +#include "zconf.h" + class z_stream { }; diff --git a/panda/src/downloader/bioPtr.h b/panda/src/downloader/bioPtr.h index b3ff5695b8..f50c239e9f 100644 --- a/panda/src/downloader/bioPtr.h +++ b/panda/src/downloader/bioPtr.h @@ -19,7 +19,10 @@ // This module is not compiled if OpenSSL is not available. #ifdef HAVE_OPENSSL + +#ifndef OPENSSL_NO_KRB5 #define OPENSSL_NO_KRB5 +#endif #include "referenceCount.h" #include "openSSLWrapper.h" // must be included before any other openssl. diff --git a/panda/src/downloader/bioStreamBuf.h b/panda/src/downloader/bioStreamBuf.h index 73fbd68b78..c03de76c02 100644 --- a/panda/src/downloader/bioStreamBuf.h +++ b/panda/src/downloader/bioStreamBuf.h @@ -19,7 +19,10 @@ // This module is not compiled if OpenSSL is not available. #ifdef HAVE_OPENSSL + +#ifndef OPENSSL_NO_KRB5 #define OPENSSL_NO_KRB5 +#endif #include "bioPtr.h" #include "pointerTo.h" diff --git a/panda/src/downloader/bioStreamPtr.h b/panda/src/downloader/bioStreamPtr.h index 95f4308aa4..d56d439bf2 100644 --- a/panda/src/downloader/bioStreamPtr.h +++ b/panda/src/downloader/bioStreamPtr.h @@ -19,7 +19,10 @@ // This module is not compiled if OpenSSL is not available. #ifdef HAVE_OPENSSL + +#ifndef OPENSSL_NO_KRB5 #define OPENSSL_NO_KRB5 +#endif #include "bioStream.h" #include "referenceCount.h" diff --git a/panda/src/downloader/httpChannel.h b/panda/src/downloader/httpChannel.h index f8ed8c56f7..490265748e 100644 --- a/panda/src/downloader/httpChannel.h +++ b/panda/src/downloader/httpChannel.h @@ -23,7 +23,10 @@ // communications. #ifdef HAVE_OPENSSL + +#ifndef OPENSSL_NO_KRB5 #define OPENSSL_NO_KRB5 +#endif #include "httpClient.h" #include "httpEnum.h" diff --git a/panda/src/express/openSSLWrapper.h b/panda/src/express/openSSLWrapper.h index ee473dbcc6..b10360a841 100644 --- a/panda/src/express/openSSLWrapper.h +++ b/panda/src/express/openSSLWrapper.h @@ -24,7 +24,10 @@ #include // must be included prior to including OpenSSL. #endif +#ifndef OPENSSL_NO_KRB5 #define OPENSSL_NO_KRB5 +#endif + #include "openssl/ssl.h" #include "openssl/rand.h" #include "openssl/err.h" diff --git a/panda/src/linmath/lmatrix3_src.I b/panda/src/linmath/lmatrix3_src.I index 1fd8c74fa9..31be16b095 100644 --- a/panda/src/linmath/lmatrix3_src.I +++ b/panda/src/linmath/lmatrix3_src.I @@ -607,6 +607,8 @@ xform(const FLOATNAME(LVecBase3) &v) const { return v_res; } +#undef VECTOR3_MATRIX3_PRODUCT + //////////////////////////////////////////////////////////////////// // Function: LMatrix3::xform_point // Access: Published @@ -811,6 +813,8 @@ multiply(const FLOATNAME(LMatrix3) &other1, const FLOATNAME(LMatrix3) &other2) { MATRIX3_PRODUCT((*this), other1, other2); } +#undef MATRIX3_PRODUCT + //////////////////////////////////////////////////////////////////// // Function: LMatrix3::matrix * scalar // Access: Published @@ -1235,6 +1239,9 @@ invert_transpose_from(const FLOATNAME(LMatrix4) &other) { #endif // HAVE_EIGEN } +#undef MATRIX3_DETERMINANT +#undef DET2 + //////////////////////////////////////////////////////////////////// // Function: LMatrix::set_translate_mat // Access: Published diff --git a/panda/src/linmath/lmatrix4_src.I b/panda/src/linmath/lmatrix4_src.I index be772cab48..c162bd868a 100644 --- a/panda/src/linmath/lmatrix4_src.I +++ b/panda/src/linmath/lmatrix4_src.I @@ -849,6 +849,8 @@ xform(const FLOATNAME(LVecBase4) &v) const { return v_res; } +#undef VECTOR4_MATRIX4_PRODUCT + //////////////////////////////////////////////////////////////////// // Function: LMatrix4::xform_point // Access: Public @@ -1068,6 +1070,8 @@ multiply(const FLOATNAME(LMatrix4) &other1, const FLOATNAME(LMatrix4) &other2) { #endif // HAVE_EIGEN } +#undef MATRIX4_PRODUCT + //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix * scalar // Access: Public diff --git a/panda/src/nativenet/socket_portable.h b/panda/src/nativenet/socket_portable.h index fe8b6451c1..0288366a84 100644 --- a/panda/src/nativenet/socket_portable.h +++ b/panda/src/nativenet/socket_portable.h @@ -8,10 +8,15 @@ const int ALL_OK = 0; const int BASIC_ERROR = -1; +#if defined(CPPPARSER) +// Interrogate doesn't need to parse any of this. + +typedef unsigned long SOCKET; + /************************************************************************ * HP SOCKET LIBRARY STUFF ************************************************************************/ -#if defined(HP_SOCK) +#elif defined(HP_SOCK) #ifndef _INCLUDE_HPUX_SOURCE #define _INCLUDE_HPUX_SOURCE diff --git a/panda/src/net/connectionManager.cxx b/panda/src/net/connectionManager.cxx index 964d73f030..146e77f39b 100644 --- a/panda/src/net/connectionManager.cxx +++ b/panda/src/net/connectionManager.cxx @@ -28,7 +28,7 @@ #include // For GetAdaptersAddresses() #elif defined(ANDROID) #include -#else +#elif !defined(CPPPARSER) #include #include #endif diff --git a/panda/src/putil/config_util.N b/panda/src/putil/config_util.N index 3e7f11238a..4c3e2086d8 100644 --- a/panda/src/putil/config_util.N +++ b/panda/src/putil/config_util.N @@ -10,9 +10,6 @@ ignoretype Factory # builds (to support multi-arch builds), so we don't export this. ignoretype BitMaskNative -forcetype basic_string -renametype basic_string CString - forcetype PointerToBase > forcetype PointerToArrayBase forcetype PointerToArray diff --git a/panda/src/rocket/rocketInputHandler.cxx b/panda/src/rocket/rocketInputHandler.cxx index b734e59bef..5cd4d30425 100644 --- a/panda/src/rocket/rocketInputHandler.cxx +++ b/panda/src/rocket/rocketInputHandler.cxx @@ -20,9 +20,11 @@ #include "keyboardButton.h" #include "mouseButton.h" +#ifndef CPPPARSER #include using namespace Rocket::Core::Input; +#endif TypeHandle RocketInputHandler::_type_handle; diff --git a/panda/src/vision/webcamVideoCursorV4L.cxx b/panda/src/vision/webcamVideoCursorV4L.cxx index e787ff658f..2000bf3136 100644 --- a/panda/src/vision/webcamVideoCursorV4L.cxx +++ b/panda/src/vision/webcamVideoCursorV4L.cxx @@ -14,7 +14,7 @@ #include "webcamVideoV4L.h" -#ifdef HAVE_VIDEO4LINUX +#if defined(HAVE_VIDEO4LINUX) && !defined(CPPPARSER) #include #include diff --git a/panda/src/vision/webcamVideoCursorV4L.h b/panda/src/vision/webcamVideoCursorV4L.h index 14ffa257f2..2dd22ee452 100644 --- a/panda/src/vision/webcamVideoCursorV4L.h +++ b/panda/src/vision/webcamVideoCursorV4L.h @@ -17,7 +17,7 @@ #include "pandabase.h" -#ifdef HAVE_VIDEO4LINUX +#if defined(HAVE_VIDEO4LINUX) && !defined(CPPPARSER) #include "webcamVideo.h" #include "movieVideoCursor.h" diff --git a/panda/src/vision/webcamVideoV4L.cxx b/panda/src/vision/webcamVideoV4L.cxx index 71cee3d312..0c86640ea1 100644 --- a/panda/src/vision/webcamVideoV4L.cxx +++ b/panda/src/vision/webcamVideoV4L.cxx @@ -14,7 +14,7 @@ #include "webcamVideoV4L.h" -#ifdef HAVE_VIDEO4LINUX +#if defined(HAVE_VIDEO4LINUX) && !defined(CPPPARSER) #include "webcamVideoCursorV4L.h" #include "dcast.h" diff --git a/panda/src/vision/webcamVideoV4L.h b/panda/src/vision/webcamVideoV4L.h index 1405497fed..38b6cf4f34 100644 --- a/panda/src/vision/webcamVideoV4L.h +++ b/panda/src/vision/webcamVideoV4L.h @@ -17,7 +17,7 @@ #include "pandabase.h" -#ifdef HAVE_VIDEO4LINUX +#if defined(HAVE_VIDEO4LINUX) && !defined(CPPPARSER) #include "webcamVideo.h" From 047e5cafcc7e14bb93994038c8d3f7f74bc866cc Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 16 Oct 2015 14:59:04 +0200 Subject: [PATCH 167/200] Fix Python 3 error in direct.stdpy.file --- direct/src/stdpy/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index e31fb76b89..f7125a3920 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -19,7 +19,7 @@ from posixpath import join _vfs = core.VirtualFileSystem.getGlobalPtr() -if sys.version < (3, 0): +if sys.version_info < (3, 0): # Python 3 defines these subtypes of IOError, but Python 2 doesn't. FileNotFoundError = IOError IsADirectoryError = IOError From ddf83435904356eeb95f1d3ef7dd6959b4731061 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 16 Oct 2015 15:38:28 +0200 Subject: [PATCH 168/200] Reorganise explicit template instantiations so that it always happens in the .cxx file, while remaining backward compatible with MSVC's standards-breaking implementation --- dtool/src/dtoolbase/dtoolbase.h | 16 +++++++++++++--- dtool/src/prc/notifyCategoryProxy.h | 12 +----------- makepanda/makepanda.py | 2 -- panda/src/chan/animChannel.cxx | 3 +++ panda/src/chan/movingPartMatrix.cxx | 2 ++ panda/src/chan/movingPartScalar.cxx | 2 ++ panda/src/egg/eggMorph.h | 4 ++++ panda/src/egg/pt_EggMaterial.cxx | 4 ++++ panda/src/egg/pt_EggTexture.cxx | 4 ++++ panda/src/egg/pt_EggVertex.cxx | 4 ++++ panda/src/event/eventParameter.cxx | 3 +++ panda/src/event/pt_Event.cxx | 4 ++++ panda/src/express/pta_double.cxx | 5 +++++ panda/src/express/pta_float.cxx | 5 +++++ panda/src/express/pta_int.cxx | 5 +++++ panda/src/express/pta_uchar.cxx | 5 +++++ panda/src/mathutil/pta_LMatrix3.cxx | 10 ++++++++++ panda/src/mathutil/pta_LMatrix4.cxx | 10 ++++++++++ panda/src/mathutil/pta_LVecBase2.cxx | 15 +++++++++++++++ panda/src/mathutil/pta_LVecBase3.cxx | 15 +++++++++++++++ panda/src/mathutil/pta_LVecBase4.cxx | 15 +++++++++++++++ panda/src/net/datagramGeneratorNet.cxx | 2 ++ panda/src/net/queuedConnectionListener.cxx | 2 ++ panda/src/net/queuedConnectionManager.cxx | 2 ++ panda/src/net/queuedConnectionReader.cxx | 2 ++ panda/src/putil/bitMask.cxx | 4 ++++ panda/src/putil/doubleBitMask.cxx | 2 ++ panda/src/putil/paramValue.cxx | 21 +++++++++++++++++++++ panda/src/putil/pta_ushort.cxx | 5 +++++ 29 files changed, 169 insertions(+), 16 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 68975b5877..75bad76d5b 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -440,13 +440,23 @@ #define EXPORT_CLASS #define IMPORT_CLASS #endif + /* "extern template" is now part of the C++11 standard. */ -#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) +#if defined(CPPPARSER) || defined(LINK_ALL_STATIC) +#define EXPORT_TEMPL +#define IMPORT_TEMPL +#elif defined(_MSC_VER) +/* Nowadays, we'd define both of these as "extern" in all cases, so that + the header file always marks the symbol as "extern" and the .cxx file + explicitly instantiates it. However, MSVC versions before 2013 break + the spec by explicitly disallowing it, so we have to instantiate the + class from the header file. Fortunately, its linker is okay with the + duplicate template instantiations that this causes. */ #define EXPORT_TEMPL #define IMPORT_TEMPL extern #else -#define EXPORT_TEMPL -#define IMPORT_TEMPL +#define EXPORT_TEMPL extern +#define IMPORT_TEMPL extern #endif #ifdef __cplusplus diff --git a/dtool/src/prc/notifyCategoryProxy.h b/dtool/src/prc/notifyCategoryProxy.h index 9e3c239c5e..de9ada490a 100644 --- a/dtool/src/prc/notifyCategoryProxy.h +++ b/dtool/src/prc/notifyCategoryProxy.h @@ -127,16 +127,6 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy &pro #ifdef CPPPARSER #define NotifyCategoryDecl(basename, expcl, exptp) -#elif defined(WIN32_VC) -// MSVC's rules for extern template classes differ slightly. -#define NotifyCategoryDecl(basename, expcl, exptp) \ - class expcl NotifyCategoryGetCategory_ ## basename { \ - public: \ - NotifyCategoryGetCategory_ ## basename(); \ - static NotifyCategory *get_category(); \ - }; \ - EXPORT_TEMPLATE_CLASS(expcl, exptp, NotifyCategoryProxy); \ - extern expcl NotifyCategoryProxy basename ## _cat; #else #define NotifyCategoryDecl(basename, expcl, exptp) \ class expcl NotifyCategoryGetCategory_ ## basename { \ @@ -144,7 +134,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy &pro NotifyCategoryGetCategory_ ## basename(); \ static NotifyCategory *get_category(); \ }; \ - EXPORT_TEMPLATE_CLASS(expcl, extern, NotifyCategoryProxy); \ + EXPORT_TEMPLATE_CLASS(expcl, exptp, NotifyCategoryProxy); \ extern expcl NotifyCategoryProxy basename ## _cat; #endif diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 1fd35793fb..145664851d 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1650,8 +1650,6 @@ def CompileLink(dll, obj, opts): else: cmd += " -pthread" - cmd += " -Wl,-allow-multiple-definition" - if LDFLAGS != "": cmd += " " + LDFLAGS diff --git a/panda/src/chan/animChannel.cxx b/panda/src/chan/animChannel.cxx index c85faed849..fb710994ee 100644 --- a/panda/src/chan/animChannel.cxx +++ b/panda/src/chan/animChannel.cxx @@ -22,6 +22,9 @@ #pragma implementation #endif +template class AnimChannel; +template class AnimChannel; + //////////////////////////////////////////////////////////////////// // Function: ACMatrixSwitchType::output_value // Access: Public, Static diff --git a/panda/src/chan/movingPartMatrix.cxx b/panda/src/chan/movingPartMatrix.cxx index de9d60e2a0..fc20b896c9 100644 --- a/panda/src/chan/movingPartMatrix.cxx +++ b/panda/src/chan/movingPartMatrix.cxx @@ -28,6 +28,8 @@ #pragma implementation #endif +template class MovingPart; + TypeHandle MovingPartMatrix::_type_handle; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/movingPartScalar.cxx b/panda/src/chan/movingPartScalar.cxx index 7f5260c7a7..727b011b5b 100644 --- a/panda/src/chan/movingPartScalar.cxx +++ b/panda/src/chan/movingPartScalar.cxx @@ -26,6 +26,8 @@ #pragma implementation #endif +template class MovingPart; + TypeHandle MovingPartScalar::_type_handle; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggMorph.h b/panda/src/egg/eggMorph.h index 4bf5cb37b8..04644e9ec7 100644 --- a/panda/src/egg/eggMorph.h +++ b/panda/src/egg/eggMorph.h @@ -49,8 +49,12 @@ private: Parameter _offset; }; +// I'd love to export these, but it produces a strange linker issue +// with Mac OS X's version of GCC. We'll do it only on Windows, then. +#ifdef _MSC_VER EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph); EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph); +#endif typedef EggMorph EggMorphVertex; typedef EggMorph EggMorphNormal; diff --git a/panda/src/egg/pt_EggMaterial.cxx b/panda/src/egg/pt_EggMaterial.cxx index f85b8e4194..1a4207000f 100644 --- a/panda/src/egg/pt_EggMaterial.cxx +++ b/panda/src/egg/pt_EggMaterial.cxx @@ -18,3 +18,7 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase; +template class PointerTo; +template class ConstPointerTo; diff --git a/panda/src/egg/pt_EggTexture.cxx b/panda/src/egg/pt_EggTexture.cxx index 9c8f4b2711..4cff50aa93 100644 --- a/panda/src/egg/pt_EggTexture.cxx +++ b/panda/src/egg/pt_EggTexture.cxx @@ -18,3 +18,7 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase; +template class PointerTo; +template class ConstPointerTo; diff --git a/panda/src/egg/pt_EggVertex.cxx b/panda/src/egg/pt_EggVertex.cxx index 7fce6ac7ea..d5c7057b0b 100644 --- a/panda/src/egg/pt_EggVertex.cxx +++ b/panda/src/egg/pt_EggVertex.cxx @@ -18,3 +18,7 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase; +template class PointerTo; +template class ConstPointerTo; diff --git a/panda/src/event/eventParameter.cxx b/panda/src/event/eventParameter.cxx index 76bef88f9b..115b6f7b8f 100644 --- a/panda/src/event/eventParameter.cxx +++ b/panda/src/event/eventParameter.cxx @@ -20,6 +20,9 @@ #pragma implementation #endif +template class ParamValue; +template class ParamValue; + //////////////////////////////////////////////////////////////////// // Function: EventParameter::output // Access: Published diff --git a/panda/src/event/pt_Event.cxx b/panda/src/event/pt_Event.cxx index 5dea3358d1..5e4d1b4f95 100644 --- a/panda/src/event/pt_Event.cxx +++ b/panda/src/event/pt_Event.cxx @@ -18,3 +18,7 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase; +template class PointerTo; +template class ConstPointerTo; diff --git a/panda/src/express/pta_double.cxx b/panda/src/express/pta_double.cxx index 679aa836f0..951be4b584 100644 --- a/panda/src/express/pta_double.cxx +++ b/panda/src/express/pta_double.cxx @@ -18,3 +18,8 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/express/pta_float.cxx b/panda/src/express/pta_float.cxx index 468be7a730..1483711420 100644 --- a/panda/src/express/pta_float.cxx +++ b/panda/src/express/pta_float.cxx @@ -18,3 +18,8 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/express/pta_int.cxx b/panda/src/express/pta_int.cxx index 7aec867a67..206e87c3db 100644 --- a/panda/src/express/pta_int.cxx +++ b/panda/src/express/pta_int.cxx @@ -18,3 +18,8 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/express/pta_uchar.cxx b/panda/src/express/pta_uchar.cxx index 01c09858b6..4abaad3fa5 100644 --- a/panda/src/express/pta_uchar.cxx +++ b/panda/src/express/pta_uchar.cxx @@ -18,3 +18,8 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/mathutil/pta_LMatrix3.cxx b/panda/src/mathutil/pta_LMatrix3.cxx index 7e71a7a8ac..42382e1295 100644 --- a/panda/src/mathutil/pta_LMatrix3.cxx +++ b/panda/src/mathutil/pta_LMatrix3.cxx @@ -18,3 +18,13 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/mathutil/pta_LMatrix4.cxx b/panda/src/mathutil/pta_LMatrix4.cxx index a171eb7e35..5ba0c1b9a8 100644 --- a/panda/src/mathutil/pta_LMatrix4.cxx +++ b/panda/src/mathutil/pta_LMatrix4.cxx @@ -18,3 +18,13 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/mathutil/pta_LVecBase2.cxx b/panda/src/mathutil/pta_LVecBase2.cxx index 4e60170a8d..cbf9ace24f 100644 --- a/panda/src/mathutil/pta_LVecBase2.cxx +++ b/panda/src/mathutil/pta_LVecBase2.cxx @@ -18,3 +18,18 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/mathutil/pta_LVecBase3.cxx b/panda/src/mathutil/pta_LVecBase3.cxx index ab535d218f..d851708d2c 100644 --- a/panda/src/mathutil/pta_LVecBase3.cxx +++ b/panda/src/mathutil/pta_LVecBase3.cxx @@ -18,3 +18,18 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/mathutil/pta_LVecBase4.cxx b/panda/src/mathutil/pta_LVecBase4.cxx index 8f133e36de..dc8de69ebe 100644 --- a/panda/src/mathutil/pta_LVecBase4.cxx +++ b/panda/src/mathutil/pta_LVecBase4.cxx @@ -18,3 +18,18 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; diff --git a/panda/src/net/datagramGeneratorNet.cxx b/panda/src/net/datagramGeneratorNet.cxx index 963d59985e..ebcd9ed5c0 100644 --- a/panda/src/net/datagramGeneratorNet.cxx +++ b/panda/src/net/datagramGeneratorNet.cxx @@ -18,6 +18,8 @@ #include "mutexHolder.h" #include "lightMutexHolder.h" +template class QueuedReturn; + //////////////////////////////////////////////////////////////////// // Function: DatagramGeneratorNet::Constructor // Access: Published diff --git a/panda/src/net/queuedConnectionListener.cxx b/panda/src/net/queuedConnectionListener.cxx index 24ad4da190..49f05ff4b5 100644 --- a/panda/src/net/queuedConnectionListener.cxx +++ b/panda/src/net/queuedConnectionListener.cxx @@ -15,6 +15,8 @@ #include "queuedConnectionListener.h" #include "config_net.h" +template class QueuedReturn; + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionListener::Constructor // Access: Public diff --git a/panda/src/net/queuedConnectionManager.cxx b/panda/src/net/queuedConnectionManager.cxx index 9a94b55094..2a7993dced 100644 --- a/panda/src/net/queuedConnectionManager.cxx +++ b/panda/src/net/queuedConnectionManager.cxx @@ -16,6 +16,8 @@ #include +template class QueuedReturn< PT(Connection) >; + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionManager::Constructor // Access: Public diff --git a/panda/src/net/queuedConnectionReader.cxx b/panda/src/net/queuedConnectionReader.cxx index 99b18721ac..2baa90ad72 100644 --- a/panda/src/net/queuedConnectionReader.cxx +++ b/panda/src/net/queuedConnectionReader.cxx @@ -17,6 +17,8 @@ #include "trueClock.h" #include "lightMutexHolder.h" +template class QueuedReturn; + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionReader::Constructor // Access: Published diff --git a/panda/src/putil/bitMask.cxx b/panda/src/putil/bitMask.cxx index 5a7873752f..11c14414b2 100644 --- a/panda/src/putil/bitMask.cxx +++ b/panda/src/putil/bitMask.cxx @@ -18,3 +18,7 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class BitMask; +template class BitMask; +template class BitMask; diff --git a/panda/src/putil/doubleBitMask.cxx b/panda/src/putil/doubleBitMask.cxx index 8d27d25e12..81fab4f3b2 100644 --- a/panda/src/putil/doubleBitMask.cxx +++ b/panda/src/putil/doubleBitMask.cxx @@ -19,3 +19,5 @@ #pragma implementation #endif +template class DoubleBitMask; +template class DoubleBitMask; diff --git a/panda/src/putil/paramValue.cxx b/panda/src/putil/paramValue.cxx index c8482dc409..3f67ee1de9 100644 --- a/panda/src/putil/paramValue.cxx +++ b/panda/src/putil/paramValue.cxx @@ -20,6 +20,27 @@ #pragma implementation #endif +template class ParamValue; +template class ParamValue; + +template class ParamValue; +template class ParamValue; +template class ParamValue; + +template class ParamValue; +template class ParamValue; +template class ParamValue; + +template class ParamValue; +template class ParamValue; +template class ParamValue; + +template class ParamValue; +template class ParamValue; + +template class ParamValue; +template class ParamValue; + TypeHandle ParamValueBase::_type_handle; TypeHandle ParamTypedRefCount::_type_handle; diff --git a/panda/src/putil/pta_ushort.cxx b/panda/src/putil/pta_ushort.cxx index f118a29cb4..1b16926a64 100644 --- a/panda/src/putil/pta_ushort.cxx +++ b/panda/src/putil/pta_ushort.cxx @@ -18,3 +18,8 @@ #ifdef __GNUC__ #pragma implementation #endif + +template class PointerToBase >; +template class PointerToArrayBase; +template class PointerToArray; +template class ConstPointerToArray; From 94b48d568f0e62d21c1c9a429a64e7bcc0d85f58 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 16 Oct 2015 15:51:16 +0200 Subject: [PATCH 169/200] Pre-C++11 compilers don't seem to like std::time_t --- dtool/src/parser-inc/stdtypedefs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 3c2b9d6d28..ec71a37e12 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -20,15 +20,15 @@ #ifndef STDTYPEDEFS_H #define STDTYPEDEFS_H +typedef long time_t; +typedef long clock_t; + typedef unsigned int uint; typedef unsigned long ulong; typedef unsigned short ushort; typedef unsigned char uchar; inline namespace std { - typedef long time_t; - typedef long clock_t; - #ifdef _WIN64 typedef unsigned long long size_t; typedef long long ssize_t; From 155ae811aa1636c6385594dff8f42c3afd6930e2 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 17 Oct 2015 02:54:07 +0200 Subject: [PATCH 170/200] Fix some edge cases for preprocessor, support auto keyword, MSVC compile fix --- dtool/src/cppparser/cppBison.cxx.prebuilt | 3580 +++++++++++---------- dtool/src/cppparser/cppBison.yxx | 10 +- dtool/src/cppparser/cppIdentifier.cxx | 2 +- dtool/src/cppparser/cppNamespace.cxx | 4 +- dtool/src/cppparser/cppNamespace.h | 4 +- dtool/src/cppparser/cppParser.cxx | 3 +- dtool/src/cppparser/cppPreprocessor.cxx | 42 +- dtool/src/cppparser/cppPreprocessor.h | 5 +- dtool/src/cppparser/cppScope.cxx | 2 +- dtool/src/cppparser/cppSimpleType.cxx | 4 + dtool/src/cppparser/cppSimpleType.h | 7 + 11 files changed, 1860 insertions(+), 1803 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index 45982424b6..2f00575c4f 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -795,18 +795,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 78 +#define YYFINAL 79 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 4444 +#define YYLAST 4452 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 141 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 94 /* YYNRULES -- Number of rules. */ -#define YYNRULES 583 +#define YYNRULES 585 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1074 +#define YYNSTATES 1076 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -885,16 +885,16 @@ static const yytype_uint16 yyprhs[] = 606, 609, 612, 615, 619, 624, 626, 628, 630, 633, 636, 639, 642, 645, 649, 654, 662, 666, 668, 671, 674, 677, 680, 683, 687, 692, 700, 702, 704, 707, - 709, 711, 713, 716, 721, 726, 728, 730, 733, 735, - 737, 739, 742, 747, 750, 755, 757, 759, 762, 765, - 768, 771, 775, 776, 782, 783, 791, 793, 795, 798, - 802, 805, 808, 811, 815, 819, 823, 827, 831, 835, - 840, 845, 848, 852, 854, 856, 858, 860, 864, 870, - 872, 875, 880, 882, 884, 886, 888, 889, 896, 897, - 905, 910, 916, 919, 923, 925, 927, 929, 931, 933, - 935, 937, 939, 941, 943, 945, 947, 949, 951, 954, - 957, 960, 963, 965, 968, 970, 974, 977, 979, 980, - 983, 985, 988, 990, 992, 994, 996, 998, 1000, 1002, + 709, 711, 713, 716, 721, 726, 728, 730, 732, 735, + 737, 739, 741, 744, 749, 752, 757, 759, 761, 763, + 766, 769, 772, 775, 779, 780, 786, 787, 795, 797, + 799, 802, 806, 809, 812, 815, 819, 823, 827, 831, + 835, 839, 844, 849, 852, 856, 858, 860, 862, 864, + 868, 874, 876, 879, 884, 886, 888, 890, 892, 893, + 900, 901, 909, 914, 920, 923, 927, 929, 931, 933, + 935, 937, 939, 941, 943, 945, 947, 949, 951, 953, + 955, 958, 961, 964, 967, 969, 972, 974, 978, 981, + 983, 984, 987, 989, 992, 994, 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, @@ -905,23 +905,23 @@ static const yytype_uint16 yyprhs[] = 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, - 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1222, 1224, - 1226, 1228, 1230, 1232, 1236, 1238, 1243, 1251, 1259, 1264, - 1269, 1272, 1275, 1278, 1281, 1284, 1288, 1292, 1296, 1300, - 1304, 1308, 1312, 1316, 1320, 1324, 1328, 1332, 1336, 1340, - 1344, 1348, 1354, 1359, 1364, 1368, 1372, 1376, 1380, 1382, - 1387, 1395, 1403, 1408, 1413, 1418, 1423, 1428, 1433, 1438, - 1443, 1448, 1453, 1458, 1463, 1468, 1473, 1478, 1481, 1487, - 1490, 1493, 1496, 1499, 1502, 1506, 1510, 1514, 1518, 1522, - 1526, 1530, 1534, 1538, 1542, 1546, 1550, 1554, 1558, 1562, - 1566, 1570, 1574, 1580, 1585, 1590, 1594, 1598, 1602, 1606, - 1608, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, - 1631, 1639, 1647, 1652, 1657, 1660, 1666, 1669, 1672, 1675, - 1678, 1682, 1686, 1690, 1694, 1698, 1702, 1706, 1710, 1714, - 1718, 1722, 1726, 1730, 1734, 1738, 1742, 1746, 1750, 1756, - 1761, 1766, 1770, 1774, 1778, 1782, 1784, 1786, 1788, 1790, - 1792, 1794, 1796, 1798, 1800, 1802, 1805, 1808, 1810, 1812, - 1814, 1816, 1819, 1822 + 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1220, 1222, + 1226, 1228, 1230, 1232, 1234, 1236, 1240, 1242, 1247, 1255, + 1263, 1268, 1273, 1276, 1279, 1282, 1285, 1288, 1292, 1296, + 1300, 1304, 1308, 1312, 1316, 1320, 1324, 1328, 1332, 1336, + 1340, 1344, 1348, 1352, 1358, 1363, 1368, 1372, 1376, 1380, + 1384, 1386, 1391, 1399, 1407, 1412, 1417, 1422, 1427, 1432, + 1437, 1442, 1447, 1452, 1457, 1462, 1467, 1472, 1477, 1482, + 1485, 1491, 1494, 1497, 1500, 1503, 1506, 1510, 1514, 1518, + 1522, 1526, 1530, 1534, 1538, 1542, 1546, 1550, 1554, 1558, + 1562, 1566, 1570, 1574, 1578, 1584, 1589, 1594, 1598, 1602, + 1606, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, + 1628, 1630, 1635, 1643, 1651, 1656, 1661, 1664, 1670, 1673, + 1676, 1679, 1682, 1686, 1690, 1694, 1698, 1702, 1706, 1710, + 1714, 1718, 1722, 1726, 1730, 1734, 1738, 1742, 1746, 1750, + 1754, 1760, 1765, 1770, 1774, 1778, 1782, 1786, 1788, 1790, + 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1809, 1812, + 1814, 1816, 1818, 1820, 1823, 1826 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -999,117 +999,117 @@ static const yytype_int16 yyrhs[] = 140, -1, 135, 192, 137, 135, 182, 137, 171, -1, 215, -1, 11, -1, 105, 232, -1, 197, -1, 199, -1, 204, -1, 210, 232, -1, 209, 232, 120, 206, - -1, 58, 135, 227, 137, -1, 215, -1, 11, -1, - 105, 232, -1, 197, -1, 199, -1, 204, -1, 210, - 232, -1, 209, 232, 120, 206, -1, 209, 232, -1, - 58, 135, 227, 137, -1, 215, -1, 11, -1, 105, - 232, -1, 210, 232, -1, 209, 232, -1, 193, 192, - -1, 56, 193, 192, -1, -1, 210, 117, 198, 143, - 138, -1, -1, 210, 232, 200, 201, 117, 143, 138, - -1, 234, -1, 202, -1, 120, 203, -1, 202, 118, - 203, -1, 90, 231, -1, 89, 231, -1, 88, 231, - -1, 109, 90, 231, -1, 109, 89, 231, -1, 109, - 88, 231, -1, 90, 109, 231, -1, 89, 109, 231, - -1, 88, 109, 231, -1, 205, 117, 208, 138, -1, - 209, 232, 120, 206, -1, 209, 232, -1, 209, 120, - 206, -1, 209, -1, 216, -1, 11, -1, 234, -1, - 207, 232, 118, -1, 207, 232, 121, 227, 118, -1, - 207, -1, 207, 232, -1, 207, 232, 121, 227, -1, - 65, -1, 55, -1, 99, -1, 106, -1, -1, 83, - 232, 117, 212, 143, 138, -1, -1, 76, 83, 232, - 117, 213, 143, 138, -1, 83, 117, 143, 138, -1, - 76, 83, 117, 143, 138, -1, 108, 232, -1, 108, - 83, 232, -1, 216, -1, 217, -1, 218, -1, 50, - -1, 52, -1, 112, -1, 53, -1, 54, -1, 93, - -1, 78, -1, 79, -1, 107, -1, 94, -1, 77, - -1, 93, 216, -1, 78, 216, -1, 107, 216, -1, - 94, 216, -1, 71, -1, 78, 71, -1, 61, -1, - 78, 78, 71, -1, 78, 61, -1, 110, -1, -1, - 220, 221, -1, 234, -1, 221, 222, -1, 3, -1, - 4, -1, 6, -1, 8, -1, 9, -1, 5, -1, - 10, -1, 11, -1, 12, -1, 7, -1, 14, -1, - 15, -1, 16, -1, 17, -1, 18, -1, 19, -1, - 20, -1, 21, -1, 22, -1, 23, -1, 24, -1, - 31, -1, 32, -1, 33, -1, 34, -1, 35, -1, - 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, - 41, -1, 42, -1, 43, -1, 44, -1, 45, -1, - 46, -1, 47, -1, 50, -1, 51, -1, 52, -1, - 53, -1, 54, -1, 55, -1, 56, -1, 57, -1, - 58, -1, 59, -1, 60, -1, 61, -1, 62, -1, - 63, -1, 65, -1, 67, -1, 68, -1, 70, -1, - 71, -1, 72, -1, 73, -1, 74, -1, 75, -1, - 76, -1, 77, -1, 78, -1, 82, -1, 84, -1, - 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, - 69, -1, 91, -1, 92, -1, 93, -1, 94, -1, - 95, -1, 96, -1, 97, -1, 98, -1, 99, -1, - 101, -1, 102, -1, 103, -1, 104, -1, 105, -1, - 106, -1, 107, -1, 109, -1, 110, -1, 111, -1, - 112, -1, 113, -1, 128, -1, 129, -1, 130, -1, - 131, -1, 125, -1, 123, -1, 124, -1, 139, -1, - 133, -1, 121, -1, 132, -1, 126, -1, 127, -1, - 135, -1, 137, -1, 134, -1, 118, -1, 119, -1, - 120, -1, 136, -1, 140, -1, 122, -1, 117, 221, - 138, -1, 234, -1, 227, -1, 234, -1, 225, -1, - 227, -1, 225, 118, 227, -1, 228, -1, 135, 196, - 137, 226, -1, 98, 126, 196, 127, 135, 225, 137, - -1, 62, 126, 196, 127, 135, 225, 137, -1, 95, - 135, 196, 137, -1, 46, 135, 196, 137, -1, 139, - 226, -1, 133, 226, -1, 129, 226, -1, 130, 226, - -1, 125, 226, -1, 226, 130, 226, -1, 226, 131, - 226, -1, 226, 132, 226, -1, 226, 128, 226, -1, - 226, 129, 226, -1, 226, 123, 226, -1, 226, 124, - 226, -1, 226, 125, 226, -1, 226, 15, 226, -1, - 226, 16, 226, -1, 226, 17, 226, -1, 226, 18, - 226, -1, 226, 19, 226, -1, 226, 20, 226, -1, - 226, 21, 226, -1, 226, 22, 226, -1, 226, 122, - 226, 120, 226, -1, 226, 136, 227, 140, -1, 226, - 135, 225, 137, -1, 226, 135, 137, -1, 226, 134, - 226, -1, 226, 31, 226, -1, 135, 225, 137, -1, - 228, -1, 135, 196, 137, 227, -1, 98, 126, 196, + -1, 58, 135, 227, 137, -1, 47, -1, 215, -1, + 11, -1, 105, 232, -1, 197, -1, 199, -1, 204, + -1, 210, 232, -1, 209, 232, 120, 206, -1, 209, + 232, -1, 58, 135, 227, 137, -1, 47, -1, 215, + -1, 11, -1, 105, 232, -1, 210, 232, -1, 209, + 232, -1, 193, 192, -1, 56, 193, 192, -1, -1, + 210, 117, 198, 143, 138, -1, -1, 210, 232, 200, + 201, 117, 143, 138, -1, 234, -1, 202, -1, 120, + 203, -1, 202, 118, 203, -1, 90, 231, -1, 89, + 231, -1, 88, 231, -1, 109, 90, 231, -1, 109, + 89, 231, -1, 109, 88, 231, -1, 90, 109, 231, + -1, 89, 109, 231, -1, 88, 109, 231, -1, 205, + 117, 208, 138, -1, 209, 232, 120, 206, -1, 209, + 232, -1, 209, 120, 206, -1, 209, -1, 216, -1, + 11, -1, 234, -1, 207, 232, 118, -1, 207, 232, + 121, 227, 118, -1, 207, -1, 207, 232, -1, 207, + 232, 121, 227, -1, 65, -1, 55, -1, 99, -1, + 106, -1, -1, 83, 232, 117, 212, 143, 138, -1, + -1, 76, 83, 232, 117, 213, 143, 138, -1, 83, + 117, 143, 138, -1, 76, 83, 117, 143, 138, -1, + 108, 232, -1, 108, 83, 232, -1, 216, -1, 217, + -1, 218, -1, 50, -1, 52, -1, 112, -1, 53, + -1, 54, -1, 93, -1, 78, -1, 79, -1, 107, + -1, 94, -1, 77, -1, 93, 216, -1, 78, 216, + -1, 107, 216, -1, 94, 216, -1, 71, -1, 78, + 71, -1, 61, -1, 78, 78, 71, -1, 78, 61, + -1, 110, -1, -1, 220, 221, -1, 234, -1, 221, + 222, -1, 3, -1, 4, -1, 6, -1, 8, -1, + 9, -1, 5, -1, 10, -1, 11, -1, 12, -1, + 7, -1, 14, -1, 15, -1, 16, -1, 17, -1, + 18, -1, 19, -1, 20, -1, 21, -1, 22, -1, + 23, -1, 24, -1, 31, -1, 32, -1, 33, -1, + 34, -1, 35, -1, 36, -1, 37, -1, 38, -1, + 39, -1, 40, -1, 41, -1, 42, -1, 43, -1, + 44, -1, 45, -1, 46, -1, 47, -1, 50, -1, + 51, -1, 52, -1, 53, -1, 54, -1, 55, -1, + 56, -1, 57, -1, 58, -1, 59, -1, 60, -1, + 61, -1, 62, -1, 63, -1, 65, -1, 67, -1, + 68, -1, 70, -1, 71, -1, 72, -1, 73, -1, + 74, -1, 75, -1, 76, -1, 77, -1, 78, -1, + 82, -1, 84, -1, 86, -1, 87, -1, 88, -1, + 89, -1, 90, -1, 69, -1, 91, -1, 92, -1, + 93, -1, 94, -1, 95, -1, 96, -1, 97, -1, + 98, -1, 99, -1, 101, -1, 102, -1, 103, -1, + 104, -1, 105, -1, 106, -1, 107, -1, 109, -1, + 110, -1, 111, -1, 112, -1, 113, -1, 128, -1, + 129, -1, 130, -1, 131, -1, 125, -1, 123, -1, + 124, -1, 139, -1, 133, -1, 121, -1, 132, -1, + 126, -1, 127, -1, 135, -1, 137, -1, 134, -1, + 118, -1, 119, -1, 120, -1, 136, -1, 140, -1, + 122, -1, 117, 221, 138, -1, 234, -1, 227, -1, + 234, -1, 225, -1, 227, -1, 225, 118, 227, -1, + 228, -1, 135, 196, 137, 226, -1, 98, 126, 196, 127, 135, 225, 137, -1, 62, 126, 196, 127, 135, - 225, 137, -1, 11, 135, 224, 137, -1, 77, 135, - 224, 137, -1, 52, 135, 224, 137, -1, 112, 135, - 224, 137, -1, 53, 135, 224, 137, -1, 54, 135, - 224, 137, -1, 50, 135, 224, 137, -1, 93, 135, - 224, 137, -1, 78, 135, 224, 137, -1, 107, 135, - 224, 137, -1, 94, 135, 224, 137, -1, 71, 135, - 224, 137, -1, 61, 135, 224, 137, -1, 95, 135, - 196, 137, -1, 46, 135, 196, 137, -1, 84, 195, - -1, 84, 195, 135, 224, 137, -1, 139, 227, -1, - 133, 227, -1, 129, 227, -1, 130, 227, -1, 125, - 227, -1, 227, 130, 227, -1, 227, 131, 227, -1, - 227, 132, 227, -1, 227, 128, 227, -1, 227, 129, - 227, -1, 227, 123, 227, -1, 227, 124, 227, -1, - 227, 125, 227, -1, 227, 15, 227, -1, 227, 16, - 227, -1, 227, 17, 227, -1, 227, 18, 227, -1, - 227, 19, 227, -1, 227, 20, 227, -1, 227, 126, - 227, -1, 227, 127, 227, -1, 227, 21, 227, -1, - 227, 22, 227, -1, 227, 122, 227, 120, 227, -1, - 227, 136, 227, 140, -1, 227, 135, 225, 137, -1, - 227, 135, 137, -1, 227, 134, 227, -1, 227, 31, + 225, 137, -1, 95, 135, 196, 137, -1, 46, 135, + 196, 137, -1, 139, 226, -1, 133, 226, -1, 129, + 226, -1, 130, 226, -1, 125, 226, -1, 226, 130, + 226, -1, 226, 131, 226, -1, 226, 132, 226, -1, + 226, 128, 226, -1, 226, 129, 226, -1, 226, 123, + 226, -1, 226, 124, 226, -1, 226, 125, 226, -1, + 226, 15, 226, -1, 226, 16, 226, -1, 226, 17, + 226, -1, 226, 18, 226, -1, 226, 19, 226, -1, + 226, 20, 226, -1, 226, 21, 226, -1, 226, 22, + 226, -1, 226, 122, 226, 120, 226, -1, 226, 136, + 227, 140, -1, 226, 135, 225, 137, -1, 226, 135, + 137, -1, 226, 134, 226, -1, 226, 31, 226, -1, + 135, 225, 137, -1, 228, -1, 135, 196, 137, 227, + -1, 98, 126, 196, 127, 135, 225, 137, -1, 62, + 126, 196, 127, 135, 225, 137, -1, 11, 135, 224, + 137, -1, 77, 135, 224, 137, -1, 52, 135, 224, + 137, -1, 112, 135, 224, 137, -1, 53, 135, 224, + 137, -1, 54, 135, 224, 137, -1, 50, 135, 224, + 137, -1, 93, 135, 224, 137, -1, 78, 135, 224, + 137, -1, 107, 135, 224, 137, -1, 94, 135, 224, + 137, -1, 71, 135, 224, 137, -1, 61, 135, 224, + 137, -1, 95, 135, 196, 137, -1, 46, 135, 196, + 137, -1, 84, 195, -1, 84, 195, 135, 224, 137, + -1, 139, 227, -1, 133, 227, -1, 129, 227, -1, + 130, 227, -1, 125, 227, -1, 227, 130, 227, -1, + 227, 131, 227, -1, 227, 132, 227, -1, 227, 128, + 227, -1, 227, 129, 227, -1, 227, 123, 227, -1, + 227, 124, 227, -1, 227, 125, 227, -1, 227, 15, + 227, -1, 227, 16, 227, -1, 227, 17, 227, -1, + 227, 18, 227, -1, 227, 19, 227, -1, 227, 20, + 227, -1, 227, 126, 227, -1, 227, 127, 227, -1, + 227, 21, 227, -1, 227, 22, 227, -1, 227, 122, + 227, 120, 227, -1, 227, 136, 227, 140, -1, 227, + 135, 225, 137, -1, 227, 135, 137, -1, 227, 134, + 227, -1, 227, 31, 227, -1, 135, 225, 137, -1, + 4, -1, 102, -1, 70, -1, 5, -1, 3, -1, + 233, -1, 9, -1, 10, -1, 86, -1, 230, -1, + 135, 196, 137, 227, -1, 98, 126, 196, 127, 135, + 225, 137, -1, 62, 126, 196, 127, 135, 225, 137, + -1, 95, 135, 196, 137, -1, 46, 135, 196, 137, + -1, 84, 195, -1, 84, 195, 135, 224, 137, -1, + 139, 227, -1, 133, 227, -1, 129, 227, -1, 125, + 227, -1, 229, 130, 227, -1, 229, 131, 227, -1, + 229, 132, 227, -1, 229, 128, 227, -1, 229, 129, + 227, -1, 229, 123, 227, -1, 229, 124, 227, -1, + 229, 125, 227, -1, 229, 15, 227, -1, 229, 16, + 227, -1, 229, 17, 227, -1, 229, 18, 227, -1, + 229, 19, 227, -1, 229, 20, 227, -1, 229, 126, + 227, -1, 229, 127, 227, -1, 229, 21, 227, -1, + 229, 22, 227, -1, 229, 122, 227, 120, 227, -1, + 229, 136, 227, 140, -1, 229, 135, 225, 137, -1, + 229, 135, 137, -1, 229, 134, 227, -1, 229, 31, 227, -1, 135, 225, 137, -1, 4, -1, 102, -1, 70, -1, 5, -1, 3, -1, 233, -1, 9, -1, - 10, -1, 86, -1, 230, -1, 135, 196, 137, 227, - -1, 98, 126, 196, 127, 135, 225, 137, -1, 62, - 126, 196, 127, 135, 225, 137, -1, 95, 135, 196, - 137, -1, 46, 135, 196, 137, -1, 84, 195, -1, - 84, 195, 135, 224, 137, -1, 139, 227, -1, 133, - 227, -1, 129, 227, -1, 125, 227, -1, 229, 130, - 227, -1, 229, 131, 227, -1, 229, 132, 227, -1, - 229, 128, 227, -1, 229, 129, 227, -1, 229, 123, - 227, -1, 229, 124, 227, -1, 229, 125, 227, -1, - 229, 15, 227, -1, 229, 16, 227, -1, 229, 17, - 227, -1, 229, 18, 227, -1, 229, 19, 227, -1, - 229, 20, 227, -1, 229, 126, 227, -1, 229, 127, - 227, -1, 229, 21, 227, -1, 229, 22, 227, -1, - 229, 122, 227, 120, 227, -1, 229, 136, 227, 140, - -1, 229, 135, 225, 137, -1, 229, 135, 137, -1, - 229, 134, 227, -1, 229, 31, 227, -1, 135, 225, - 137, -1, 4, -1, 102, -1, 70, -1, 5, -1, - 3, -1, 233, -1, 9, -1, 10, -1, 86, -1, - 232, -1, 210, 232, -1, 105, 232, -1, 10, -1, - 11, -1, 6, -1, 8, -1, 233, 6, -1, 233, - 8, -1, -1 + 10, -1, 86, -1, 232, -1, 210, 232, -1, 105, + 232, -1, 10, -1, 11, -1, 6, -1, 8, -1, + 233, 6, -1, 233, 8, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1137,43 +1137,43 @@ static const yytype_uint16 yyrline[] = 1521, 1526, 1531, 1536, 1541, 1549, 1553, 1557, 1561, 1566, 1571, 1576, 1581, 1586, 1591, 1596, 1602, 1610, 1614, 1619, 1624, 1629, 1634, 1639, 1644, 1649, 1658, 1662, 1670, 1674, - 1678, 1682, 1686, 1702, 1718, 1730, 1734, 1742, 1746, 1750, - 1754, 1758, 1774, 1790, 1808, 1820, 1824, 1832, 1836, 1852, - 1871, 1877, 1888, 1887, 1912, 1911, 1941, 1942, 1946, 1947, - 1951, 1955, 1959, 1963, 1967, 1971, 1975, 1979, 1983, 1990, - 1998, 2002, 2006, 2010, 2017, 2021, 2028, 2029, 2035, 2043, - 2044, 2050, 2059, 2066, 2070, 2074, 2082, 2081, 2104, 2103, - 2126, 2127, 2131, 2137, 2146, 2147, 2148, 2152, 2156, 2160, - 2164, 2168, 2172, 2177, 2182, 2187, 2192, 2197, 2201, 2206, - 2215, 2220, 2228, 2232, 2237, 2241, 2246, 2254, 2264, 2264, - 2274, 2275, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, - 2287, 2288, 2289, 2289, 2289, 2290, 2290, 2290, 2290, 2291, - 2291, 2291, 2291, 2291, 2292, 2292, 2292, 2293, 2293, 2293, - 2293, 2293, 2294, 2294, 2294, 2294, 2294, 2295, 2295, 2295, - 2295, 2295, 2296, 2296, 2296, 2297, 2297, 2297, 2297, 2297, - 2298, 2298, 2298, 2298, 2298, 2299, 2299, 2299, 2300, 2300, - 2300, 2300, 2301, 2301, 2301, 2301, 2301, 2302, 2302, 2302, - 2302, 2302, 2303, 2303, 2303, 2303, 2304, 2304, 2304, 2304, - 2304, 2305, 2305, 2305, 2305, 2305, 2306, 2306, 2306, 2306, - 2306, 2307, 2307, 2307, 2307, 2310, 2310, 2310, 2310, 2310, - 2310, 2310, 2310, 2310, 2310, 2310, 2311, 2311, 2311, 2311, - 2311, 2311, 2311, 2311, 2311, 2311, 2312, 2312, 2316, 2320, - 2327, 2331, 2338, 2342, 2349, 2353, 2357, 2361, 2365, 2369, + 1678, 1682, 1686, 1702, 1718, 1727, 1734, 1738, 1746, 1750, + 1754, 1758, 1762, 1778, 1794, 1812, 1821, 1828, 1832, 1840, + 1844, 1860, 1879, 1885, 1896, 1895, 1920, 1919, 1949, 1950, + 1954, 1955, 1959, 1963, 1967, 1971, 1975, 1979, 1983, 1987, + 1991, 1998, 2006, 2010, 2014, 2018, 2025, 2029, 2036, 2037, + 2043, 2051, 2052, 2058, 2067, 2074, 2078, 2082, 2090, 2089, + 2112, 2111, 2134, 2135, 2139, 2145, 2154, 2155, 2156, 2160, + 2164, 2168, 2172, 2176, 2180, 2185, 2190, 2195, 2200, 2205, + 2209, 2214, 2223, 2228, 2236, 2240, 2245, 2249, 2254, 2262, + 2272, 2272, 2282, 2283, 2287, 2288, 2289, 2290, 2291, 2292, + 2293, 2294, 2295, 2296, 2297, 2297, 2297, 2298, 2298, 2298, + 2298, 2299, 2299, 2299, 2299, 2299, 2300, 2300, 2300, 2301, + 2301, 2301, 2301, 2301, 2302, 2302, 2302, 2302, 2302, 2303, + 2303, 2303, 2303, 2303, 2304, 2304, 2304, 2305, 2305, 2305, + 2305, 2305, 2306, 2306, 2306, 2306, 2306, 2307, 2307, 2307, + 2308, 2308, 2308, 2308, 2309, 2309, 2309, 2309, 2309, 2310, + 2310, 2310, 2310, 2310, 2311, 2311, 2311, 2311, 2312, 2312, + 2312, 2312, 2312, 2313, 2313, 2313, 2313, 2313, 2314, 2314, + 2314, 2314, 2314, 2315, 2315, 2315, 2315, 2318, 2318, 2318, + 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2319, 2319, + 2319, 2319, 2319, 2319, 2319, 2319, 2319, 2319, 2320, 2320, + 2324, 2328, 2335, 2339, 2346, 2350, 2357, 2361, 2365, 2369, 2373, 2377, 2381, 2385, 2389, 2393, 2397, 2401, 2405, 2409, 2413, 2417, 2421, 2425, 2429, 2433, 2437, 2441, 2445, 2449, - 2453, 2457, 2461, 2465, 2469, 2473, 2477, 2481, 2489, 2493, - 2497, 2501, 2505, 2515, 2521, 2527, 2533, 2539, 2545, 2551, - 2558, 2565, 2572, 2579, 2585, 2591, 2595, 2599, 2603, 2607, + 2453, 2457, 2461, 2465, 2469, 2473, 2477, 2481, 2485, 2489, + 2497, 2501, 2505, 2509, 2513, 2523, 2529, 2535, 2541, 2547, + 2553, 2559, 2566, 2573, 2580, 2587, 2593, 2599, 2603, 2607, 2611, 2615, 2619, 2623, 2627, 2631, 2635, 2639, 2643, 2647, 2651, 2655, 2659, 2663, 2667, 2671, 2675, 2679, 2683, 2687, - 2691, 2695, 2699, 2703, 2707, 2711, 2715, 2719, 2723, 2730, - 2734, 2738, 2742, 2746, 2750, 2754, 2758, 2762, 2776, 2780, + 2691, 2695, 2699, 2703, 2707, 2711, 2715, 2719, 2723, 2727, + 2731, 2738, 2742, 2746, 2750, 2754, 2758, 2762, 2766, 2770, 2784, 2788, 2792, 2796, 2800, 2804, 2808, 2812, 2816, 2820, 2824, 2828, 2832, 2836, 2840, 2844, 2848, 2852, 2856, 2860, 2864, 2868, 2872, 2876, 2880, 2884, 2888, 2892, 2896, 2900, - 2904, 2908, 2912, 2916, 2920, 2927, 2931, 2935, 2939, 2943, - 2947, 2951, 2955, 2959, 2966, 2974, 2982, 3008, 3012, 3019, - 3023, 3027, 3033, 3044 + 2904, 2908, 2912, 2916, 2920, 2924, 2928, 2935, 2939, 2943, + 2947, 2951, 2955, 2959, 2963, 2967, 2974, 2982, 2990, 3016, + 3020, 3027, 3031, 3035, 3041, 3052 }; #endif @@ -1286,16 +1286,16 @@ static const yytype_uint8 yyr1[] = 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 195, 195, 195, 195, 195, - 196, 196, 198, 197, 200, 199, 201, 201, 202, 202, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 204, - 205, 205, 205, 205, 206, 206, 207, 207, 207, 208, - 208, 208, 209, 210, 210, 210, 212, 211, 213, 211, - 211, 211, 214, 214, 215, 215, 215, 216, 216, 216, + 193, 193, 193, 193, 193, 193, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 195, 195, 195, + 195, 195, 196, 196, 198, 197, 200, 199, 201, 201, + 202, 202, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 204, 205, 205, 205, 205, 206, 206, 207, 207, + 207, 208, 208, 208, 209, 210, 210, 210, 212, 211, + 213, 211, 211, 211, 214, 214, 215, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 217, 217, 217, 217, 217, 218, 220, 219, - 221, 221, 222, 222, 222, 222, 222, 222, 222, 222, + 216, 216, 216, 216, 217, 217, 217, 217, 217, 218, + 220, 219, 221, 221, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, @@ -1306,23 +1306,23 @@ static const yytype_uint8 yyr1[] = 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 223, 223, - 224, 224, 225, 225, 226, 226, 226, 226, 226, 226, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 223, 223, 224, 224, 225, 225, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 229, 229, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 228, 228, 228, 228, 228, 228, 228, 228, 228, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 231, 231, 231, 232, 232, 233, - 233, 233, 233, 234 + 229, 229, 229, 229, 229, 229, 229, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 231, 231, 231, 232, + 232, 233, 233, 233, 233, 234 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1350,16 +1350,16 @@ static const yytype_uint8 yyr2[] = 2, 2, 2, 3, 4, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 7, 3, 1, 2, 2, 2, 2, 2, 3, 4, 7, 1, 1, 2, 1, - 1, 1, 2, 4, 4, 1, 1, 2, 1, 1, - 1, 2, 4, 2, 4, 1, 1, 2, 2, 2, - 2, 3, 0, 5, 0, 7, 1, 1, 2, 3, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, - 4, 2, 3, 1, 1, 1, 1, 3, 5, 1, - 2, 4, 1, 1, 1, 1, 0, 6, 0, 7, - 4, 5, 2, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 1, 2, 1, 3, 2, 1, 0, 2, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 4, 4, 1, 1, 1, 2, 1, + 1, 1, 2, 4, 2, 4, 1, 1, 1, 2, + 2, 2, 2, 3, 0, 5, 0, 7, 1, 1, + 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, + 3, 4, 4, 2, 3, 1, 1, 1, 1, 3, + 5, 1, 2, 4, 1, 1, 1, 1, 0, 6, + 0, 7, 4, 5, 2, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 1, 2, 1, 3, 2, 1, + 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1370,23 +1370,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 1, 4, 7, 7, 4, 4, - 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 1, 4, 7, 7, + 4, 4, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 5, 4, 4, 3, 3, 3, 3, 1, 4, - 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 2, 5, 2, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 5, 4, 4, 3, 3, 3, 3, + 1, 4, 7, 7, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, + 5, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 3, 3, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 7, 7, 4, 4, 2, 5, 2, 2, 2, 2, + 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 7, 7, 4, 4, 2, 5, 2, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, - 4, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, - 1, 2, 2, 0 + 5, 4, 4, 3, 3, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, + 1, 1, 1, 2, 2, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1394,1110 +1394,1105 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 583, 0, 0, 0, 583, 5, 523, 519, 522, - 579, 580, 525, 526, 0, 0, 0, 0, 0, 0, - 0, 0, 521, 0, 0, 0, 0, 527, 0, 0, - 0, 0, 520, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 468, 524, 217, 287, 288, 290, 291, 273, - 0, 0, 304, 272, 302, 297, 293, 294, 292, 296, - 274, 0, 275, 295, 307, 289, 583, 4, 219, 220, - 221, 0, 263, 0, 216, 284, 285, 286, 1, 20, - 583, 583, 21, 583, 583, 583, 0, 31, 583, 0, - 0, 583, 0, 0, 0, 0, 583, 583, 0, 583, - 583, 0, 583, 583, 6, 15, 7, 18, 0, 13, - 46, 14, 16, 17, 33, 583, 0, 583, 583, 583, - 583, 583, 0, 583, 583, 583, 236, 0, 487, 0, - 0, 235, 583, 583, 0, 0, 583, 583, 493, 491, - 492, 490, 217, 287, 288, 290, 291, 304, 302, 297, - 293, 292, 296, 295, 289, 0, 0, 432, 489, 0, + 0, 585, 0, 0, 0, 585, 5, 525, 521, 524, + 581, 582, 527, 528, 0, 0, 0, 0, 0, 0, + 0, 0, 523, 0, 0, 0, 0, 529, 0, 0, + 0, 0, 522, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 470, 526, 217, 225, 289, 290, 292, 293, + 275, 0, 0, 306, 274, 304, 299, 295, 296, 294, + 298, 276, 0, 277, 297, 309, 291, 585, 4, 219, + 220, 221, 0, 265, 0, 216, 286, 287, 288, 1, + 20, 585, 585, 21, 585, 585, 585, 0, 31, 585, + 0, 0, 585, 0, 0, 0, 0, 585, 585, 0, + 585, 585, 0, 585, 585, 6, 15, 7, 18, 0, + 13, 46, 14, 16, 17, 33, 585, 0, 585, 585, + 585, 585, 585, 0, 585, 585, 585, 238, 0, 489, + 0, 0, 237, 585, 585, 0, 0, 585, 585, 495, + 493, 494, 492, 217, 289, 290, 292, 293, 306, 304, + 299, 295, 294, 298, 297, 291, 0, 0, 434, 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 581, 582, 583, 0, 306, 303, 293, 299, - 293, 298, 301, 577, 578, 218, 300, 0, 583, 583, - 583, 583, 583, 583, 240, 207, 583, 0, 261, 242, - 222, 583, 44, 43, 45, 583, 34, 39, 22, 583, - 0, 37, 0, 0, 42, 583, 0, 25, 24, 23, - 40, 36, 0, 0, 129, 0, 0, 19, 0, 282, - 38, 41, 80, 226, 0, 0, 0, 0, 11, 0, - 0, 49, 228, 229, 230, 263, 0, 225, 0, 431, - 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 237, 583, 239, 238, 0, 0, 0, 0, 0, - 0, 0, 0, 518, 502, 503, 504, 505, 506, 507, - 510, 511, 517, 0, 499, 500, 501, 508, 509, 497, - 498, 494, 495, 496, 516, 515, 0, 0, 241, 0, - 305, 583, 212, 208, 209, 211, 210, 0, 583, 269, - 0, 266, 265, 262, 264, 0, 583, 583, 35, 32, - 583, 0, 0, 0, 583, 276, 0, 583, 0, 0, - 57, 283, 66, 68, 51, 0, 0, 583, 227, 583, - 0, 308, 168, 0, 0, 48, 47, 0, 233, 231, - 472, 486, 478, 474, 476, 477, 484, 0, 483, 473, - 480, 0, 479, 482, 485, 0, 481, 475, 469, 433, - 0, 514, 513, 224, 213, 0, 0, 429, 428, 270, - 259, 223, 583, 0, 0, 247, 246, 583, 278, 0, - 0, 280, 583, 0, 30, 141, 142, 0, 0, 0, - 0, 131, 132, 583, 140, 130, 59, 61, 0, 583, - 0, 0, 583, 0, 0, 583, 186, 187, 0, 583, - 583, 583, 583, 583, 0, 185, 583, 70, 0, 583, - 0, 8, 0, 583, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 50, 583, 143, 0, 0, 488, 0, - 512, 583, 214, 267, 0, 243, 0, 0, 0, 0, - 248, 583, 0, 281, 583, 0, 0, 583, 0, 134, - 583, 136, 583, 0, 196, 197, 0, 583, 583, 583, - 583, 583, 583, 583, 195, 0, 58, 583, 569, 565, - 568, 571, 572, 158, 0, 0, 0, 567, 0, 573, - 0, 0, 0, 566, 0, 0, 0, 0, 0, 0, - 159, 162, 583, 184, 528, 570, 157, 0, 0, 0, - 52, 583, 234, 0, 583, 192, 188, 189, 191, 190, - 76, 583, 12, 583, 169, 309, 310, 308, 0, 583, - 583, 0, 174, 176, 173, 171, 0, 150, 146, 0, - 96, 97, 98, 99, 100, 101, 104, 105, 120, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 124, 123, 107, 106, 93, 95, 94, 102, 103, - 91, 92, 88, 89, 90, 87, 0, 0, 86, 144, - 147, 149, 148, 0, 0, 0, 155, 583, 0, 53, - 166, 232, 0, 0, 0, 271, 0, 0, 0, 252, - 574, 0, 251, 0, 250, 0, 0, 0, 583, 249, - 583, 0, 0, 0, 277, 29, 0, 583, 0, 125, - 128, 126, 133, 583, 202, 198, 199, 201, 200, 0, - 0, 583, 138, 164, 60, 583, 0, 62, 0, 0, - 583, 0, 534, 183, 0, 0, 539, 538, 537, 0, - 0, 536, 583, 161, 0, 583, 0, 0, 0, 0, + 0, 0, 0, 583, 584, 585, 0, 308, 305, 295, + 301, 295, 300, 303, 579, 580, 218, 302, 0, 585, + 585, 585, 585, 585, 585, 242, 207, 585, 0, 263, + 244, 222, 585, 44, 43, 45, 585, 34, 39, 22, + 585, 0, 37, 0, 0, 42, 585, 0, 25, 24, + 23, 40, 36, 0, 0, 129, 0, 0, 19, 0, + 284, 38, 41, 80, 227, 236, 0, 0, 0, 0, + 11, 0, 0, 49, 229, 230, 231, 265, 0, 226, + 0, 433, 432, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 239, 585, 241, 240, 0, 0, 0, + 0, 0, 0, 0, 0, 520, 504, 505, 506, 507, + 508, 509, 512, 513, 519, 0, 501, 502, 503, 510, + 511, 499, 500, 496, 497, 498, 518, 517, 0, 0, + 243, 0, 307, 585, 212, 208, 209, 211, 210, 0, + 585, 271, 0, 268, 267, 264, 266, 0, 585, 585, + 35, 32, 585, 0, 0, 0, 585, 278, 0, 585, + 0, 0, 57, 285, 66, 68, 51, 0, 0, 585, + 228, 585, 0, 310, 168, 0, 0, 48, 47, 0, + 234, 232, 474, 488, 480, 476, 478, 479, 486, 0, + 485, 475, 482, 0, 481, 484, 487, 0, 483, 477, + 471, 435, 0, 516, 515, 224, 213, 0, 0, 431, + 430, 272, 261, 223, 585, 0, 0, 249, 248, 585, + 280, 0, 0, 282, 585, 0, 30, 141, 142, 0, + 0, 0, 0, 131, 132, 585, 140, 130, 59, 61, + 0, 585, 0, 0, 585, 0, 0, 585, 186, 187, + 0, 585, 585, 585, 585, 585, 0, 185, 585, 70, + 0, 585, 0, 8, 0, 585, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50, 585, 143, 0, 0, + 490, 0, 514, 585, 214, 269, 0, 245, 0, 0, + 0, 0, 250, 585, 0, 283, 585, 0, 0, 585, + 0, 134, 585, 136, 585, 0, 196, 197, 0, 585, + 585, 585, 585, 585, 585, 585, 195, 0, 58, 585, + 571, 567, 570, 573, 574, 158, 0, 0, 0, 569, + 0, 575, 0, 0, 0, 568, 0, 0, 0, 0, + 0, 0, 159, 162, 585, 184, 530, 572, 157, 0, + 0, 0, 52, 585, 235, 0, 585, 192, 188, 189, + 191, 190, 76, 585, 12, 585, 169, 311, 312, 310, + 0, 585, 585, 0, 174, 176, 173, 171, 0, 150, + 146, 0, 96, 97, 98, 99, 100, 101, 104, 105, + 120, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 124, 123, 107, 106, 93, 95, 94, + 102, 103, 91, 92, 88, 89, 90, 87, 0, 0, + 86, 144, 147, 149, 148, 0, 0, 0, 155, 585, + 0, 53, 166, 233, 0, 0, 0, 273, 0, 0, + 0, 254, 576, 0, 253, 0, 252, 0, 0, 0, + 585, 251, 585, 0, 0, 0, 279, 29, 0, 585, + 0, 125, 128, 126, 133, 585, 202, 198, 199, 201, + 200, 0, 0, 585, 138, 164, 60, 585, 0, 62, + 0, 0, 585, 0, 536, 183, 0, 0, 541, 540, + 539, 0, 0, 538, 585, 161, 0, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 583, 0, 55, 78, 193, 583, 0, 0, - 312, 313, 317, 314, 321, 315, 316, 318, 319, 320, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 0, 0, 0, 0, 585, 0, 55, 78, 193, 585, + 0, 0, 314, 315, 319, 316, 323, 317, 318, 320, + 321, 322, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 383, 367, 368, 369, 370, + 362, 363, 364, 365, 366, 367, 368, 385, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, - 381, 382, 384, 385, 386, 387, 388, 389, 390, 391, + 381, 382, 383, 384, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 583, 421, 422, 423, 414, 426, 410, - 411, 409, 416, 417, 405, 406, 407, 408, 415, 413, - 420, 418, 424, 419, 412, 425, 311, 0, 9, 0, - 0, 172, 175, 151, 145, 122, 121, 154, 153, 167, - 583, 0, 0, 471, 470, 583, 268, 576, 258, 575, - 257, 256, 255, 254, 253, 245, 279, 0, 26, 0, - 135, 139, 137, 203, 206, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 165, 434, 0, 0, 64, - 0, 0, 583, 583, 0, 583, 0, 0, 0, 564, - 82, 67, 81, 160, 163, 0, 180, 548, 549, 550, - 551, 552, 553, 556, 557, 563, 0, 545, 546, 547, - 554, 555, 543, 544, 540, 541, 542, 562, 561, 0, - 0, 0, 72, 69, 0, 583, 0, 194, 583, 0, - 170, 10, 177, 583, 178, 0, 152, 54, 215, 0, - 0, 583, 0, 0, 0, 0, 444, 442, 443, 441, - 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, + 402, 403, 404, 405, 406, 585, 423, 424, 425, 416, + 428, 412, 413, 411, 418, 419, 407, 408, 409, 410, + 417, 415, 422, 420, 426, 421, 414, 427, 313, 0, + 9, 0, 0, 172, 175, 151, 145, 122, 121, 154, + 153, 167, 585, 0, 0, 473, 472, 585, 270, 578, + 260, 577, 259, 258, 257, 256, 255, 247, 281, 0, + 26, 0, 135, 139, 137, 203, 206, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 165, 436, 0, + 0, 64, 0, 0, 585, 585, 0, 585, 0, 0, + 0, 566, 82, 67, 81, 160, 163, 0, 180, 550, + 551, 552, 553, 554, 555, 558, 559, 565, 0, 547, + 548, 549, 556, 557, 545, 546, 542, 543, 544, 564, + 563, 0, 0, 0, 72, 69, 0, 585, 0, 194, + 585, 0, 170, 10, 177, 585, 178, 0, 152, 54, + 215, 0, 0, 585, 0, 0, 0, 0, 446, 444, + 445, 443, 0, 0, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 204, 0, 63, 533, 583, 181, - 0, 0, 532, 0, 529, 83, 0, 167, 0, 560, - 559, 74, 583, 56, 0, 583, 71, 427, 0, 583, - 27, 28, 0, 0, 0, 0, 0, 0, 467, 453, - 454, 455, 456, 457, 458, 459, 460, 466, 0, 450, - 451, 452, 448, 449, 445, 446, 447, 465, 464, 0, - 0, 65, 182, 0, 535, 0, 0, 558, 583, 0, - 583, 77, 179, 156, 583, 439, 0, 438, 0, 435, - 0, 463, 462, 0, 0, 84, 0, 0, 583, 79, - 205, 0, 0, 461, 531, 530, 85, 583, 73, 0, - 0, 75, 437, 436 + 0, 0, 0, 0, 0, 0, 204, 0, 63, 535, + 585, 181, 0, 0, 534, 0, 531, 83, 0, 167, + 0, 562, 561, 74, 585, 56, 0, 585, 71, 429, + 0, 585, 27, 28, 0, 0, 0, 0, 0, 0, + 469, 455, 456, 457, 458, 459, 460, 461, 462, 468, + 0, 452, 453, 454, 450, 451, 447, 448, 449, 467, + 466, 0, 0, 65, 182, 0, 537, 0, 0, 560, + 585, 0, 585, 77, 179, 156, 585, 441, 0, 440, + 0, 437, 0, 465, 464, 0, 0, 84, 0, 0, + 585, 79, 205, 0, 0, 463, 533, 532, 85, 585, + 73, 0, 0, 75, 439, 438 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 440, 441, 105, 349, 106, 107, 219, - 108, 109, 110, 357, 423, 453, 530, 237, 418, 495, - 496, 654, 250, 419, 422, 543, 992, 1038, 707, 925, - 891, 599, 640, 111, 235, 410, 411, 412, 413, 454, - 840, 519, 520, 652, 608, 355, 551, 552, 521, 434, - 493, 204, 66, 251, 128, 67, 68, 326, 69, 327, - 394, 395, 470, 70, 71, 323, 319, 320, 72, 73, - 112, 402, 474, 113, 74, 75, 76, 77, 438, 439, - 545, 826, 386, 258, 259, 875, 157, 42, 523, 524, - 619, 455, 43, 114 + -1, 4, 5, 442, 443, 106, 351, 107, 108, 220, + 109, 110, 111, 359, 425, 455, 532, 238, 420, 497, + 498, 656, 252, 421, 424, 545, 994, 1040, 709, 927, + 893, 601, 642, 112, 236, 412, 413, 414, 415, 456, + 842, 521, 522, 654, 610, 357, 553, 554, 523, 436, + 495, 205, 67, 253, 129, 68, 69, 328, 70, 329, + 396, 397, 472, 71, 72, 325, 321, 322, 73, 74, + 113, 404, 476, 114, 75, 76, 77, 78, 440, 441, + 547, 828, 388, 260, 261, 877, 158, 42, 525, 526, + 621, 457, 43, 115 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -642 +#define YYPACT_NINF -659 static const yytype_int16 yypact[] = { - 204, -642, 2639, 3671, 43, 3382, -642, -642, -642, -642, - -642, -642, -642, -642, -75, -53, -44, -40, -30, -9, - -2, -11, -642, 24, 28, 32, 3867, -642, 40, 52, - 78, 103, -642, 116, 129, 2639, 2639, 2639, 2639, 1819, - 2639, 3105, -642, 217, -642, -642, -642, -642, -642, -642, - 3830, 176, -642, -642, -642, -642, 4325, -642, 3482, 3482, - -642, 61, -642, 3482, -642, -642, 236, -642, -642, -642, - -642, 169, 48, 86, -642, -642, -642, -642, -642, -642, - 2662, 2662, -642, 2662, 741, 2662, 170, -642, 4333, 189, - 195, 2662, 118, 229, 233, 250, 2662, 2662, 200, 2631, - 2662, 30, 2662, 2662, -642, -642, -642, -642, 2863, -642, - -642, -642, -642, -642, -642, 2639, 3671, 2639, 2639, 2639, - 2639, 2639, 3671, 2639, 2639, 2639, -642, 61, 202, 61, - 61, -642, 2639, 2639, 3671, 3671, 2639, 2639, 59, 59, - 59, 59, -75, -44, -40, -30, -9, -2, 24, 28, - 4239, 2028, 3253, 3602, 129, 203, -71, 3105, 59, 2639, - 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, - 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, - 2039, 2639, -642, -642, 236, 2639, -642, -642, 909, -642, - 3482, -642, -642, -642, -642, -642, -642, 226, 236, 236, - 236, 236, 236, 236, 237, -642, -642, 2924, 254, -642, - -28, 2662, -642, -642, -642, 2662, -642, -642, -642, 4272, - 133, -642, 366, 61, -642, -642, 265, -642, -642, -642, - -642, -642, 2639, 2776, -642, 257, 2933, -642, 61, -642, - -642, -642, 251, 252, 3830, 256, 3732, 61, -642, 61, - 324, 270, -642, -642, -642, 48, 86, -642, 255, 279, - -642, 261, 271, 276, 277, 282, 283, 280, 288, 296, - 310, -642, 2639, -642, -642, 325, 326, 329, 308, 331, - 335, 2639, 2639, -642, 3277, 3416, 3003, 3003, 320, 320, - 503, 503, -642, 3031, 3477, 3492, 924, 320, 320, 110, - 110, 59, 59, 59, -642, -642, -63, 564, 237, 1617, - -642, 236, 237, 237, 237, 237, 237, 136, 2639, 61, - 323, -642, -642, -642, -642, 2924, -642, 355, -642, -642, - -642, 360, 367, 385, 3914, -642, 1133, 1116, 3830, 324, - -642, -642, -642, 20, -642, 2639, 3830, 353, -642, -642, - 349, -642, -642, 61, 2139, -642, -642, 220, 100, -28, - -642, -642, -642, -642, -642, -642, -642, 370, -642, -642, - -642, 374, -642, -642, -642, 371, -642, -642, 59, 3105, - 2639, -642, -642, -642, 237, 372, 364, 3105, -642, 37, - -642, 400, 3960, 172, 406, 409, -642, 4006, -642, 519, - 61, -642, -642, 289, -642, -642, -642, 61, 3623, 61, - 410, 417, -642, 227, -642, -642, -642, -642, 220, 1599, - 411, 220, 1599, 220, 1837, 353, -642, -642, 416, 353, - 353, 353, 353, 353, 164, -642, 4052, -642, 398, -642, - 215, -642, 403, 2239, 3052, 420, 220, 220, 2775, 220, - 220, 220, 220, -642, 260, -642, 2924, 2639, -642, 2639, - 3105, 1599, -642, -642, 2639, -642, 657, 830, 901, 369, - -642, -642, 172, -642, -642, -54, 421, 4098, 25, 430, - 227, 433, 1108, 1116, -642, -642, 435, 227, 227, 227, - 227, 227, 227, 113, -642, 220, -642, 260, -642, -642, - -642, -642, -642, -642, 428, 3769, 441, -642, 3867, -642, - 1929, 434, 444, -642, 2639, 2639, 2639, 1819, 2639, 436, - 38, -642, 227, 3227, -642, 217, -642, 220, 345, 437, - -642, 260, -642, 208, 353, 439, 439, 439, 439, 439, - -642, 2639, -642, 1599, -642, 1461, -642, -642, 61, 2639, - 2239, 440, 454, 3105, -642, -642, 220, 224, 224, 567, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, 451, 453, -642, -642, - 224, 224, 224, 408, 298, 2139, -642, 2639, 478, -642, - -642, 400, -50, -12, 460, 3071, 61, 317, 61, -642, - -642, 317, -642, 317, -642, 317, 317, 317, 4144, -642, - 4190, 589, 481, 61, -642, -642, 3671, 113, 3671, -642, - -642, -642, -642, 227, 465, 465, 465, 465, 465, 231, - 2650, 2639, -642, -642, -642, 260, 487, -642, 3671, 3830, - 227, 3671, 477, -642, 3671, 3671, 59, 59, 59, 480, - 72, 59, 560, -642, 1709, 185, 2639, 2639, 2639, 2639, - 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2639, - 2639, 2639, 2639, 2639, 2639, 2639, 2639, 2339, 2639, 467, - 614, 485, 560, 506, -642, -642, 439, 1599, 486, 491, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, 492, -642, 508, - 509, -642, 2439, 224, -642, -642, -642, -642, -642, 3052, - 1599, 489, 220, -642, -642, 560, -642, -642, -642, -642, - -642, -642, -642, -642, -642, -642, -642, 511, -642, 512, - -642, -642, -642, 465, 516, 517, 520, 518, 529, 2650, - 2650, 2650, 2650, 1819, 2650, 3261, -642, 521, 538, -642, - 220, 523, 227, 185, 530, 2639, 527, 531, 2639, -642, - -642, -16, -642, -642, -642, 2639, -642, 3277, 3416, 3003, - 3003, 320, 320, 503, 503, -642, 3088, 3477, 3492, 924, - 320, 320, 110, 110, 59, 59, 59, -642, -642, 89, - 733, 537, -642, -16, 220, 1599, 539, -642, 560, 1270, - -642, -642, -642, 2239, 3105, 541, -642, -642, -16, 561, - 563, 1599, 3671, 3671, 3671, 3671, 180, 180, 180, 180, - 565, 96, 180, 2650, 2650, 2650, 2650, 2650, 2650, 2650, - 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650, - 2650, 2650, 2539, 2639, -642, 220, -642, -642, 185, -642, - 562, 568, -642, 572, 59, -642, 573, 3105, 2639, -642, - -642, -642, 1599, -642, 574, 560, -16, -642, 571, 560, - -642, -642, 597, 599, 583, 600, 611, 2650, -642, 3293, - 3507, 479, 479, 384, 384, 758, 758, -642, 3244, 3536, - 2052, 900, 123, 123, 180, 180, 180, -642, -642, 151, - 951, -642, -642, 2639, -642, 2639, 14, 3105, 1599, 603, - 560, -16, -642, -16, 560, -642, 606, -642, 607, 180, - 2650, -642, -642, 152, 156, -642, 608, 609, 560, -16, - -16, 2639, 2639, 3261, -642, -642, -642, 560, -16, 159, - 161, -16, -642, -642 + 191, -659, 2440, 3611, 10, 2563, -659, -659, -659, -659, + -659, -659, -659, -659, -100, -91, -86, -78, -65, -60, + -43, -30, -659, -9, 24, 52, 3807, -659, 55, 59, + 62, 86, -659, 88, 95, 2440, 2440, 2440, 2440, 1620, + 2440, 3118, -659, 212, -659, -659, -659, -659, -659, -659, + -659, 3770, 117, -659, -659, -659, -659, 4285, -659, 3661, + 3661, -659, 103, -659, 3661, -659, -659, 524, -659, -659, + -659, -659, 153, -4, 41, -659, -659, -659, -659, -659, + -659, 4341, 4341, -659, 4341, 2455, 4341, 134, -659, 4292, + 156, 175, 4341, 79, 193, 196, 201, 4341, 4341, 205, + 4187, 4341, 44, 4341, 4341, -659, -659, -659, -659, 2655, + -659, -659, -659, -659, -659, -659, 2440, 3611, 2440, 2440, + 2440, 2440, 2440, 3611, 2440, 2440, 2440, -659, 103, 209, + 103, 103, -659, 2440, 2440, 3611, 3611, 2440, 2440, 81, + 81, 81, 81, -100, -86, -78, -65, -60, -43, -9, + 24, 4179, 1829, 3297, 3483, 95, 219, -87, 3118, 81, + 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, + 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, + 2440, 1840, 2440, -659, -659, 524, 2440, -659, -659, 3600, + -659, 3661, -659, -659, -659, -659, -659, -659, 251, 524, + 524, 524, 524, 524, 524, 206, -659, -659, 2716, 229, + -659, 31, 4341, -659, -659, -659, 4341, -659, -659, -659, + 4236, 87, -659, 373, 103, -659, -659, 270, -659, -659, + -659, -659, -659, 2440, 2726, -659, 268, 2790, -659, 103, + -659, -659, -659, 260, 269, -659, 3770, 271, 3672, 103, + -659, 103, -16, 288, -659, -659, -659, -4, 41, -659, + 275, 295, -659, 280, 284, 285, 292, 298, 299, 310, + 301, 305, 306, -659, 2440, -659, -659, 314, 317, 319, + 330, 321, 323, 2440, 2440, -659, 3290, 3321, 2860, 2860, + 892, 892, 644, 644, -659, 2944, 3336, 3351, 3381, 892, + 892, 559, 559, 81, 81, 81, -659, -659, -79, 954, + 206, 2909, -659, 524, 206, 206, 206, 206, 206, -2, + 2440, 103, 287, -659, -659, -659, -659, 2716, -659, 347, + -659, -659, -659, 352, 361, 362, 3854, -659, 2888, 3493, + 3770, -16, -659, -659, -659, 33, -659, 2440, 3770, 585, + -659, -659, 335, -659, -659, 103, 1940, -659, -659, 341, + 66, 31, -659, -659, -659, -659, -659, -659, -659, 349, + -659, -659, -659, 345, -659, -659, -659, 366, -659, -659, + 81, 3118, 2440, -659, -659, -659, 206, 367, 356, 3118, + -659, 67, -659, 370, 3900, 173, 380, 387, -659, 3946, + -659, 502, 103, -659, -659, 220, -659, -659, -659, 103, + 3563, 103, 386, 397, -659, 389, -659, -659, -659, -659, + 341, 1400, 388, 341, 1400, 341, 2926, 585, -659, -659, + 391, 585, 585, 585, 585, 585, 124, -659, 3992, -659, + 379, -659, 171, -659, 390, 2040, 2962, 399, 341, 341, + 2565, 341, 341, 341, 341, -659, 329, -659, 2716, 2440, + -659, 2440, 3118, 1400, -659, -659, 2440, -659, 467, 1477, + 1587, 247, -659, -659, 173, -659, -659, -51, 412, 4038, + 17, 410, 389, 417, 4304, 3493, -659, -659, 411, 389, + 389, 389, 389, 389, 389, -94, -659, 341, -659, 329, + -659, -659, -659, -659, -659, -659, 408, 3709, 419, -659, + 3807, -659, 1730, 413, 420, -659, 2440, 2440, 2440, 1620, + 2440, 423, 12, -659, 389, 3135, -659, 212, -659, 341, + 197, 424, -659, 329, -659, 164, 585, 426, 426, 426, + 426, 426, -659, 2440, -659, 1400, -659, 1261, -659, -659, + 103, 2440, 2040, 409, 431, 3118, -659, -659, 341, 167, + 167, 555, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, 430, 429, + -659, -659, 167, 167, 167, 210, 265, 1940, -659, 2440, + 452, -659, -659, 370, -49, -46, 437, 3084, 103, 847, + 103, -659, -659, 847, -659, 847, -659, 847, 847, 847, + 4084, -659, 4130, 567, 459, 103, -659, -659, 3611, -94, + 3611, -659, -659, -659, -659, 389, 443, 443, 443, 443, + 443, 189, 792, 2440, -659, -659, -659, 329, 463, -659, + 3611, 3770, 389, 3611, 447, -659, 3611, 3611, 81, 81, + 81, 448, -44, 81, 528, -659, 1510, 93, 2440, 2440, + 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, + 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2140, + 2440, 273, 582, 458, 528, 476, -659, -659, 426, 1400, + 460, 461, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, 465, + -659, 462, 468, -659, 2240, 167, -659, -659, -659, -659, + -659, 2962, 1400, 470, 341, -659, -659, 528, -659, -659, + -659, -659, -659, -659, -659, -659, -659, -659, -659, 474, + -659, 478, -659, -659, -659, 443, 472, 481, 479, 484, + 487, 792, 792, 792, 792, 1620, 792, 3169, -659, 485, + 510, -659, 341, 492, 389, 93, 505, 2440, 496, 507, + 2440, -659, -659, -23, -659, -659, -659, 2440, -659, 3290, + 3321, 2860, 2860, 892, 892, 644, 644, -659, 3101, 3336, + 3351, 3381, 892, 892, 559, 559, 81, 81, 81, -659, + -659, -8, 1418, 501, -659, -23, 341, 1400, 503, -659, + 528, 1123, -659, -659, -659, 2040, 3118, 506, -659, -659, + -23, 520, 523, 1400, 3611, 3611, 3611, 3611, 162, 162, + 162, 162, 508, 74, 162, 792, 792, 792, 792, 792, + 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, + 792, 792, 792, 792, 2340, 2440, -659, 341, -659, -659, + 93, -659, 511, 513, -659, 512, 81, -659, 516, 3118, + 2440, -659, -659, -659, 1400, -659, 518, 528, -23, -659, + 519, 528, -659, -659, 521, 525, 533, 526, 537, 792, + -659, 3306, 3366, 678, 678, 935, 935, 657, 657, -659, + 3152, 3501, 1853, 919, 813, 813, 162, 162, 162, -659, + -659, 90, 1638, -659, -659, 2440, -659, 2440, 37, 3118, + 1400, 529, 528, -23, -659, -23, 528, -659, 534, -659, + 536, 162, 792, -659, -659, 137, 140, -659, 531, 545, + 528, -23, -23, 2440, 2440, 3169, -659, -659, -659, 528, + -23, 147, 150, -23, -659, -659 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -642, -642, -196, -642, 196, -642, -642, 524, -642, -642, - -46, -98, -642, -642, -642, -85, -166, -642, -642, -642, - -120, -214, 532, -642, -642, -642, -642, -642, -642, -642, - -641, -642, -642, 285, -642, -642, -642, 286, 357, -348, - -642, -394, -642, 137, -483, -316, -543, -642, -497, 128, - -380, -122, -34, 543, 267, 5, -88, -642, -72, -642, - -642, -642, 305, -45, -642, -310, -642, -642, -15, 58, - -642, -642, -642, -642, -14, 115, -642, -642, 238, -642, - -19, -642, -455, -115, -20, 175, 554, 153, -642, -642, - -441, 155, -373, -1 + -659, -659, -183, -659, 98, -659, -659, 454, -659, -659, + -21, -95, -659, -659, -659, -160, -234, -659, -659, -659, + -181, -275, 469, -659, -659, -659, -659, -659, -659, -659, + -658, -659, -659, 221, -659, -659, -659, 222, 302, -273, + -659, -423, -659, 77, -495, -328, -543, -659, -504, 76, + -351, 354, -39, 480, 203, -36, -81, -659, -77, -659, + -659, -659, 244, -68, -659, -303, -659, -659, -15, 58, + -659, -659, -659, -659, -24, 207, -659, -659, 170, -659, + -85, -659, -507, -104, -20, -140, 71, -593, -659, -659, + -305, 490, -368, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -262 +#define YYTABLE_NINF -264 static const yytype_int16 yytable[] = { - 6, 234, 262, 263, 264, 265, 266, 830, 268, 269, - 270, 129, 131, 663, 656, 391, 184, 275, 276, 156, - 252, 279, 280, 417, 193, 194, 622, 624, 529, 334, - 478, 182, 420, 183, 212, 213, 253, 214, 216, 217, - 193, 194, 221, 78, 155, 224, 525, 282, 703, 525, - 230, 231, 673, 233, 236, 282, 240, 241, 193, 194, - 115, 923, 308, 254, 631, 205, 283, 614, 282, 985, - 497, 193, 194, 528, 381, 531, 312, 313, 314, 315, - 316, 317, 116, 632, 130, 986, 708, 843, 525, -244, - 167, 117, -244, 255, 257, 118, 193, 194, 557, 558, - 637, 600, 601, 602, 603, 119, 282, 644, 645, 646, - 647, 648, 649, 238, 260, 122, 260, 260, 260, 260, - 260, 261, 260, 260, 260, 844, 120, 267, 193, 194, - 392, 260, 260, 121, 397, 260, 260, 525, 609, 277, - 278, 167, 675, 193, 194, 252, 611, 655, 252, 709, - 421, 1055, 841, 436, 961, 463, 674, 371, 464, 123, - 306, 253, 635, 124, 253, 221, 256, 125, 207, 328, - 525, 189, 878, 191, 192, 132, 848, 894, 196, 699, - 850, 657, 851, 205, 852, 853, 854, 133, 254, 384, - 282, 254, 896, 179, 180, 181, 877, 205, 205, 205, - 205, 205, 205, 209, 938, 321, 477, 282, 833, 889, - 344, 961, 347, 134, 282, 704, 195, -261, 255, 257, - 456, 255, 257, 182, 6, 183, 989, 208, 210, 135, - 193, 194, 445, 1008, 650, 225, 446, 484, 485, 486, - 176, 177, 178, 487, 179, 180, 181, 226, 197, 651, - 330, 136, 198, 968, 969, 970, 239, 971, 972, 973, - 466, 467, 468, 863, 137, 189, 191, 192, 196, 282, - 282, 260, 318, 385, 282, 628, 447, 282, 630, 282, - 883, 469, 271, 488, 273, 274, 206, 996, 1051, 1064, - 218, 256, 199, 1065, 256, 10, 1072, 11, 1073, 540, - 541, 525, 838, 189, 416, 189, 895, 448, 193, 194, - 205, 185, 425, 926, 971, 972, 973, 388, 1, 2, - 3, 651, 324, 414, 222, 6, 396, 193, 194, 6, - 223, 449, 547, 548, 525, 232, 415, 272, 489, 879, - 281, 165, 166, 705, 541, 450, 435, 200, 6, 227, - 451, 167, 490, 228, 1041, 452, 311, 491, 1043, 606, - 607, 201, 492, 426, 427, 428, 202, 651, 864, 429, - 229, 203, 49, 318, 325, 331, 332, 351, 333, 352, - 604, 605, 335, 337, 639, 522, 342, 343, 522, 356, - 998, 345, 360, 341, 414, 606, 607, 282, 361, 1059, - 979, 6, 348, 1060, 350, 959, 960, 367, 362, 430, - 358, 359, 494, 363, 364, 961, 60, 1068, 526, 365, - 366, 526, 616, 62, 435, 368, 1071, 522, 435, 435, - 435, 435, 435, 369, 829, 375, 233, 612, 546, 613, - 324, 351, 554, 352, 353, 354, 935, 370, 174, 175, - 176, 177, 178, 610, 179, 180, 181, 625, 626, 627, - 526, 390, 372, 373, 431, 700, 374, 525, 376, 414, - 6, 660, 377, 6, 389, 393, 522, 398, 432, 494, - 606, 607, 701, 433, 437, 399, 494, 494, 494, 494, - 494, 494, 653, 129, 131, 1032, 610, 670, 957, 958, - 959, 960, 978, 400, 462, 457, 459, 461, 442, 522, - 961, 458, 966, 967, 968, 969, 970, -260, 971, 972, - 973, 494, 669, 471, 618, 618, 618, 472, 700, 475, - 610, 994, 497, 435, 167, 483, 544, 482, 549, 633, - 388, 527, 526, 606, 607, 837, 534, 1002, 260, 554, - 556, 636, 525, 533, 638, 476, 41, 535, 536, 537, - 538, 539, 479, 658, 481, 643, 130, 661, 525, 664, - 665, 324, 832, 672, 702, 541, 531, 834, 831, 159, - 160, 161, 162, 163, 164, 165, 166, 700, 835, 138, - 139, 140, 141, 836, 158, 167, 842, 845, 1039, 857, - 858, 651, 606, 607, 921, 880, 388, 966, 967, 968, - 969, 970, 885, 971, 972, 973, 890, 888, 838, 525, - 922, 620, 620, 620, 924, 882, 927, 655, 928, 936, - 930, 174, 175, 176, 177, 178, 653, 179, 180, 181, - 522, 860, 494, 862, 1057, 931, 943, 932, 939, 940, - 388, 941, 942, 944, 610, 945, 975, 980, 983, 494, - 977, 974, 706, 881, 982, 525, 884, 193, 194, 886, - 887, 892, 991, 522, 610, 618, 995, 919, 999, 618, - 1000, 618, 1001, 618, 618, 618, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 1033, 179, 180, - 181, 892, 1007, 442, 382, 1034, 526, 1035, 1036, 1042, - 1046, 1040, 49, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 1044, 307, 1045, 1047, 1048, 309, - 1058, 1061, 1062, 329, 828, 1066, 1067, 215, 159, 160, - 161, 162, 163, 164, 165, 166, 60, 937, 993, 442, - 976, 1031, 616, 62, 167, 480, 617, 641, 339, 642, - 981, 847, 620, 849, 861, 662, 620, 629, 620, 340, - 620, 620, 620, 0, 929, 827, 336, 0, 859, 961, - 80, 0, 0, 0, 0, 0, 0, 0, 81, 0, - 0, 0, 546, 876, 0, 0, 522, 83, 84, 85, - 0, 0, 0, 0, 0, 0, 0, 211, 0, 0, - 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, - 0, 0, 96, 0, 0, 378, 379, 97, 0, 526, - 193, 194, 0, 0, 892, 0, 0, 0, 0, 0, - 102, 0, 103, 951, 0, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 0, 179, 180, 181, - 0, 0, 387, 990, 0, 0, 0, 0, 950, 0, - 0, 494, 610, 0, 260, 49, 966, 967, 968, 969, - 970, 522, 971, 972, 973, 0, 0, 0, 0, 424, - 0, 0, 0, 0, 0, 0, 0, 522, 444, 0, - 0, 193, 194, 0, 0, 0, 0, 955, 956, 957, - 958, 959, 960, 0, 526, 0, 0, 892, 0, 60, - 0, 961, 554, 0, 460, 616, 62, 0, 0, 621, - 526, 161, 162, 163, 164, 165, 166, 1003, 1004, 1005, - 1006, 0, 1029, 0, 0, 167, 49, 0, 522, 45, - 0, 46, 47, 48, 0, 0, 159, 160, 161, 162, - 163, 164, 165, 166, 0, 0, 0, 610, 0, 0, - 310, 0, 167, 0, 0, 0, 55, 190, 57, 0, - 0, 526, 0, 0, 892, 0, 0, 553, 892, 0, - 60, 0, 58, 59, 522, 0, 616, 62, 0, 0, - 623, 0, 0, 1053, 0, 1054, 63, 0, 615, 0, - 0, 65, 876, 876, 876, 876, 0, 876, 966, 967, - 968, 969, 970, 0, 971, 972, 973, 526, 0, 892, - 0, 1069, 1070, 892, 946, 947, 948, 949, 0, 952, - 172, 173, 174, 175, 176, 177, 178, 892, 179, 180, - 181, 0, 0, 0, 0, 0, 892, 0, 666, 667, - 668, 0, 671, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 0, 179, 180, 181, 0, 0, - 0, 1052, 0, 0, 0, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 553, 0, 876, 876, 876, 876, - 876, 876, 876, 876, 876, 876, 876, 876, 876, 876, - 876, 876, 876, 876, 876, 0, 405, 406, 1009, 1010, - 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, - 1021, 1022, 1023, 1024, 1025, 1026, 1027, 0, 159, 160, - 161, 162, 163, 164, 165, 166, 0, 80, 0, 839, - 876, 387, 0, 0, 167, 81, 45, 0, 46, 47, - 48, 407, 408, 0, 83, 84, 85, 52, 0, 0, - 0, 0, 1049, 0, 211, 0, 0, 54, 0, 0, - 91, 1056, 0, 55, 56, 57, 0, 0, 0, 96, - 0, 0, 0, 876, 97, 387, 0, 0, 99, 58, - 59, 0, 0, 0, 0, 0, 0, 102, 0, 103, - 0, 409, 0, 63, 0, 1063, 64, 0, 65, 0, - 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, - 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, - 917, 403, 920, 0, 0, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 0, 179, 180, 181, - 404, 0, 0, 710, 711, 712, 713, 714, 715, 716, - 717, 718, 719, 0, 720, 721, 722, 723, 724, 725, - 726, 727, 728, 729, 730, 0, 0, 0, 0, 0, - 0, 731, 732, 733, 734, 735, 736, 737, 738, 739, - 740, 741, 742, 743, 744, 745, 746, 747, 0, 0, - 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, - 758, 759, 760, 761, 0, 762, 0, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 772, 773, 774, 0, - 0, 0, 775, 0, 776, 0, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, - 0, 791, 792, 793, 794, 795, 796, 797, 0, 798, - 799, 800, 801, 802, 0, 0, 934, 803, 804, 805, - 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, - 816, 817, 818, 819, 820, 821, 822, 823, 997, 824, - 825, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 984, 0, 0, 0, 0, 0, 0, 987, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 710, 711, 712, 713, 714, 715, - 716, 717, 718, 719, 0, 720, 721, 722, 723, 724, - 725, 726, 727, 728, 729, 730, 0, 553, 0, 0, - 0, 0, 731, 732, 733, 734, 735, 736, 737, 738, - 739, 740, 741, 742, 743, 744, 745, 746, 747, 0, - 0, 748, 749, 750, 751, 752, 753, 754, 755, 756, - 757, 758, 759, 760, 761, 0, 762, 1030, 763, 764, + 6, 531, 132, 156, 658, 235, 194, 195, 665, 832, + 79, 130, 185, 419, 264, 265, 266, 267, 268, 157, + 270, 271, 272, 183, 393, 184, 675, 652, 254, 277, + 278, 284, 255, 281, 282, 116, 710, 480, 705, 284, + 616, 256, 653, 336, 117, 422, 925, 194, 195, 118, + 285, 194, 195, 527, 194, 195, 527, 119, 383, 878, + 213, 214, 987, 215, 217, 218, 206, 633, 222, 284, + 120, 225, 284, 41, 284, 121, 231, 232, 988, 234, + 237, 263, 241, 242, 131, 259, 634, 269, 845, 194, + 195, 846, 122, 891, 257, 527, 123, 194, 195, 279, + 280, 353, 843, 354, 355, 356, 139, 140, 141, 142, + 284, 159, 168, 194, 195, 262, 208, 262, 262, 262, + 262, 262, 711, 262, 262, 262, 124, 239, 611, 991, + 676, 639, 262, 262, 320, 387, 262, 262, 646, 647, + 648, 649, 650, 651, 527, 394, 879, 499, -246, 399, + 530, -246, 533, 254, 637, 613, 254, 255, 210, 125, + 255, 308, 880, 423, 624, 626, 256, 258, 438, 256, + 373, 659, 896, 677, 1057, 559, 560, 527, 602, 603, + 604, 605, 898, -263, 206, 465, 458, 126, 466, 940, + 133, 222, 284, 963, 134, 330, 226, 135, 206, 206, + 206, 206, 206, 206, 332, 706, 323, 346, 284, 349, + 259, 1010, 136, 259, 897, 180, 181, 182, 183, 257, + 184, 479, 257, 137, 657, 6, 10, 1053, 11, 653, + 138, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 186, 309, 219, 284, 701, 311, 284, 542, + 543, 468, 469, 470, 190, 284, 192, 193, 284, 840, + 207, 197, 998, 262, 1066, 194, 195, 1067, 878, 878, + 878, 878, 471, 878, 1074, 835, 928, 1075, 549, 550, + 630, 223, 258, 632, 865, 258, 973, 974, 975, 707, + 543, 418, 608, 609, 338, 1, 2, 3, 527, 427, + 224, 885, 206, 228, 850, 416, 229, 702, 852, 390, + 853, 230, 854, 855, 856, 653, 866, 6, 398, 881, + 702, 6, 608, 609, 703, 627, 628, 629, 417, 1043, + 233, 527, 320, 1045, 274, 608, 609, 839, 437, 327, + 6, 194, 195, 447, 380, 381, 283, 448, 190, 192, + 193, 197, 878, 878, 878, 878, 878, 878, 878, 878, + 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, + 878, 313, 524, 334, 1061, 524, 416, 337, 1062, 641, + 981, 389, 1000, 702, 339, 344, 190, 449, 190, 486, + 487, 488, 1070, 6, 345, 489, 347, 358, 608, 609, + 923, 1073, 362, 284, 496, 326, 878, 363, 426, 937, + 528, 364, 365, 528, 524, 392, 437, 446, 450, 366, + 437, 437, 437, 437, 437, 367, 368, 369, 370, 614, + 548, 615, 371, 372, 556, 490, 353, 831, 354, 606, + 607, 374, 451, 462, 375, 612, 376, 377, 378, 878, + 379, 416, 528, 234, 608, 609, 452, 395, 662, 400, + 439, 453, 6, 524, 527, 6, 454, 194, 195, 401, + 402, 496, 460, 671, 459, 1034, 132, -262, 496, 496, + 496, 496, 496, 496, 655, 130, 464, 473, 612, 672, + 491, 461, 463, 535, 996, 474, 524, 537, 538, 539, + 540, 541, 477, 484, 492, 485, 555, 546, 529, 493, + 1004, 536, 50, 496, 494, 551, 620, 620, 620, 558, + 635, 638, 612, 980, 326, 437, 198, 617, 640, 310, + 199, 645, 390, 660, 528, 663, 667, 833, 666, 834, + 262, 556, 196, 314, 315, 316, 317, 318, 319, 527, + 674, 704, 543, 209, 211, 836, 61, 837, 131, 838, + 844, 1041, 618, 63, 847, 527, 619, 859, 860, 653, + 200, 882, 887, 227, 892, 890, 840, 668, 669, 670, + 168, 673, 240, 924, 926, 428, 429, 430, 930, 933, + 929, 431, 862, 932, 864, 945, 934, 943, 390, 499, + 938, 941, 708, 947, 389, 942, 944, 1059, 273, 946, + 275, 276, 884, 555, 883, 976, 527, 886, 977, 979, + 888, 889, 982, 984, 985, 201, 993, 524, 655, 1002, + 997, 432, 1003, 1001, 496, 1009, 1035, 1037, 830, 202, + 1036, 1038, 390, 533, 203, 1042, 612, 1044, 1046, 204, + 1048, 496, 1047, 1049, 1050, 326, 1060, 386, 1068, 1063, + 524, 1064, 527, 894, 331, 168, 612, 620, 841, 921, + 389, 620, 1069, 620, 939, 620, 620, 620, 963, 177, + 178, 179, 995, 180, 181, 182, 433, 959, 960, 961, + 962, 978, 1033, 894, 657, 643, 341, 644, 528, 963, + 434, 333, 482, 664, 335, 435, 863, 342, 631, 829, + 931, 0, 0, 0, 389, 0, 0, 0, 0, 343, + 0, 948, 949, 950, 951, 0, 954, 0, 0, 350, + 0, 352, 0, 0, 0, 0, 0, 360, 361, 899, + 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, + 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, + 0, 922, 175, 176, 177, 178, 179, 0, 180, 181, + 182, 0, 0, 983, 0, 968, 969, 970, 971, 972, + 0, 973, 974, 975, 0, 7, 8, 9, 10, 0, + 11, 12, 13, 524, 548, 0, 968, 969, 970, 971, + 972, 391, 973, 974, 975, 1011, 1012, 1013, 1014, 1015, + 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, + 1026, 1027, 1028, 1029, 0, 0, 0, 0, 867, 952, + 0, 528, 0, 0, 963, 444, 894, 0, 0, 0, + 0, 0, 0, 0, 868, 953, 0, 194, 195, 0, + 0, 0, 22, 0, 0, 0, 0, 0, 0, 1051, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, + 0, 0, 0, 496, 612, 0, 262, 869, 524, 0, + 870, 0, 478, 0, 32, 0, 0, 0, 0, 481, + 0, 483, 50, 0, 524, 936, 0, 0, 1005, 1006, + 1007, 1008, 1065, 166, 167, 0, 0, 871, 0, 0, + 0, 872, 873, 168, 0, 874, 528, 875, 0, 894, + 0, 876, 0, 0, 556, 0, 957, 958, 959, 960, + 961, 962, 528, 970, 971, 972, 61, 973, 974, 975, + 963, 0, 618, 63, 1031, 524, 961, 962, 622, 622, + 622, 986, 0, 0, 0, 0, 963, 0, 989, 160, + 161, 162, 163, 164, 165, 166, 167, 0, 0, 612, + 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, + 0, 0, 0, 528, 0, 0, 894, 0, 0, 0, + 894, 524, 0, 0, 0, 0, 555, 0, 0, 0, + 0, 0, 0, 0, 0, 1055, 0, 1056, 0, 0, + 175, 176, 177, 178, 179, 0, 180, 181, 182, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, + 444, 894, 0, 1071, 1072, 894, 1032, 968, 969, 970, + 971, 972, 0, 973, 974, 975, 0, 0, 0, 894, + 0, 1039, 0, 968, 969, 970, 971, 972, 894, 973, + 974, 975, 0, 0, 0, 0, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 182, 0, 0, 0, 384, 0, 444, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 849, 622, + 851, 0, 0, 622, 0, 622, 0, 622, 622, 622, + 0, 0, 0, 0, 0, 861, 712, 713, 714, 715, + 716, 717, 718, 719, 720, 721, 0, 722, 723, 724, + 725, 726, 727, 728, 729, 730, 731, 732, 0, 0, + 0, 0, 0, 0, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, + 749, 0, 0, 750, 751, 752, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 763, 0, 764, 0, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, - 0, 0, 1037, 775, 0, 776, 0, 777, 778, 779, + 775, 776, 0, 0, 0, 777, 0, 778, 0, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, - 790, 0, 791, 792, 793, 794, 795, 796, 797, 0, - 798, 799, 800, 801, 802, 0, 0, 0, 803, 804, + 790, 791, 792, 0, 793, 794, 795, 796, 797, 798, + 799, 0, 800, 801, 802, 803, 804, 0, 0, 0, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, - 815, 816, 817, 818, 819, 820, 821, 822, 823, 0, - 824, 825, 498, 499, 500, 10, 0, 11, 501, 502, - 44, 0, 0, 503, 0, 0, 0, 0, 0, 0, + 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, + 825, 999, 826, 827, 712, 713, 714, 715, 716, 717, + 718, 719, 720, 721, 0, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 0, 0, 0, 0, + 0, 0, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 0, + 0, 750, 751, 752, 753, 754, 755, 756, 757, 758, + 759, 760, 761, 762, 763, 0, 764, 0, 765, 766, + 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 0, 0, 0, 777, 0, 778, 0, 779, 780, 781, + 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, + 792, 0, 793, 794, 795, 796, 797, 798, 799, 0, + 800, 801, 802, 803, 804, 0, 0, 0, 805, 806, + 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, + 817, 818, 819, 820, 821, 822, 823, 824, 825, 0, + 826, 827, 0, 500, 501, 502, 10, 0, 11, 503, + 504, 44, 0, 0, 505, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 160, 161, 162, 163, 164, 165, 166, - 0, 0, 0, 0, 0, 504, 0, 0, 167, 45, - 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, - 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, - 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, - 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, - 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, - 0, 65, 498, 499, 500, 10, 0, 11, 501, 502, - 44, 0, 0, 893, 514, 0, 0, 0, 515, 0, - 0, 0, 516, 0, 517, 0, 0, 0, 518, 168, + 0, 0, 0, 160, 161, 162, 163, 164, 165, 166, + 167, 0, 0, 0, 0, 0, 506, 45, 0, 168, + 46, 0, 47, 48, 49, 50, 507, 0, 52, 0, + 0, 53, 508, 0, 0, 54, 0, 0, 0, 0, + 509, 55, 0, 0, 0, 0, 0, 56, 57, 58, + 0, 0, 0, 0, 510, 0, 511, 194, 195, 0, + 0, 512, 0, 59, 60, 513, 0, 0, 514, 61, + 0, 0, 515, 0, 0, 62, 63, 64, 0, 0, + 65, 0, 66, 500, 501, 502, 10, 0, 11, 503, + 504, 44, 0, 0, 895, 516, 0, 0, 1058, 517, + 0, 0, 50, 518, 0, 519, 0, 0, 0, 520, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 0, 179, 180, 181, 383, 504, 0, 0, 0, 45, - 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, - 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, - 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, - 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, - 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, - 0, 65, 7, 8, 9, 10, 0, 11, 12, 13, - 142, 0, 0, 0, 514, 0, 0, 0, 515, 0, - 0, 0, 516, 0, 517, 0, 0, 0, 518, 0, - 0, 0, 159, 160, 161, 162, 163, 164, 165, 166, - 0, 0, 0, 0, 0, 15, 0, 0, 167, 143, - 0, 144, 145, 146, 49, 50, 0, 51, 0, 0, - 147, 21, 0, 0, 53, 0, 0, 0, 0, 22, - 148, 0, 0, 0, 0, 0, 149, 150, 57, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 151, 152, 30, 0, 0, 31, 60, 0, - 0, 32, 0, 0, 61, 62, 153, 0, 0, 64, - 0, 154, 498, 499, 500, 10, 0, 11, 501, 502, - 44, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 0, 0, 40, 168, + 179, 0, 180, 181, 182, 0, 506, 45, 992, 0, + 46, 0, 47, 48, 49, 50, 507, 0, 52, 0, + 0, 53, 508, 0, 0, 54, 61, 0, 0, 0, + 509, 55, 618, 63, 0, 0, 623, 56, 57, 58, + 0, 0, 0, 0, 510, 0, 511, 194, 195, 0, + 0, 512, 0, 59, 60, 513, 0, 0, 514, 61, + 0, 0, 515, 0, 0, 62, 63, 64, 0, 0, + 65, 0, 66, 7, 8, 9, 10, 0, 11, 12, + 13, 143, 0, 0, 0, 516, 0, 0, 0, 517, + 0, 0, 50, 518, 0, 519, 0, 0, 0, 520, + 0, 0, 0, 160, 161, 162, 163, 164, 165, 166, + 167, 0, 0, 0, 0, 0, 15, 45, 0, 168, + 144, 0, 145, 146, 147, 50, 51, 0, 52, 0, + 0, 148, 21, 0, 0, 54, 61, 0, 0, 0, + 22, 149, 618, 63, 0, 0, 625, 150, 151, 58, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 152, 153, 30, 0, 0, 31, 61, + 0, 0, 32, 0, 0, 62, 63, 154, 0, 0, + 65, 0, 155, 500, 501, 502, 10, 0, 11, 503, + 504, 44, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 0, 0, 40, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 0, 179, 180, 181, 532, 504, 0, 0, 0, 45, - 0, 46, 47, 48, 49, 505, 0, 51, 0, 0, - 52, 506, 0, 0, 53, 0, 0, 0, 0, 507, - 54, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 0, 508, 0, 509, 0, 0, 0, 0, - 510, 0, 58, 59, 511, 0, 0, 512, 60, 0, - 0, 513, 0, 0, 61, 62, 63, 0, 0, 64, - 0, 65, 7, 8, 9, 10, 0, 11, 12, 13, - 14, 0, 0, 0, 514, 0, 0, 0, 515, 0, - 0, 0, 516, 0, 517, 0, 0, 0, 518, 955, - 956, 957, 958, 959, 960, 0, 0, 0, 45, 0, - 46, 47, 48, 961, 0, 15, 0, 0, 0, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 55, 190, 57, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 58, 59, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 63, 0, 31, 0, 0, - 65, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 305, 965, 40, 0, - 966, 967, 968, 969, 970, 15, 971, 972, 973, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, - 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 0, 0, 0, 443, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, - 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 0, 0, 0, 550, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, - 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 918, 0, 40, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, - 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 0, 0, 0, 933, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 0, 0, 40, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, - 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 0, 0, 0, 0, 0, 24, 25, 0, 0, - 0, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 28, 29, 30, 0, 0, 31, 0, 0, - 0, 32, 7, 8, 9, 10, 33, 11, 12, 13, - 14, 34, 0, 7, 8, 9, 10, 0, 11, 12, - 13, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 0, 38, 0, 39, 0, 1028, 0, 40, 0, - 80, 0, 0, 0, 0, 15, 0, 0, 81, 16, - 0, 17, 18, 19, 0, 0, 865, 83, 84, 85, - 20, 21, 0, 0, 0, 0, 0, 211, 0, 22, - 23, 80, 866, 91, 0, 0, 24, 25, 0, 81, - 22, 0, 96, 26, 0, 27, 0, 97, 83, 84, - 85, 0, 28, 29, 30, 0, 27, 31, 211, 0, - 102, 32, 103, 0, 91, 867, 33, 0, 868, 0, - 0, 34, 32, 96, 0, 0, 0, -127, 97, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 102, 38, 103, 39, 869, 0, 0, 40, 870, - 871, 559, 0, 872, 0, 873, 242, 243, 0, 874, - 560, 561, 562, 563, 564, 565, 566, 567, 0, 0, - 0, 0, 0, 0, 0, 0, 568, 0, 569, 570, - 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, - 0, 0, 0, 0, 0, 0, 45, 0, 46, 47, - 48, 49, 244, 0, 245, 581, 0, 52, 0, 0, - 0, 53, 0, 0, 0, 0, 0, 54, 0, 0, - 0, 0, 0, 55, 56, 57, 0, 0, 0, 582, - 0, 0, 0, 246, 0, 0, 0, 0, 0, 58, - 59, 0, 0, 242, 243, 60, 0, 0, 0, 0, - 0, 247, 62, 63, 0, 0, 64, 0, 65, 0, - 0, 0, 0, 583, 0, 0, 584, 0, 585, 586, - 587, 588, 589, 590, 591, 592, 593, 594, 595, 249, - 596, 597, 0, 45, 598, 46, 47, 48, 49, 244, - 0, 245, 0, 0, 52, 0, 0, 0, 53, 0, - 0, 0, 0, 0, 54, 322, 0, 0, 0, 0, - 55, 56, 57, 242, 243, 0, 0, 0, 0, 0, - 246, 0, 0, 0, 0, 0, 58, 59, 0, 0, - 0, 0, 60, 0, 0, 0, 0, 0, 247, 62, - 63, 0, 0, 64, 45, 65, 46, 47, 48, 0, - 248, 0, 0, 45, 0, 46, 47, 48, 49, 338, - 0, 245, 0, 0, 52, 0, 249, 0, 53, 0, - 0, 55, 190, 57, 54, 0, 0, 0, 0, 0, - 55, 56, 57, 0, 0, 0, 0, 58, 59, 0, - 246, 0, 163, 164, 165, 166, 58, 59, 0, 0, - 0, 63, 60, 0, 167, 0, 65, 0, 247, 62, - 63, 0, 0, 64, 0, 65, 159, 160, 161, 162, - 163, 164, 165, 166, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 0, 0, 0, 249, 159, 160, 161, - 162, 163, 164, 165, 166, 0, 0, 0, 0, 0, - 0, 0, 0, 167, 0, 0, 159, 160, 161, 162, - 163, 164, 165, 166, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 159, 160, 161, 162, 163, 164, 165, - 166, 0, 0, 0, 0, 0, 0, 0, 0, 167, - 159, 160, 161, 162, 163, 164, 165, 166, 0, 172, - 173, 174, 175, 176, 177, 178, 167, 179, 180, 181, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 380, 0, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 0, 179, 180, 181, 0, 0, - 0, 555, 0, 0, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 0, 179, 180, 181, 846, - 0, 0, 0, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 0, 179, 180, 181, 988, 0, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 0, 179, 180, 181, 0, 0, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 0, 179, - 180, 181, 676, 677, 678, 679, 680, 681, 682, 683, - 0, 0, 0, 0, 0, 0, 0, 0, 684, 953, - 954, 955, 956, 957, 958, 959, 960, 0, 0, 0, - 0, 0, 0, 0, 0, 961, 953, 954, 955, 956, - 957, 958, 959, 960, 0, 0, 0, 0, 0, 0, - 0, 0, 961, 160, 161, 162, 163, 164, 165, 166, - 0, 0, 0, 45, 0, 46, 47, 48, 167, 954, - 955, 956, 957, 958, 959, 960, 0, 0, 0, 0, - 0, 0, 0, 0, 961, 0, 0, 0, 0, 0, - 55, 190, 57, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 58, 59, 0, 685, - 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, - 63, 696, 697, 698, 1050, 65, 962, 963, 964, 965, - 0, 0, 966, 967, 968, 969, 970, 0, 971, 972, - 973, 0, -2, 962, 963, 964, 965, 0, 133, 966, - 967, 968, 969, 970, 0, 971, 972, 973, 0, 0, + 179, 0, 180, 181, 182, 0, 506, 45, 1054, 0, + 46, 0, 47, 48, 49, 50, 507, 0, 52, 0, + 0, 53, 508, 0, 0, 54, 0, 0, 0, 0, + 509, 55, 0, 0, 0, 0, 0, 56, 57, 58, + 0, 0, 0, 0, 510, 0, 511, 0, 0, 0, + 0, 512, 0, 59, 60, 513, 0, 0, 514, 61, + 0, 0, 515, 0, 0, 62, 63, 64, 0, 0, + 65, 0, 66, 7, 8, 9, 10, 0, 11, 12, + 13, 14, 0, 0, 0, 516, 0, 0, 0, 517, + 0, 0, 0, 518, 0, 519, 0, 0, 0, 520, + 957, 958, 959, 960, 961, 962, 0, 0, 0, 46, + 0, 47, 48, 49, 963, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 56, 191, 58, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 59, 60, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 64, 0, 31, 0, + 0, 66, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 133, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 307, 967, 40, + 0, 968, 969, 970, 971, 972, 15, 973, 974, 975, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 0, 0, 31, 0, + 0, 0, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 445, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 0, 0, 40, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 0, 0, 31, 0, + 0, 0, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 552, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 0, 0, 40, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 0, 0, 31, 0, + 0, 0, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 920, 0, 40, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 0, 0, 31, 0, + 0, 0, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 935, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 0, 0, 40, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, + 0, 0, 0, 28, 29, 30, 0, 0, 31, 0, + 0, 0, 32, 7, 8, 9, 10, 33, 11, 12, + 13, 14, 34, 0, 0, 0, 0, 0, 0, 0, + 0, 216, 0, 0, 0, 35, 0, 0, 0, 36, + 37, 0, 0, 38, 0, 39, 0, 1030, 0, 40, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 20, 21, 0, 81, 0, 0, 0, 0, 0, + 22, 23, 82, 0, 0, 0, 0, 24, 25, 0, + 0, 84, 85, 86, 26, 0, 27, 0, 0, 0, + 0, 212, 0, 28, 29, 30, 0, 92, 31, 0, + 0, 0, 32, 0, 0, 0, 97, 33, 0, 0, + 0, 98, 34, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -2, 103, 35, 104, 0, 0, 36, + 37, 561, 0, 38, 0, 39, 0, 0, 0, 40, + 562, 563, 564, 565, 566, 567, 568, 569, 0, 0, + 0, 0, 0, 0, 0, 0, 570, 0, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 0, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 82, 0, 0, 0, 0, 583, 0, 83, 0, 84, + 85, 86, 87, 0, 0, 88, 0, 0, 0, 89, + 0, 0, 0, 90, 91, 92, 93, 0, 0, 584, + 0, 94, 95, 96, 97, 0, 0, 0, 0, 98, + 99, 0, 0, 100, 0, 243, 244, 101, 0, 0, + 0, 102, 103, 0, 104, 0, 0, 0, 0, 0, + 0, 0, 105, 585, 0, 0, 586, 0, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 0, + 598, 599, 245, 0, 600, 46, 0, 47, 48, 49, + 50, 246, 0, 247, 0, 0, 53, 0, 0, 0, + 54, 0, 0, 0, 0, 0, 55, 324, 0, 0, + 0, 0, 56, 57, 58, 0, 243, 244, 0, 0, + 0, 0, 248, 0, 0, 0, 0, 0, 59, 60, + 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, + 249, 63, 64, 0, 0, 65, 46, 66, 47, 48, + 49, 0, 250, 245, 0, 0, 46, 0, 47, 48, + 49, 50, 246, 0, 247, 0, 0, 53, 251, 0, + 0, 54, 0, 56, 191, 58, 0, 55, 0, 0, + 243, 244, 0, 56, 57, 58, 0, 0, 0, 59, + 60, 0, 0, 248, 0, 0, 0, 0, 0, 59, + 60, 0, 0, 64, 0, 61, 0, 0, 66, 0, + 0, 249, 63, 64, 0, 0, 65, 245, 66, 0, + 46, 0, 47, 48, 49, 50, 340, 0, 247, 0, + 0, 53, 0, 0, 0, 54, 0, 0, 0, 251, + 0, 55, 0, 0, 0, 0, 0, 56, 57, 58, + 0, 0, 0, 0, 0, 0, 0, 248, 0, 164, + 165, 166, 167, 59, 60, 0, 0, 0, 0, 61, + 0, 168, 0, 0, 0, 249, 63, 64, 0, 0, + 65, 0, 66, 160, 161, 162, 163, 164, 165, 166, + 167, 0, 0, 0, 0, 0, 0, 0, 0, 168, + 0, 0, 0, 251, 160, 161, 162, 163, 164, 165, + 166, 167, 0, 0, 0, 0, 0, 0, 0, 0, + 168, 160, 161, 162, 163, 164, 165, 166, 167, 0, + 0, 0, 0, 0, 0, 0, 0, 168, 0, 160, + 161, 162, 163, 164, 165, 166, 167, 0, 0, 0, + 0, 0, 0, 0, 0, 168, 0, 160, 161, 162, + 163, 164, 165, 166, 167, 0, 173, 174, 175, 176, + 177, 178, 179, 168, 180, 181, 182, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 0, 179, 180, 181, 0, 0, 963, 964, 965, 0, - 0, 966, 967, 968, 969, 970, 0, 971, 972, 973, - 79, 80, 0, 161, 162, 163, 164, 165, 166, 81, - 0, 0, 0, 0, 0, 0, 82, 167, 83, 84, - 85, 86, 0, 0, 87, 0, 0, 0, 88, 0, - 0, 0, 89, 90, 91, 92, 0, 0, 0, 0, - 93, 94, 95, 96, 0, 0, 0, 0, 97, 98, - 0, 0, 99, 0, 0, 0, 100, 0, 0, 0, - 101, 102, 0, 103, 161, 162, 163, 164, 165, 166, - 0, 104, 0, 0, 0, 0, 0, 0, 167, 161, - 162, 163, 164, 165, 166, 0, 0, 0, 0, 0, - 0, 0, 0, 167, 955, 956, 957, 958, 959, 960, - 0, 0, 45, 0, 46, 47, 48, 0, 961, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, - 179, 180, 181, 955, 956, 957, 958, 959, 960, 55, - 190, 57, 0, 0, 0, 0, 0, 961, 0, 0, - 0, 0, 0, 0, 0, 58, 59, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, - 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 0, 179, 180, 181, 0, 0, 0, 171, 172, 173, - 174, 175, 176, 177, 178, 0, 179, 180, 181, 0, - 963, 964, 965, 405, 406, 966, 967, 968, 969, 970, - 0, 971, 972, 973, 0, 0, 0, 0, 0, 0, - 0, 0, 45, 0, 46, 47, 48, 0, 0, 0, - 964, 965, 0, 0, 966, 967, 968, 969, 970, 0, - 971, 972, 973, 45, 0, 46, 47, 48, 0, 55, - 190, 57, 44, 0, 52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 54, 58, 59, 0, 0, 0, - 55, 56, 57, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 65, 0, 58, 59, 0, 0, - 0, 45, 0, 46, 47, 48, 49, 50, 0, 51, - 63, 0, 52, 64, 0, 65, 53, 136, 0, 0, - 0, 0, 54, 44, 0, 0, 0, 0, 55, 56, - 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 58, 59, 0, 0, 0, 0, - 60, 0, 0, 0, 0, 0, 61, 62, 63, 0, - 44, 64, 45, 65, 46, 47, 48, 49, 346, 0, - 51, 0, 0, 52, 0, 0, 0, 53, 0, 0, - 0, 0, 0, 54, 0, 0, 0, 0, 0, 55, - 56, 57, 0, 0, 0, 0, 0, 0, 0, 45, - 0, 46, 47, 48, 49, 58, 59, 51, 0, 0, - 52, 60, 0, 0, 53, 0, 0, 61, 62, 63, - 54, 44, 64, 0, 65, 0, 55, 56, 57, 0, + 179, 0, 180, 181, 182, 406, 0, 0, 0, 0, + 0, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 0, 180, 181, 182, 385, 0, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 182, 534, 382, 0, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 182, 557, 0, 0, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 182, 160, + 161, 162, 163, 164, 165, 166, 167, 0, 0, 0, + 0, 0, 0, 0, 0, 168, 160, 161, 162, 163, + 164, 165, 166, 167, 0, 0, 0, 0, 0, 0, + 0, 0, 168, 160, 161, 162, 163, 164, 165, 166, + 167, 0, 0, 0, 0, 0, 0, 0, 0, 168, + 678, 679, 680, 681, 682, 683, 684, 685, 0, 0, + 0, 0, 0, 0, 0, 0, 686, 955, 956, 957, + 958, 959, 960, 961, 962, 0, 0, 0, 0, 0, + 0, 0, 0, 963, 955, 956, 957, 958, 959, 960, + 961, 962, 0, 0, 0, 0, 0, 0, 0, 0, + 963, 0, 848, 0, 0, 0, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 182, 990, 0, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 182, 0, 0, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 182, 0, 0, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 0, 698, + 699, 700, 1052, 0, 964, 965, 966, 967, 0, 0, + 968, 969, 970, 971, 972, 0, 973, 974, 975, 0, + 0, 964, 965, 966, 967, 0, 0, 968, 969, 970, + 971, 972, 0, 973, 974, 975, 161, 162, 163, 164, + 165, 166, 167, 0, 0, 0, 0, 0, 0, 0, + 0, 168, 956, 957, 958, 959, 960, 961, 962, 0, + 0, 0, 0, 0, 0, 0, 0, 963, 162, 163, + 164, 165, 166, 167, 0, 0, 0, 46, 0, 47, + 48, 49, 168, 162, 163, 164, 165, 166, 167, 0, + 0, 0, 0, 0, 0, 0, 0, 168, 162, 163, + 164, 165, 166, 167, 56, 191, 58, 0, 0, 0, + 0, 0, 168, 957, 958, 959, 960, 961, 962, 0, + 59, 60, 0, 0, 0, 0, 0, 963, 162, 163, + 164, 165, 166, 167, 64, 0, 0, 0, 0, 66, + 0, 0, 168, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 182, 0, 0, 965, + 966, 967, 134, 0, 968, 969, 970, 971, 972, 0, + 973, 974, 975, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 182, 0, 0, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 182, 0, 0, 0, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 182, 0, 965, + 966, 967, 0, 0, 968, 969, 970, 971, 972, 0, + 973, 974, 975, 407, 408, 0, 0, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 182, 957, 958, + 959, 960, 961, 962, 0, 0, 0, 0, 0, 0, + 0, 0, 963, 46, 0, 47, 48, 49, 0, 0, + 0, 0, 0, 46, 0, 47, 48, 49, 409, 410, + 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, + 56, 191, 58, 0, 55, 0, 0, 0, 0, 0, + 56, 57, 58, 407, 408, 0, 59, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 60, 0, 0, + 64, 0, 0, 0, 0, 66, 0, 0, 411, 0, + 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, + 0, 0, 0, 46, 0, 47, 48, 49, 137, 0, + 0, 0, 44, 0, 53, 966, 967, 0, 0, 968, + 969, 970, 971, 972, 55, 973, 974, 975, 0, 0, + 56, 57, 58, 0, 0, 0, 0, 0, 0, 0, + 46, 0, 47, 48, 49, 0, 59, 60, 45, 0, + 0, 46, 0, 47, 48, 49, 50, 51, 0, 52, + 64, 312, 53, 65, 0, 66, 54, 56, 191, 58, + 0, 0, 55, 44, 0, 0, 0, 0, 56, 57, + 58, 0, 0, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 60, 0, 64, 0, 0, + 61, 46, 66, 47, 48, 49, 62, 63, 64, 45, + 44, 65, 46, 66, 47, 48, 49, 50, 348, 0, + 52, 0, 0, 53, 0, 0, 0, 54, 56, 191, + 58, 0, 0, 55, 0, 0, 0, 0, 0, 56, + 57, 58, 0, 0, 59, 60, 45, 0, 0, 46, + 0, 47, 48, 49, 50, 59, 60, 52, 64, 0, + 53, 61, 0, 66, 54, 0, 0, 62, 63, 64, + 55, 44, 65, 0, 66, 0, 56, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 659, 0, 58, 59, 0, 0, 0, 0, 60, 0, - 0, 0, 0, 0, 61, 62, 63, 0, 126, 64, - 45, 65, 46, 47, 48, 49, 0, 0, 51, 0, - 0, 52, 0, 0, 0, 53, 0, 0, 0, 0, - 0, 54, 0, 0, 0, 0, 0, 55, 56, 57, - 0, 0, 0, 0, 0, 0, 0, 45, 0, 46, - 47, 48, 49, 58, 59, 0, 0, 0, 52, 60, - 0, 0, 53, 0, 0, 61, 62, 63, 54, 0, - 64, 0, 65, 0, 55, 56, 57, 0, 0, 0, + 661, 0, 59, 60, 0, 0, 0, 0, 61, 0, + 0, 0, 0, 0, 62, 63, 64, 45, 127, 65, + 46, 66, 47, 48, 49, 50, 0, 0, 52, 0, + 0, 53, 0, 0, 0, 54, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 56, 57, 58, + 0, 0, 0, 0, 0, 0, 0, 46, 0, 47, + 48, 49, 50, 59, 60, 0, 0, 0, 53, 61, + 0, 0, 54, 0, 0, 62, 63, 64, 55, 0, + 65, 0, 66, 0, 56, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 59, 79, 80, 0, 0, 60, 0, 0, 0, - 0, 81, 127, 62, 63, 0, 0, 64, 82, 65, - 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, - 88, 0, 0, 0, 89, 90, 91, 92, 0, 0, - 0, 0, 93, 94, 95, 96, 0, 0, 79, 80, - 97, 98, 0, 0, 99, 0, 0, 81, 100, 0, - 0, 0, 101, 102, 82, 103, 83, 84, 85, 86, - 0, 0, 87, 104, 0, 0, 88, 0, 0, 0, - 89, 90, 91, 92, 0, 0, 0, 0, 93, 94, - 95, 96, 401, 0, 79, 80, 97, 98, 0, 0, - 99, 0, 0, 81, 100, 0, 0, 0, 101, 102, - 82, 103, 83, 84, 85, 86, 0, 0, 87, 104, - 0, 0, 88, 0, 0, 0, 89, 90, 91, 92, - 0, 0, 0, 0, 93, 94, 95, 96, 465, 0, - 79, 80, 97, 98, 0, 0, 99, 0, 0, 81, - 100, 0, 0, 0, 101, 102, 82, 103, 83, 84, - 85, 86, 0, 0, 87, 104, 0, 0, 88, 0, - 0, 0, 89, 90, 91, 92, 0, 0, 0, 0, - 93, 94, 95, 96, 473, 0, 79, 80, 97, 98, - 0, 0, 99, 0, 0, 81, 100, 0, 0, 0, - 101, 102, 82, 103, 83, 84, 85, 86, 0, 0, - 87, 104, 0, 0, 88, 0, 0, 0, 89, 90, - 91, 92, 0, 0, 0, 0, 93, 94, 95, 96, - 542, 0, 79, 80, 97, 98, 0, 0, 99, 0, - 0, 81, 100, 0, 0, 0, 101, 102, 82, 103, - 83, 84, 85, 86, 0, 0, 87, 104, 0, 0, - 88, 0, 0, 0, 89, 90, 91, 92, 0, 0, - 0, 0, 93, 94, 95, 96, 634, 0, 79, 80, - 97, 98, 0, 0, 99, 0, 0, 81, 100, 0, - 0, 0, 101, 102, 82, 103, 83, 84, 85, 86, - 0, 0, 87, 104, 0, 0, 88, 0, 0, 0, - 89, 90, 91, 92, 0, 0, 0, 0, 93, 94, - 95, 96, 855, 0, 0, 0, 97, 98, 0, 45, - 99, 46, 47, 48, 100, 0, 0, 0, 101, 102, - 186, 103, 0, 0, 0, 0, 0, 0, 0, 104, - 187, 0, 0, 0, 0, 0, 55, 188, 57, 0, - 79, 80, 0, 0, 0, 0, 0, 0, 856, 81, - 0, 0, 58, 59, 0, 0, 82, 0, 83, 84, - 85, 86, 0, 0, 87, 0, 63, 0, 88, 0, - 0, 65, 89, 90, 91, 92, 0, 0, 0, 0, - 93, 94, 95, 96, 0, 0, 0, 0, 97, 98, - 0, 0, 99, 0, 125, 45, 100, 46, 47, 48, - 101, 102, 80, 103, 0, 0, 186, 0, 0, 0, - 81, 0, 0, 0, 0, 0, 187, 0, 0, 83, - 84, 85, 55, 188, 57, 0, 0, 0, 0, 211, - 0, 0, 0, 0, 0, 91, 220, 0, 58, 59, - 0, 0, 0, 0, 96, 0, 0, 0, 0, 97, - 0, 0, 63, 0, 0, 0, 0, 65, 0, 0, - 0, 0, 102, 0, 103 + 59, 60, 80, 81, 0, 0, 61, 0, 0, 0, + 0, 82, 128, 63, 64, 0, 0, 65, 83, 66, + 84, 85, 86, 87, 0, 0, 88, 0, 0, 0, + 89, 0, 0, 0, 90, 91, 92, 93, 0, 0, + 0, 0, 94, 95, 96, 97, 0, 0, 80, 81, + 98, 99, 0, 0, 100, 0, 0, 82, 101, 0, + 0, 0, 102, 103, 83, 104, 84, 85, 86, 87, + 0, 0, 88, 105, 0, 0, 89, 0, 0, 0, + 90, 91, 92, 93, 0, 0, 0, 0, 94, 95, + 96, 97, 403, 0, 80, 81, 98, 99, 0, 0, + 100, 0, 0, 82, 101, 0, 0, 0, 102, 103, + 83, 104, 84, 85, 86, 87, 0, 0, 88, 105, + 0, 0, 89, 0, 0, 0, 90, 91, 92, 93, + 0, 0, 0, 0, 94, 95, 96, 97, 467, 0, + 80, 81, 98, 99, 0, 0, 100, 0, 0, 82, + 101, 0, 0, 0, 102, 103, 83, 104, 84, 85, + 86, 87, 0, 0, 88, 105, 0, 0, 89, 0, + 0, 0, 90, 91, 92, 93, 0, 0, 0, 0, + 94, 95, 96, 97, 475, 0, 80, 81, 98, 99, + 0, 0, 100, 0, 0, 82, 101, 0, 0, 0, + 102, 103, 83, 104, 84, 85, 86, 87, 0, 0, + 88, 105, 0, 0, 89, 0, 0, 0, 90, 91, + 92, 93, 0, 0, 0, 0, 94, 95, 96, 97, + 544, 0, 80, 81, 98, 99, 0, 0, 100, 0, + 0, 82, 101, 0, 0, 0, 102, 103, 83, 104, + 84, 85, 86, 87, 0, 0, 88, 105, 0, 0, + 89, 0, 0, 0, 90, 91, 92, 93, 0, 0, + 0, 0, 94, 95, 96, 97, 636, 0, 80, 81, + 98, 99, 0, 0, 100, 0, 0, 82, 101, 0, + 0, 0, 102, 103, 83, 104, 84, 85, 86, 87, + 0, 0, 88, 105, 0, 0, 89, 0, 0, 0, + 90, 91, 92, 93, 0, 0, 0, 0, 94, 95, + 96, 97, 857, 0, 0, 0, 98, 99, 0, 46, + 100, 47, 48, 49, 101, 0, 81, 0, 102, 103, + 187, 104, 0, 0, 82, 0, 0, 0, 0, 105, + 188, 0, 0, 84, 85, 86, 56, 189, 58, 0, + 0, 0, 0, 212, 0, 0, 0, 0, 858, 92, + 0, 0, 59, 60, 0, 0, 0, 0, 97, 0, + 0, 0, 0, 98, 80, 81, 64, 0, 0, 0, + 0, 66, 0, 82, 0, 0, 103, 0, 104, 0, + 83, 0, 84, 85, 86, 87, 0, 0, 88, 0, + 0, 0, 89, -127, 126, 0, 90, 91, 92, 93, + 0, 0, 0, 0, 94, 95, 96, 97, 0, 0, + 0, 0, 98, 99, 0, 46, 100, 47, 48, 49, + 101, 81, 0, 0, 102, 103, 187, 104, 0, 82, + 0, 0, 0, 81, 0, 0, 188, 0, 84, 85, + 86, 82, 56, 189, 58, 0, 0, 0, 212, 0, + 84, 85, 86, 0, 92, 221, 0, 0, 59, 60, + 212, 0, 0, 97, 0, 0, 92, 0, 98, 0, + 81, 0, 64, 0, 0, 97, 0, 66, 82, 0, + 98, 103, 0, 104, 100, 0, 0, 84, 85, 86, + 0, 0, 0, 103, 0, 104, 0, 212, 0, 0, + 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, + 0, 0, 97, 0, 0, 0, 0, 98, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 103, 0, 104 }; #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-642))) + (!!((Yystate) == (-659))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 1, 99, 117, 118, 119, 120, 121, 550, 123, 124, - 125, 26, 26, 510, 497, 325, 50, 132, 133, 39, - 108, 136, 137, 339, 10, 11, 467, 468, 422, 225, - 403, 6, 12, 8, 80, 81, 108, 83, 84, 85, - 10, 11, 88, 0, 39, 91, 419, 118, 531, 422, - 96, 97, 14, 99, 100, 118, 102, 103, 10, 11, - 135, 702, 184, 108, 118, 66, 137, 461, 118, 85, - 418, 10, 11, 421, 137, 423, 198, 199, 200, 201, - 202, 203, 135, 137, 26, 101, 541, 137, 461, 117, - 31, 135, 120, 108, 108, 135, 10, 11, 446, 447, - 480, 449, 450, 451, 452, 135, 118, 487, 488, 489, - 490, 491, 492, 83, 115, 126, 117, 118, 119, 120, - 121, 116, 123, 124, 125, 137, 135, 122, 10, 11, - 326, 132, 133, 135, 330, 136, 137, 510, 454, 134, - 135, 31, 522, 10, 11, 233, 456, 495, 236, 543, - 130, 137, 607, 349, 31, 118, 118, 272, 121, 135, - 180, 233, 137, 135, 236, 211, 108, 135, 120, 215, - 543, 56, 655, 58, 59, 135, 617, 674, 63, 527, - 621, 497, 623, 184, 625, 626, 627, 135, 233, 311, - 118, 236, 675, 134, 135, 136, 651, 198, 199, 200, - 201, 202, 203, 117, 845, 206, 402, 118, 556, 137, - 244, 31, 246, 135, 118, 531, 61, 117, 233, 233, - 120, 236, 236, 6, 225, 8, 137, 72, 73, 126, - 10, 11, 12, 137, 121, 117, 16, 10, 11, 12, - 130, 131, 132, 16, 134, 135, 136, 92, 12, 136, - 117, 135, 16, 130, 131, 132, 101, 134, 135, 136, - 88, 89, 90, 643, 135, 150, 151, 152, 153, 118, - 118, 272, 136, 137, 118, 471, 56, 118, 474, 118, - 660, 109, 127, 56, 129, 130, 117, 928, 137, 137, - 120, 233, 56, 137, 236, 6, 137, 8, 137, 135, - 136, 674, 4, 188, 338, 190, 121, 87, 10, 11, - 311, 135, 346, 707, 134, 135, 136, 318, 114, 115, - 116, 136, 207, 337, 135, 326, 327, 10, 11, 330, - 135, 111, 117, 118, 707, 135, 337, 135, 111, 655, - 137, 21, 22, 135, 136, 125, 347, 111, 349, 120, - 130, 31, 125, 120, 995, 135, 130, 130, 999, 135, - 136, 125, 135, 10, 11, 12, 130, 136, 137, 16, - 120, 135, 55, 136, 120, 220, 10, 117, 223, 119, - 120, 121, 117, 126, 482, 419, 135, 135, 422, 119, - 933, 135, 137, 238, 408, 135, 136, 118, 137, 1040, - 883, 402, 247, 1044, 249, 21, 22, 127, 137, 56, - 255, 256, 413, 137, 137, 31, 99, 1058, 419, 137, - 137, 422, 105, 106, 425, 137, 1067, 461, 429, 430, - 431, 432, 433, 137, 549, 127, 482, 457, 439, 459, - 325, 117, 443, 119, 120, 121, 840, 137, 128, 129, - 130, 131, 132, 454, 134, 135, 136, 88, 89, 90, - 461, 138, 137, 137, 111, 120, 137, 840, 137, 483, - 471, 505, 137, 474, 319, 120, 510, 117, 125, 480, - 135, 136, 137, 130, 135, 118, 487, 488, 489, 490, - 491, 492, 493, 508, 508, 978, 497, 517, 19, 20, - 21, 22, 882, 118, 140, 135, 135, 135, 353, 543, - 31, 137, 128, 129, 130, 131, 132, 117, 134, 135, - 136, 522, 517, 117, 466, 467, 468, 118, 120, 10, - 531, 925, 880, 534, 31, 118, 138, 127, 135, 118, - 541, 130, 543, 135, 136, 137, 130, 941, 549, 550, - 130, 121, 925, 425, 121, 400, 2, 429, 430, 431, - 432, 433, 407, 135, 409, 130, 508, 126, 941, 135, - 126, 456, 118, 137, 137, 136, 924, 10, 138, 15, - 16, 17, 18, 19, 20, 21, 22, 120, 137, 35, - 36, 37, 38, 140, 40, 31, 118, 137, 992, 10, - 119, 136, 135, 136, 137, 118, 607, 128, 129, 130, - 131, 132, 135, 134, 135, 136, 56, 137, 4, 992, - 135, 466, 467, 468, 118, 659, 140, 975, 137, 140, - 138, 128, 129, 130, 131, 132, 637, 134, 135, 136, - 674, 636, 643, 638, 1038, 137, 126, 138, 137, 137, - 651, 135, 135, 135, 655, 126, 118, 127, 127, 660, - 137, 140, 534, 658, 137, 1038, 661, 10, 11, 664, - 665, 672, 135, 707, 675, 617, 137, 697, 137, 621, - 119, 623, 119, 625, 626, 627, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 135, 134, 135, - 136, 702, 137, 548, 140, 137, 707, 135, 135, 138, - 127, 137, 55, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 137, 181, 137, 137, 127, 185, - 137, 135, 135, 219, 548, 137, 137, 6, 15, 16, - 17, 18, 19, 20, 21, 22, 99, 842, 924, 604, - 880, 975, 105, 106, 31, 408, 109, 482, 236, 483, - 885, 616, 617, 618, 637, 508, 621, 472, 623, 236, - 625, 626, 627, -1, 803, 547, 232, -1, 633, 31, - 49, -1, -1, -1, -1, -1, -1, -1, 57, -1, - -1, -1, 803, 650, -1, -1, 840, 66, 67, 68, - -1, -1, -1, -1, -1, -1, -1, 76, -1, -1, - -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, - -1, -1, 91, -1, -1, 281, 282, 96, -1, 840, - 10, 11, -1, -1, 845, -1, -1, -1, -1, -1, - 109, -1, 111, 873, -1, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, - -1, -1, 318, 140, -1, -1, -1, -1, 873, -1, - -1, 882, 883, -1, 885, 55, 128, 129, 130, 131, - 132, 925, 134, 135, 136, -1, -1, -1, -1, 345, - -1, -1, -1, -1, -1, -1, -1, 941, 354, -1, - -1, 10, 11, -1, -1, -1, -1, 17, 18, 19, - 20, 21, 22, -1, 925, -1, -1, 928, -1, 99, - -1, 31, 933, -1, 380, 105, 106, -1, -1, 109, - 941, 17, 18, 19, 20, 21, 22, 942, 943, 944, - 945, -1, 972, -1, -1, 31, 55, -1, 992, 50, - -1, 52, 53, 54, -1, -1, 15, 16, 17, 18, - 19, 20, 21, 22, -1, -1, -1, 978, -1, -1, - 71, -1, 31, -1, -1, -1, 77, 78, 79, -1, - -1, 992, -1, -1, 995, -1, -1, 443, 999, -1, - 99, -1, 93, 94, 1038, -1, 105, 106, -1, -1, - 109, -1, -1, 1033, -1, 1035, 107, -1, 464, -1, - -1, 112, 869, 870, 871, 872, -1, 874, 128, 129, - 130, 131, 132, -1, 134, 135, 136, 1038, -1, 1040, - -1, 1061, 1062, 1044, 869, 870, 871, 872, -1, 874, - 126, 127, 128, 129, 130, 131, 132, 1058, 134, 135, - 136, -1, -1, -1, -1, -1, 1067, -1, 514, 515, - 516, -1, 518, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, - -1, 140, -1, -1, -1, 541, -1, -1, -1, -1, - -1, -1, -1, -1, 550, -1, 953, 954, 955, 956, - 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, - 967, 968, 969, 970, 971, -1, 10, 11, 953, 954, - 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, - 965, 966, 967, 968, 969, 970, 971, -1, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 49, -1, 605, - 1007, 607, -1, -1, 31, 57, 50, -1, 52, 53, - 54, 55, 56, -1, 66, 67, 68, 61, -1, -1, - -1, -1, 1007, -1, 76, -1, -1, 71, -1, -1, - 82, 1036, -1, 77, 78, 79, -1, -1, -1, 91, - -1, -1, -1, 1050, 96, 651, -1, -1, 100, 93, - 94, -1, -1, -1, -1, -1, -1, 109, -1, 111, - -1, 105, -1, 107, -1, 1050, 110, -1, 112, -1, - 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, - 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, - 696, 118, 698, -1, -1, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, -1, 134, 135, 136, - 137, -1, -1, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, -1, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, - -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, -1, -1, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, -1, 65, -1, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, - -1, -1, 82, -1, 84, -1, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - -1, 101, 102, 103, 104, 105, 106, 107, -1, 109, - 110, 111, 112, 113, -1, -1, 832, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 888, -1, -1, -1, -1, -1, -1, 895, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, + 1, 424, 26, 39, 499, 100, 10, 11, 512, 552, + 0, 26, 51, 341, 118, 119, 120, 121, 122, 39, + 124, 125, 126, 6, 327, 8, 14, 121, 109, 133, + 134, 118, 109, 137, 138, 135, 543, 405, 533, 118, + 463, 109, 136, 226, 135, 12, 704, 10, 11, 135, + 137, 10, 11, 421, 10, 11, 424, 135, 137, 652, + 81, 82, 85, 84, 85, 86, 67, 118, 89, 118, + 135, 92, 118, 2, 118, 135, 97, 98, 101, 100, + 101, 117, 103, 104, 26, 109, 137, 123, 137, 10, + 11, 137, 135, 137, 109, 463, 126, 10, 11, 135, + 136, 117, 609, 119, 120, 121, 35, 36, 37, 38, + 118, 40, 31, 10, 11, 116, 120, 118, 119, 120, + 121, 122, 545, 124, 125, 126, 135, 83, 456, 137, + 118, 482, 133, 134, 136, 137, 137, 138, 489, 490, + 491, 492, 493, 494, 512, 328, 653, 420, 117, 332, + 423, 120, 425, 234, 137, 458, 237, 234, 117, 135, + 237, 181, 657, 130, 469, 470, 234, 109, 351, 237, + 274, 499, 676, 524, 137, 448, 449, 545, 451, 452, + 453, 454, 677, 117, 185, 118, 120, 135, 121, 847, + 135, 212, 118, 31, 135, 216, 117, 135, 199, 200, + 201, 202, 203, 204, 117, 533, 207, 246, 118, 248, + 234, 137, 126, 237, 121, 134, 135, 136, 6, 234, + 8, 404, 237, 135, 497, 226, 6, 137, 8, 136, + 135, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 135, 182, 120, 118, 529, 186, 118, 135, + 136, 88, 89, 90, 57, 118, 59, 60, 118, 4, + 117, 64, 930, 274, 137, 10, 11, 137, 871, 872, + 873, 874, 109, 876, 137, 558, 709, 137, 117, 118, + 473, 135, 234, 476, 645, 237, 134, 135, 136, 135, + 136, 340, 135, 136, 233, 114, 115, 116, 676, 348, + 135, 662, 313, 120, 619, 339, 120, 120, 623, 320, + 625, 120, 627, 628, 629, 136, 137, 328, 329, 657, + 120, 332, 135, 136, 137, 88, 89, 90, 339, 997, + 135, 709, 136, 1001, 135, 135, 136, 137, 349, 120, + 351, 10, 11, 12, 283, 284, 137, 16, 151, 152, + 153, 154, 955, 956, 957, 958, 959, 960, 961, 962, + 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, + 973, 130, 421, 10, 1042, 424, 410, 117, 1046, 484, + 885, 320, 935, 120, 126, 135, 189, 56, 191, 10, + 11, 12, 1060, 404, 135, 16, 135, 119, 135, 136, + 137, 1069, 137, 118, 415, 208, 1009, 137, 347, 842, + 421, 137, 137, 424, 463, 138, 427, 356, 87, 137, + 431, 432, 433, 434, 435, 137, 137, 127, 137, 459, + 441, 461, 137, 137, 445, 56, 117, 551, 119, 120, + 121, 137, 111, 382, 137, 456, 137, 127, 137, 1052, + 137, 485, 463, 484, 135, 136, 125, 120, 507, 117, + 135, 130, 473, 512, 842, 476, 135, 10, 11, 118, + 118, 482, 137, 519, 135, 980, 510, 117, 489, 490, + 491, 492, 493, 494, 495, 510, 140, 117, 499, 519, + 111, 135, 135, 427, 927, 118, 545, 431, 432, 433, + 434, 435, 10, 127, 125, 118, 445, 138, 130, 130, + 943, 130, 55, 524, 135, 135, 468, 469, 470, 130, + 118, 121, 533, 884, 327, 536, 12, 466, 121, 185, + 16, 130, 543, 135, 545, 126, 126, 138, 135, 118, + 551, 552, 62, 199, 200, 201, 202, 203, 204, 927, + 137, 137, 136, 73, 74, 10, 99, 137, 510, 140, + 118, 994, 105, 106, 137, 943, 109, 10, 119, 136, + 56, 118, 135, 93, 56, 137, 4, 516, 517, 518, + 31, 520, 102, 135, 118, 10, 11, 12, 137, 137, + 140, 16, 638, 138, 640, 126, 138, 135, 609, 882, + 140, 137, 536, 126, 543, 137, 135, 1040, 128, 135, + 130, 131, 661, 552, 660, 140, 994, 663, 118, 137, + 666, 667, 127, 137, 127, 111, 135, 676, 639, 119, + 137, 56, 119, 137, 645, 137, 135, 135, 550, 125, + 137, 135, 653, 926, 130, 137, 657, 138, 137, 135, + 127, 662, 137, 137, 127, 458, 137, 313, 137, 135, + 709, 135, 1040, 674, 220, 31, 677, 619, 607, 699, + 609, 623, 137, 625, 844, 627, 628, 629, 31, 130, + 131, 132, 926, 134, 135, 136, 111, 19, 20, 21, + 22, 882, 977, 704, 977, 484, 237, 485, 709, 31, + 125, 221, 410, 510, 224, 130, 639, 237, 474, 549, + 805, -1, -1, -1, 653, -1, -1, -1, -1, 239, + -1, 871, 872, 873, 874, -1, 876, -1, -1, 249, + -1, 251, -1, -1, -1, -1, -1, 257, 258, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, + 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, + -1, 700, 128, 129, 130, 131, 132, -1, 134, 135, + 136, -1, -1, 887, -1, 128, 129, 130, 131, 132, + -1, 134, 135, 136, -1, 3, 4, 5, 6, -1, + 8, 9, 10, 842, 805, -1, 128, 129, 130, 131, + 132, 321, 134, 135, 136, 955, 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, + 970, 971, 972, 973, -1, -1, -1, -1, 46, 875, + -1, 842, -1, -1, 31, 355, 847, -1, -1, -1, + -1, -1, -1, -1, 62, 875, -1, 10, 11, -1, + -1, -1, 70, -1, -1, -1, -1, -1, -1, 1009, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, -1, -1, 884, 885, -1, 887, 95, 927, -1, + 98, -1, 402, -1, 102, -1, -1, -1, -1, 409, + -1, 411, 55, -1, 943, 834, -1, -1, 944, 945, + 946, 947, 1052, 21, 22, -1, -1, 125, -1, -1, + -1, 129, 130, 31, -1, 133, 927, 135, -1, 930, + -1, 139, -1, -1, 935, -1, 17, 18, 19, 20, + 21, 22, 943, 130, 131, 132, 99, 134, 135, 136, + 31, -1, 105, 106, 974, 994, 21, 22, 468, 469, + 470, 890, -1, -1, -1, -1, 31, -1, 897, 15, + 16, 17, 18, 19, 20, 21, 22, -1, -1, 980, + -1, -1, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 994, -1, -1, 997, -1, -1, -1, + 1001, 1040, -1, -1, -1, -1, 935, -1, -1, -1, + -1, -1, -1, -1, -1, 1035, -1, 1037, -1, -1, + 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1040, + 550, 1042, -1, 1063, 1064, 1046, 975, 128, 129, 130, + 131, 132, -1, 134, 135, 136, -1, -1, -1, 1060, + -1, 990, -1, 128, 129, 130, 131, 132, 1069, 134, + 135, 136, -1, -1, -1, -1, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, + 136, -1, -1, -1, 140, -1, 606, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 618, 619, + 620, -1, -1, 623, -1, 625, -1, 627, 628, 629, + -1, -1, -1, -1, -1, 635, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, -1, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, -1, -1, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, -1, 65, -1, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, -1, -1, -1, 82, -1, 84, -1, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, -1, 101, 102, 103, 104, 105, 106, + 107, -1, 109, 110, 111, 112, 113, -1, -1, -1, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, -1, 933, -1, -1, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, -1, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, -1, 65, 973, 67, 68, + 59, 60, 61, 62, 63, -1, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - -1, -1, 988, 82, -1, 84, -1, 86, 87, 88, + -1, -1, -1, 82, -1, 84, -1, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, -1, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 111, 112, 113, -1, -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, -1, - 139, 140, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, 14, -1, -1, -1, -1, -1, -1, + 139, 140, -1, 3, 4, 5, 6, -1, 8, 9, + 10, 11, -1, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, -1, 46, -1, -1, 31, 50, - -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, - -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, - -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, 14, 125, -1, -1, -1, 129, -1, - -1, -1, 133, -1, 135, -1, -1, -1, 139, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, 137, 46, -1, -1, -1, 50, - -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, - -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, - -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, -1, 125, -1, -1, -1, 129, -1, - -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, - -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, -1, 46, -1, -1, 31, 50, - -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, 99, -1, - -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, - -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, -1, -1, 139, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, 137, 46, -1, -1, -1, 50, - -1, 52, 53, 54, 55, 56, -1, 58, -1, -1, - 61, 62, -1, -1, 65, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - 91, -1, 93, 94, 95, -1, -1, 98, 99, -1, - -1, 102, -1, -1, 105, 106, 107, -1, -1, 110, - -1, 112, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, -1, 125, -1, -1, -1, 129, -1, - -1, -1, 133, -1, 135, -1, -1, -1, 139, 17, - 18, 19, 20, 21, 22, -1, -1, -1, 50, -1, - 52, 53, 54, 31, -1, 46, -1, -1, -1, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, 77, 78, 79, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, 93, 94, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, 107, -1, 98, -1, -1, - 112, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 135, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, 137, 125, 139, -1, - 128, 129, 130, 131, 132, 46, 134, 135, 136, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, - -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, - -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, - -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, - -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, - -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, 137, -1, 139, -1, - -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, - -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, -1, -1, -1, 117, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, -1, -1, 139, -1, - -1, -1, -1, -1, -1, 46, -1, -1, -1, 50, - -1, 52, 53, 54, -1, -1, -1, -1, -1, -1, - 61, 62, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, - -1, -1, -1, 84, -1, 86, -1, -1, -1, -1, - -1, -1, 93, 94, 95, -1, -1, 98, -1, -1, - -1, 102, 3, 4, 5, 6, 107, 8, 9, 10, - 11, 112, -1, 3, 4, 5, 6, -1, 8, 9, - 10, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, -1, 133, -1, 135, -1, 137, -1, 139, -1, - 49, -1, -1, -1, -1, 46, -1, -1, 57, 50, - -1, 52, 53, 54, -1, -1, 46, 66, 67, 68, - 61, 62, -1, -1, -1, -1, -1, 76, -1, 70, - 71, 49, 62, 82, -1, -1, 77, 78, -1, 57, - 70, -1, 91, 84, -1, 86, -1, 96, 66, 67, - 68, -1, 93, 94, 95, -1, 86, 98, 76, -1, - 109, 102, 111, -1, 82, 95, 107, -1, 98, -1, - -1, 112, 102, 91, -1, -1, -1, 126, 96, -1, - -1, -1, -1, -1, 125, -1, -1, -1, 129, 130, - -1, 109, 133, 111, 135, 125, -1, -1, 139, 129, - 130, 6, -1, 133, -1, 135, 10, 11, -1, 139, + -1, -1, -1, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, 46, 47, -1, 31, + 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, -1, 65, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, 84, -1, 86, 10, 11, -1, + -1, 91, -1, 93, 94, 95, -1, -1, 98, 99, + -1, -1, 102, -1, -1, 105, 106, 107, -1, -1, + 110, -1, 112, 3, 4, 5, 6, -1, 8, 9, + 10, 11, -1, -1, 14, 125, -1, -1, 1038, 129, + -1, -1, 55, 133, -1, 135, -1, -1, -1, 139, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, -1, 134, 135, 136, -1, 46, 47, 140, -1, + 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, -1, 65, 99, -1, -1, -1, + 70, 71, 105, 106, -1, -1, 109, 77, 78, 79, + -1, -1, -1, -1, 84, -1, 86, 10, 11, -1, + -1, 91, -1, 93, 94, 95, -1, -1, 98, 99, + -1, -1, 102, -1, -1, 105, 106, 107, -1, -1, + 110, -1, 112, 3, 4, 5, 6, -1, 8, 9, + 10, 11, -1, -1, -1, 125, -1, -1, -1, 129, + -1, -1, 55, 133, -1, 135, -1, -1, -1, 139, + -1, -1, -1, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, 46, 47, -1, 31, + 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, -1, 65, 99, -1, -1, -1, + 70, 71, 105, 106, -1, -1, 109, 77, 78, 79, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, 99, + -1, -1, 102, -1, -1, 105, 106, 107, -1, -1, + 110, -1, 112, 3, 4, 5, 6, -1, 8, 9, + 10, 11, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, -1, -1, 139, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, -1, 134, 135, 136, -1, 46, 47, 140, -1, + 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, -1, 65, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, 91, -1, 93, 94, 95, -1, -1, 98, 99, + -1, -1, 102, -1, -1, 105, 106, 107, -1, -1, + 110, -1, 112, 3, 4, 5, 6, -1, 8, 9, + 10, 11, -1, -1, -1, 125, -1, -1, -1, 129, + -1, -1, -1, 133, -1, 135, -1, -1, -1, 139, + 17, 18, 19, 20, 21, 22, -1, -1, -1, 50, + -1, 52, 53, 54, 31, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, 77, 78, 79, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, 93, 94, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, 107, -1, 98, -1, + -1, 112, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 135, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, 137, 125, 139, + -1, 128, 129, 130, 131, 132, 46, 134, 135, 136, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, -1, + -1, -1, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, 117, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, -1, -1, 139, + -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, -1, + -1, -1, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, 117, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, -1, -1, 139, + -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, -1, + -1, -1, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, 137, -1, 139, + -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, -1, + -1, -1, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, 117, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, -1, -1, 139, + -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, -1, -1, -1, -1, -1, -1, + 70, 71, -1, -1, -1, -1, -1, 77, 78, -1, + -1, -1, -1, -1, 84, -1, 86, -1, -1, -1, + -1, -1, -1, 93, 94, 95, -1, -1, 98, -1, + -1, -1, 102, 3, 4, 5, 6, 107, 8, 9, + 10, 11, 112, -1, -1, -1, -1, -1, -1, -1, + -1, 6, -1, -1, -1, 125, -1, -1, -1, 129, + 130, -1, -1, 133, -1, 135, -1, 137, -1, 139, + -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, + 50, -1, 52, 53, 54, -1, -1, -1, -1, -1, + -1, 61, 62, -1, 49, -1, -1, -1, -1, -1, + 70, 71, 57, -1, -1, -1, -1, 77, 78, -1, + -1, 66, 67, 68, 84, -1, 86, -1, -1, -1, + -1, 76, -1, 93, 94, 95, -1, 82, 98, -1, + -1, -1, 102, -1, -1, -1, 91, 107, -1, -1, + -1, 96, 112, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 0, 109, 125, 111, -1, -1, 129, + 130, 6, -1, 133, -1, 135, -1, -1, -1, 139, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - -1, -1, -1, -1, -1, -1, 50, -1, 52, 53, - 54, 55, 56, -1, 58, 60, -1, 61, -1, -1, - -1, 65, -1, -1, -1, -1, -1, 71, -1, -1, - -1, -1, -1, 77, 78, 79, -1, -1, -1, 84, - -1, -1, -1, 87, -1, -1, -1, -1, -1, 93, - 94, -1, -1, 10, 11, 99, -1, -1, -1, -1, - -1, 105, 106, 107, -1, -1, 110, -1, 112, -1, - -1, -1, -1, 118, -1, -1, 121, -1, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, - 135, 136, -1, 50, 139, 52, 53, 54, 55, 56, - -1, 58, -1, -1, 61, -1, -1, -1, 65, -1, - -1, -1, -1, -1, 71, 11, -1, -1, -1, -1, - 77, 78, 79, 10, 11, -1, -1, -1, -1, -1, - 87, -1, -1, -1, -1, -1, 93, 94, -1, -1, - -1, -1, 99, -1, -1, -1, -1, -1, 105, 106, - 107, -1, -1, 110, 50, 112, 52, 53, 54, -1, - 117, -1, -1, 50, -1, 52, 53, 54, 55, 56, - -1, 58, -1, -1, 61, -1, 133, -1, 65, -1, - -1, 77, 78, 79, 71, -1, -1, -1, -1, -1, - 77, 78, 79, -1, -1, -1, -1, 93, 94, -1, - 87, -1, 19, 20, 21, 22, 93, 94, -1, -1, - -1, 107, 99, -1, 31, -1, 112, -1, 105, 106, - 107, -1, -1, 110, -1, 112, 15, 16, 17, 18, - 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, 31, -1, -1, -1, 133, 15, 16, 17, - 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, 31, -1, -1, 15, 16, 17, 18, - 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, + -1, 48, 49, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, -1, 60, -1, 64, -1, 66, + 67, 68, 69, -1, -1, 72, -1, -1, -1, 76, + -1, -1, -1, 80, 81, 82, 83, -1, -1, 84, + -1, 88, 89, 90, 91, -1, -1, -1, -1, 96, + 97, -1, -1, 100, -1, 10, 11, 104, -1, -1, + -1, 108, 109, -1, 111, -1, -1, -1, -1, -1, + -1, -1, 119, 118, -1, -1, 121, -1, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, + 135, 136, 47, -1, 139, 50, -1, 52, 53, 54, + 55, 56, -1, 58, -1, -1, 61, -1, -1, -1, + 65, -1, -1, -1, -1, -1, 71, 11, -1, -1, + -1, -1, 77, 78, 79, -1, 10, 11, -1, -1, + -1, -1, 87, -1, -1, -1, -1, -1, 93, 94, + -1, -1, -1, -1, 99, -1, -1, -1, -1, -1, + 105, 106, 107, -1, -1, 110, 50, 112, 52, 53, + 54, -1, 117, 47, -1, -1, 50, -1, 52, 53, + 54, 55, 56, -1, 58, -1, -1, 61, 133, -1, + -1, 65, -1, 77, 78, 79, -1, 71, -1, -1, + 10, 11, -1, 77, 78, 79, -1, -1, -1, 93, + 94, -1, -1, 87, -1, -1, -1, -1, -1, 93, + 94, -1, -1, 107, -1, 99, -1, -1, 112, -1, + -1, 105, 106, 107, -1, -1, 110, 47, 112, -1, + 50, -1, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, -1, -1, -1, 65, -1, -1, -1, 133, + -1, 71, -1, -1, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, -1, -1, -1, 87, -1, 19, + 20, 21, 22, 93, 94, -1, -1, -1, -1, 99, + -1, 31, -1, -1, -1, 105, 106, 107, -1, -1, + 110, -1, 112, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, - 15, 16, 17, 18, 19, 20, 21, 22, -1, 126, - 127, 128, 129, 130, 131, 132, 31, 134, 135, 136, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 120, -1, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, - -1, 119, -1, -1, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, -1, 134, 135, 136, 118, - -1, -1, -1, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, -1, 134, 135, 136, 120, -1, + -1, -1, -1, 133, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + 31, 15, 16, 17, 18, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, 31, -1, 15, + 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, + -1, -1, -1, -1, -1, 31, -1, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 126, 127, 128, 129, + 130, 131, 132, 31, 134, 135, 136, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 118, -1, -1, -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, -1, 134, 135, 136, -1, -1, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, - 135, 136, 15, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, -1, -1, -1, -1, 31, 15, + 132, -1, 134, 135, 136, 137, -1, -1, -1, -1, + -1, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, -1, 134, 135, 136, 137, -1, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, + 134, 135, 136, 137, 120, -1, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, + 136, 119, -1, -1, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, -1, 134, 135, 136, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, 31, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, 50, -1, 52, 53, 54, 31, 16, - 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, - -1, -1, -1, -1, 31, -1, -1, -1, -1, -1, - 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 93, 94, -1, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 107, 134, 135, 136, 120, 112, 122, 123, 124, 125, - -1, -1, 128, 129, 130, 131, 132, -1, 134, 135, - 136, -1, 0, 122, 123, 124, 125, -1, 135, 128, - 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, -1, -1, 123, 124, 125, -1, - -1, 128, 129, 130, 131, 132, -1, 134, 135, 136, - 48, 49, -1, 17, 18, 19, 20, 21, 22, 57, - -1, -1, -1, -1, -1, -1, 64, 31, 66, 67, - 68, 69, -1, -1, 72, -1, -1, -1, 76, -1, - -1, -1, 80, 81, 82, 83, -1, -1, -1, -1, - 88, 89, 90, 91, -1, -1, -1, -1, 96, 97, - -1, -1, 100, -1, -1, -1, 104, -1, -1, -1, - 108, 109, -1, 111, 17, 18, 19, 20, 21, 22, - -1, 119, -1, -1, -1, -1, -1, -1, 31, 17, + -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, 31, + 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, + -1, -1, -1, -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, 31, 17, 18, 19, 20, 21, 22, - -1, -1, 50, -1, 52, 53, 54, -1, 31, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, - 134, 135, 136, 17, 18, 19, 20, 21, 22, 77, - 78, 79, -1, -1, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 93, 94, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, - -1, -1, -1, -1, 112, -1, -1, -1, -1, -1, - -1, 124, 125, 126, 127, 128, 129, 130, 131, 132, - -1, 134, 135, 136, -1, -1, -1, 125, 126, 127, + -1, -1, -1, 31, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + 31, -1, 118, -1, -1, -1, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, + 136, 120, -1, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, -1, 134, 135, 136, -1, -1, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, -1, 134, + 135, 136, 120, -1, 122, 123, 124, 125, -1, -1, 128, 129, 130, 131, 132, -1, 134, 135, 136, -1, - 123, 124, 125, 10, 11, 128, 129, 130, 131, 132, - -1, 134, 135, 136, -1, -1, -1, -1, -1, -1, - -1, -1, 50, -1, 52, 53, 54, -1, -1, -1, + -1, 122, 123, 124, 125, -1, -1, 128, 129, 130, + 131, 132, -1, 134, 135, 136, 16, 17, 18, 19, + 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, + -1, 31, 16, 17, 18, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, 31, 17, 18, + 19, 20, 21, 22, -1, -1, -1, 50, -1, 52, + 53, 54, 31, 17, 18, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, 31, 17, 18, + 19, 20, 21, 22, 77, 78, 79, -1, -1, -1, + -1, -1, 31, 17, 18, 19, 20, 21, 22, -1, + 93, 94, -1, -1, -1, -1, -1, 31, 17, 18, + 19, 20, 21, 22, 107, -1, -1, -1, -1, 112, + -1, -1, 31, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, -1, 134, 135, 136, -1, -1, 123, + 124, 125, 135, -1, 128, 129, 130, 131, 132, -1, + 134, 135, 136, -1, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, -1, + 124, 125, 126, 127, 128, 129, 130, 131, 132, -1, + 134, 135, 136, -1, -1, -1, 125, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, -1, 123, 124, 125, -1, -1, 128, 129, 130, 131, 132, -1, - 134, 135, 136, 50, -1, 52, 53, 54, -1, 77, - 78, 79, 11, -1, 61, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 71, 93, 94, -1, -1, -1, - 77, 78, 79, -1, -1, -1, -1, -1, -1, 107, - -1, -1, -1, -1, 112, -1, 93, 94, -1, -1, + 134, 135, 136, 10, 11, -1, -1, 126, 127, 128, + 129, 130, 131, 132, -1, 134, 135, 136, 17, 18, + 19, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 31, 50, -1, 52, 53, 54, -1, -1, + -1, -1, -1, 50, -1, 52, 53, 54, 55, 56, + -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, + 77, 78, 79, -1, 71, -1, -1, -1, -1, -1, + 77, 78, 79, 10, 11, -1, 93, 94, -1, -1, + -1, -1, -1, -1, -1, -1, 93, 94, -1, -1, + 107, -1, -1, -1, -1, 112, -1, -1, 105, -1, + 107, -1, -1, 110, -1, 112, -1, -1, -1, -1, + -1, -1, -1, 50, -1, 52, 53, 54, 135, -1, + -1, -1, 11, -1, 61, 124, 125, -1, -1, 128, + 129, 130, 131, 132, 71, 134, 135, 136, -1, -1, + 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, + 50, -1, 52, 53, 54, -1, 93, 94, 47, -1, -1, 50, -1, 52, 53, 54, 55, 56, -1, 58, - 107, -1, 61, 110, -1, 112, 65, 135, -1, -1, + 107, 71, 61, 110, -1, 112, 65, 77, 78, 79, -1, -1, 71, 11, -1, -1, -1, -1, 77, 78, - 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, 94, -1, -1, -1, -1, - 99, -1, -1, -1, -1, -1, 105, 106, 107, -1, + 79, -1, -1, 93, 94, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, 94, -1, 107, -1, -1, + 99, 50, 112, 52, 53, 54, 105, 106, 107, 47, 11, 110, 50, 112, 52, 53, 54, 55, 56, -1, - 58, -1, -1, 61, -1, -1, -1, 65, -1, -1, - -1, -1, -1, 71, -1, -1, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, 50, - -1, 52, 53, 54, 55, 93, 94, 58, -1, -1, - 61, 99, -1, -1, 65, -1, -1, 105, 106, 107, + 58, -1, -1, 61, -1, -1, -1, 65, 77, 78, + 79, -1, -1, 71, -1, -1, -1, -1, -1, 77, + 78, 79, -1, -1, 93, 94, 47, -1, -1, 50, + -1, 52, 53, 54, 55, 93, 94, 58, 107, -1, + 61, 99, -1, 112, 65, -1, -1, 105, 106, 107, 71, 11, 110, -1, 112, -1, 77, 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, -1, 99, -1, - -1, -1, -1, -1, 105, 106, 107, -1, 11, 110, + -1, -1, -1, -1, 105, 106, 107, 47, 11, 110, 50, 112, 52, 53, 54, 55, -1, -1, 58, -1, -1, 61, -1, -1, -1, 65, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, 77, 78, 79, @@ -2539,22 +2534,29 @@ static const yytype_int16 yycheck[] = -1, -1, 72, 119, -1, -1, 76, -1, -1, -1, 80, 81, 82, 83, -1, -1, -1, -1, 88, 89, 90, 91, 138, -1, -1, -1, 96, 97, -1, 50, - 100, 52, 53, 54, 104, -1, -1, -1, 108, 109, - 61, 111, -1, -1, -1, -1, -1, -1, -1, 119, - 71, -1, -1, -1, -1, -1, 77, 78, 79, -1, - 48, 49, -1, -1, -1, -1, -1, -1, 138, 57, - -1, -1, 93, 94, -1, -1, 64, -1, 66, 67, - 68, 69, -1, -1, 72, -1, 107, -1, 76, -1, - -1, 112, 80, 81, 82, 83, -1, -1, -1, -1, - 88, 89, 90, 91, -1, -1, -1, -1, 96, 97, - -1, -1, 100, -1, 135, 50, 104, 52, 53, 54, - 108, 109, 49, 111, -1, -1, 61, -1, -1, -1, - 57, -1, -1, -1, -1, -1, 71, -1, -1, 66, - 67, 68, 77, 78, 79, -1, -1, -1, -1, 76, - -1, -1, -1, -1, -1, 82, 83, -1, 93, 94, - -1, -1, -1, -1, 91, -1, -1, -1, -1, 96, - -1, -1, 107, -1, -1, -1, -1, 112, -1, -1, - -1, -1, 109, -1, 111 + 100, 52, 53, 54, 104, -1, 49, -1, 108, 109, + 61, 111, -1, -1, 57, -1, -1, -1, -1, 119, + 71, -1, -1, 66, 67, 68, 77, 78, 79, -1, + -1, -1, -1, 76, -1, -1, -1, -1, 138, 82, + -1, -1, 93, 94, -1, -1, -1, -1, 91, -1, + -1, -1, -1, 96, 48, 49, 107, -1, -1, -1, + -1, 112, -1, 57, -1, -1, 109, -1, 111, -1, + 64, -1, 66, 67, 68, 69, -1, -1, 72, -1, + -1, -1, 76, 126, 135, -1, 80, 81, 82, 83, + -1, -1, -1, -1, 88, 89, 90, 91, -1, -1, + -1, -1, 96, 97, -1, 50, 100, 52, 53, 54, + 104, 49, -1, -1, 108, 109, 61, 111, -1, 57, + -1, -1, -1, 49, -1, -1, 71, -1, 66, 67, + 68, 57, 77, 78, 79, -1, -1, -1, 76, -1, + 66, 67, 68, -1, 82, 83, -1, -1, 93, 94, + 76, -1, -1, 91, -1, -1, 82, -1, 96, -1, + 49, -1, 107, -1, -1, 91, -1, 112, 57, -1, + 96, 109, -1, 111, 100, -1, -1, 66, 67, 68, + -1, -1, -1, 109, -1, 111, -1, 76, -1, -1, + -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, + -1, -1, 91, -1, -1, -1, -1, 96, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 109, -1, 111 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2565,110 +2567,110 @@ static const yytype_uint8 yystos[] = 6, 8, 9, 10, 11, 46, 50, 52, 53, 54, 61, 62, 70, 71, 77, 78, 84, 86, 93, 94, 95, 98, 102, 107, 112, 125, 129, 130, 133, 135, - 139, 227, 228, 233, 11, 50, 52, 53, 54, 55, - 56, 58, 61, 65, 71, 77, 78, 79, 93, 94, - 99, 105, 106, 107, 110, 112, 193, 196, 197, 199, - 204, 205, 209, 210, 215, 216, 217, 218, 0, 48, - 49, 57, 64, 66, 67, 68, 69, 72, 76, 80, - 81, 82, 83, 88, 89, 90, 91, 96, 97, 100, - 104, 108, 109, 111, 119, 146, 148, 149, 151, 152, - 153, 174, 211, 214, 234, 135, 135, 135, 135, 135, - 135, 135, 126, 135, 135, 135, 11, 105, 195, 209, - 210, 215, 135, 135, 135, 126, 135, 135, 227, 227, - 227, 227, 11, 50, 52, 53, 54, 61, 71, 77, - 78, 93, 94, 107, 112, 196, 225, 227, 227, 15, - 16, 17, 18, 19, 20, 21, 22, 31, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, - 135, 136, 6, 8, 193, 135, 61, 71, 78, 216, - 78, 216, 216, 10, 11, 232, 216, 12, 16, 56, - 111, 125, 130, 135, 192, 234, 117, 120, 232, 117, - 232, 76, 151, 151, 151, 6, 151, 151, 120, 150, - 83, 151, 135, 135, 151, 117, 232, 120, 120, 120, - 151, 151, 135, 151, 152, 175, 151, 158, 83, 232, - 151, 151, 10, 11, 56, 58, 87, 105, 117, 133, - 163, 194, 197, 199, 204, 209, 210, 215, 224, 225, - 234, 196, 224, 224, 224, 224, 224, 196, 224, 224, - 224, 232, 135, 232, 232, 224, 224, 196, 196, 224, - 224, 137, 118, 137, 227, 227, 227, 227, 227, 227, + 139, 227, 228, 233, 11, 47, 50, 52, 53, 54, + 55, 56, 58, 61, 65, 71, 77, 78, 79, 93, + 94, 99, 105, 106, 107, 110, 112, 193, 196, 197, + 199, 204, 205, 209, 210, 215, 216, 217, 218, 0, + 48, 49, 57, 64, 66, 67, 68, 69, 72, 76, + 80, 81, 82, 83, 88, 89, 90, 91, 96, 97, + 100, 104, 108, 109, 111, 119, 146, 148, 149, 151, + 152, 153, 174, 211, 214, 234, 135, 135, 135, 135, + 135, 135, 135, 126, 135, 135, 135, 11, 105, 195, + 209, 210, 215, 135, 135, 135, 126, 135, 135, 227, + 227, 227, 227, 11, 50, 52, 53, 54, 61, 71, + 77, 78, 93, 94, 107, 112, 196, 225, 227, 227, + 15, 16, 17, 18, 19, 20, 21, 22, 31, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 134, 135, 136, 6, 8, 193, 135, 61, 71, 78, + 216, 78, 216, 216, 10, 11, 232, 216, 12, 16, + 56, 111, 125, 130, 135, 192, 234, 117, 120, 232, + 117, 232, 76, 151, 151, 151, 6, 151, 151, 120, + 150, 83, 151, 135, 135, 151, 117, 232, 120, 120, + 120, 151, 151, 135, 151, 152, 175, 151, 158, 83, + 232, 151, 151, 10, 11, 47, 56, 58, 87, 105, + 117, 133, 163, 194, 197, 199, 204, 209, 210, 215, + 224, 225, 234, 196, 224, 224, 224, 224, 224, 196, + 224, 224, 224, 232, 135, 232, 232, 224, 224, 196, + 196, 224, 224, 137, 118, 137, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 137, 225, 227, 192, 227, - 71, 130, 192, 192, 192, 192, 192, 192, 136, 207, - 208, 234, 11, 206, 216, 120, 198, 200, 151, 148, - 117, 232, 10, 232, 143, 117, 227, 126, 56, 163, - 194, 232, 135, 135, 193, 135, 56, 193, 232, 147, - 232, 117, 119, 120, 121, 186, 119, 154, 232, 232, - 137, 137, 137, 137, 137, 137, 137, 127, 137, 137, - 137, 224, 137, 137, 137, 127, 137, 137, 227, 227, - 120, 137, 140, 137, 192, 137, 223, 227, 234, 232, - 138, 206, 143, 120, 201, 202, 234, 143, 117, 118, - 118, 138, 212, 118, 137, 10, 11, 55, 56, 105, - 176, 177, 178, 179, 215, 234, 193, 186, 159, 164, - 12, 130, 165, 155, 227, 193, 10, 11, 12, 16, - 56, 111, 125, 130, 190, 234, 143, 135, 219, 220, - 144, 145, 232, 117, 227, 12, 16, 56, 87, 111, - 125, 130, 135, 156, 180, 232, 120, 135, 137, 135, - 227, 135, 140, 118, 121, 138, 88, 89, 90, 109, - 203, 117, 118, 138, 213, 10, 232, 143, 233, 232, - 179, 232, 127, 118, 10, 11, 12, 16, 56, 111, - 125, 130, 135, 191, 234, 160, 161, 180, 3, 4, - 5, 9, 10, 14, 46, 56, 62, 70, 84, 86, - 91, 95, 98, 102, 125, 129, 133, 135, 139, 182, - 183, 189, 193, 229, 230, 233, 234, 130, 180, 182, - 157, 180, 137, 190, 130, 190, 190, 190, 190, 190, - 135, 136, 138, 166, 138, 221, 234, 117, 118, 135, - 117, 187, 188, 227, 234, 119, 130, 180, 180, 6, - 15, 16, 17, 18, 19, 20, 21, 22, 31, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 60, 84, 118, 121, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 135, 136, 139, 172, - 180, 180, 180, 180, 120, 121, 135, 136, 185, 186, - 234, 206, 225, 225, 182, 227, 105, 109, 210, 231, - 232, 109, 231, 109, 231, 88, 89, 90, 143, 203, - 143, 118, 137, 118, 138, 137, 121, 191, 121, 152, - 173, 174, 178, 130, 191, 191, 191, 191, 191, 191, - 121, 136, 184, 234, 162, 180, 185, 186, 135, 91, - 193, 126, 195, 189, 135, 126, 227, 227, 227, 196, - 225, 227, 137, 14, 118, 191, 15, 16, 17, 18, - 19, 20, 21, 22, 31, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 134, 135, 136, 180, - 120, 137, 137, 185, 186, 135, 190, 169, 223, 182, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 82, 84, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 101, 102, 103, 104, 105, 106, 107, 109, 110, - 111, 112, 113, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 139, 140, 222, 219, 145, 224, - 187, 138, 118, 180, 10, 137, 140, 137, 4, 227, - 181, 223, 118, 137, 137, 137, 118, 232, 231, 232, - 231, 231, 231, 231, 231, 138, 138, 10, 119, 232, - 196, 184, 196, 191, 137, 46, 62, 95, 98, 125, - 129, 130, 133, 135, 139, 226, 228, 223, 185, 186, - 118, 196, 193, 191, 196, 135, 196, 196, 137, 137, - 56, 171, 234, 14, 189, 121, 185, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 137, 225, 227, + 192, 227, 71, 130, 192, 192, 192, 192, 192, 192, + 136, 207, 208, 234, 11, 206, 216, 120, 198, 200, + 151, 148, 117, 232, 10, 232, 143, 117, 227, 126, + 56, 163, 194, 232, 135, 135, 193, 135, 56, 193, + 232, 147, 232, 117, 119, 120, 121, 186, 119, 154, + 232, 232, 137, 137, 137, 137, 137, 137, 137, 127, + 137, 137, 137, 224, 137, 137, 137, 127, 137, 137, + 227, 227, 120, 137, 140, 137, 192, 137, 223, 227, + 234, 232, 138, 206, 143, 120, 201, 202, 234, 143, + 117, 118, 118, 138, 212, 118, 137, 10, 11, 55, + 56, 105, 176, 177, 178, 179, 215, 234, 193, 186, + 159, 164, 12, 130, 165, 155, 227, 193, 10, 11, + 12, 16, 56, 111, 125, 130, 190, 234, 143, 135, + 219, 220, 144, 145, 232, 117, 227, 12, 16, 56, + 87, 111, 125, 130, 135, 156, 180, 232, 120, 135, + 137, 135, 227, 135, 140, 118, 121, 138, 88, 89, + 90, 109, 203, 117, 118, 138, 213, 10, 232, 143, + 233, 232, 179, 232, 127, 118, 10, 11, 12, 16, + 56, 111, 125, 130, 135, 191, 234, 160, 161, 180, + 3, 4, 5, 9, 10, 14, 46, 56, 62, 70, + 84, 86, 91, 95, 98, 102, 125, 129, 133, 135, + 139, 182, 183, 189, 193, 229, 230, 233, 234, 130, + 180, 182, 157, 180, 137, 190, 130, 190, 190, 190, + 190, 190, 135, 136, 138, 166, 138, 221, 234, 117, + 118, 135, 117, 187, 188, 227, 234, 119, 130, 180, + 180, 6, 15, 16, 17, 18, 19, 20, 21, 22, + 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 60, 84, 118, 121, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, + 139, 172, 180, 180, 180, 180, 120, 121, 135, 136, + 185, 186, 234, 206, 225, 225, 182, 227, 105, 109, + 210, 231, 232, 109, 231, 109, 231, 88, 89, 90, + 143, 203, 143, 118, 137, 118, 138, 137, 121, 191, + 121, 152, 173, 174, 178, 130, 191, 191, 191, 191, + 191, 191, 121, 136, 184, 234, 162, 180, 185, 186, + 135, 91, 193, 126, 195, 189, 135, 126, 227, 227, + 227, 196, 225, 227, 137, 14, 118, 191, 15, 16, + 17, 18, 19, 20, 21, 22, 31, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, + 136, 180, 120, 137, 137, 185, 186, 135, 190, 169, + 223, 182, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 82, 84, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, + 109, 110, 111, 112, 113, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 139, 140, 222, 219, + 145, 224, 187, 138, 118, 180, 10, 137, 140, 137, + 4, 227, 181, 223, 118, 137, 137, 137, 118, 232, + 231, 232, 231, 231, 231, 231, 231, 138, 138, 10, + 119, 232, 196, 184, 196, 191, 137, 46, 62, 95, + 98, 125, 129, 130, 133, 135, 139, 226, 228, 223, + 185, 186, 118, 196, 193, 191, 196, 135, 196, 196, + 137, 137, 56, 171, 234, 14, 189, 121, 185, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 137, 225, - 227, 137, 135, 171, 118, 170, 182, 140, 137, 221, - 138, 137, 138, 117, 227, 182, 140, 156, 171, 137, - 137, 135, 135, 126, 135, 126, 226, 226, 226, 226, - 196, 225, 226, 15, 16, 17, 18, 19, 20, 21, - 22, 31, 122, 123, 124, 125, 128, 129, 130, 131, - 132, 134, 135, 136, 140, 118, 161, 137, 191, 185, - 127, 224, 137, 127, 227, 85, 101, 227, 120, 137, - 140, 135, 167, 157, 182, 137, 171, 138, 187, 137, - 119, 119, 182, 196, 196, 196, 196, 137, 137, 226, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 137, 225, 227, 137, 135, 171, 118, 170, 182, 140, + 137, 221, 138, 137, 138, 117, 227, 182, 140, 156, + 171, 137, 137, 135, 135, 126, 135, 126, 226, 226, + 226, 226, 196, 225, 226, 15, 16, 17, 18, 19, + 20, 21, 22, 31, 122, 123, 124, 125, 128, 129, + 130, 131, 132, 134, 135, 136, 140, 118, 161, 137, + 191, 185, 127, 224, 137, 127, 227, 85, 101, 227, + 120, 137, 140, 135, 167, 157, 182, 137, 171, 138, + 187, 137, 119, 119, 182, 196, 196, 196, 196, 137, + 137, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 137, 225, - 227, 162, 185, 135, 137, 135, 135, 227, 168, 182, - 137, 171, 138, 171, 137, 137, 127, 137, 127, 226, - 120, 137, 140, 225, 225, 137, 232, 182, 137, 171, - 171, 135, 135, 226, 137, 137, 137, 137, 171, 225, - 225, 171, 137, 137 + 137, 225, 227, 162, 185, 135, 137, 135, 135, 227, + 168, 182, 137, 171, 138, 171, 137, 137, 127, 137, + 127, 226, 120, 137, 140, 225, 225, 137, 232, 182, + 137, 171, 171, 135, 135, 226, 137, 137, 137, 137, + 171, 225, 225, 171, 137, 137 }; #define yyerrok (yyerrstatus = 0) @@ -5548,9 +5550,9 @@ yyreduce: case 225: /* Line 1792 of yacc.c */ -#line 1731 "dtool/src/cppparser/cppBison.yxx" +#line 1728 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); + (yyval.u.type) = new CPPSimpleType(CPPSimpleType::T_auto); } break; @@ -5558,6 +5560,14 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1735 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); +} + break; + + case 227: +/* Line 1792 of yacc.c */ +#line 1739 "dtool/src/cppparser/cppBison.yxx" + { (yyval.u.decl) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.decl) == NULL) { yyerror(string("internal error resolving type ") + (yyvsp[(1) - (1)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (1)])); @@ -5566,19 +5576,11 @@ yyreduce: } break; - case 227: -/* Line 1792 of yacc.c */ -#line 1743 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); -} - break; - case 228: /* Line 1792 of yacc.c */ #line 1747 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); + (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; @@ -5586,7 +5588,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1751 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); + (yyval.u.decl) = CPPType::new_type((yyvsp[(1) - (1)].u.struct_type)); } break; @@ -5594,7 +5596,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1755 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.struct_type))); } break; @@ -5602,6 +5604,14 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1759 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[(1) - (1)].u.enum_type))); +} + break; + + case 232: +/* Line 1792 of yacc.c */ +#line 1763 "dtool/src/cppparser/cppBison.yxx" + { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { (yyval.u.decl) = type; @@ -5618,9 +5628,9 @@ yyreduce: } break; - case 232: + case 233: /* Line 1792 of yacc.c */ -#line 1775 "dtool/src/cppparser/cppBison.yxx" +#line 1779 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type != NULL) { @@ -5638,9 +5648,9 @@ yyreduce: } break; - case 233: + case 234: /* Line 1792 of yacc.c */ -#line 1791 "dtool/src/cppparser/cppBison.yxx" +#line 1795 "dtool/src/cppparser/cppBison.yxx" { yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[(2) - (2)].u.identifier)->get_fully_scoped_name(), (yylsp[(1) - (2)])); @@ -5660,9 +5670,9 @@ yyreduce: } break; - case 234: + case 235: /* Line 1792 of yacc.c */ -#line 1809 "dtool/src/cppparser/cppBison.yxx" +#line 1813 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.decl) = (yyvsp[(3) - (4)].u.expr)->determine_type(); if ((yyval.u.decl) == (CPPType *)NULL) { @@ -5673,17 +5683,25 @@ yyreduce: } break; - case 235: + case 236: /* Line 1792 of yacc.c */ -#line 1821 "dtool/src/cppparser/cppBison.yxx" +#line 1822 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.decl) = new CPPSimpleType(CPPSimpleType::T_auto); +} + break; + + case 237: +/* Line 1792 of yacc.c */ +#line 1829 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; - case 236: + case 238: /* Line 1792 of yacc.c */ -#line 1825 "dtool/src/cppparser/cppBison.yxx" +#line 1833 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if ((yyval.u.type) == NULL) { @@ -5693,57 +5711,57 @@ yyreduce: } break; - case 237: + case 239: /* Line 1792 of yacc.c */ -#line 1833 "dtool/src/cppparser/cppBison.yxx" +#line 1841 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 238: -/* Line 1792 of yacc.c */ -#line 1837 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } -} - break; - - case 239: -/* Line 1792 of yacc.c */ -#line 1853 "dtool/src/cppparser/cppBison.yxx" - { - CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); - if (type != NULL) { - (yyval.u.type) = type; - } else { - CPPExtensionType *et = - CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) - ->as_extension_type(); - CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); - if (scope != NULL) { - scope->define_extension_type(et); - } - (yyval.u.type) = et; - } -} - break; - case 240: /* Line 1792 of yacc.c */ -#line 1872 "dtool/src/cppparser/cppBison.yxx" +#line 1845 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 241: +/* Line 1792 of yacc.c */ +#line 1861 "dtool/src/cppparser/cppBison.yxx" + { + CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + if (type != NULL) { + (yyval.u.type) = type; + } else { + CPPExtensionType *et = + CPPType::new_type(new CPPExtensionType((yyvsp[(1) - (2)].u.extension_enum), (yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file)) + ->as_extension_type(); + CPPScope *scope = (yyvsp[(2) - (2)].u.identifier)->get_scope(current_scope, global_scope); + if (scope != NULL) { + scope->define_extension_type(et); + } + (yyval.u.type) = et; + } +} + break; + + case 242: +/* Line 1792 of yacc.c */ +#line 1880 "dtool/src/cppparser/cppBison.yxx" { CPPInstance *inst = new CPPInstance((yyvsp[(1) - (2)].u.type), (yyvsp[(2) - (2)].u.inst_ident), 0, (yylsp[(1) - (2)]).file); (yyval.u.type) = inst->_type; @@ -5751,9 +5769,9 @@ yyreduce: } break; - case 241: + case 243: /* Line 1792 of yacc.c */ -#line 1878 "dtool/src/cppparser/cppBison.yxx" +#line 1886 "dtool/src/cppparser/cppBison.yxx" { (yyvsp[(3) - (3)].u.inst_ident)->add_modifier(IIT_const); CPPInstance *inst = new CPPInstance((yyvsp[(2) - (3)].u.type), (yyvsp[(3) - (3)].u.inst_ident), 0, (yylsp[(1) - (3)]).file); @@ -5762,9 +5780,9 @@ yyreduce: } break; - case 242: + case 244: /* Line 1792 of yacc.c */ -#line 1888 "dtool/src/cppparser/cppBison.yxx" +#line 1896 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5780,9 +5798,9 @@ yyreduce: } break; - case 243: + case 245: /* Line 1792 of yacc.c */ -#line 1902 "dtool/src/cppparser/cppBison.yxx" +#line 1910 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5791,9 +5809,9 @@ yyreduce: } break; - case 244: + case 246: /* Line 1792 of yacc.c */ -#line 1912 "dtool/src/cppparser/cppBison.yxx" +#line 1920 "dtool/src/cppparser/cppBison.yxx" { CPPVisibility starting_vis = ((yyvsp[(1) - (2)].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public; @@ -5815,9 +5833,9 @@ yyreduce: } break; - case 245: + case 247: /* Line 1792 of yacc.c */ -#line 1932 "dtool/src/cppparser/cppBison.yxx" +#line 1940 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.struct_type) = current_struct; current_struct->_incomplete = false; @@ -5826,27 +5844,11 @@ yyreduce: } break; - case 250: -/* Line 1792 of yacc.c */ -#line 1952 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); -} - break; - - case 251: -/* Line 1792 of yacc.c */ -#line 1956 "dtool/src/cppparser/cppBison.yxx" - { - current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); -} - break; - case 252: /* Line 1792 of yacc.c */ #line 1960 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); + current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_public, false); } break; @@ -5854,7 +5856,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1964 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); + current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_protected, false); } break; @@ -5862,7 +5864,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1968 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); + current_struct->append_derivation((yyvsp[(2) - (2)].u.type), V_private, false); } break; @@ -5870,7 +5872,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1972 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } break; @@ -5878,7 +5880,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1976 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } break; @@ -5886,7 +5888,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1980 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } break; @@ -5894,32 +5896,32 @@ yyreduce: /* Line 1792 of yacc.c */ #line 1984 "dtool/src/cppparser/cppBison.yxx" { - current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_public, true); } break; case 259: /* Line 1792 of yacc.c */ -#line 1991 "dtool/src/cppparser/cppBison.yxx" +#line 1988 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.enum_type) = current_enum; - current_enum = NULL; + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_protected, true); } break; case 260: /* Line 1792 of yacc.c */ -#line 1999 "dtool/src/cppparser/cppBison.yxx" +#line 1992 "dtool/src/cppparser/cppBison.yxx" { - current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); + current_struct->append_derivation((yyvsp[(3) - (3)].u.type), V_private, true); } break; case 261: /* Line 1792 of yacc.c */ -#line 2003 "dtool/src/cppparser/cppBison.yxx" +#line 1999 "dtool/src/cppparser/cppBison.yxx" { - current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); + (yyval.u.enum_type) = current_enum; + current_enum = NULL; } break; @@ -5927,7 +5929,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2007 "dtool/src/cppparser/cppBison.yxx" { - current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); + current_enum = new CPPEnumType((yyvsp[(2) - (4)].u.identifier), (yyvsp[(4) - (4)].u.type), current_scope, (yylsp[(1) - (4)]).file); } break; @@ -5935,23 +5937,31 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2011 "dtool/src/cppparser/cppBison.yxx" { - current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); + current_enum = new CPPEnumType((yyvsp[(2) - (2)].u.identifier), current_scope, (yylsp[(1) - (2)]).file); } break; case 264: /* Line 1792 of yacc.c */ -#line 2018 "dtool/src/cppparser/cppBison.yxx" +#line 2015 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); + current_enum = new CPPEnumType(NULL, (yyvsp[(3) - (3)].u.type), current_scope, (yylsp[(1) - (3)]).file); } break; case 265: /* Line 1792 of yacc.c */ -#line 2022 "dtool/src/cppparser/cppBison.yxx" +#line 2019 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); + current_enum = new CPPEnumType(NULL, current_scope, (yylsp[(1) - (1)]).file); +} + break; + + case 266: +/* Line 1792 of yacc.c */ +#line 2026 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.type) = CPPType::new_type((yyvsp[(1) - (1)].u.simple_type)); } break; @@ -5959,15 +5969,23 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2030 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.type) = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); +} + break; + + case 269: +/* Line 1792 of yacc.c */ +#line 2038 "dtool/src/cppparser/cppBison.yxx" + { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (3)].u.identifier)->get_simple_name()); current_scope->add_enum_value(inst, current_lexer, (yylsp[(2) - (3)])); } break; - case 268: + case 270: /* Line 1792 of yacc.c */ -#line 2036 "dtool/src/cppparser/cppBison.yxx" +#line 2044 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (5)].u.identifier)->get_simple_name(), (yyvsp[(4) - (5)].u.expr)); @@ -5975,9 +5993,9 @@ yyreduce: } break; - case 270: + case 272: /* Line 1792 of yacc.c */ -#line 2045 "dtool/src/cppparser/cppBison.yxx" +#line 2053 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (2)].u.identifier)->get_simple_name()); @@ -5985,9 +6003,9 @@ yyreduce: } break; - case 271: + case 273: /* Line 1792 of yacc.c */ -#line 2051 "dtool/src/cppparser/cppBison.yxx" +#line 2059 "dtool/src/cppparser/cppBison.yxx" { assert(current_enum != NULL); CPPInstance *inst = current_enum->add_element((yyvsp[(2) - (4)].u.identifier)->get_simple_name(), (yyvsp[(4) - (4)].u.expr)); @@ -5995,27 +6013,11 @@ yyreduce: } break; - case 272: -/* Line 1792 of yacc.c */ -#line 2060 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.extension_enum) = CPPExtensionType::T_enum; -} - break; - - case 273: -/* Line 1792 of yacc.c */ -#line 2067 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.extension_enum) = CPPExtensionType::T_class; -} - break; - case 274: /* Line 1792 of yacc.c */ -#line 2071 "dtool/src/cppparser/cppBison.yxx" +#line 2068 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.extension_enum) = CPPExtensionType::T_struct; + (yyval.u.extension_enum) = CPPExtensionType::T_enum; } break; @@ -6023,13 +6025,29 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2075 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.extension_enum) = CPPExtensionType::T_union; + (yyval.u.extension_enum) = CPPExtensionType::T_class; } break; case 276: /* Line 1792 of yacc.c */ -#line 2082 "dtool/src/cppparser/cppBison.yxx" +#line 2079 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.extension_enum) = CPPExtensionType::T_struct; +} + break; + + case 277: +/* Line 1792 of yacc.c */ +#line 2083 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.extension_enum) = CPPExtensionType::T_union; +} + break; + + case 278: +/* Line 1792 of yacc.c */ +#line 2090 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(2) - (3)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -6049,17 +6067,17 @@ yyreduce: } break; - case 277: + case 279: /* Line 1792 of yacc.c */ -#line 2100 "dtool/src/cppparser/cppBison.yxx" +#line 2108 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 278: + case 280: /* Line 1792 of yacc.c */ -#line 2104 "dtool/src/cppparser/cppBison.yxx" +#line 2112 "dtool/src/cppparser/cppBison.yxx" { CPPScope *scope = (yyvsp[(3) - (4)].u.identifier)->find_scope(current_scope, global_scope, current_lexer); if (scope == NULL) { @@ -6073,24 +6091,24 @@ yyreduce: } CPPNamespace *nspace = new CPPNamespace((yyvsp[(3) - (4)].u.identifier), scope, (yylsp[(2) - (4)]).file); - nspace->_inline = true; + nspace->_is_inline = true; current_scope->add_declaration(nspace, global_scope, current_lexer, (yylsp[(2) - (4)])); current_scope->define_namespace(nspace); push_scope(scope); } break; - case 279: + case 281: /* Line 1792 of yacc.c */ -#line 2123 "dtool/src/cppparser/cppBison.yxx" +#line 2131 "dtool/src/cppparser/cppBison.yxx" { pop_scope(); } break; - case 282: + case 284: /* Line 1792 of yacc.c */ -#line 2132 "dtool/src/cppparser/cppBison.yxx" +#line 2140 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(2) - (2)].u.identifier), false, (yylsp[(1) - (2)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (2)])); @@ -6098,9 +6116,9 @@ yyreduce: } break; - case 283: + case 285: /* Line 1792 of yacc.c */ -#line 2138 "dtool/src/cppparser/cppBison.yxx" +#line 2146 "dtool/src/cppparser/cppBison.yxx" { CPPUsing *using_decl = new CPPUsing((yyvsp[(3) - (3)].u.identifier), true, (yylsp[(1) - (3)]).file); current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[(1) - (3)])); @@ -6108,27 +6126,11 @@ yyreduce: } break; - case 287: -/* Line 1792 of yacc.c */ -#line 2153 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); -} - break; - - case 288: -/* Line 1792 of yacc.c */ -#line 2157 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); -} - break; - case 289: /* Line 1792 of yacc.c */ #line 2161 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } break; @@ -6136,7 +6138,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2165 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } break; @@ -6144,7 +6146,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2169 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } break; @@ -6152,67 +6154,83 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2173 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, - CPPSimpleType::F_short); + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } break; case 293: /* Line 1792 of yacc.c */ -#line 2178 "dtool/src/cppparser/cppBison.yxx" +#line 2177 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); +} + break; + + case 294: +/* Line 1792 of yacc.c */ +#line 2181 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, + CPPSimpleType::F_short); +} + break; + + case 295: +/* Line 1792 of yacc.c */ +#line 2186 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } break; - case 294: + case 296: /* Line 1792 of yacc.c */ -#line 2183 "dtool/src/cppparser/cppBison.yxx" +#line 2191 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_longlong); } break; - case 295: + case 297: /* Line 1792 of yacc.c */ -#line 2188 "dtool/src/cppparser/cppBison.yxx" +#line 2196 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } break; - case 296: + case 298: /* Line 1792 of yacc.c */ -#line 2193 "dtool/src/cppparser/cppBison.yxx" +#line 2201 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } break; - case 297: + case 299: /* Line 1792 of yacc.c */ -#line 2198 "dtool/src/cppparser/cppBison.yxx" +#line 2206 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } break; - case 298: + case 300: /* Line 1792 of yacc.c */ -#line 2202 "dtool/src/cppparser/cppBison.yxx" +#line 2210 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } break; - case 299: + case 301: /* Line 1792 of yacc.c */ -#line 2207 "dtool/src/cppparser/cppBison.yxx" +#line 2215 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) { @@ -6223,117 +6241,101 @@ yyreduce: } break; - case 300: + case 302: /* Line 1792 of yacc.c */ -#line 2216 "dtool/src/cppparser/cppBison.yxx" +#line 2224 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } break; - case 301: + case 303: /* Line 1792 of yacc.c */ -#line 2221 "dtool/src/cppparser/cppBison.yxx" +#line 2229 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = (yyvsp[(2) - (2)].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } break; - case 302: + case 304: /* Line 1792 of yacc.c */ -#line 2229 "dtool/src/cppparser/cppBison.yxx" +#line 2237 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } break; - case 303: + case 305: /* Line 1792 of yacc.c */ -#line 2233 "dtool/src/cppparser/cppBison.yxx" +#line 2241 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_long); } break; - case 304: + case 306: /* Line 1792 of yacc.c */ -#line 2238 "dtool/src/cppparser/cppBison.yxx" +#line 2246 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } break; - case 305: + case 307: /* Line 1792 of yacc.c */ -#line 2242 "dtool/src/cppparser/cppBison.yxx" +#line 2250 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float, CPPSimpleType::F_longlong); } break; - case 306: + case 308: /* Line 1792 of yacc.c */ -#line 2247 "dtool/src/cppparser/cppBison.yxx" +#line 2255 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, CPPSimpleType::F_long); } break; - case 307: + case 309: /* Line 1792 of yacc.c */ -#line 2255 "dtool/src/cppparser/cppBison.yxx" +#line 2263 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); } break; - case 308: + case 310: /* Line 1792 of yacc.c */ -#line 2264 "dtool/src/cppparser/cppBison.yxx" +#line 2272 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = false; } break; - case 309: + case 311: /* Line 1792 of yacc.c */ -#line 2268 "dtool/src/cppparser/cppBison.yxx" +#line 2276 "dtool/src/cppparser/cppBison.yxx" { current_lexer->_resolve_identifiers = true; } break; - case 404: + case 406: /* Line 1792 of yacc.c */ -#line 2308 "dtool/src/cppparser/cppBison.yxx" +#line 2316 "dtool/src/cppparser/cppBison.yxx" { } break; - case 428: -/* Line 1792 of yacc.c */ -#line 2317 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (CPPExpression *)NULL; -} - break; - - case 429: -/* Line 1792 of yacc.c */ -#line 2321 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); -} - break; - case 430: /* Line 1792 of yacc.c */ -#line 2328 "dtool/src/cppparser/cppBison.yxx" +#line 2325 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (CPPExpression *)NULL; } @@ -6341,7 +6343,7 @@ yyreduce: case 431: /* Line 1792 of yacc.c */ -#line 2332 "dtool/src/cppparser/cppBison.yxx" +#line 2329 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6349,23 +6351,23 @@ yyreduce: case 432: /* Line 1792 of yacc.c */ -#line 2339 "dtool/src/cppparser/cppBison.yxx" +#line 2336 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = (CPPExpression *)NULL; } break; case 433: /* Line 1792 of yacc.c */ -#line 2343 "dtool/src/cppparser/cppBison.yxx" +#line 2340 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 434: /* Line 1792 of yacc.c */ -#line 2350 "dtool/src/cppparser/cppBison.yxx" +#line 2347 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } @@ -6373,9 +6375,9 @@ yyreduce: case 435: /* Line 1792 of yacc.c */ -#line 2354 "dtool/src/cppparser/cppBison.yxx" +#line 2351 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression(',', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6383,7 +6385,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2358 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -6391,7 +6393,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2362 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; @@ -6399,7 +6401,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2366 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; @@ -6407,7 +6409,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2370 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; @@ -6415,7 +6417,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2374 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -6423,7 +6425,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2378 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -6431,7 +6433,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2382 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6439,7 +6441,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2386 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6447,7 +6449,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2390 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6455,7 +6457,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2394 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6463,7 +6465,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2398 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6471,7 +6473,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2402 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6479,7 +6481,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2406 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6487,7 +6489,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2410 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6495,7 +6497,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2414 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6503,7 +6505,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2418 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6511,7 +6513,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2422 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6519,7 +6521,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2426 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6527,7 +6529,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2430 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6535,7 +6537,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2434 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6543,7 +6545,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2438 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6551,7 +6553,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2442 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6559,7 +6561,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2446 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6567,7 +6569,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2450 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6575,7 +6577,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2454 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6583,7 +6585,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2458 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6591,7 +6593,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2462 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6599,7 +6601,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2466 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; @@ -6607,7 +6609,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2470 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -6615,7 +6617,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2474 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -6623,7 +6625,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2478 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; @@ -6631,23 +6633,23 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2482 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 468: /* Line 1792 of yacc.c */ -#line 2490 "dtool/src/cppparser/cppBison.yxx" +#line 2486 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 469: /* Line 1792 of yacc.c */ -#line 2494 "dtool/src/cppparser/cppBison.yxx" +#line 2490 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; @@ -6655,7 +6657,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2498 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -6663,7 +6665,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2502 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; @@ -6671,6 +6673,22 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2506 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 473: +/* Line 1792 of yacc.c */ +#line 2510 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); +} + break; + + case 474: +/* Line 1792 of yacc.c */ +#line 2514 "dtool/src/cppparser/cppBison.yxx" + { // A constructor call. CPPType *type = (yyvsp[(1) - (4)].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); if (type == NULL) { @@ -6681,9 +6699,9 @@ yyreduce: } break; - case 473: + case 475: /* Line 1792 of yacc.c */ -#line 2516 "dtool/src/cppparser/cppBison.yxx" +#line 2524 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); @@ -6691,9 +6709,9 @@ yyreduce: } break; - case 474: + case 476: /* Line 1792 of yacc.c */ -#line 2522 "dtool/src/cppparser/cppBison.yxx" +#line 2530 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); @@ -6701,9 +6719,9 @@ yyreduce: } break; - case 475: + case 477: /* Line 1792 of yacc.c */ -#line 2528 "dtool/src/cppparser/cppBison.yxx" +#line 2536 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); @@ -6711,9 +6729,9 @@ yyreduce: } break; - case 476: + case 478: /* Line 1792 of yacc.c */ -#line 2534 "dtool/src/cppparser/cppBison.yxx" +#line 2542 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); @@ -6721,9 +6739,9 @@ yyreduce: } break; - case 477: + case 479: /* Line 1792 of yacc.c */ -#line 2540 "dtool/src/cppparser/cppBison.yxx" +#line 2548 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); @@ -6731,9 +6749,9 @@ yyreduce: } break; - case 478: + case 480: /* Line 1792 of yacc.c */ -#line 2546 "dtool/src/cppparser/cppBison.yxx" +#line 2554 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); @@ -6741,9 +6759,9 @@ yyreduce: } break; - case 479: + case 481: /* Line 1792 of yacc.c */ -#line 2552 "dtool/src/cppparser/cppBison.yxx" +#line 2560 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6752,9 +6770,9 @@ yyreduce: } break; - case 480: + case 482: /* Line 1792 of yacc.c */ -#line 2559 "dtool/src/cppparser/cppBison.yxx" +#line 2567 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6763,9 +6781,9 @@ yyreduce: } break; - case 481: + case 483: /* Line 1792 of yacc.c */ -#line 2566 "dtool/src/cppparser/cppBison.yxx" +#line 2574 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6774,9 +6792,9 @@ yyreduce: } break; - case 482: + case 484: /* Line 1792 of yacc.c */ -#line 2573 "dtool/src/cppparser/cppBison.yxx" +#line 2581 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, @@ -6785,9 +6803,9 @@ yyreduce: } break; - case 483: + case 485: /* Line 1792 of yacc.c */ -#line 2580 "dtool/src/cppparser/cppBison.yxx" +#line 2588 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); @@ -6795,9 +6813,9 @@ yyreduce: } break; - case 484: + case 486: /* Line 1792 of yacc.c */ -#line 2586 "dtool/src/cppparser/cppBison.yxx" +#line 2594 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); @@ -6805,27 +6823,11 @@ yyreduce: } break; - case 485: -/* Line 1792 of yacc.c */ -#line 2592 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); -} - break; - - case 486: -/* Line 1792 of yacc.c */ -#line 2596 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); -} - break; - case 487: /* Line 1792 of yacc.c */ #line 2600 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -6833,7 +6835,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2604 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -6841,7 +6843,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2608 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; @@ -6849,7 +6851,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2612 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; @@ -6857,7 +6859,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2616 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6865,7 +6867,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2620 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6873,7 +6875,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2624 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6881,7 +6883,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2628 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6889,7 +6891,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2632 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; @@ -6897,7 +6899,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2636 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6905,7 +6907,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2640 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6913,7 +6915,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2644 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6921,7 +6923,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2648 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6929,7 +6931,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2652 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6937,7 +6939,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2656 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6945,7 +6947,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2660 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6953,7 +6955,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2664 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6961,7 +6963,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2668 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6969,7 +6971,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2672 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6977,7 +6979,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2676 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6985,7 +6987,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2680 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -6993,7 +6995,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2684 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7001,7 +7003,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2688 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7009,7 +7011,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2692 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7017,7 +7019,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2696 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7025,7 +7027,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2700 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7033,7 +7035,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2704 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7041,7 +7043,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2708 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; @@ -7049,7 +7051,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2712 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -7057,7 +7059,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2716 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -7065,7 +7067,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2720 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; @@ -7073,23 +7075,23 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2724 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 519: /* Line 1792 of yacc.c */ -#line 2731 "dtool/src/cppparser/cppBison.yxx" +#line 2728 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 520: /* Line 1792 of yacc.c */ -#line 2735 "dtool/src/cppparser/cppBison.yxx" +#line 2732 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(true); + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; @@ -7097,7 +7099,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2739 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(false); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; @@ -7105,7 +7107,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2743 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); + (yyval.u.expr) = new CPPExpression(true); } break; @@ -7113,7 +7115,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2747 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); + (yyval.u.expr) = new CPPExpression(false); } break; @@ -7121,7 +7123,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2751 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; @@ -7129,7 +7131,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2755 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; @@ -7137,7 +7139,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2759 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -7145,23 +7147,23 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2763 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 528: /* Line 1792 of yacc.c */ -#line 2777 "dtool/src/cppparser/cppBison.yxx" +#line 2767 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); } break; case 529: /* Line 1792 of yacc.c */ -#line 2781 "dtool/src/cppparser/cppBison.yxx" +#line 2771 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); } break; @@ -7169,7 +7171,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2785 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -7177,7 +7179,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2789 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(2) - (4)].u.type), (yyvsp[(4) - (4)].u.expr))); } break; @@ -7185,7 +7187,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2793 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; @@ -7193,7 +7195,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2797 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[(3) - (7)].u.type), (yyvsp[(6) - (7)].u.expr))); } break; @@ -7201,7 +7203,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2801 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); + (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -7209,7 +7211,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2805 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); + (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[(3) - (4)].u.type))); } break; @@ -7217,7 +7219,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2809 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (2)].u.type))); } break; @@ -7225,7 +7227,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2813 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[(2) - (5)].u.type), (yyvsp[(4) - (5)].u.expr))); } break; @@ -7233,7 +7235,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2817 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[(2) - (2)].u.expr)); } break; @@ -7241,7 +7243,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2821 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[(2) - (2)].u.expr)); } break; @@ -7249,7 +7251,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2825 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[(2) - (2)].u.expr)); } break; @@ -7257,7 +7259,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2829 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[(2) - (2)].u.expr)); } break; @@ -7265,7 +7267,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2833 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('*', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7273,7 +7275,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2837 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('/', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7281,7 +7283,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2841 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('%', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7289,7 +7291,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2845 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('+', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7297,7 +7299,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2849 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('-', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7305,7 +7307,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2853 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('|', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7313,7 +7315,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2857 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('^', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7321,7 +7323,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2861 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('&', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7329,7 +7331,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2865 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7337,7 +7339,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2869 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7345,7 +7347,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2873 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7353,7 +7355,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2877 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7361,7 +7363,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2881 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7369,7 +7371,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2885 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7377,7 +7379,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2889 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('<', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7385,7 +7387,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2893 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('>', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7393,7 +7395,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2897 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); + (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7401,7 +7403,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2901 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; @@ -7409,7 +7411,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2905 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); + (yyval.u.expr) = new CPPExpression('?', (yyvsp[(1) - (5)].u.expr), (yyvsp[(3) - (5)].u.expr), (yyvsp[(5) - (5)].u.expr)); } break; @@ -7417,7 +7419,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2909 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('[', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -7425,7 +7427,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2913 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (4)].u.expr), (yyvsp[(3) - (4)].u.expr)); } break; @@ -7433,7 +7435,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2917 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); + (yyval.u.expr) = new CPPExpression('f', (yyvsp[(1) - (3)].u.expr)); } break; @@ -7441,23 +7443,23 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2921 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); + (yyval.u.expr) = new CPPExpression('.', (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 565: /* Line 1792 of yacc.c */ -#line 2928 "dtool/src/cppparser/cppBison.yxx" +#line 2925 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); + (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[(1) - (3)].u.expr), (yyvsp[(3) - (3)].u.expr)); } break; case 566: /* Line 1792 of yacc.c */ -#line 2932 "dtool/src/cppparser/cppBison.yxx" +#line 2929 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(true); + (yyval.u.expr) = (yyvsp[(2) - (3)].u.expr); } break; @@ -7465,7 +7467,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2936 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(false); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; @@ -7473,7 +7475,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2940 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); + (yyval.u.expr) = new CPPExpression(true); } break; @@ -7481,7 +7483,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2944 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); + (yyval.u.expr) = new CPPExpression(false); } break; @@ -7489,7 +7491,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2948 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.integer)); } break; @@ -7497,7 +7499,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2952 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.real)); } break; @@ -7505,7 +7507,7 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2956 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; @@ -7513,13 +7515,29 @@ yyreduce: /* Line 1792 of yacc.c */ #line 2960 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); } break; case 574: /* Line 1792 of yacc.c */ -#line 2967 "dtool/src/cppparser/cppBison.yxx" +#line 2964 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].u.identifier), current_scope, global_scope, current_lexer); +} + break; + + case 575: +/* Line 1792 of yacc.c */ +#line 2968 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); +} + break; + + case 576: +/* Line 1792 of yacc.c */ +#line 2975 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(1) - (1)].u.identifier)->find_type(current_scope, global_scope, true); if (type == NULL) { @@ -7529,9 +7547,9 @@ yyreduce: } break; - case 575: + case 577: /* Line 1792 of yacc.c */ -#line 2975 "dtool/src/cppparser/cppBison.yxx" +#line 2983 "dtool/src/cppparser/cppBison.yxx" { CPPType *type = (yyvsp[(2) - (2)].u.identifier)->find_type(current_scope, global_scope, true, current_lexer); if (type == NULL) { @@ -7541,43 +7559,27 @@ yyreduce: } break; - case 576: + case 578: /* Line 1792 of yacc.c */ -#line 2983 "dtool/src/cppparser/cppBison.yxx" +#line 2991 "dtool/src/cppparser/cppBison.yxx" { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[(2) - (2)].u.identifier))); } break; - case 577: -/* Line 1792 of yacc.c */ -#line 3009 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - - case 578: -/* Line 1792 of yacc.c */ -#line 3013 "dtool/src/cppparser/cppBison.yxx" - { - (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); -} - break; - case 579: /* Line 1792 of yacc.c */ -#line 3020 "dtool/src/cppparser/cppBison.yxx" +#line 3017 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; case 580: /* Line 1792 of yacc.c */ -#line 3024 "dtool/src/cppparser/cppBison.yxx" +#line 3021 "dtool/src/cppparser/cppBison.yxx" { - (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); + (yyval.u.identifier) = (yyvsp[(1) - (1)].u.identifier); } break; @@ -7585,15 +7587,31 @@ yyreduce: /* Line 1792 of yacc.c */ #line 3028 "dtool/src/cppparser/cppBison.yxx" { + (yyval.u.expr) = new CPPExpression((yyvsp[(1) - (1)].str)); +} + break; + + case 582: +/* Line 1792 of yacc.c */ +#line 3032 "dtool/src/cppparser/cppBison.yxx" + { + (yyval.u.expr) = (yyvsp[(1) - (1)].u.expr); +} + break; + + case 583: +/* Line 1792 of yacc.c */ +#line 3036 "dtool/src/cppparser/cppBison.yxx" + { // The right string takes on the literal type of the left. (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); (yyval.u.expr)->_str += (yyvsp[(2) - (2)].str); } break; - case 582: + case 584: /* Line 1792 of yacc.c */ -#line 3034 "dtool/src/cppparser/cppBison.yxx" +#line 3042 "dtool/src/cppparser/cppBison.yxx" { // We have to check that the two literal types match up. (yyval.u.expr) = (yyvsp[(1) - (2)].u.expr); @@ -7606,7 +7624,7 @@ yyreduce: /* Line 1792 of yacc.c */ -#line 7610 "built/tmp/cppBison.yxx.c" +#line 7628 "built/tmp/cppBison.yxx.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 0cca93bef7..d98f4f71e8 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -1723,6 +1723,10 @@ type: str << *$3; yyerror("could not determine type of " + str.str(), @3); } +} + | KW_AUTO +{ + $$ = new CPPSimpleType(CPPSimpleType::T_auto); } ; @@ -1813,6 +1817,10 @@ type_decl: str << *$3; yyerror("could not determine type of " + str.str(), @3); } +} + | KW_AUTO +{ + $$ = new CPPSimpleType(CPPSimpleType::T_auto); } ; @@ -2114,7 +2122,7 @@ namespace_declaration: } CPPNamespace *nspace = new CPPNamespace($3, scope, @2.file); - nspace->_inline = true; + nspace->_is_inline = true; current_scope->add_declaration(nspace, global_scope, current_lexer, @2); current_scope->define_namespace(nspace); push_scope(scope); diff --git a/dtool/src/cppparser/cppIdentifier.cxx b/dtool/src/cppparser/cppIdentifier.cxx index f3c5985ed9..678bea56b8 100644 --- a/dtool/src/cppparser/cppIdentifier.cxx +++ b/dtool/src/cppparser/cppIdentifier.cxx @@ -189,7 +189,7 @@ get_local_name(CPPScope *scope) const { // Strip off template scopes, since they don't add anything // particularly meaningful to the local name. - while (my_scope->as_template_scope() != NULL) { + while (my_scope != NULL && my_scope->as_template_scope() != NULL) { my_scope = my_scope->get_parent_scope(); } diff --git a/dtool/src/cppparser/cppNamespace.cxx b/dtool/src/cppparser/cppNamespace.cxx index dc7871d8ea..ca91a86b63 100644 --- a/dtool/src/cppparser/cppNamespace.cxx +++ b/dtool/src/cppparser/cppNamespace.cxx @@ -28,7 +28,7 @@ CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) : CPPDeclaration(file), _ident(ident), _scope(scope), - _inline(false) + _is_inline(false) { } @@ -88,7 +88,7 @@ get_scope() const { //////////////////////////////////////////////////////////////////// void CPPNamespace:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { - if (_inline) { + if (_is_inline) { out << "inline "; } if (!complete && _ident != NULL) { diff --git a/dtool/src/cppparser/cppNamespace.h b/dtool/src/cppparser/cppNamespace.h index 9791194419..16a6f3d304 100644 --- a/dtool/src/cppparser/cppNamespace.h +++ b/dtool/src/cppparser/cppNamespace.h @@ -42,7 +42,9 @@ public: virtual CPPNamespace *as_namespace(); - bool _inline; + // We can't call this _inline since that would clash with an MSVC + // built-in keyword declaration. + bool _is_inline; private: CPPIdentifier *_ident; diff --git a/dtool/src/cppparser/cppParser.cxx b/dtool/src/cppparser/cppParser.cxx index 443bbf9e0e..d47a0db5ca 100644 --- a/dtool/src/cppparser/cppParser.cxx +++ b/dtool/src/cppparser/cppParser.cxx @@ -72,7 +72,8 @@ parse_file(const Filename &filename) { //////////////////////////////////////////////////////////////////// CPPExpression *CPPParser:: parse_expr(const string &expr) { - return CPPPreprocessor::parse_expr(expr, this, this); + YYLTYPE loc = {}; + return CPPPreprocessor::parse_expr(expr, this, this, loc); } //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 4def9695ae..a13fad4c11 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -774,6 +774,7 @@ push_file(const CPPFile &file) { indent(cerr, _files.size() * 2) << "Reading " << file << "\n"; } + assert(_last_c == 0); _files.push_back(InputFile()); InputFile &infile = _files.back(); @@ -841,7 +842,8 @@ push_string(const string &input, bool lock_position) { // string and return the new string. //////////////////////////////////////////////////////////////////// string CPPPreprocessor:: -expand_manifests(const string &input_expr, bool expand_undefined) { +expand_manifests(const string &input_expr, bool expand_undefined, + const YYLTYPE &loc) { // Get a copy of the expression string we can modify. string expr = input_expr; @@ -872,11 +874,28 @@ expand_manifests(const string &input_expr, bool expand_undefined) { manifest_found = true; } else if (expand_undefined && ident != "true" && ident != "false") { - // It is not found. Expand it to 0. + // It is not found. Expand it to 0, but only if we are currently + // parsing an #if expression. expr = expr.substr(0, q) + "0" + expr.substr(p); p = q + 1; } } + } else if (expr[p] == '\'' || expr[p] == '"') { + // Skip the next part until we find a closing quotation mark. + char quote = expr[p]; + p++; + while (p < expr.size() && expr[p] != quote) { + if (expr[p] == '\\') { + // This might be an escaped quote. Skip an extra char. + p++; + } + p++; + } + if (p >= expr.size()) { + // Unclosed string. + warning("missing terminating " + string(1, quote) + " character", loc); + } + p++; } else { p++; } @@ -903,8 +922,8 @@ expand_manifests(const string &input_expr, bool expand_undefined) { //////////////////////////////////////////////////////////////////// CPPExpression *CPPPreprocessor:: parse_expr(const string &input_expr, CPPScope *current_scope, - CPPScope *global_scope) { - string expr = expand_manifests(input_expr, false); + CPPScope *global_scope, const YYLTYPE &loc) { + string expr = expand_manifests(input_expr, false, loc); CPPExpressionParser ep(current_scope, global_scope); ep._verbose = 0; @@ -1475,7 +1494,7 @@ handle_define_directive(const string &args, const YYLTYPE &loc) { if (!manifest->_has_parameters) { string expr_string = manifest->expand(); if (!expr_string.empty()) { - manifest->_expr = parse_expr(expr_string, global_scope, global_scope); + manifest->_expr = parse_expr(expr_string, global_scope, global_scope, loc); } } @@ -1554,7 +1573,7 @@ void CPPPreprocessor:: handle_if_directive(const string &args, const YYLTYPE &loc) { // When expanding manifests, we should replace unknown macros // with 0. - string expr = expand_manifests(args, true); + string expr = expand_manifests(args, true, loc); int expression_result = 0; CPPExpressionParser ep(current_scope, global_scope); @@ -1602,7 +1621,7 @@ handle_include_directive(const string &args, const YYLTYPE &loc) { // might not filter out quotes and angle brackets properly, we'll // only expand manifests if we don't begin with a quote or bracket. if (!expr.empty() && (expr[0] != '"' && expr[0] != '<')) { - expr = expand_manifests(expr, false); + expr = expand_manifests(expr, false, loc); } if (!expr.empty()) { @@ -2727,14 +2746,11 @@ get() { indent(cerr, _files.size() * 2) << "End of input stream, restoring to previous input\n"; #endif - int last_c = _files.back()._prev_last_c; _files.pop_back(); - if (last_c != '\0') { - c = last_c; - } else if (!_files.empty()) { - c = _files.back().get(); - } + // Synthesize a newline, just in case the file doesn't already + // end with one. + c = '\n'; } if (c == '\n') { diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 6e9ef54f7d..189de37650 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -111,9 +111,10 @@ protected: bool push_file(const CPPFile &file); bool push_string(const string &input, bool lock_position); - string expand_manifests(const string &input_expr, bool expand_undefined); + string expand_manifests(const string &input_expr, bool expand_undefined, + const YYLTYPE &loc); CPPExpression *parse_expr(const string &expr, CPPScope *current_scope, - CPPScope *global_scope); + CPPScope *global_scope, const YYLTYPE &loc); private: CPPToken internal_get_next_token(); diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index ded976708d..4118668ed4 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -297,7 +297,7 @@ define_namespace(CPPNamespace *ns) { _namespaces[name] = ns; - if (ns->_inline) { + if (ns->_is_inline) { // Add an implicit using declaration for an inline namespace. _using.insert(ns->get_scope()); } diff --git a/dtool/src/cppparser/cppSimpleType.cxx b/dtool/src/cppparser/cppSimpleType.cxx index d104c98881..a6e4db1a59 100644 --- a/dtool/src/cppparser/cppSimpleType.cxx +++ b/dtool/src/cppparser/cppSimpleType.cxx @@ -158,6 +158,10 @@ output(ostream &out, int, CPPScope *, bool) const { out << "parameter"; break; + case T_auto: + out << "auto"; + break; + default: out << "***invalid type***"; } diff --git a/dtool/src/cppparser/cppSimpleType.h b/dtool/src/cppparser/cppSimpleType.h index eceb8afe26..9acfdafbd9 100644 --- a/dtool/src/cppparser/cppSimpleType.h +++ b/dtool/src/cppparser/cppSimpleType.h @@ -55,6 +55,13 @@ public: // but it initially looks like a function prototype. // T_parameter, + + // T_auto is also a special type that corresponds to the "auto" + // keyword used in a variable assignment. The type of it is + // automatically determined at a later stage based on the type + // of the expression that is assigned to it. + // + T_auto, }; enum Flags { From ebd1fd846241fc3d80d42722cdbbf25ca1269072 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 17 Oct 2015 03:27:38 +0200 Subject: [PATCH 171/200] Fix interrogate warnings on Windows. Show warnings when running makepanda in verbose mode. --- dtool/src/parser-inc/NxPhysics.h | 16 ++++++++---- dtool/src/parser-inc/io.h | 0 dtool/src/parser-inc/minmax.h | 0 dtool/src/parser-inc/ode.h | 3 +-- dtool/src/parser-inc/process.h | 0 dtool/src/parser-inc/sys/malloc.h | 0 dtool/src/parser-inc/sys/timeb.h | 0 dtool/src/parser-inc/windows.h | 36 +++++++++++++++++++------- dtool/src/parser-inc/winsock.h | 3 +++ dtool/src/parser-inc/winsock2.h | 4 ++- dtool/src/parser-inc/wtypes.h | 28 ++++++++++++++++++++ makepanda/makepanda.py | 3 +++ panda/src/net/connectionManager.cxx | 5 ++-- panda/src/pipeline/threadDummyImpl.cxx | 4 ++- panda/src/putil/pbitops.h | 2 +- 15 files changed, 82 insertions(+), 22 deletions(-) create mode 100644 dtool/src/parser-inc/io.h create mode 100644 dtool/src/parser-inc/minmax.h create mode 100644 dtool/src/parser-inc/process.h create mode 100644 dtool/src/parser-inc/sys/malloc.h create mode 100644 dtool/src/parser-inc/sys/timeb.h create mode 100644 dtool/src/parser-inc/winsock.h create mode 100644 dtool/src/parser-inc/wtypes.h diff --git a/dtool/src/parser-inc/NxPhysics.h b/dtool/src/parser-inc/NxPhysics.h index e424507953..ab7c06c5a6 100644 --- a/dtool/src/parser-inc/NxPhysics.h +++ b/dtool/src/parser-inc/NxPhysics.h @@ -32,6 +32,7 @@ class NxCapsuleForceFieldShapeDesc; class NxCapsuleShape; class NxCapsuleShapeDesc; class NxCCDSkeleton; +class NxContactStreamIterator; class NxConvexMesh; class NxConvexMeshDesc; class NxConvexForceFieldShape; @@ -121,11 +122,16 @@ class NxSoftBodyDesc; class NxSoftBodyMesh; class NxSoftBodyMeshDesc; -enum NxSDKCreateError; -enum NxAssertResponse; -enum NxErrorCode; -enum NxTriggerFlag; -enum NxHeightFieldAxis; +enum NxAssertResponse { + NX_AR_CONTINUE, + NX_AR_IGNORE, + NX_AR_BREAKPOINT +}; + +enum NxControllerType { + NX_CONTROLLER_CAPSULE, + NX_CONTROLLER_FORCE_DWORD = 0x7fffffff +}; template class NxUserEntityReport; diff --git a/dtool/src/parser-inc/io.h b/dtool/src/parser-inc/io.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/minmax.h b/dtool/src/parser-inc/minmax.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/ode.h b/dtool/src/parser-inc/ode.h index 6f9d0a0f6a..c34e687a92 100644 --- a/dtool/src/parser-inc/ode.h +++ b/dtool/src/parser-inc/ode.h @@ -19,8 +19,7 @@ #ifndef _ODE_CONFIG_H_ #define _ODE_CONFIG_H_ -#define dSINGLE 1 -#define ODE_PLATFORM_WINDOWS +#define ODE_PLATFORM_WINDOWS #if !defined(ODE_API) #define ODE_API diff --git a/dtool/src/parser-inc/process.h b/dtool/src/parser-inc/process.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/sys/malloc.h b/dtool/src/parser-inc/sys/malloc.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/sys/timeb.h b/dtool/src/parser-inc/sys/timeb.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dtool/src/parser-inc/windows.h b/dtool/src/parser-inc/windows.h index 22f9f2ffb7..bee8a5c25a 100644 --- a/dtool/src/parser-inc/windows.h +++ b/dtool/src/parser-inc/windows.h @@ -20,23 +20,43 @@ #ifndef WINDOWS_H #define WINDOWS_H +#include + +#ifdef _WIN64 +typedef int HALF_PTR; +typedef long long INT_PTR; +typedef long long LONG_PTR; +typedef unsigned long long UINT_PTR; +typedef unsigned long long ULONG_PTR; +#else +typedef short HALF_PTR; +typedef int INT_PTR; +typedef long LONG_PTR; +typedef unsigned int UINT_PTR; +typedef unsigned long ULONG_PTR; +#endif + // http://msdn.microsoft.com/en-us/library/cc230309.aspx typedef bool BOOL; -typedef long DWORD; +typedef unsigned long DWORD; typedef long LONG; typedef long UINT; typedef unsigned long ULONG; -typedef signed long long LONGLONG; +typedef long long LONGLONG; typedef long HRESULT; typedef int CRITICAL_SECTION; -typedef int HANDLE; -typedef int HGLOBAL; -typedef int HWAVEIN; typedef void *LPSTR; typedef void *LPWAVEHDR; +typedef void *PVOID; typedef void *LPVOID; +typedef PVOID HANDLE; +typedef HANDLE HGLOBAL; +typedef HANDLE HWAVEIN; +typedef HANDLE HWND; typedef void *DWORD_PTR; -typedef unsigned short WCHAR; +typedef UINT_PTR WPARAM; +typedef LONG_PTR LPARAM; +typedef wchar_t WCHAR; typedef WCHAR *BSTR; typedef struct _MediaType AM_MEDIA_TYPE; typedef struct _VIDEO_STREAM_CONFIG_CAPS VIDEO_STREAM_CONFIG_CAPS; @@ -49,10 +69,6 @@ typedef struct _FILTERKEYS FILTERKEYS; #define WINAPI -union LARGE_INTEGER { - long long QuadPart; -}; - class IGraphBuilder; class ICaptureGraphBuilder2; class IBaseFilter; diff --git a/dtool/src/parser-inc/winsock.h b/dtool/src/parser-inc/winsock.h new file mode 100644 index 0000000000..50e185473b --- /dev/null +++ b/dtool/src/parser-inc/winsock.h @@ -0,0 +1,3 @@ +#pragma once + +struct timeval; diff --git a/dtool/src/parser-inc/winsock2.h b/dtool/src/parser-inc/winsock2.h index 3033be48f2..c63bef39b2 100644 --- a/dtool/src/parser-inc/winsock2.h +++ b/dtool/src/parser-inc/winsock2.h @@ -2,7 +2,9 @@ #define _WINSOCK2API_ #define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ -typedef int SOCKET; +#include + +typedef unsigned long SOCKET; struct sockaddr_in; diff --git a/dtool/src/parser-inc/wtypes.h b/dtool/src/parser-inc/wtypes.h new file mode 100644 index 0000000000..68b1379197 --- /dev/null +++ b/dtool/src/parser-inc/wtypes.h @@ -0,0 +1,28 @@ +#pragma once + +#ifndef _WINDEF_ +typedef void *PVOID; +typedef void *LPVOID; +typedef float FLOAT; +typedef struct tagRECT RECT; +typedef struct tagRECT *PRECT; +typedef struct tagRECT *LPRECT; +#endif + +typedef unsigned char UCHAR; +typedef short SHORT; +typedef unsigned short USHORT; +typedef unsigned long ULONG; +typedef double DOUBLE; + +typedef unsigned long long DWORDLONG; +typedef DWORDLONG *PDWORDLONG; + +typedef long long LONGLONG; +typedef unsigned long long ULONGLONG; +typedef LONGLONG *PLONGLONG; +typedef ULONGLONG *PULONGLONG; + +typedef struct _LARGE_INTEGER LARGE_INTEGER; +typedef struct _LARGE_INTEGER *PLARGE_INTEGER; +typedef struct _ULARGE_INTEGER ULARGE_INTEGER; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 145664851d..825e9042e3 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1351,6 +1351,9 @@ def CompileIgate(woutd,wsrc,opts): # Assume that interrogate is on the PATH somewhere. cmd = 'interrogate' + if GetVerbose(): + cmd += ' -v' + cmd += ' -srcdir %s -I%s' % (srcdir, srcdir) cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus=201103L' if (COMPILER=="MSVC"): diff --git a/panda/src/net/connectionManager.cxx b/panda/src/net/connectionManager.cxx index 146e77f39b..a8e5405f9a 100644 --- a/panda/src/net/connectionManager.cxx +++ b/panda/src/net/connectionManager.cxx @@ -23,12 +23,13 @@ #include "lightMutexHolder.h" #include "trueClock.h" -#if defined(WIN32_VC) || defined(WIN64_VC) +#if defined(CPPPARSER) +#elif defined(WIN32_VC) || defined(WIN64_VC) #include // For gethostname() #include // For GetAdaptersAddresses() #elif defined(ANDROID) #include -#elif !defined(CPPPARSER) +#else #include #include #endif diff --git a/panda/src/pipeline/threadDummyImpl.cxx b/panda/src/pipeline/threadDummyImpl.cxx index 3a402a1bf0..3cd2b2a811 100644 --- a/panda/src/pipeline/threadDummyImpl.cxx +++ b/panda/src/pipeline/threadDummyImpl.cxx @@ -19,8 +19,10 @@ #include "threadDummyImpl.h" #include "thread.h" -#ifdef WIN32 +#ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 +#endif #include #endif diff --git a/panda/src/putil/pbitops.h b/panda/src/putil/pbitops.h index 5d5b00c580..b8d832481a 100644 --- a/panda/src/putil/pbitops.h +++ b/panda/src/putil/pbitops.h @@ -18,7 +18,7 @@ #include "pandabase.h" #include "numeric_types.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(CPPPARSER) #include #endif From aca077916d6bfb09992e87da540a84fdd549b2e8 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 17 Oct 2015 12:11:11 +0200 Subject: [PATCH 172/200] Add flag enabling vertex shader control over point size --- .../src/glstuff/glGraphicsStateGuardian_src.cxx | 17 +++++++++++++++++ panda/src/glstuff/glGraphicsStateGuardian_src.h | 4 ++++ panda/src/pgraph/shaderAttrib.h | 1 + 3 files changed, 22 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 0a1dc16a0b..d24272383c 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -374,6 +374,10 @@ CLP(GraphicsStateGuardian)(GraphicsEngine *engine, GraphicsPipe *pipe) : _white_texture = 0; +#ifndef OPENGLES + _shader_point_size = false; +#endif + #ifdef HAVE_CG _cg_context = 0; #endif @@ -6016,6 +6020,19 @@ do_issue_shader() { } } +#ifndef OPENGLES + // Is the point size provided by the shader or by OpenGL? + bool shader_point_size = _target_shader->get_flag(ShaderAttrib::F_shader_point_size); + if (shader_point_size != _shader_point_size) { + if (shader_point_size) { + glEnable(GL_PROGRAM_POINT_SIZE); + } else { + glDisable(GL_PROGRAM_POINT_SIZE); + } + _shader_point_size = shader_point_size; + } +#endif + report_my_gl_errors(); } #endif // !OPENGLES_1 diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 43ba33bdfd..fcfe13c56a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -608,6 +608,10 @@ protected: ShaderContext *_texture_binding_shader_context; static PT(Shader) _default_shader; + +#ifndef OPENGLES + bool _shader_point_size; +#endif #endif #ifdef HAVE_CG diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index fd6b26dffc..5e92b71011 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -49,6 +49,7 @@ PUBLISHED: F_disable_alpha_write = 0, // Suppress writes to color buffer alpha channel. F_subsume_alpha_test = 1, // Shader promises to subsume the alpha test using TEXKILL F_hardware_skinning = 2, // Shader needs pre-animated vertices + F_shader_point_size = 3, // Shader provides point size, not RenderModeAttrib }; INLINE bool has_shader() const; From 4ebbe0748db6aed2f496f2789dd47a32ca5590a1 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 17 Oct 2015 14:25:37 +0200 Subject: [PATCH 173/200] Add -nomangle flag to interrogate do disable mangled aliases of function names --- dtool/src/interrogate/interrogate.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dtool/src/interrogate/interrogate.cxx b/dtool/src/interrogate/interrogate.cxx index 232f293a9b..515b149437 100644 --- a/dtool/src/interrogate/interrogate.cxx +++ b/dtool/src/interrogate/interrogate.cxx @@ -79,6 +79,7 @@ enum CommandOptions { CO_promiscuous, CO_spam, CO_noangles, + CO_nomangle, CO_help, }; @@ -106,6 +107,7 @@ static struct option long_options[] = { { "promiscuous", no_argument, NULL, CO_promiscuous }, { "spam", no_argument, NULL, CO_spam }, { "noangles", no_argument, NULL, CO_noangles }, + { "nomangle", no_argument, NULL, CO_nomangle }, { "help", no_argument, NULL, CO_help }, { NULL } }; @@ -284,7 +286,10 @@ void show_help() { << " -noangles\n" << " Treat #include the same as #include \"file\". This means -I\n" - << " and -S are equivalent.\n\n"; + << " and -S are equivalent.\n\n" + + << " -nomangle\n" + << " Do not generate camelCase equivalents of functions.\n\n"; } // handle commandline -D options @@ -446,6 +451,10 @@ main(int argc, char **argv) { parser._noangles = true; break; + case CO_nomangle: + mangle_names = false; + break; + case 'h': case CO_help: show_help(); From 668e60e386543600ea02781875e03031a8e2720e Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 22 Oct 2015 18:53:53 +0200 Subject: [PATCH 174/200] Update README.md --- README.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 615074193e..42ad27f53f 100644 --- a/README.md +++ b/README.md @@ -81,14 +81,18 @@ sudo apt-get install build-essential pkg-config python-dev libpng-dev libjpeg-de ``` Once Panda3D has built, you can either install the .deb or .rpm package that -it produced (if relevant to your platform, and you added --installer). On -other systems, you will need to use the installpanda script to install it onto -your system. Careful: it is not easy to uninstall Panda3D in this way! +it produced, depending on which Linux distribution you are using. For example, +to install the package on Debian or Ubuntu, use this: ```bash -python2.7 makepanda/installpanda.py --prefix=/usr/local +sudo dpkg -i panda3d*.deb ``` +If you are not using a Linux distribution that supports .deb or .rpm packages, you +may have to use the installpanda.py script instead, which will directly copy the +files into the appropriate locations on your computer. You may have to run the +`ldconfig` tool in order to update your library cache after installing Panda3D. + Mac OS X -------- @@ -110,3 +114,20 @@ by the release number, eg. 10.6 or 10.7. If the build was successful, makepanda will have generated a .dmg file in the source directory containing the installer. Simply open it and run the package file in order to install the SDK onto your system. + +Reporting Issues +================ + +If you encounter any bugs when using Panda3D, please report them in the bug +tracker. This is hosted at: + + https://bugs.launchpad.net/panda3d + +Make sure to first use the search function to see if the bug has already been +reported. When filling out a bug report, make sure that you include as much +information as possible to help the developers track down the issue, such as +your version of Panda3D, operating system, architecture, and any code and +models that are necessary for the developers to reproduce the issue. + +If you're not sure whether you've encountered a bug, feel free to ask about +it in the forums or the IRC channel first. From 6714de8090e42d6cfd77f3442d77372308ebcb2a Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 22 Oct 2015 23:06:18 +0200 Subject: [PATCH 175/200] Allow passing a unicode object to write() in Python 2 --- direct/src/stdpy/file.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index f7125a3920..27257ad890 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -185,6 +185,13 @@ class StreamIOWrapper(io.IOBase): if isinstance(stream, core.Ostream): self.__writer = core.StreamWriter(stream, False) self.__lastWrite = True + if sys.version_info >= (3, 0): + # In Python 3, we use appendData, which only accepts bytes. + self.__write = self.__writer.appendData + else: + # In Python 2.7, we also accept unicode objects, which are + # implicitly converted to C++ strings. + self.__write = self.__writer.write def __repr__(self): s = " Date: Fri, 23 Oct 2015 16:18:59 +0200 Subject: [PATCH 176/200] Add config var to toggle between incorrect/correct normal generation for GeoMipTerrain --- panda/src/grutil/geoMipTerrain.cxx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/panda/src/grutil/geoMipTerrain.cxx b/panda/src/grutil/geoMipTerrain.cxx index c236564172..1015e13d8e 100644 --- a/panda/src/grutil/geoMipTerrain.cxx +++ b/panda/src/grutil/geoMipTerrain.cxx @@ -30,6 +30,14 @@ #include "collideMask.h" +static ConfigVariableBool geomipterrain_incorrect_normals +("geomipterrain-incorrect-normals", true, + PRC_DESC("If true, uses the incorrect normal vector calculation that " + "was used in Panda3D versions 1.9.0 and earlier. If false, " + "uses the correct calculation. For backward compatibility, " + "the default value is true in 1.9 releases, and false in " + "Panda3D 1.10.0 and above.")); + TypeHandle GeoMipTerrain::_type_handle; //////////////////////////////////////////////////////////////////// @@ -123,12 +131,12 @@ generate_block(unsigned short mx, LVecBase4f color = _color_map.get_xel_a( int((mx * _block_size + x) * cmap_xratio), int((my * _block_size + y) * cmap_yratio)); - cwriter.add_data4f(color); + cwriter.set_data4f(color); } - vwriter.add_data3(x - 0.5 * _block_size, y - 0.5 * _block_size, get_pixel_value(mx, my, x, y)); - twriter.add_data2((mx * _block_size + x) * tc_xscale, + vwriter.set_data3(x - 0.5 * _block_size, y - 0.5 * _block_size, get_pixel_value(mx, my, x, y)); + twriter.set_data2((mx * _block_size + x) * tc_xscale, (my * _block_size + y) * tc_yscale); - nwriter.add_data3(get_normal(mx, my, x, y)); + nwriter.set_data3(get_normal(mx, my, x, y)); if (x > 0 && y > 0) { // Left border @@ -328,11 +336,15 @@ get_normal(int x, int y) { if (ny < 0) ny++; if (px >= int(_xsize)) px--; if (py >= int(_ysize)) py--; - double drx = get_pixel_value(px, y) - get_pixel_value(nx, y); + double drx = get_pixel_value(nx, y) - get_pixel_value(px, y); double dry = get_pixel_value(x, py) - get_pixel_value(x, ny); LVector3 normal(drx * 0.5, dry * 0.5, 1); normal.normalize(); + if (geomipterrain_incorrect_normals) { + normal[0] = -normal[0]; + } + return normal; } From e48b910382ba1a796e58d683848a4ef666104ce2 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 27 Oct 2015 13:00:29 +0100 Subject: [PATCH 177/200] Don't umount all filesystems when ShowBase is destroyed --- direct/src/showbase/ShowBase.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index e6c0f623e4..6c6c68d4a8 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -533,9 +533,6 @@ class ShowBase(DirectObject.DirectObject): del self.winList del self.pipe - vfs = VirtualFileSystem.getGlobalPtr() - vfs.unmountAll() - def makeDefaultPipe(self, printPipeTypes = True): """ Creates the default GraphicsPipe, which will be used to make From bac5401a9d2bb5977f7f8cfedb6dfdc187ef5255 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 28 Oct 2015 13:18:12 +0100 Subject: [PATCH 178/200] Add GL function pointers for indirect draw --- panda/src/display/graphicsStateGuardian.I | 12 ++++++++++++ panda/src/display/graphicsStateGuardian.cxx | 1 + panda/src/display/graphicsStateGuardian.h | 2 ++ .../glstuff/glGraphicsStateGuardian_src.cxx | 18 ++++++++++++++++++ .../src/glstuff/glGraphicsStateGuardian_src.h | 5 +++++ 5 files changed, 38 insertions(+) diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 1646f4a741..8a3a5b6f5b 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -808,6 +808,18 @@ get_supports_geometry_instancing() const { return _supports_geometry_instancing; } +//////////////////////////////////////////////////////////////////// +// Function: GraphicsStateGuardian::get_supports_indirect_draw +// Access: Published +// Description: Returns true if this particular GSG supports +// draw calls for which the information comes from a +// buffer. +//////////////////////////////////////////////////////////////////// +INLINE bool GraphicsStateGuardian:: +get_supports_indirect_draw() const { + return _supports_indirect_draw; +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::get_supports_occlusion_query // Access: Published diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index b804613d9e..c55b988125 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -245,6 +245,7 @@ GraphicsStateGuardian(CoordinateSystem internal_coordinate_system, _supports_stencil_wrap = false; _supports_two_sided_stencil = false; _supports_geometry_instancing = false; + _supports_indirect_draw = false; // Assume a maximum of 1 render target in absence of MRT. _max_color_targets = 1; diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index b657d867e9..50ef6f0f2d 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -160,6 +160,7 @@ PUBLISHED: INLINE bool get_supports_stencil() const; INLINE bool get_supports_two_sided_stencil() const; INLINE bool get_supports_geometry_instancing() const; + INLINE bool get_supports_indirect_draw() const; INLINE bool get_supports_occlusion_query() const; INLINE bool get_supports_timer_query() const; @@ -538,6 +539,7 @@ protected: bool _supports_stencil_wrap; bool _supports_two_sided_stencil; bool _supports_geometry_instancing; + bool _supports_indirect_draw; int _max_color_targets; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index d24272383c..614dbec469 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -1757,6 +1757,24 @@ reset() { } #endif + // Check if we support indirect draw. + _supports_indirect_draw = false; +#ifndef OPENGLES + if (is_at_least_gl_version(4, 0) || has_extension("GL_ARB_draw_indirect")) { + _glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC) + get_extension_func("glDrawArraysIndirect"); + _glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC) + get_extension_func("glDrawElementsIndirect"); + + if (_glDrawArraysIndirect == NULL || _glDrawElementsIndirect == NULL) { + GLCAT.warning() + << "Indirect draw advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n"; + } else { + _supports_indirect_draw = true; + } + } +#endif + #ifdef OPENGLES_2 // In OpenGL ES 2.x, FBO's are supported in the core. _supports_framebuffer_object = true; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index fcfe13c56a..62df6fe84c 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -763,6 +763,11 @@ public: PFNGLDELETEVERTEXARRAYSPROC _glDeleteVertexArrays; PFNGLGENVERTEXARRAYSPROC _glGenVertexArrays; +#ifndef OPENGLES + PFNGLDRAWARRAYSINDIRECTPROC _glDrawArraysIndirect; + PFNGLDRAWELEMENTSINDIRECTPROC _glDrawElementsIndirect; +#endif + bool _supports_framebuffer_object; PFNGLISRENDERBUFFEREXTPROC _glIsRenderbuffer; PFNGLBINDRENDERBUFFEREXTPROC _glBindRenderbuffer; From fe633b51a127e0947efc8a1ec1d3402d09362d01 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 28 Oct 2015 15:55:59 +0100 Subject: [PATCH 179/200] Remove unnecessary cg.h include --- panda/src/glstuff/glCgShaderContext_src.cxx | 3 ++- panda/src/glstuff/glCgShaderContext_src.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index 4afda4b921..10a6bc3119 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -16,7 +16,8 @@ #if defined(HAVE_CG) && !defined(OPENGLES) -#include "Cg/cgGL.h" +#include +#include #include "pStatGPUTimer.h" diff --git a/panda/src/glstuff/glCgShaderContext_src.h b/panda/src/glstuff/glCgShaderContext_src.h index 16dd9bcdb2..6d4a74c795 100644 --- a/panda/src/glstuff/glCgShaderContext_src.h +++ b/panda/src/glstuff/glCgShaderContext_src.h @@ -21,8 +21,6 @@ #include "shaderContext.h" #include "deletedChain.h" -#include - class CLP(GraphicsStateGuardian); //////////////////////////////////////////////////////////////////// From 21656ace52fbc404e13c0f00520154f020cea24e Mon Sep 17 00:00:00 2001 From: deflected Date: Sat, 6 Jun 2015 14:10:16 +0300 Subject: [PATCH 180/200] Squash merge of PR #37: commit 757038784126094d350244c5ecdd764b1f726532 Author: deflected Date: Sat Jun 6 14:10:16 2015 +0300 makepanda: Runtime support for FreeBSD PKGNG - Support creation of runtime package - Changed @dirrm to @dir. All non-empty directories are handled by pkg internally, but it is good to have entry for all directories. commit 756f8b10bad559a9802df68e3aa5d419afe13a25 Author: deflected Date: Fri Jun 5 01:21:26 2015 +0300 makepanda: Add FreeBSD PKGNG support - The old FreeBSD package manager is obsolete for more than an year. - Added generating of installable package for the new package manager when '--installer' is invoked on FreeBSD --- makepanda/makepanda.py | 88 +++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 825e9042e3..2b7b1bf128 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -6649,6 +6649,29 @@ This package contains the SDK for development with Panda3D, install panda3d-runt WWW: http://www.panda3d.org/ """ +# FreeBSD pkg-descr +RUNTIME_INSTALLER_PKG_DESCR_FILE = """ +Runtime binary and browser plugin for the Panda3D Game Engine + +This package contains the runtime distribution and browser plugin of the Panda3D engine. It allows you view webpages that contain Panda3D content and to run games created with Panda3D that are packaged as .p3d file. + +WWW: http://www.panda3d.org/ +""" + +# FreeBSD PKG Manifest template file +INSTALLER_PKG_MANIFEST_FILE = """ +name: NAME +version: VERSION +arch: ARCH +origin: ORIGIN +comment: "Panda 3D Engine" +www: http://www.panda3d.org +maintainer: rdb +prefix: /usr/local +flatsize: INSTSIZEMB +deps: {DEPENDS} +""" + def MakeInstallerLinux(): if not RUNTIME and not PkgSkip("PYTHON"): PYTHONV = SDK["PYTHONVERSION"] @@ -6965,8 +6988,7 @@ def MakeInstallerOSX(): oscmd('rm -f Panda3D-rw.dmg') def MakeInstallerFreeBSD(): - import compileall - oscmd("rm -rf targetroot pkg-descr pkg-plist") + oscmd("rm -rf targetroot +DESC pkg-plist +MANIFEST") oscmd("mkdir targetroot") # Invoke installpanda.py to install it into a temporary dir @@ -6975,52 +6997,48 @@ def MakeInstallerFreeBSD(): else: InstallPanda(destdir = "targetroot", prefix = "/usr/local", outputdir = GetOutputDir()) - if (not os.path.exists("/usr/sbin/pkg_create")): - exit("Cannot create an installer without pkg_create") + if not os.path.exists("/usr/sbin/pkg"): + exit("Cannot create an installer without pkg") - if (RUNTIME): - descr_txt = RUNTIME_INSTALLER_PKG_DESCR_FILE[1:] - else: - descr_txt = INSTALLER_PKG_DESCR_FILE[1:] - descr_txt = descr_txt.replace("VERSION", VERSION) - if (RUNTIME): - plist_txt = "@name panda3d-runtime-%s\n" % VERSION - else: - plist_txt = "@name panda3d-%s\n" % VERSION + plist_txt = '' for root, dirs, files in os.walk("targetroot/usr/local/", True): for f in files: plist_txt += os.path.join(root, f)[21:] + "\n" - if (not RUNTIME): + if not RUNTIME: plist_txt += "@exec /sbin/ldconfig -m /usr/local/lib\n" plist_txt += "@unexec /sbin/ldconfig -R\n" for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"): for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False): for d in dirs: - plist_txt += "@dirrm %s\n" % os.path.join(root, d)[21:] - plist_txt += "@dirrm %s\n" % remdir + plist_txt += "@dir %s\n" % os.path.join(root, d)[21:] + plist_txt += "@dir %s\n" % remdir + + oscmd("echo \"`pkg config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2`:*\" > " + GetOutputDir() + "/tmp/architecture.txt") + pkg_arch = ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() + + dependencies = '' + if PkgSkip("PYTHON") == 0: + # If this version of Python was installed from a package or ports, let's mark it as dependency. + oscmd("rm -f %s/tmp/python_dep" % GetOutputDir()) + oscmd("pkg query \"\n\t%%n : {\n\t\torigin : %%o,\n\t\tversion : %%v\n\t},\n\" python%s > %s/tmp/python_dep" % (SDK["PYTHONVERSION"][6:9:2], GetOutputDir()), True) + if os.path.isfile(GetOutputDir() + "/tmp/python_dep"): + python_pkg = ReadFile(GetOutputDir() + "/tmp/python_dep") + if python_pkg: + dependencies += python_pkg + + manifest_txt = INSTALLER_PKG_MANIFEST_FILE[1:].replace("NAME", 'Panda3D' if not RUNTIME else 'Panda3D-Runtime') + manifest_txt = manifest_txt.replace("VERSION", VERSION) + manifest_txt = manifest_txt.replace("ARCH", pkg_arch) + manifest_txt = manifest_txt.replace("ORIGIN", 'devel/panda3d' if not RUNTIME else 'graphics/panda3d-runtime') + manifest_txt = manifest_txt.replace("DEPENDS", dependencies) + manifest_txt = manifest_txt.replace("INSTSIZE", str(GetDirectorySize("targetroot") / 1024 / 1024)) WriteFile("pkg-plist", plist_txt) - WriteFile("pkg-descr", descr_txt) - cmd = "pkg_create" - if GetVerbose(): - cmd += " --verbose" - if PkgSkip("PYTHON")==0: - # If this version of Python was installed from a package, let's mark it as dependency. - oscmd("rm -f %s/tmp/python-pkg.txt" % GetOutputDir()) - oscmd("pkg_info -E 'python%s>=%s' > %s/tmp/python-pkg.txt" % (SDK["PYTHONVERSION"][6:9:2], SDK["PYTHONVERSION"][6:9], GetOutputDir()), True) - if (os.path.isfile(GetOutputDir() + "/tmp/python-pkg.txt")): - python_pkg = ReadFile(GetOutputDir() + "/tmp/python-pkg.txt").strip() - if (python_pkg): - cmd += " -P " + python_pkg - cmd += " -p /usr/local -S \"%s\"" % os.path.abspath("targetroot") - if (RUNTIME): - cmd += " -c -\"The Panda3D free 3D engine runtime\" -o graphics/panda3d-runtime" - else: - cmd += " -c -\"The Panda3D free 3D engine SDK\" -o devel/panda3d" - cmd += " -d pkg-descr -f pkg-plist panda3d-%s" % VERSION - oscmd(cmd) + WriteFile("+DESC", INSTALLER_PKG_DESCR_FILE[1:] if not RUNTIME else RUNTIME_INSTALLER_PKG_DESCR_FILE[1:]) + WriteFile("+MANIFEST", manifest_txt) + oscmd("pkg create -p pkg-plist -r %s -m . -o . %s" % (os.path.abspath("targetroot"), "--verbose" if GetVerbose() else "--quiet")) try: if INSTALLER: From bfe42fa8e9aa84c4ec4eaeabf7a4b7aea57a1d9e Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 28 Oct 2015 20:24:42 +0100 Subject: [PATCH 181/200] Fix updating of light position uniform in GLSL (thanks to deflected for tracking this down) --- panda/src/glstuff/glShaderContext_src.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 6cac37cf82..beec31ad17 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1196,7 +1196,9 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._func = Shader::SMF_first; bind._part[0] = Shader::SMO_vec_constant_x_attrib; bind._arg[0] = iname; - bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame; + // We need SSD_transform since some attributes (eg. light + // position) have to be transformed to view space. + bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame | Shader::SSD_transform; bind._part[1] = Shader::SMO_identity; bind._arg[1] = NULL; bind._dep[1] = Shader::SSD_NONE; From d3494edf2c325093e136d7b33382fcfa192fc2e7 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 31 Oct 2015 04:11:12 +0100 Subject: [PATCH 182/200] Address some rare crashes at shutdown --- direct/src/showbase/ShowBase.py | 3 ++- panda/src/display/graphicsEngine.cxx | 6 ++---- panda/src/putil/bamCache.I | 26 ++++++++++++++++++++++++++ panda/src/putil/bamCache.h | 2 ++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 6c6c68d4a8..9e4f7a9296 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -296,7 +296,6 @@ class ShowBase(DirectObject.DirectObject): self.physicsMgrEnabled = 0 self.physicsMgrAngular = 0 - self.createBaseAudioManagers() self.createStats() self.AppHasAudioFocus = 1 @@ -384,6 +383,8 @@ class ShowBase(DirectObject.DirectObject): else: ShowBase.notify.info('__dev__ == %s' % __dev__) + self.createBaseAudioManagers() + # set up recording of Functor creation stacks in __dev__ PythonUtil.recordFunctorCreationStacks() diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 22b2b876f8..5d3c109c46 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -630,8 +630,7 @@ remove_all_windows() { // a hack, since it's not really related to removing windows, this // would nevertheless be a fine time to ensure the model cache (if // any) has been flushed to disk. - BamCache *cache = BamCache::get_global_ptr(); - cache->flush_index(); + BamCache::flush_global_index(); // And, hey, let's stop the vertex paging threads, if any. VertexDataPage::stop_threads(); @@ -716,8 +715,7 @@ render_frame() { // Since this gets called every frame, we should take advantage of // the opportunity to flush the cache if necessary. - BamCache *cache = BamCache::get_global_ptr(); - cache->consider_flush_index(); + BamCache::consider_flush_global_index(); // Anything that happens outside of GraphicsEngine::render_frame() // is deemed to be App. diff --git a/panda/src/putil/bamCache.I b/panda/src/putil/bamCache.I index 3d2906e36c..9527bd0a83 100644 --- a/panda/src/putil/bamCache.I +++ b/panda/src/putil/bamCache.I @@ -257,6 +257,32 @@ get_global_ptr() { return _global_ptr; } +//////////////////////////////////////////////////////////////////// +// Function: BamCache::consider_flush_global_index +// Access: Published, Static +// Description: If there is a global BamCache object, calls +// consider_flush_index() on it. +//////////////////////////////////////////////////////////////////// +INLINE void BamCache:: +consider_flush_global_index() { + if (_global_ptr != (BamCache *)NULL) { + _global_ptr->consider_flush_index(); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: BamCache::flush_global_index +// Access: Published, Static +// Description: If there is a global BamCache object, calls +// flush_index() on it. +//////////////////////////////////////////////////////////////////// +INLINE void BamCache:: +flush_global_index() { + if (_global_ptr != (BamCache *)NULL) { + _global_ptr->flush_index(); + } +} + //////////////////////////////////////////////////////////////////// // Function: BamCache::mark_index_stale // Access: Private diff --git a/panda/src/putil/bamCache.h b/panda/src/putil/bamCache.h index beab547935..f0615111a1 100644 --- a/panda/src/putil/bamCache.h +++ b/panda/src/putil/bamCache.h @@ -83,6 +83,8 @@ PUBLISHED: void list_index(ostream &out, int indent_level = 0) const; INLINE static BamCache *get_global_ptr(); + INLINE static void consider_flush_global_index(); + INLINE static void flush_global_index(); private: void read_index(); From 63a9b5dfeca34d0ad06783958bfc98fddc64f1eb Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 15:45:52 +0100 Subject: [PATCH 183/200] Re-expose MouseWatcherGroup; clearer error message for make_seq when getter is not exposed --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- panda/src/tform/mouseWatcherBase.cxx | 2 +- panda/src/tform/mouseWatcherGroup.h | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 5a2dd24e41..1d5520470c 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -6121,7 +6121,7 @@ write_make_seq(ostream &out, Object *obj, const std::string &ClassName, << "\n" << " PyObject *getter = PyDict_GetItemString(Dtool_" << ClassName << "._PyType.tp_dict, \"" << element_name << "\");\n" << " if (getter == (PyObject *)NULL) {\n" - << " return NULL;\n" + << " return Dtool_Raise_AttributeError(self, \"" << element_name << "\");\n" << " }\n" << "\n" << " Py_ssize_t count = (Py_ssize_t)local_this->" << make_seq->_num_name << "();\n" diff --git a/panda/src/tform/mouseWatcherBase.cxx b/panda/src/tform/mouseWatcherBase.cxx index 6a5a92aa4c..559508029d 100644 --- a/panda/src/tform/mouseWatcherBase.cxx +++ b/panda/src/tform/mouseWatcherBase.cxx @@ -218,7 +218,7 @@ get_region(int n) const { //////////////////////////////////////////////////////////////////// void MouseWatcherBase:: output(ostream &out) const { - out << "MouseWatcherBase (" << _regions.size() << " regions)"; + out << "MouseWatcherGroup (" << _regions.size() << " regions)"; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/tform/mouseWatcherGroup.h b/panda/src/tform/mouseWatcherGroup.h index d07994581d..bab2b497e1 100644 --- a/panda/src/tform/mouseWatcherGroup.h +++ b/panda/src/tform/mouseWatcherGroup.h @@ -31,13 +31,17 @@ class EXPCL_PANDA_TFORM MouseWatcherGroup : public MouseWatcherBase, public: INLINE MouseWatcherGroup() {}; -public: +PUBLISHED: static TypeHandle get_class_type() { - ReferenceCount::init_type(); return _type_handle; } + +public: static void init_type() { + MouseWatcherBase::init_type(); + ReferenceCount::init_type(); register_type(_type_handle, "MouseWatcherGroup", + MouseWatcherBase::get_class_type(), ReferenceCount::get_class_type()); } From b1c7086cbc0d810a142d0b1a4ed8772a9dd843c4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 15:53:02 +0100 Subject: [PATCH 184/200] Fix Rope, fix some unnecessary reliances on base.config --- direct/src/actor/Actor.py | 10 ++++++---- direct/src/showbase/PythonUtil.py | 2 +- direct/src/showbase/ShowBase.py | 6 ++++-- direct/src/showbase/Transitions.py | 2 +- direct/src/showutil/Rope.py | 6 +++++- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index 7802ebc3eb..d5fcaa8ee4 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -24,6 +24,8 @@ class Actor(DirectObject, NodePath): LoaderOptions.LFConvertAnim) validateSubparts = ConfigVariableBool('validate-subparts', True) + mergeLODBundles = ConfigVariableBool('merge-lod-bundles', True) + allowAsyncBind = ConfigVariableBool('allow-async-bind', True) class PartDef: @@ -171,10 +173,10 @@ class Actor(DirectObject, NodePath): # ['common']; when it is false, __animControlDict has one key # per each LOD name. - if mergeLODBundles == None: + if mergeLODBundles is None: # If this isn't specified, it comes from the Config.prc # file. - self.mergeLODBundles = base.config.GetBool('merge-lod-bundles', True) + self.mergeLODBundles = Actor.mergeLODBundles.getValue() else: self.mergeLODBundles = mergeLODBundles @@ -182,8 +184,8 @@ class Actor(DirectObject, NodePath): # asynchronous animation binding. This requires that you have # run "egg-optchar -preload" on your animation and models to # generate the appropriate AnimPreloadTable. - if allowAsyncBind == None: - self.allowAsyncBind = base.config.GetBool('allow-async-bind', True) + if allowAsyncBind is None: + self.allowAsyncBind = Actor.allowAsyncBind.getValue() else: self.allowAsyncBind = allowAsyncBind diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 8d20e1683d..ccd4de8800 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -1995,7 +1995,7 @@ def pstatcollect(scope, level = None): try: - if not (__dev__ or config.GetBool('force-pstatcollect', 0)) or \ + if not (__dev__ or ConfigVariableBool('force-pstatcollect', False)) or \ not scope: return decorator diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 9e4f7a9296..54e18040b3 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -75,6 +75,8 @@ class ShowBase(DirectObject.DirectObject): if logStackDump or uploadStackDump: ExceptionVarDump.install(logStackDump, uploadStackDump) + self.__autoGarbageLogging = self.__dev__ and self.config.GetBool('auto-garbage-logging', False) + ## The directory containing the main Python file of this application. self.mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR") @@ -2665,7 +2667,7 @@ class ShowBase(DirectObject.DirectObject): if not properties.getOpen(): # If the user closes the main window, we should exit. self.notify.info("User closed main window.") - if __dev__ and config.GetBool('auto-garbage-logging', 0): + if self.__autoGarbageLogging: GarbageReport.b_checkForGarbageLeaks() self.userExit() @@ -2673,7 +2675,7 @@ class ShowBase(DirectObject.DirectObject): self.mainWinForeground = 1 elif not properties.getForeground() and self.mainWinForeground: self.mainWinForeground = 0 - if __dev__ and config.GetBool('auto-garbage-logging', 0): + if self.__autoGarbageLogging: GarbageReport.b_checkForGarbageLeaks() if properties.getMinimized() and not self.mainWinMinimized: diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py index ca4919a48f..2f2db9592d 100644 --- a/direct/src/showbase/Transitions.py +++ b/direct/src/showbase/Transitions.py @@ -168,7 +168,7 @@ class Transitions: self.loadFade() self.fade.reparentTo(aspect2d, FADE_SORT_INDEX) self.fade.setColor(self.alphaOn) - elif base.config.GetBool('no-loading-screen',0): + elif ConfigVariableBool('no-loading-screen', False): if finishIval: self.transitionIval = finishIval self.transitionIval.start() diff --git a/direct/src/showutil/Rope.py b/direct/src/showutil/Rope.py index 9f4a3b1c90..922c681631 100644 --- a/direct/src/showutil/Rope.py +++ b/direct/src/showutil/Rope.py @@ -10,7 +10,8 @@ class Rope(NodePath): thick lines built from triangle strips. """ - showRope = base.config.GetBool('show-rope', 1) + showRope = ConfigVariableBool('show-rope', True, \ + "Set this to false to deactivate the display of ropes.") def __init__(self, name = 'Rope'): self.ropeNode = RopeNode(name) @@ -18,6 +19,9 @@ class Rope(NodePath): self.ropeNode.setCurve(self.curve) NodePath.__init__(self, self.ropeNode) self.name = name + self.order = 0 + self.verts = [] + self.knots = None def setup(self, order, verts, knots = None): """This must be called to define the shape of the curve From b0d8b9109e5e9ca3360ff584537241e024d60c4e Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 15:59:38 +0100 Subject: [PATCH 185/200] Check in change that might help fix a WeakKeyHashMap assert --- panda/src/putil/weakKeyHashMap.I | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/putil/weakKeyHashMap.I b/panda/src/putil/weakKeyHashMap.I index 03987ef866..128936fe20 100644 --- a/panda/src/putil/weakKeyHashMap.I +++ b/panda/src/putil/weakKeyHashMap.I @@ -710,5 +710,8 @@ expand_table() { nassertv(validate()); nassertv(old_map.validate()); - nassertv(_num_entries == old_map._num_entries); + // Note that since has_element(i) also checks whether the pointer + // has been deleted, we may end up with fewer entries than we + // started with. Good riddance. + nassertv(_num_entries <= old_map._num_entries); } From da17cce447ed00510d3fb238c9a1ec7322b74c80 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 16:57:52 +0100 Subject: [PATCH 186/200] Fix error and warnings in 32-bit Windows build --- dtool/src/cppparser/cppEnumType.cxx | 2 +- dtool/src/cppparser/cppExpression.cxx | 8 ++++---- dtool/src/cppparser/cppPreprocessor.cxx | 2 +- dtool/src/dtoolbase/stl_compares.I | 6 +----- dtool/src/interrogate/functionRemap.cxx | 10 +++++----- dtool/src/interrogate/functionRemap.h | 4 ++-- .../interrogate/interfaceMakerPythonNative.cxx | 16 ++++++++-------- dtool/src/prc/configPageManager.cxx | 2 +- panda/src/gobj/geom.cxx | 2 +- panda/src/gobj/geomVertexData.cxx | 14 +++++++------- panda/src/gobj/geomVertexFormat.cxx | 4 ++-- panda/src/pgraph/geomNode.cxx | 2 +- panda/src/pgraph/geomTransformer.cxx | 10 +++++----- panda/src/putil/bitArray.I | 6 +++--- panda/src/putil/sparseArray.cxx | 4 ++-- 15 files changed, 44 insertions(+), 48 deletions(-) diff --git a/dtool/src/cppparser/cppEnumType.cxx b/dtool/src/cppparser/cppEnumType.cxx index 8a3684a777..e3506d0ad1 100644 --- a/dtool/src/cppparser/cppEnumType.cxx +++ b/dtool/src/cppparser/cppEnumType.cxx @@ -177,7 +177,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, bool any_changed = false; - for (int i = 0; i < _elements.size(); ++i) { + for (size_t i = 0; i < _elements.size(); ++i) { CPPInstance *elem_rep = _elements[i]->substitute_decl(subst, current_scope, global_scope) ->as_instance(); diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index 91bab50d03..55e640de01 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -637,11 +637,11 @@ evaluate() const { (_u._op._op1->_type == T_string || _u._op._op1->_type == T_u8string)) { - int index = r2.as_integer(); - if (index == _u._op._op1->_str.size()) { + int index = (int)r2.as_integer(); + if ((size_t)index == _u._op._op1->_str.size()) { return Result(0); - } else if (index >= 0 && index < _u._op._op1->_str.size()) { - return Result(_u._op._op1->_str[index]); + } else if (index >= 0 && (size_t)index < _u._op._op1->_str.size()) { + return Result(_u._op._op1->_str[(size_t)index]); } else { cerr << "array index " << index << " out of bounds of string literal " << *_u._op._op1 << "\n"; diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index a13fad4c11..ec2771ab06 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -1689,7 +1689,7 @@ handle_include_directive(const string &args, const YYLTYPE &loc) { // Now search the quote-include-path if (!angle_quotes && !found_file) { - for (int dir=0; dir<_quote_include_path.get_num_directories(); dir++) { + for (size_t dir=0; dir<_quote_include_path.get_num_directories(); dir++) { Filename match(_quote_include_path.get_directory(dir), filename); if (match.exists()) { filename = match; diff --git a/dtool/src/dtoolbase/stl_compares.I b/dtool/src/dtoolbase/stl_compares.I index e0d51b74dd..e68080451c 100644 --- a/dtool/src/dtoolbase/stl_compares.I +++ b/dtool/src/dtoolbase/stl_compares.I @@ -132,11 +132,7 @@ add_hash(size_t hash, const Key &key) { INLINE size_t pointer_hash:: add_hash(size_t hash, const void *key) { // We don't mind if this loses precision. -#ifdef _MSC_VER - PN_uint32 key32 = PtrToUlong(key); -#else - PN_uint32 key32 = (PN_uint32)reinterpret_cast(key); -#endif + PN_uint32 key32 = (PN_uint32)reinterpret_cast(key); return AddHash::add_hash(hash, &key32, 1); } diff --git a/dtool/src/interrogate/functionRemap.cxx b/dtool/src/interrogate/functionRemap.cxx index 1b7315f1eb..f074a954a4 100644 --- a/dtool/src/interrogate/functionRemap.cxx +++ b/dtool/src/interrogate/functionRemap.cxx @@ -108,7 +108,7 @@ string FunctionRemap:: call_function(ostream &out, int indent_level, bool convert_result, const string &container) const { vector_string pexprs; - for (int i = 0; i < _parameters.size(); ++i) { + for (size_t i = 0; i < _parameters.size(); ++i) { pexprs.push_back(get_parameter_name(i)); } return call_function(out, indent_level, convert_result, container, pexprs); @@ -478,8 +478,8 @@ get_call_str(const string &container, const vector_string &pexprs) const { separator = ", "; } - int pn = _first_true_parameter; - int num_parameters = pexprs.size(); + size_t pn = _first_true_parameter; + size_t num_parameters = pexprs.size(); if (_type == T_item_assignment_operator) { // The last parameter is the value to set. @@ -513,8 +513,8 @@ get_call_str(const string &container, const vector_string &pexprs) const { // of the nth parameter is it is empty. //////////////////////////////////////////////////////////////////// string FunctionRemap:: -get_parameter_expr(int n, const vector_string &pexprs) const { - if (n < (int)pexprs.size()) { +get_parameter_expr(size_t n, const vector_string &pexprs) const { + if (n < pexprs.size()) { return pexprs[n]; } return get_parameter_name(n); diff --git a/dtool/src/interrogate/functionRemap.h b/dtool/src/interrogate/functionRemap.h index 6a4477ba56..dadd26c45d 100644 --- a/dtool/src/interrogate/functionRemap.h +++ b/dtool/src/interrogate/functionRemap.h @@ -112,7 +112,7 @@ public: bool _blocking; bool _extension; bool _const_method; - int _first_true_parameter; + size_t _first_true_parameter; int _num_default_parameters; Type _type; int _flags; @@ -137,7 +137,7 @@ public: bool _is_valid; private: - string get_parameter_expr(int n, const vector_string &pexprs) const; + string get_parameter_expr(size_t n, const vector_string &pexprs) const; bool setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_maker); }; diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 2edc8c657d..9c06abeaed 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -3990,9 +3990,9 @@ collapse_default_remaps(std::map > &map_sets, std::set::iterator sii; for (sii = rmi->second.begin(); sii != rmi->second.end(); ++sii) { FunctionRemap *remap = (*sii); - int pn = rmi->first - 1; - if (remap->_has_this && remap->_type != FunctionRemap::T_constructor) { - ++pn; + size_t pn = (size_t)rmi->first; + if (!remap->_has_this || remap->_type == FunctionRemap::T_constructor) { + --pn; } nassertd(pn < remap->_parameters.size()) goto abort_iteration; @@ -4345,8 +4345,8 @@ write_function_forset(ostream &out, for (sii = remaps.begin(); sii != remaps.end(); ++sii) { remap = (*sii); - if (remap->_parameters.size() > (int)remap->_has_this) { - ParameterRemap *param = remap->_parameters[(int)remap->_has_this]._remap; + if (remap->_parameters.size() > (size_t)remap->_has_this) { + ParameterRemap *param = remap->_parameters[(size_t)remap->_has_this]._remap; string param_name = param->get_orig_type()->get_local_name(&parser); if (param_name != "CPT_InternalName" && @@ -4601,15 +4601,15 @@ write_function_instance(ostream &out, FunctionRemap *remap, if (remap->_has_this) { num_params += 1; } - if (num_params > remap->_parameters.size()) { + if (num_params > (int)remap->_parameters.size()) { // Limit to how many parameters this remap actually has. - num_params = remap->_parameters.size(); + num_params = (int)remap->_parameters.size(); max_num_args = num_params; if (remap->_has_this) { --max_num_args; } } - nassertv(num_params <= remap->_parameters.size()); + nassertv(num_params <= (int)remap->_parameters.size()); bool only_pyobjects = true; diff --git a/dtool/src/prc/configPageManager.cxx b/dtool/src/prc/configPageManager.cxx index 125a27e695..eae07c92c8 100644 --- a/dtool/src/prc/configPageManager.cxx +++ b/dtool/src/prc/configPageManager.cxx @@ -255,7 +255,7 @@ reload_implicit_pages() { // We walk through the list of directories in forward order, so that // the most important directories are visited first. - for (int di = 0; di < _search_path.get_num_directories(); ++di) { + for (size_t di = 0; di < _search_path.get_num_directories(); ++di) { const Filename &directory = _search_path.get_directory(di); if (directory.is_directory()) { Filename canonical(directory, "."); diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index 40166e15bc..08c1fdcf1d 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -981,7 +981,7 @@ transform_vertices(const LMatrix4 &mat) { PT(GeomVertexData) new_data = modify_vertex_data(); CPT(GeomVertexFormat) format = new_data->get_format(); - int ci; + size_t ci; for (ci = 0; ci < format->get_num_points(); ci++) { GeomVertexRewriter data(new_data, format->get_point(ci)); diff --git a/panda/src/gobj/geomVertexData.cxx b/panda/src/gobj/geomVertexData.cxx index d2202e1831..1ac95c98c3 100644 --- a/panda/src/gobj/geomVertexData.cxx +++ b/panda/src/gobj/geomVertexData.cxx @@ -358,7 +358,7 @@ unclean_set_format(const GeomVertexFormat *format) { #ifndef NDEBUG nassertv(format->get_num_arrays() == cdata->_format->get_num_arrays()); - for (int ai = 0; ai < format->get_num_arrays(); ++ai) { + for (size_t ai = 0; ai < format->get_num_arrays(); ++ai) { nassertv(format->get_array(ai)->get_stride() == cdata->_format->get_array(ai)->get_stride()); } nassertv(cdata->_arrays.size() == cdata->_format->get_num_arrays()); @@ -702,7 +702,7 @@ copy_from(const GeomVertexData *source, bool keep_data_objects, LVecBase4i indices(0, 0, 0, 0); nassertv(blend.get_num_transforms() <= 4); - for (int i = 0; i < blend.get_num_transforms(); i++) { + for (size_t i = 0; i < blend.get_num_transforms(); i++) { weights[i] = blend.get_weight(i); indices[i] = add_transform(transform_table, blend.get_transform(i), already_added); @@ -722,7 +722,7 @@ copy_from(const GeomVertexData *source, bool keep_data_objects, const TransformBlend &blend = blend_table->get_blend(from.get_data1i()); LVecBase4 weights = LVecBase4::zero(); - for (int i = 0; i < blend.get_num_transforms(); i++) { + for (size_t i = 0; i < blend.get_num_transforms(); i++) { int index = add_transform(transform_table, blend.get_transform(i), already_added); nassertv(index <= 4); @@ -1184,7 +1184,7 @@ transform_vertices(const LMatrix4 &mat, int begin_row, int end_row) { const GeomVertexFormat *format = get_format(); - int ci; + size_t ci; for (ci = 0; ci < format->get_num_points(); ci++) { GeomVertexRewriter data(this, format->get_point(ci)); do_transform_point_column(format, data, mat, begin_row, end_row); @@ -1395,7 +1395,7 @@ describe_vertex(ostream &out, int row) const { // index and report the vertex weighting. reader.set_column(ai, column); int bi = reader.get_data1i(); - if (bi >= 0 && bi < tb_table->get_num_blends()) { + if (bi >= 0 && (size_t)bi < tb_table->get_num_blends()) { const TransformBlend &blend = tb_table->get_blend(bi); out << " " << blend << "\n"; } @@ -1681,7 +1681,7 @@ update_animated_vertices(GeomVertexData::CData *cdata, Thread *current_thread) { CPT(GeomVertexArrayDataHandle) blend_array_handle = cdata->_arrays[blend_array_index].get_read_pointer()->get_handle(current_thread); const unsigned short *blendt = (const unsigned short *)blend_array_handle->get_read_pointer(true); - int ci; + size_t ci; for (ci = 0; ci < new_format->get_num_points(); ci++) { GeomVertexRewriter data(new_data, new_format->get_point(ci)); @@ -1768,7 +1768,7 @@ update_animated_vertices(GeomVertexData::CData *cdata, Thread *current_thread) { GeomVertexReader blendi(this, InternalName::get_transform_blend()); nassertv(blendi.has_column()); - int ci; + size_t ci; for (ci = 0; ci < new_format->get_num_points(); ci++) { GeomVertexRewriter data(new_data, new_format->get_point(ci)); diff --git a/panda/src/gobj/geomVertexFormat.cxx b/panda/src/gobj/geomVertexFormat.cxx index 35401efc1f..c26c075d49 100644 --- a/panda/src/gobj/geomVertexFormat.cxx +++ b/panda/src/gobj/geomVertexFormat.cxx @@ -423,7 +423,7 @@ const GeomVertexColumn *GeomVertexFormat:: get_column(size_t i) const { Arrays::const_iterator ai; for (ai = _arrays.begin(); ai != _arrays.end(); ++ai) { - if (i < (*ai)->get_num_columns()) { + if (i < (size_t)(*ai)->get_num_columns()) { return (*ai)->get_column(i); } i -= (*ai)->get_num_columns(); @@ -448,7 +448,7 @@ int GeomVertexFormat:: get_array_with(size_t i) const { int array_index = 0; for (array_index = 0; array_index < (int)_arrays.size(); array_index++) { - if (i < _arrays[array_index]->get_num_columns()) { + if (i < (size_t)_arrays[array_index]->get_num_columns()) { return array_index; } i -= _arrays[array_index]->get_num_columns(); diff --git a/panda/src/pgraph/geomNode.cxx b/panda/src/pgraph/geomNode.cxx index db7bdd42dd..aa9b70a852 100644 --- a/panda/src/pgraph/geomNode.cxx +++ b/panda/src/pgraph/geomNode.cxx @@ -1124,7 +1124,7 @@ finalize(BamReader *manager) { // GeomVertexData::has_column(). CPT(GeomVertexData) vdata = geom->get_vertex_data(current_thread); CPT(GeomVertexFormat) vformat = vdata->get_format(); - for (int i = 0; i < vformat->get_num_arrays(); ++i) { + for (size_t i = 0; i < vformat->get_num_arrays(); ++i) { const GeomVertexArrayFormat *varray = vformat->get_array(i); manager->finalize_now((GeomVertexArrayFormat *)varray); } diff --git a/panda/src/pgraph/geomTransformer.cxx b/panda/src/pgraph/geomTransformer.cxx index 410f9b22cb..3c209abbb2 100644 --- a/panda/src/pgraph/geomTransformer.cxx +++ b/panda/src/pgraph/geomTransformer.cxx @@ -1357,13 +1357,13 @@ append_vdata(const GeomVertexData *vdata, int vertex_offset) { for (int i = 0; i < vdata->get_num_arrays(); ++i) { PT(GeomVertexArrayData) new_array = _new_data->modify_array(i); CPT(GeomVertexArrayData) old_array = vdata->get_array(i); - int stride = _new_format->get_array(i)->get_stride(); - int start_byte = vertex_offset * stride; - int copy_bytes = old_array->get_data_size_bytes(); + size_t stride = (size_t)_new_format->get_array(i)->get_stride(); + size_t start_byte = (size_t)vertex_offset * stride; + size_t copy_bytes = old_array->get_data_size_bytes(); nassertv(start_byte + copy_bytes <= new_array->get_data_size_bytes()); - + new_array->modify_handle()->copy_subdata_from - (start_byte, copy_bytes, + (start_byte, copy_bytes, old_array->get_handle(), 0, copy_bytes); } diff --git a/panda/src/putil/bitArray.I b/panda/src/putil/bitArray.I index cdf3adfd92..4209812abe 100644 --- a/panda/src/putil/bitArray.I +++ b/panda/src/putil/bitArray.I @@ -208,7 +208,7 @@ get_bit(int index) const { nassertr(index >= 0, false); int w = index / num_bits_per_word; int b = index % num_bits_per_word; - if (w >= get_num_words()) { + if ((size_t)w >= get_num_words()) { return get_highest_bits(); } else { return (_array[w].get_bit(b)); @@ -226,7 +226,7 @@ set_bit(int index) { nassertv(index >= 0); int w = index / num_bits_per_word; int b = index % num_bits_per_word; - if (w >= get_num_words() && _highest_bits) { + if ((size_t)w >= get_num_words() && _highest_bits) { // All the highest bits are already on. return; } @@ -246,7 +246,7 @@ clear_bit(int index) { nassertv(index >= 0); int w = index / num_bits_per_word; int b = index % num_bits_per_word; - if (w >= get_num_words() && !_highest_bits) { + if ((size_t)w >= get_num_words() && !_highest_bits) { // All the highest bits are already off. return; } diff --git a/panda/src/putil/sparseArray.cxx b/panda/src/putil/sparseArray.cxx index 418a28edfc..6db82d8285 100644 --- a/panda/src/putil/sparseArray.cxx +++ b/panda/src/putil/sparseArray.cxx @@ -29,9 +29,9 @@ SparseArray(const BitArray &from) { bool empty_bit = from.get_highest_bits(); _inverse = empty_bit; - int begin = 0; + size_t begin = 0; bool current_state = from.get_bit(0); - int i = 0; + size_t i = 0; // By including get_num_bits()--one more than the last bit--in this // traversal, we guarantee that we will end on the empty_bit state From 368390536b41ed51159e7ab0c031abf7ba5eea22 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 19:07:33 +0100 Subject: [PATCH 187/200] Fix bug preventing switching from Z_top to Z_normal on Windows (Reported by Epihaius) --- panda/src/windisplay/winGraphicsWindow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 0146f2f89c..5018fb8a4a 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -1272,7 +1272,7 @@ adjust_z_order(WindowProperties::ZOrder last_z_order, // have focus now, don't move it to the top; it will get moved // the next time we get focus. ) { - order = HWND_TOP; + order = HWND_NOTOPMOST; do_change = true; } break; From d8fedc1bc0dfb1e41cc760306c4a327b298239ef Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Nov 2015 20:01:39 +0100 Subject: [PATCH 188/200] Call SetProcessDPIAware() to fix issues caused by DPI virtualization in Windows 8.1 --- panda/src/windisplay/config_windisplay.cxx | 6 ++++++ panda/src/windisplay/config_windisplay.h | 1 + panda/src/windisplay/winGraphicsPipe.cxx | 17 +++++++++++++++++ panda/src/windisplay/winGraphicsPipe.h | 4 ++++ 4 files changed, 28 insertions(+) diff --git a/panda/src/windisplay/config_windisplay.cxx b/panda/src/windisplay/config_windisplay.cxx index fe1919a6c9..e0bda2979e 100644 --- a/panda/src/windisplay/config_windisplay.cxx +++ b/panda/src/windisplay/config_windisplay.cxx @@ -65,6 +65,12 @@ ConfigVariableBool request_dxdisplay_information "you have a specific need for this information and don't mind " "having a slow start-up.")); +ConfigVariableBool dpi_aware +("dpi-aware", true, + PRC_DESC("The default behavior is for Panda3D to disable DPI-virtualization " + "that is introduced in Windows 8.1. Set this to false if you are " + "experiencing problems with this setting.")); + ConfigVariableBool swapbuffer_framelock ("swapbuffer-framelock", false, PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards")); diff --git a/panda/src/windisplay/config_windisplay.h b/panda/src/windisplay/config_windisplay.h index ac0e1b1df9..f3f7cb1ea4 100644 --- a/panda/src/windisplay/config_windisplay.h +++ b/panda/src/windisplay/config_windisplay.h @@ -30,6 +30,7 @@ extern ConfigVariableBool ime_composition_w; extern ConfigVariableBool ime_aware; extern ConfigVariableBool ime_hide; extern ConfigVariableBool request_dxdisplay_information; +extern ConfigVariableBool dpi_aware; extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock; diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index 3776e8dbc5..eb56ec2f10 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -686,16 +686,30 @@ WinGraphicsPipe() { // these fns arent defined on win95, so get dynamic ptrs to them // to avoid ugly DLL loader failures on w95 _pfnTrackMouseEvent = NULL; + _pfnSetProcessDPIAware = NULL; _hUser32 = (HINSTANCE)LoadLibrary("user32.dll"); if (_hUser32 != NULL) { _pfnTrackMouseEvent = (PFN_TRACKMOUSEEVENT)GetProcAddress(_hUser32, "TrackMouseEvent"); + + if (dpi_aware) { + _pfnSetProcessDPIAware = + (PFN_SETPROCESSDPIAWARE)GetProcAddress(_hUser32, "SetProcessDPIAware"); + + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "Calling SetProcessDPIAware().\n"; + } + _pfnSetProcessDPIAware(); + } } #ifdef HAVE_DX9 // Use D3D to get display info. This is disabled by default as it is slow. if (request_dxdisplay_information) { + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "Using Direct3D 9 to fetch display information.\n"; + } DisplaySearchParameters display_search_parameters_dx9; int dx9_display_information (DisplaySearchParameters &display_search_parameters_dx9, DisplayInformation *display_information); dx9_display_information(display_search_parameters_dx9, _display_information); @@ -703,6 +717,9 @@ WinGraphicsPipe() { #endif { // Use the Win32 API to query the available display modes. + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "Using EnumDisplaySettings to fetch display information.\n"; + } pvector display_modes; DEVMODE dm = {0}; dm.dmSize = sizeof(dm); diff --git a/panda/src/windisplay/winGraphicsPipe.h b/panda/src/windisplay/winGraphicsPipe.h index 96bdc0ed2c..2afeaf0b94 100644 --- a/panda/src/windisplay/winGraphicsPipe.h +++ b/panda/src/windisplay/winGraphicsPipe.h @@ -41,9 +41,13 @@ public: private: HINSTANCE _hUser32; + typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT); PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent; + typedef BOOL (WINAPI *PFN_SETPROCESSDPIAWARE)(void); + PFN_SETPROCESSDPIAWARE _pfnSetProcessDPIAware; + public: static TypeHandle get_class_type() { return _type_handle; From 546bb2242100ba32f2c5fabcfb7cfa1fc0e28ba9 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 2 Nov 2015 10:01:11 +0100 Subject: [PATCH 189/200] Workaround for Apple compiler bug causing Eigen compile error --- makepanda/makepanda.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 7758c4df44..3c6e1979f9 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1223,6 +1223,10 @@ def CompileCxx(obj,src,opts): else: cmd += " -fno-exceptions" + if src.endswith(".mm"): + # Work around Apple compiler bug. + cmd += " -U__EXCEPTIONS" + if 'RTTI' not in opts: # We always disable RTTI on Android for memory usage reasons. if optlevel >= 4 or GetTarget() == "android": From bd354a9cde3bc455a3ec8d547308c394d0ac6c89 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 2 Nov 2015 16:41:17 +0100 Subject: [PATCH 190/200] Fix crash on shutdown of buffer in threaded pipeline --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index cd40b52384..290dadfcf5 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -1626,6 +1626,15 @@ report_my_errors(int line, const char *file) { void CLP(GraphicsBuffer):: check_host_valid() { if ((_host == 0)||(!_host->is_valid())) { + _rb_data_size_bytes = 0; + if (_rb_context != NULL) { + // We must delete this object first, because when the GSG + // destructs, so will the tracker that this context is + // attached to. + _rb_context->update_data_size_bytes(0); + delete _rb_context; + _rb_context = NULL; + } _is_valid = false; _gsg.clear(); _host.clear(); From d4d8585d0e40ede98864d7317f161d105a9c4759 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 Nov 2015 20:43:03 +0100 Subject: [PATCH 191/200] Fix issues building with Cygwin version of Python --- makepanda/makepandacore.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 7b1770fe77..f14179fb84 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -505,14 +505,14 @@ def oscmd(cmd, ignoreError = False): print(GetColor("blue") + cmd.split(" ", 1)[0] + " " + GetColor("magenta") + cmd.split(" ", 1)[1] + GetColor()) sys.stdout.flush() - if sys.platform in ("win32", "cygwin"): + if sys.platform == "win32": exe = cmd.split()[0] exe_path = LocateBinary(exe) if exe_path is None: exit("Cannot find "+exe+" on search path") res = os.spawnl(os.P_WAIT, exe_path, cmd) else: - res = os.system(cmd) + res = subprocess.call(cmd, shell=True) sig = res & 0x7F if (GetVerbose() and res != 0): print(ColorText("red", "Process exited with exit status %d and signal code %d" % ((res & 0xFF00) >> 8, sig))) @@ -534,7 +534,7 @@ def oscmd(cmd, ignoreError = False): if sys.platform == "win32": os.spawnl(os.P_WAIT, exe, cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1]) else: - os.system(cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1]) + subprocess.call(cmd.split(" ", 1)[0] + " -vv " + cmd.split(" ", 1)[1], shell=True) exit("The following command returned a non-zero value: " + str(cmd)) return res @@ -2177,7 +2177,11 @@ def SdkAutoDisableSpeedTree(): def AddToPathEnv(path,add): if path in os.environ: - os.environ[path] = add + os.pathsep + os.environ[path] + if sys.platform == 'cygwin' and path != "PATH": + # INCLUDE, LIB, etc. must remain in Windows-style in cygwin. + os.environ[path] = add + ';' + os.environ[path] + else: + os.environ[path] = add + os.pathsep + os.environ[path] else: os.environ[path] = add @@ -2483,6 +2487,10 @@ def CopyFile(dstfile, srcfile): os.symlink(os.readlink(srcfile), dstfile) else: WriteBinaryFile(dstfile, ReadBinaryFile(srcfile)) + + if sys.platform == 'cygwin' and os.path.splitext(dstfile)[1].lower() in ('.dll', '.exe'): + os.chmod(dstfile, 0o755) + JustBuilt([dstfile], [srcfile]) def CopyAllFiles(dstdir, srcdir, suffix=""): @@ -2517,7 +2525,9 @@ def CopyTree(dstdir, srcdir, omitVCS=True): if not omitVCS or entry not in VCS_DIRS: CopyTree(dstpth, srcpth) else: - if sys.platform == 'win32': + if GetHost() == 'windows': + srcdir = srcdir.replace('/', '\\') + dstdir = dstdir.replace('/', '\\') cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"' else: cmd = 'cp -R -f ' + srcdir + ' ' + dstdir From 042dc824163f7bd9b31cb966bd72543c12c18745 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 Nov 2015 20:43:33 +0100 Subject: [PATCH 192/200] Handle DPI change on Windows 8.1+, add dpi-window-resize config option --- panda/src/windisplay/config_windisplay.cxx | 8 +++++++ panda/src/windisplay/config_windisplay.h | 1 + panda/src/windisplay/winGraphicsPipe.cxx | 24 +++++++++++++++----- panda/src/windisplay/winGraphicsPipe.h | 3 --- panda/src/windisplay/winGraphicsWindow.cxx | 26 ++++++++++++++++++++++ 5 files changed, 53 insertions(+), 9 deletions(-) diff --git a/panda/src/windisplay/config_windisplay.cxx b/panda/src/windisplay/config_windisplay.cxx index e0bda2979e..4d8f8efc5b 100644 --- a/panda/src/windisplay/config_windisplay.cxx +++ b/panda/src/windisplay/config_windisplay.cxx @@ -71,6 +71,14 @@ ConfigVariableBool dpi_aware "that is introduced in Windows 8.1. Set this to false if you are " "experiencing problems with this setting.")); +ConfigVariableBool dpi_window_resize +("dpi-window-resize", false, + PRC_DESC("Set this to true to let Panda3D resize the window according to the " + "DPI settings whenever the window is dragged to a monitor with " + "different DPI, or when the DPI setting is changed in the control " + "panel. Only available in Windows 8.1 and later, and requires " + "dpi-aware to be set as well.")); + ConfigVariableBool swapbuffer_framelock ("swapbuffer-framelock", false, PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards")); diff --git a/panda/src/windisplay/config_windisplay.h b/panda/src/windisplay/config_windisplay.h index f3f7cb1ea4..a620b4e64a 100644 --- a/panda/src/windisplay/config_windisplay.h +++ b/panda/src/windisplay/config_windisplay.h @@ -31,6 +31,7 @@ extern ConfigVariableBool ime_aware; extern ConfigVariableBool ime_hide; extern ConfigVariableBool request_dxdisplay_information; extern ConfigVariableBool dpi_aware; +extern ConfigVariableBool dpi_window_resize; extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock; diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index eb56ec2f10..8fd031ffef 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -32,6 +32,12 @@ TypeHandle WinGraphicsPipe::_type_handle; #define MAXIMUM_PROCESSORS 32 #endif +typedef enum _Process_DPI_Awareness { + Process_DPI_Unaware = 0, + Process_System_DPI_Aware = 1, + Process_Per_Monitor_DPI_Aware = 2 +} Process_DPI_Awareness; + typedef struct _PROCESSOR_POWER_INFORMATION { ULONG Number; ULONG MaxMhz; @@ -686,7 +692,6 @@ WinGraphicsPipe() { // these fns arent defined on win95, so get dynamic ptrs to them // to avoid ugly DLL loader failures on w95 _pfnTrackMouseEvent = NULL; - _pfnSetProcessDPIAware = NULL; _hUser32 = (HINSTANCE)LoadLibrary("user32.dll"); if (_hUser32 != NULL) { @@ -694,13 +699,20 @@ WinGraphicsPipe() { (PFN_TRACKMOUSEEVENT)GetProcAddress(_hUser32, "TrackMouseEvent"); if (dpi_aware) { - _pfnSetProcessDPIAware = - (PFN_SETPROCESSDPIAWARE)GetProcAddress(_hUser32, "SetProcessDPIAware"); + typedef HRESULT (WINAPI *PFN_SETPROCESSDPIAWARENESS)(Process_DPI_Awareness); + PFN_SETPROCESSDPIAWARENESS pfnSetProcessDpiAwareness = + (PFN_SETPROCESSDPIAWARENESS)GetProcAddress(_hUser32, "SetProcessDpiAwarenessInternal"); - if (windisplay_cat.is_debug()) { - windisplay_cat.debug() << "Calling SetProcessDPIAware().\n"; + if (pfnSetProcessDpiAwareness == NULL) { + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "Unable to find SetProcessDpiAwareness in user32.dll.\n"; + } + } else { + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "Calling SetProcessDpiAwareness().\n"; + } + pfnSetProcessDpiAwareness(Process_Per_Monitor_DPI_Aware); } - _pfnSetProcessDPIAware(); } } diff --git a/panda/src/windisplay/winGraphicsPipe.h b/panda/src/windisplay/winGraphicsPipe.h index 2afeaf0b94..88d3e264d6 100644 --- a/panda/src/windisplay/winGraphicsPipe.h +++ b/panda/src/windisplay/winGraphicsPipe.h @@ -45,9 +45,6 @@ private: typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT); PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent; - typedef BOOL (WINAPI *PFN_SETPROCESSDPIAWARE)(void); - PFN_SETPROCESSDPIAWARE _pfnSetProcessDPIAware; - public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 5018fb8a4a..f270a70f61 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -26,6 +26,10 @@ #include +#ifndef WM_DPICHANGED +#define WM_DPICHANGED 0x02E0 +#endif + TypeHandle WinGraphicsWindow::_type_handle; TypeHandle WinGraphicsWindow::WinWindowHandle::_type_handle; @@ -2151,6 +2155,28 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { system_changed_properties(properties); break; + case WM_DPICHANGED: + // The window moved to a monitor of different DPI, or someone changed + // the DPI setting in the configuration panel. + if (windisplay_cat.is_debug()) { + windisplay_cat.debug() << "DPI changed to " << LOWORD(wparam); + + if (LOWORD(wparam) != HIWORD(wparam)) { + windisplay_cat.debug(false) << "x" << HIWORD(wparam) << "\n"; + } else { + windisplay_cat.debug(false) << "\n"; + } + } + // Resize the window if requested to match the new DPI. + // Obviously, don't do this if a fixed size was requested. + if (!_properties.get_fixed_size() && dpi_window_resize) { + RECT &rect = *(LPRECT)lparam; + SetWindowPos(_hWnd, HWND_TOP, rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, + SWP_NOZORDER | SWP_NOACTIVATE); + } + break; + #ifdef HAVE_WIN_TOUCHINPUT case WM_TOUCH: _numTouches = LOWORD(wparam); From 04949501c6e12e02b225bad45c521cca2288bdca Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 Nov 2015 20:48:18 +0100 Subject: [PATCH 193/200] Fix annoying 'rpm not found' error on Windows --- makepanda/installpanda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 41e78bc85a..fa9c744927 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -127,7 +127,7 @@ def GetLibDir(): something like "lib" or "lib64" or in some cases, something similar to "lib/x86_64-linux-gnu". """ - if sys.platform == "darwin": + if sys.platform in ("darwin", "win32", "cygwin"): return "lib" # This one's a bit tricky. Some systems require us to install From dafb4e7e5ec96180d727423ec768668f9251a576 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 Nov 2015 20:59:50 +0100 Subject: [PATCH 194/200] Fix error locating VC 2010 on cygwin Python --- makepanda/makepandacore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 4c4c2581ce..377f6addec 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1964,7 +1964,7 @@ def SdkLocateVisualStudio(version=10): elif (os.path.isfile("C:\\Program Files\\Microsoft Visual Studio %s\\VC\\bin\\cl.exe" % (version))): SDK["VISUALSTUDIO"] = "C:\\Program Files\\Microsoft Visual Studio %s\\" % (version) - elif (os.path.isfile("C:\\Program Files (x86)\\Microsoft Visual Studio %s\\VC\\bin\\cl.exe")): + elif (os.path.isfile("C:\\Program Files (x86)\\Microsoft Visual Studio %s\\VC\\bin\\cl.exe" % (version))): SDK["VISUALSTUDIO"] = "C:\\Program Files (x86)\\Microsoft Visual Studio %s\\" % (version) elif "VCINSTALLDIR" in os.environ: From 47fdb9b748a807a672d1ffe5c677121fbae12510 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 7 Nov 2015 16:42:06 +0100 Subject: [PATCH 195/200] Correct position of viewing axis for off-axis lens frustum (with thanks to tobspr) --- panda/src/gobj/lens.cxx | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/panda/src/gobj/lens.cxx b/panda/src/gobj/lens.cxx index c22174493c..b0e050a5e0 100644 --- a/panda/src/gobj/lens.cxx +++ b/panda/src/gobj/lens.cxx @@ -1817,12 +1817,13 @@ do_define_geom_data(CData *cdata) { if (!is_linear()) { num_segments = lens_geom_segments; } - + if (cdata->_geom_data == (GeomVertexData *)NULL) { cdata->_geom_data = new GeomVertexData ("lens", GeomVertexFormat::get_v3(), Geom::UH_dynamic); } + cdata->_geom_data->unclean_set_num_rows(num_segments * 8 + 2); GeomVertexWriter vertex(cdata->_geom_data, InternalName::get_vertex()); LPoint3 near_point, far_point; @@ -1835,8 +1836,8 @@ do_define_geom_data(CData *cdata) { // Hey, this point is off the lens! Can't do a frustum. return 0; } - vertex.add_data3(near_point); - vertex.add_data3(far_point); + vertex.set_data3(near_point); + vertex.set_data3(far_point); // Upper right, right edge. LPoint3 p2(1.0f, 1.0f - t, 0.0f); @@ -1844,8 +1845,8 @@ do_define_geom_data(CData *cdata) { // Hey, this point is off the lens! Can't do a frustum. return 0; } - vertex.add_data3(near_point); - vertex.add_data3(far_point); + vertex.set_data3(near_point); + vertex.set_data3(far_point); // Lower right, bottom edge. LPoint3 p3(1.0f - t, -1.0f, 0.0f); @@ -1853,8 +1854,8 @@ do_define_geom_data(CData *cdata) { // Hey, this point is off the lens! Can't do a frustum. return 0; } - vertex.add_data3(near_point); - vertex.add_data3(far_point); + vertex.set_data3(near_point); + vertex.set_data3(far_point); // Lower left, left edge. LPoint3 p4(-1.0f, -1.0f + t, 0.0f); @@ -1862,19 +1863,20 @@ do_define_geom_data(CData *cdata) { // Hey, this point is off the lens! Can't do a frustum. return 0; } - vertex.add_data3(near_point); - vertex.add_data3(far_point); + vertex.set_data3(near_point); + vertex.set_data3(far_point); } - // Finally, add one more pair for the viewing axis (or more - // specifically, the center of the lens). - LPoint3 pc(-cdata->_film_offset[0], -cdata->_film_offset[1], 0.0f); + + // Finally, add one more pair for the viewing axis (or more specifically, the + // center of the lens). + LPoint3 pc(0); if (!do_extrude(cdata, pc, near_point, far_point)) { - vertex.add_data3(0.0f, 0.0f, 0.0f); - vertex.add_data3(0.0f, 0.0f, 0.0f); + vertex.set_data3(0.0f, 0.0f, 0.0f); + vertex.set_data3(0.0f, 0.0f, 0.0f); } else { - vertex.add_data3(near_point); - vertex.add_data3(far_point); + vertex.set_data3(near_point); + vertex.set_data3(far_point); } return num_segments; From 6a263746cd0a7fad2e9cc745e54c009737cf6e9b Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 7 Nov 2015 21:55:51 +0100 Subject: [PATCH 196/200] Fix Cg crash at shutdown when multithreaded pipeline is active --- panda/src/display/graphicsStateGuardian.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 9fbe8b9606..5faf282e53 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -2980,7 +2980,6 @@ close_gsg() { display_cat.debug() << this << " close_gsg " << get_type() << "\n"; } - free_pointers(); // As tempting as it may be to try to release all the textures and // geoms now, we can't, because we might not be the currently-active @@ -3005,6 +3004,8 @@ close_gsg() { #ifdef DO_PSTATS _pending_timer_queries.clear(); #endif + + free_pointers(); } //////////////////////////////////////////////////////////////////// From 68f762aa209c992e3d180328cfbf2f22d8382bb1 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 8 Nov 2015 00:01:45 +0100 Subject: [PATCH 197/200] Fix leak of prepared contexts, prevent deleting GL resources in wrong context in multi-GSG applications --- panda/src/glstuff/glCgShaderContext_src.cxx | 2 +- panda/src/glstuff/glCgShaderContext_src.h | 4 +-- .../glstuff/glGraphicsStateGuardian_src.cxx | 23 +++++++++++++ panda/src/glstuff/glSamplerContext_src.cxx | 5 +-- panda/src/glstuff/glShaderContext_src.cxx | 2 +- panda/src/glstuff/glShaderContext_src.h | 4 +-- panda/src/glstuff/glTextureContext_src.cxx | 8 +---- panda/src/glstuff/glmisc_src.cxx | 3 ++ panda/src/gobj/preparedGraphicsObjects.cxx | 32 ++++++++++++++++--- 9 files changed, 61 insertions(+), 22 deletions(-) diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index 910bf5c7c1..0f2e32e353 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -326,7 +326,7 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte //////////////////////////////////////////////////////////////////// CLP(CgShaderContext):: ~CLP(CgShaderContext)() { - release_resources(); + // Don't call release_resources; we may not have an active context. } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glstuff/glCgShaderContext_src.h b/panda/src/glstuff/glCgShaderContext_src.h index 6bb0f8f43c..4a3d688096 100644 --- a/panda/src/glstuff/glCgShaderContext_src.h +++ b/panda/src/glstuff/glCgShaderContext_src.h @@ -92,9 +92,9 @@ public: return _type_handle; } static void init_type() { - TypedObject::init_type(); + ShaderContext::init_type(); register_type(_type_handle, CLASSPREFIX_QUOTED "CgShaderContext", - TypedObject::get_class_type()); + ShaderContext::get_class_type()); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 614dbec469..422cfe6390 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4684,6 +4684,13 @@ update_texture(TextureContext *tc, bool force) { void CLP(GraphicsStateGuardian):: release_texture(TextureContext *tc) { CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); + + glDeleteTextures(1, >c->_index); + + if (gtc->_buffer != 0) { + _glDeleteBuffers(1, >c->_buffer); + } + delete gtc; } @@ -4817,6 +4824,11 @@ prepare_sampler(const SamplerState &sampler) { void CLP(GraphicsStateGuardian):: release_sampler(SamplerContext *sc) { CLP(SamplerContext) *gsc = DCAST(CLP(SamplerContext), sc); + + if (gsc->_index != 0) { + _glDeleteSamplers(1, &gsc->_index); + } + delete gsc; } #endif // !OPENGLES @@ -4923,6 +4935,17 @@ prepare_shader(Shader *se) { //////////////////////////////////////////////////////////////////// void CLP(GraphicsStateGuardian):: release_shader(ShaderContext *sc) { +#ifndef OPENGLES_1 + if (sc->is_of_type(CLP(ShaderContext)::get_class_type())) { + ((CLP(ShaderContext) *)sc)->release_resources(); + } +#if defined(HAVE_CG) && !defined(OPENGLES_2) + else if (sc->is_of_type(CLP(CgShaderContext)::get_class_type())) { + ((CLP(CgShaderContext) *)sc)->release_resources(); + } +#endif +#endif + delete sc; } diff --git a/panda/src/glstuff/glSamplerContext_src.cxx b/panda/src/glstuff/glSamplerContext_src.cxx index 13f4129071..c09655912d 100644 --- a/panda/src/glstuff/glSamplerContext_src.cxx +++ b/panda/src/glstuff/glSamplerContext_src.cxx @@ -39,10 +39,7 @@ CLP(SamplerContext)(CLP(GraphicsStateGuardian) *glgsg, //////////////////////////////////////////////////////////////////// CLP(SamplerContext):: ~CLP(SamplerContext)() { - if (_index != 0) { - _glgsg->_glDeleteSamplers(1, &_index); - _index = 0; - } + // Don't call glDeleteSamplers; we may not have an active context. } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index beec31ad17..f355f2ffda 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1513,7 +1513,7 @@ get_sampler_texture_type(int &out, GLenum param_type) { //////////////////////////////////////////////////////////////////// CLP(ShaderContext):: ~CLP(ShaderContext)() { - release_resources(); + // Don't call release_resources; we may not have an active context. } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index f6231b8481..eb4e2df24f 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -116,9 +116,9 @@ public: return _type_handle; } static void init_type() { - TypedObject::init_type(); + ShaderContext::init_type(); register_type(_type_handle, CLASSPREFIX_QUOTED "ShaderContext", - TypedObject::get_class_type()); + ShaderContext::get_class_type()); } virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/glstuff/glTextureContext_src.cxx b/panda/src/glstuff/glTextureContext_src.cxx index 1383275832..470692d6bb 100644 --- a/panda/src/glstuff/glTextureContext_src.cxx +++ b/panda/src/glstuff/glTextureContext_src.cxx @@ -32,13 +32,7 @@ CLP(TextureContext):: } #endif - glDeleteTextures(1, &_index); - _index = 0; - - if (_buffer != 0) { - _glgsg->_glDeleteBuffers(1, &_buffer); - _buffer = 0; - } + // Don't call glDeleteTextures; we may not have an active context. } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glstuff/glmisc_src.cxx b/panda/src/glstuff/glmisc_src.cxx index 0d4e31ae96..cc72730a43 100644 --- a/panda/src/glstuff/glmisc_src.cxx +++ b/panda/src/glstuff/glmisc_src.cxx @@ -308,6 +308,9 @@ void CLP(init_classes)() { CLP(IndexBufferContext)::init_type(); #ifndef OPENGLES_1 CLP(ShaderContext)::init_type(); +#endif +#if defined(HAVE_CG) && !defined(OPENGLES) + CLP(CgShaderContext)::init_type(); #endif CLP(TextureContext)::init_type(); #ifndef OPENGLES diff --git a/panda/src/gobj/preparedGraphicsObjects.cxx b/panda/src/gobj/preparedGraphicsObjects.cxx index ee694450aa..075ee719fd 100644 --- a/panda/src/gobj/preparedGraphicsObjects.cxx +++ b/panda/src/gobj/preparedGraphicsObjects.cxx @@ -63,7 +63,9 @@ PreparedGraphicsObjects:: // There may be objects that are still prepared when we destruct. // If this is so, then all of the GSG's that own them have already // destructed, so we can assume their resources were internally - // cleaned up. Quietly erase these remaining objects. + // cleaned up. Besides, we may not even be allowed to call the + // GSG release methods since some APIs (eg. OpenGL) require a + // context current. So we just call the destructors. ReMutexHolder holder(_lock); release_all_textures(); @@ -72,18 +74,38 @@ PreparedGraphicsObjects:: tci != _released_textures.end(); ++tci) { TextureContext *tc = (*tci); - tc->set_owning_chain(NULL); + delete tc; } - // Is this a leak? Should we delete these TextureContexts? _released_textures.clear(); release_all_samplers(); + ReleasedSamplers::iterator ssci; + for (ssci = _released_samplers.begin(); + ssci != _released_samplers.end(); + ++ssci) { + SamplerContext *sc = (*ssci); + delete sc; + } _released_samplers.clear(); release_all_geoms(); + Geoms::iterator gci; + for (gci = _released_geoms.begin(); + gci != _released_geoms.end(); + ++gci) { + GeomContext *gc = (*gci); + delete gc; + } _released_geoms.clear(); release_all_shaders(); + Shaders::iterator sci; + for (sci = _released_shaders.begin(); + sci != _released_shaders.end(); + ++sci) { + ShaderContext *sc = (*sci); + delete sc; + } _released_shaders.clear(); release_all_vertex_buffers(); @@ -92,7 +114,7 @@ PreparedGraphicsObjects:: vbci != _released_vertex_buffers.end(); ++vbci) { VertexBufferContext *vbc = (VertexBufferContext *)(*vbci); - vbc->set_owning_chain(NULL); + delete vbc; } _released_vertex_buffers.clear(); @@ -102,7 +124,7 @@ PreparedGraphicsObjects:: ibci != _released_index_buffers.end(); ++ibci) { IndexBufferContext *ibc = (IndexBufferContext *)(*ibci); - ibc->set_owning_chain(NULL); + delete ibc; } _released_index_buffers.clear(); } From d1732a4dca9f89176a920836ff1f974eb9754a8a Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 8 Nov 2015 02:10:38 +0100 Subject: [PATCH 198/200] Fix minor preprocessor bugs, particularly parsing files with CRLF --- dtool/src/cppparser/cppPreprocessor.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index ec2771ab06..e405f2cf4c 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -154,8 +154,10 @@ int CPPPreprocessor::InputFile:: get() { assert(_in != NULL); - _line_number = _next_line_number; - _col_number = _next_col_number; + if (!_lock_position) { + _line_number = _next_line_number; + _col_number = _next_col_number; + } int c = _in->get(); @@ -201,7 +203,7 @@ peek() { // shouldn't see any of these unless there was some DOS-to-Unix file // conversion problem. while (c == '\r') { - get(); + _in->get(); c = _in->peek(); } @@ -1872,10 +1874,11 @@ get_identifier(int c) { loc.last_line = get_line_number(); loc.last_column = get_col_number(); - if ((c == '\'' || c == '"') && name != "operator") { + if ((c == '\'' || c == '"') && + (name == "L" || name == "u8" || + name == "u" || name == "U")) { // This is actually a wide-character or wide-string literal or // some such. Figure out the correct character type to use. - // We had to add in an exception in order to support operator"". CPPExpression::Type type; if (name == "L") { @@ -1886,9 +1889,6 @@ get_identifier(int c) { type = CPPExpression::T_u16string; } else if (name == "U") { type = CPPExpression::T_u32string; - } else { - type = CPPExpression::T_string; - warning("unrecognized literal prefix " + name, loc); } get(); From 0f2f27689a3f3d4998a033323f68e2ee799ac52d Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 8 Nov 2015 02:12:43 +0100 Subject: [PATCH 199/200] Convert from DOS back to Unix newlines --- panda/src/egg/config_egg.cxx | 460 ++-- panda/src/egg/config_egg.h | 96 +- panda/src/egg/eggData.cxx | 828 +++---- pandatool/src/objegg/Sources.pp | 50 +- pandatool/src/objegg/eggToObjConverter.cxx | 924 ++++---- pandatool/src/objegg/objToEggConverter.cxx | 2376 ++++++++++---------- pandatool/src/objegg/objToEggConverter.h | 304 +-- 7 files changed, 2519 insertions(+), 2519 deletions(-) diff --git a/panda/src/egg/config_egg.cxx b/panda/src/egg/config_egg.cxx index 0aa50cbcb7..166d6488e0 100644 --- a/panda/src/egg/config_egg.cxx +++ b/panda/src/egg/config_egg.cxx @@ -1,230 +1,230 @@ -// Filename: config_egg.cxx -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "config_egg.h" -#include "eggRenderMode.h" -#include "eggAnimData.h" -#include "eggAnimPreload.h" -#include "eggAttributes.h" -#include "eggBin.h" -#include "eggBinMaker.h" -#include "eggComment.h" -#include "eggCompositePrimitive.h" -#include "eggCoordinateSystem.h" -#include "eggCurve.h" -#include "eggExternalReference.h" -#include "eggFilenameNode.h" -#include "eggGroup.h" -#include "eggGroupNode.h" -#include "eggGroupUniquifier.h" -#include "eggLine.h" -#include "eggMaterial.h" -#include "eggNameUniquifier.h" -#include "eggNamedObject.h" -#include "eggNode.h" -#include "eggNurbsCurve.h" -#include "eggNurbsSurface.h" -#include "eggObject.h" -#include "eggPatch.h" -#include "eggPoint.h" -#include "eggPolygon.h" -#include "eggPolysetMaker.h" -#include "eggPoolUniquifier.h" -#include "eggPrimitive.h" -#include "eggSAnimData.h" -#include "eggSurface.h" -#include "eggSwitchCondition.h" -#include "eggTable.h" -#include "eggTexture.h" -#include "eggTriangleFan.h" -#include "eggTriangleStrip.h" -#include "eggUserData.h" -#include "eggVertex.h" -#include "eggVertexPool.h" -#include "eggVertexUV.h" -#include "eggVertexAux.h" -#include "eggXfmAnimData.h" -#include "eggXfmSAnim.h" - -#include "dconfig.h" - -Configure(config_egg); -NotifyCategoryDef(egg, ""); - -ConfigureFn(config_egg) { - init_libegg(); -} - -ConfigVariableBool egg_support_old_anims -("egg-support-old-anims", true, - PRC_DESC("Set this true to support loading of old character animation files, which " - "had the convention that the order \"phr\" implied a reversed roll.")); - -ConfigVariableBool egg_mesh -("egg-mesh", true, - PRC_DESC("Set this true to convert triangles and higher-order polygons " - "into triangle strips and triangle fans when an egg file is " - "loaded or converted to bam. Set this false just to triangulate " - "everything into independent triangles.")); - -ConfigVariableBool egg_retesselate_coplanar -("egg-retesselate-coplanar", false, - PRC_DESC("If this is true, the egg loader may reverse the " - "tesselation direction of a single pair of planar triangles that " - "share the same properties, if that will help get a better " - "triangle strip. In some rare cases, doing so can distort the " - "UV's on a face; turning this off should eliminate that artifact " - "(at the cost of less-effective triangle stripping).")); - -ConfigVariableBool egg_unroll_fans -("egg-unroll-fans", true, - PRC_DESC("Set this true to allow the egg loader to convert weak triangle " - "fans--triangles that share the same vertex but aren't " - "connected enough to justify making a triangle fan primitive " - "from them--into a series of zig-zag triangles that can make " - "a triangle strip that might connect better with its neighbors.")); - -ConfigVariableBool egg_show_tstrips -("egg-show-tstrips", false, - PRC_DESC("Set this true to color each triangle strip a random color, with " - "the leading triangle a little bit darker, so you can visually " - "observe the quality of the triangle stripping algorithm.")); - -ConfigVariableBool egg_show_qsheets -("egg-show-qsheets", false, - PRC_DESC("Set this true to color each quadsheet a random color, so you " - "can visually observe the quadsheet algorithm.")); - -ConfigVariableBool egg_show_quads -("egg-show-quads", false, - PRC_DESC("Set this true to color each detected quad a random color, so " - "you can visually observe the algorithm that unifies pairs of " - "triangles into quads (prior to generating triangle strips).")); - -ConfigVariableBool egg_subdivide_polys -("egg-subdivide-polys", true, - PRC_DESC("This is obsolete. In the old Geom implementation, it used to " - "be true to force higher-order polygons that were not otherwise " - "meshed to be subdivided into triangles. In the new " - "Geom implementation, this happens anyway.")); - -ConfigVariableBool egg_consider_fans -("egg-consider-fans", false, - PRC_DESC("Set this true to enable the egg mesher to consider making " - "triangle fans out of triangles that are connected at a common " - "vertex. This may help if your scene involves lots of such " - "connected triangles, but it can also make the overall stripping " - "less effective (by interfering with triangle strips).")); - -ConfigVariableDouble egg_max_tfan_angle -("egg-max-tfan-angle", 40.0, - PRC_DESC("The maximum average angle per triangle to allow in a triangle " - "fan. If triangles are larger than this--that is, more loosely " - "packed--then we figure a triangle strip is likely to do a " - "more effective job than a triangle fan, and the fan maker leaves " - "it alone.")); - -ConfigVariableInt egg_min_tfan_tris -("egg-min-tfan-tris", 4, - PRC_DESC("The minimum number of triangles that must be involved in order " - "to generate a triangle fan. Fewer than this is just interrupting " - "a triangle strip.")); - -ConfigVariableDouble egg_coplanar_threshold -("egg-coplanar-threshold", 0.01, - PRC_DESC("The numerical threshold below which polygons are considered " - "to be coplanar. Determined empirically.")); - -ConfigVariableInt egg_test_vref_integrity -("egg-test-vref-integrity", 20, - PRC_DESC("The maximum number of vertices a primitive may have before " - "its vertices will no longer be checked for internal integrity. " - "This is meaningful in non-production builds only.")); - -ConfigVariableInt egg_recursion_limit -("egg-recursion-limit", 1000, - PRC_DESC("The maximum number of levels that recursive algorithms within " - "the egg library are allowed to traverse. This is a simple hack " - "to prevent deeply-recursive algorithms from triggering a stack " - "overflow. Set it larger to run more efficiently if your stack " - "allows it; set it lower if you experience stack overflows.")); - -ConfigVariableInt egg_precision -("egg-precision", 15, - PRC_DESC("The number of digits of precision to write out for values in " - "an egg file. Leave this at 0 to use the default setting for the " - "stream.")); - -//////////////////////////////////////////////////////////////////// -// Function: init_libegg -// Description: Initializes the library. This must be called at -// least once before any of the functions or classes in -// this library can be used. Normally it will be -// called by the static initializers and need not be -// called explicitly, but special cases exist. -//////////////////////////////////////////////////////////////////// -void -init_libegg() { - static bool initialized = false; - if (initialized) { - return; - } - initialized = true; - - EggRenderMode::init_type(); - EggAnimData::init_type(); - EggAnimPreload::init_type(); - EggAttributes::init_type(); - EggBin::init_type(); - EggBinMaker::init_type(); - EggComment::init_type(); - EggCompositePrimitive::init_type(); - EggCoordinateSystem::init_type(); - EggCurve::init_type(); - EggData::init_type(); - EggExternalReference::init_type(); - EggFilenameNode::init_type(); - EggGroup::init_type(); - EggGroupNode::init_type(); - EggGroupUniquifier::init_type(); - EggLine::init_type(); - EggMaterial::init_type(); - EggNameUniquifier::init_type(); - EggNamedObject::init_type(); - EggNode::init_type(); - EggNurbsCurve::init_type(); - EggNurbsSurface::init_type(); - EggObject::init_type(); - EggPatch::init_type(); - EggPoint::init_type(); - EggPolygon::init_type(); - EggPolysetMaker::init_type(); - EggPoolUniquifier::init_type(); - EggPrimitive::init_type(); - EggSAnimData::init_type(); - EggSurface::init_type(); - EggSwitchCondition::init_type(); - EggSwitchConditionDistance::init_type(); - EggTable::init_type(); - EggTexture::init_type(); - EggTriangleFan::init_type(); - EggTriangleStrip::init_type(); - EggUserData::init_type(); - EggVertex::init_type(); - EggVertexPool::init_type(); - EggVertexUV::init_type(); - EggVertexAux::init_type(); - EggXfmAnimData::init_type(); - EggXfmSAnim::init_type(); -} +// Filename: config_egg.cxx +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "config_egg.h" +#include "eggRenderMode.h" +#include "eggAnimData.h" +#include "eggAnimPreload.h" +#include "eggAttributes.h" +#include "eggBin.h" +#include "eggBinMaker.h" +#include "eggComment.h" +#include "eggCompositePrimitive.h" +#include "eggCoordinateSystem.h" +#include "eggCurve.h" +#include "eggExternalReference.h" +#include "eggFilenameNode.h" +#include "eggGroup.h" +#include "eggGroupNode.h" +#include "eggGroupUniquifier.h" +#include "eggLine.h" +#include "eggMaterial.h" +#include "eggNameUniquifier.h" +#include "eggNamedObject.h" +#include "eggNode.h" +#include "eggNurbsCurve.h" +#include "eggNurbsSurface.h" +#include "eggObject.h" +#include "eggPatch.h" +#include "eggPoint.h" +#include "eggPolygon.h" +#include "eggPolysetMaker.h" +#include "eggPoolUniquifier.h" +#include "eggPrimitive.h" +#include "eggSAnimData.h" +#include "eggSurface.h" +#include "eggSwitchCondition.h" +#include "eggTable.h" +#include "eggTexture.h" +#include "eggTriangleFan.h" +#include "eggTriangleStrip.h" +#include "eggUserData.h" +#include "eggVertex.h" +#include "eggVertexPool.h" +#include "eggVertexUV.h" +#include "eggVertexAux.h" +#include "eggXfmAnimData.h" +#include "eggXfmSAnim.h" + +#include "dconfig.h" + +Configure(config_egg); +NotifyCategoryDef(egg, ""); + +ConfigureFn(config_egg) { + init_libegg(); +} + +ConfigVariableBool egg_support_old_anims +("egg-support-old-anims", true, + PRC_DESC("Set this true to support loading of old character animation files, which " + "had the convention that the order \"phr\" implied a reversed roll.")); + +ConfigVariableBool egg_mesh +("egg-mesh", true, + PRC_DESC("Set this true to convert triangles and higher-order polygons " + "into triangle strips and triangle fans when an egg file is " + "loaded or converted to bam. Set this false just to triangulate " + "everything into independent triangles.")); + +ConfigVariableBool egg_retesselate_coplanar +("egg-retesselate-coplanar", false, + PRC_DESC("If this is true, the egg loader may reverse the " + "tesselation direction of a single pair of planar triangles that " + "share the same properties, if that will help get a better " + "triangle strip. In some rare cases, doing so can distort the " + "UV's on a face; turning this off should eliminate that artifact " + "(at the cost of less-effective triangle stripping).")); + +ConfigVariableBool egg_unroll_fans +("egg-unroll-fans", true, + PRC_DESC("Set this true to allow the egg loader to convert weak triangle " + "fans--triangles that share the same vertex but aren't " + "connected enough to justify making a triangle fan primitive " + "from them--into a series of zig-zag triangles that can make " + "a triangle strip that might connect better with its neighbors.")); + +ConfigVariableBool egg_show_tstrips +("egg-show-tstrips", false, + PRC_DESC("Set this true to color each triangle strip a random color, with " + "the leading triangle a little bit darker, so you can visually " + "observe the quality of the triangle stripping algorithm.")); + +ConfigVariableBool egg_show_qsheets +("egg-show-qsheets", false, + PRC_DESC("Set this true to color each quadsheet a random color, so you " + "can visually observe the quadsheet algorithm.")); + +ConfigVariableBool egg_show_quads +("egg-show-quads", false, + PRC_DESC("Set this true to color each detected quad a random color, so " + "you can visually observe the algorithm that unifies pairs of " + "triangles into quads (prior to generating triangle strips).")); + +ConfigVariableBool egg_subdivide_polys +("egg-subdivide-polys", true, + PRC_DESC("This is obsolete. In the old Geom implementation, it used to " + "be true to force higher-order polygons that were not otherwise " + "meshed to be subdivided into triangles. In the new " + "Geom implementation, this happens anyway.")); + +ConfigVariableBool egg_consider_fans +("egg-consider-fans", false, + PRC_DESC("Set this true to enable the egg mesher to consider making " + "triangle fans out of triangles that are connected at a common " + "vertex. This may help if your scene involves lots of such " + "connected triangles, but it can also make the overall stripping " + "less effective (by interfering with triangle strips).")); + +ConfigVariableDouble egg_max_tfan_angle +("egg-max-tfan-angle", 40.0, + PRC_DESC("The maximum average angle per triangle to allow in a triangle " + "fan. If triangles are larger than this--that is, more loosely " + "packed--then we figure a triangle strip is likely to do a " + "more effective job than a triangle fan, and the fan maker leaves " + "it alone.")); + +ConfigVariableInt egg_min_tfan_tris +("egg-min-tfan-tris", 4, + PRC_DESC("The minimum number of triangles that must be involved in order " + "to generate a triangle fan. Fewer than this is just interrupting " + "a triangle strip.")); + +ConfigVariableDouble egg_coplanar_threshold +("egg-coplanar-threshold", 0.01, + PRC_DESC("The numerical threshold below which polygons are considered " + "to be coplanar. Determined empirically.")); + +ConfigVariableInt egg_test_vref_integrity +("egg-test-vref-integrity", 20, + PRC_DESC("The maximum number of vertices a primitive may have before " + "its vertices will no longer be checked for internal integrity. " + "This is meaningful in non-production builds only.")); + +ConfigVariableInt egg_recursion_limit +("egg-recursion-limit", 1000, + PRC_DESC("The maximum number of levels that recursive algorithms within " + "the egg library are allowed to traverse. This is a simple hack " + "to prevent deeply-recursive algorithms from triggering a stack " + "overflow. Set it larger to run more efficiently if your stack " + "allows it; set it lower if you experience stack overflows.")); + +ConfigVariableInt egg_precision +("egg-precision", 15, + PRC_DESC("The number of digits of precision to write out for values in " + "an egg file. Leave this at 0 to use the default setting for the " + "stream.")); + +//////////////////////////////////////////////////////////////////// +// Function: init_libegg +// Description: Initializes the library. This must be called at +// least once before any of the functions or classes in +// this library can be used. Normally it will be +// called by the static initializers and need not be +// called explicitly, but special cases exist. +//////////////////////////////////////////////////////////////////// +void +init_libegg() { + static bool initialized = false; + if (initialized) { + return; + } + initialized = true; + + EggRenderMode::init_type(); + EggAnimData::init_type(); + EggAnimPreload::init_type(); + EggAttributes::init_type(); + EggBin::init_type(); + EggBinMaker::init_type(); + EggComment::init_type(); + EggCompositePrimitive::init_type(); + EggCoordinateSystem::init_type(); + EggCurve::init_type(); + EggData::init_type(); + EggExternalReference::init_type(); + EggFilenameNode::init_type(); + EggGroup::init_type(); + EggGroupNode::init_type(); + EggGroupUniquifier::init_type(); + EggLine::init_type(); + EggMaterial::init_type(); + EggNameUniquifier::init_type(); + EggNamedObject::init_type(); + EggNode::init_type(); + EggNurbsCurve::init_type(); + EggNurbsSurface::init_type(); + EggObject::init_type(); + EggPatch::init_type(); + EggPoint::init_type(); + EggPolygon::init_type(); + EggPolysetMaker::init_type(); + EggPoolUniquifier::init_type(); + EggPrimitive::init_type(); + EggSAnimData::init_type(); + EggSurface::init_type(); + EggSwitchCondition::init_type(); + EggSwitchConditionDistance::init_type(); + EggTable::init_type(); + EggTexture::init_type(); + EggTriangleFan::init_type(); + EggTriangleStrip::init_type(); + EggUserData::init_type(); + EggVertex::init_type(); + EggVertexPool::init_type(); + EggVertexUV::init_type(); + EggVertexAux::init_type(); + EggXfmAnimData::init_type(); + EggXfmSAnim::init_type(); +} diff --git a/panda/src/egg/config_egg.h b/panda/src/egg/config_egg.h index dbd47ab3b8..20119cd07c 100644 --- a/panda/src/egg/config_egg.h +++ b/panda/src/egg/config_egg.h @@ -1,48 +1,48 @@ -// Filename: config_egg.h -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#ifndef CONFIG_EGG_H -#define CONFIG_EGG_H - -#include "pandabase.h" -#include "notifyCategoryProxy.h" -#include "configVariableSearchPath.h" -#include "configVariableBool.h" -#include "configVariableEnum.h" -#include "configVariableDouble.h" -#include "configVariableInt.h" - -NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); - -extern ConfigVariableBool egg_support_old_anims; - -extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; -extern EXPCL_PANDAEGG ConfigVariableBool egg_retesselate_coplanar; -extern EXPCL_PANDAEGG ConfigVariableBool egg_unroll_fans; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_tstrips; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_qsheets; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_quads; -#define egg_false_color (egg_show_tstrips | egg_show_qsheets | egg_show_quads) -extern EXPCL_PANDAEGG ConfigVariableBool egg_subdivide_polys; -extern EXPCL_PANDAEGG ConfigVariableBool egg_consider_fans; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_max_tfan_angle; -extern EXPCL_PANDAEGG ConfigVariableInt egg_min_tfan_tris; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_coplanar_threshold; -extern EXPCL_PANDAEGG ConfigVariableInt egg_test_vref_integrity; -extern EXPCL_PANDAEGG ConfigVariableInt egg_recursion_limit; -extern EXPCL_PANDAEGG ConfigVariableInt egg_precision; - -extern EXPCL_PANDAEGG void init_libegg(); - -#endif +// Filename: config_egg.h +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef CONFIG_EGG_H +#define CONFIG_EGG_H + +#include "pandabase.h" +#include "notifyCategoryProxy.h" +#include "configVariableSearchPath.h" +#include "configVariableBool.h" +#include "configVariableEnum.h" +#include "configVariableDouble.h" +#include "configVariableInt.h" + +NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); + +extern ConfigVariableBool egg_support_old_anims; + +extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; +extern EXPCL_PANDAEGG ConfigVariableBool egg_retesselate_coplanar; +extern EXPCL_PANDAEGG ConfigVariableBool egg_unroll_fans; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_tstrips; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_qsheets; +extern EXPCL_PANDAEGG ConfigVariableBool egg_show_quads; +#define egg_false_color (egg_show_tstrips | egg_show_qsheets | egg_show_quads) +extern EXPCL_PANDAEGG ConfigVariableBool egg_subdivide_polys; +extern EXPCL_PANDAEGG ConfigVariableBool egg_consider_fans; +extern EXPCL_PANDAEGG ConfigVariableDouble egg_max_tfan_angle; +extern EXPCL_PANDAEGG ConfigVariableInt egg_min_tfan_tris; +extern EXPCL_PANDAEGG ConfigVariableDouble egg_coplanar_threshold; +extern EXPCL_PANDAEGG ConfigVariableInt egg_test_vref_integrity; +extern EXPCL_PANDAEGG ConfigVariableInt egg_recursion_limit; +extern EXPCL_PANDAEGG ConfigVariableInt egg_precision; + +extern EXPCL_PANDAEGG void init_libegg(); + +#endif diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index 71e6fd1424..da891bfb9e 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -1,414 +1,414 @@ -// Filename: eggData.cxx -// Created by: drose (20Jan99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "eggData.h" -#include "eggCoordinateSystem.h" -#include "eggTextureCollection.h" -#include "eggMaterialCollection.h" -#include "eggComment.h" -#include "eggPoolUniquifier.h" -#include "config_egg.h" -#include "config_util.h" -#include "config_express.h" -#include "string_utils.h" -#include "dSearchPath.h" -#include "virtualFileSystem.h" -#include "lightMutexHolder.h" -#include "zStream.h" - -extern int eggyyparse(); -#include "parserDefs.h" -#include "lexerDefs.h" - -TypeHandle EggData::_type_handle; - -//////////////////////////////////////////////////////////////////// -// Function: EggData::resolve_egg_filename -// Access: Public, Static -// Description: Looks for the indicated filename, first along the -// indicated searchpath, and then along the model_path. -// If found, updates the filename to the full path and -// returns true; otherwise, returns false. -//////////////////////////////////////////////////////////////////// -bool EggData:: -resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - - if (egg_filename.is_fully_qualified() && vfs->exists(egg_filename)) { - return true; - } - - vfs->resolve_filename(egg_filename, searchpath, "egg") || - vfs->resolve_filename(egg_filename, get_model_path(), "egg"); - - return vfs->exists(egg_filename); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::read -// Access: Public -// Description: Opens the indicated filename and reads the egg data -// contents from it. Returns true if the file was -// successfully opened and read, false if there were -// some errors, in which case the data may be partially -// read. -// -// error is the output stream to which to write error -// messages. -//////////////////////////////////////////////////////////////////// -bool EggData:: -read(Filename filename, string display_name) { - filename.set_text(); - set_egg_filename(filename); - - if (display_name.empty()) { - display_name = filename; - } - - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - - PT(VirtualFile) vfile = vfs->get_file(filename); - if (vfile == NULL) { - egg_cat.error() << "Could not find " << display_name << "\n"; - return false; - } - set_egg_timestamp(vfile->get_timestamp()); - - istream *file = vfile->open_read_file(true); - if (file == (istream *)NULL) { - egg_cat.error() << "Unable to open " << display_name << "\n"; - return false; - } - - egg_cat.info() - << "Reading " << display_name << "\n"; - - bool read_ok = read(*file); - vfile->close_read_file(file); - return read_ok; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::read -// Access: Public -// Description: Parses the egg syntax contained in the indicated -// input stream. Returns true if the stream was a -// completely valid egg file, false if there were some -// errors, in which case the data may be partially read. -// -// Before you call this routine, you should probably -// call set_egg_filename() to set the name of the egg -// file we're processing, if at all possible. If there -// is no such filename, you may set it to the empty -// string. -//////////////////////////////////////////////////////////////////// -bool EggData:: -read(istream &in) { - // First, dispense with any children we had previously. We will - // replace them with the new data. - clear(); - - // Create a temporary EggData structure to read into. We initialize - // it with a copy of ourselves, so that it will get our _coordsys - // value, if the user set it. - PT(EggData) data = new EggData(*this); - - int error_count; - { - LightMutexHolder holder(egg_lock); - egg_init_parser(in, get_egg_filename(), data, data); - eggyyparse(); - egg_cleanup_parser(); - error_count = egg_error_count(); - } - - data->post_read(); - - steal_children(*data); - (*this) = *data; - - return (error_count == 0); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::merge -// Access: Public -// Description: Appends the other egg structure to the end of this -// one. The other egg structure is invalidated. -//////////////////////////////////////////////////////////////////// -void EggData:: -merge(EggData &other) { - if (get_coordinate_system() == CS_default) { - // If we haven't specified a coordinate system yet, we inherit the - // other one's. - set_coordinate_system(other.get_coordinate_system()); - - } else { - // Otherwise, the other one is forced into our coordinate system - // before we merge. - other.set_coordinate_system(get_coordinate_system()); - } - steal_children(other); -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::load_externals -// Access: Public -// Description: Loads up all the egg files referenced by -// entries within the egg structure, and inserts their -// contents in place of the entries. Searches -// for files in the searchpath, if not found directly, -// and writes error messages to the indicated output -// stream. Returns true if all externals were loaded -// successfully, false otherwise. -//////////////////////////////////////////////////////////////////// -bool EggData:: -load_externals(const DSearchPath &searchpath) { - return - r_load_externals(searchpath, get_coordinate_system(), NULL); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::load_externals -// Access: Public -// Description: Loads up all the egg files referenced by -// entries within the egg structure, and inserts their -// contents in place of the entries. Searches -// for files in the searchpath, if not found directly, -// and writes error messages to the indicated output -// stream. Returns true if all externals were loaded -// successfully, false otherwise. -//////////////////////////////////////////////////////////////////// -bool EggData:: -load_externals(const DSearchPath &searchpath, BamCacheRecord *record) { - return - r_load_externals(searchpath, get_coordinate_system(), record); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::collapse_equivalent_textures -// Access: Public -// Description: Removes duplicate references to the same texture -// image with the same properties. Considers two -// texture references with identical properties, but -// different tref names, to be equivalent, and collapses -// them, choosing one tref name to keep arbitrarily. -// Returns the number of textures removed. -//////////////////////////////////////////////////////////////////// -int EggData:: -collapse_equivalent_textures() { - EggTextureCollection textures; - textures.find_used_textures(this); - return - textures.collapse_equivalent_textures(~EggTexture::E_tref_name, this); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::collapse_equivalent_materials -// Access: Public -// Description: Removes duplicate references to the same material -// with the same properties. Considers two material -// references with identical properties, but different -// mref names, to be equivalent, and collapses them, -// choosing one mref name to keep arbitrarily. Returns -// the number of materials removed. -//////////////////////////////////////////////////////////////////// -int EggData:: -collapse_equivalent_materials() { - EggMaterialCollection materials; - materials.find_used_materials(this); - return - materials.collapse_equivalent_materials(~EggMaterial::E_mref_name, this); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write_egg -// Access: Public -// Description: The main interface for writing complete egg files. -//////////////////////////////////////////////////////////////////// -bool EggData:: -write_egg(Filename filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - filename.set_text(); - vfs->delete_file(filename); - ostream *file = vfs->open_write_file(filename, true, true); - if (file == (ostream *)NULL) { - egg_cat.error() << "Unable to open " << filename << " for writing.\n"; - return false; - } - - bool wrote_ok = write_egg(*file); - vfs->close_write_file(file); - return wrote_ok; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write_egg -// Access: Public -// Description: The main interface for writing complete egg files. -//////////////////////////////////////////////////////////////////// -bool EggData:: -write_egg(ostream &out) { - pre_write(); - - if (egg_precision > 0) { - // Change the egg precision as requested. - streamsize orig_precision = out.precision(); - out.precision((streamsize)egg_precision); - write(out, 0); - out.precision(orig_precision); - } else { - // Use the stream default precision. - write(out, 0); - } - return true; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::set_coordinate_system -// Access: Public -// Description: Changes the coordinate system of the EggData. If the -// coordinate system was previously different, this may -// result in a conversion of the data. -//////////////////////////////////////////////////////////////////// -void EggData:: -set_coordinate_system(CoordinateSystem new_coordsys) { - if (new_coordsys == CS_default) { - new_coordsys = get_default_coordinate_system(); - } - if (new_coordsys != _coordsys && - (_coordsys != CS_default && _coordsys != CS_invalid)) { - // Time to convert the data. - LMatrix4d mat = LMatrix4d::convert_mat(_coordsys, new_coordsys); - LMatrix4d inv = LMatrix4d::convert_mat(new_coordsys, _coordsys); - - r_transform(mat, inv, new_coordsys); - r_transform_vertices(mat); - - // Now we have to update the under_flags to ensure that all the - // cached relative matrices are correct. - update_under(0); - } - - _coordsys = new_coordsys; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::write -// Access: Protected, Virtual -// Description: Writes the egg data out to the indicated output -// stream. -//////////////////////////////////////////////////////////////////// -void EggData:: -write(ostream &out, int indent_level) const { - PT(EggCoordinateSystem) ecs = new EggCoordinateSystem(_coordsys); - ecs->write(out, indent_level); - EggGroupNode::write(out, indent_level); - out << flush; -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggData::post_read -// Access: Private -// Description: Does whatever processing is appropriate after reading -// the data in from an egg file. -//////////////////////////////////////////////////////////////////// -void EggData:: -post_read() { - CoordinateSystem old_coordsys = _coordsys; - _coordsys = find_coordsys_entry(); - - if (_coordsys == CS_default) { - // If the egg file didn't contain a entry, - // assume it's Y-up, by convention. - _coordsys = CS_yup_right; - - } else if (_coordsys == CS_invalid) { - egg_cat.warning() - << "Contradictory entries encountered.\n"; - _coordsys = CS_yup_right; - } - - r_mark_coordsys(_coordsys); - - if (old_coordsys != CS_default) { - // Now if we had a previous definition, enforce it. This might - // convert the data to the given coordinate system. - set_coordinate_system(old_coordsys); - } - - // Fill this in before we automatically resolve pathnames. - _had_absolute_pathnames = has_absolute_pathnames(); - - if (get_auto_resolve_externals()) { - // Resolve filenames that are relative to the egg file. - DSearchPath dir; - dir.append_directory(get_egg_filename().get_dirname()); - resolve_filenames(dir); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggData::pre_write -// Access: Private -// Description: Does whatever processing is appropriate just before -// writing the data out to an egg file. This includes -// verifying that vertex pool names are unique, etc. -//////////////////////////////////////////////////////////////////// -void EggData:: -pre_write() { - // Pull out all of the texture definitions in the file and massage - // them a bit. - EggTextureCollection textures; - textures.extract_textures(this); - - // Remove any textures that aren't being used. - textures.remove_unused_textures(this); - - // Collapse out any textures that are completely equivalent. For - // this purpose, we consider two textures with identical properties - // but different tref names to be different. - textures.collapse_equivalent_textures(~0, this); - - // Make sure all of the textures have unique TRef names. - textures.uniquify_trefs(); - textures.sort_by_tref(); - - // Do the same thing with the materials. - EggMaterialCollection materials; - materials.extract_materials(this); - materials.remove_unused_materials(this); - materials.collapse_equivalent_materials(~0, this); - materials.uniquify_mrefs(); - materials.sort_by_mref(); - - // Now put them all back at the head of the file, after any initial - // comment records. - iterator ci = begin(); - while (ci != end() && (*ci)->is_of_type(EggComment::get_class_type())) { - ++ci; - } - textures.insert_textures(this, ci); - materials.insert_materials(this, ci); - - // Also make sure that the vertex pools are uniquely named. This - // also checks textures and materials, which is kind of redundant - // since we just did that, but we don't mind. - EggPoolUniquifier pu; - pu.uniquify(this); -} +// Filename: eggData.cxx +// Created by: drose (20Jan99) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "eggData.h" +#include "eggCoordinateSystem.h" +#include "eggTextureCollection.h" +#include "eggMaterialCollection.h" +#include "eggComment.h" +#include "eggPoolUniquifier.h" +#include "config_egg.h" +#include "config_util.h" +#include "config_express.h" +#include "string_utils.h" +#include "dSearchPath.h" +#include "virtualFileSystem.h" +#include "lightMutexHolder.h" +#include "zStream.h" + +extern int eggyyparse(); +#include "parserDefs.h" +#include "lexerDefs.h" + +TypeHandle EggData::_type_handle; + +//////////////////////////////////////////////////////////////////// +// Function: EggData::resolve_egg_filename +// Access: Public, Static +// Description: Looks for the indicated filename, first along the +// indicated searchpath, and then along the model_path. +// If found, updates the filename to the full path and +// returns true; otherwise, returns false. +//////////////////////////////////////////////////////////////////// +bool EggData:: +resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + + if (egg_filename.is_fully_qualified() && vfs->exists(egg_filename)) { + return true; + } + + vfs->resolve_filename(egg_filename, searchpath, "egg") || + vfs->resolve_filename(egg_filename, get_model_path(), "egg"); + + return vfs->exists(egg_filename); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::read +// Access: Public +// Description: Opens the indicated filename and reads the egg data +// contents from it. Returns true if the file was +// successfully opened and read, false if there were +// some errors, in which case the data may be partially +// read. +// +// error is the output stream to which to write error +// messages. +//////////////////////////////////////////////////////////////////// +bool EggData:: +read(Filename filename, string display_name) { + filename.set_text(); + set_egg_filename(filename); + + if (display_name.empty()) { + display_name = filename; + } + + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + + PT(VirtualFile) vfile = vfs->get_file(filename); + if (vfile == NULL) { + egg_cat.error() << "Could not find " << display_name << "\n"; + return false; + } + set_egg_timestamp(vfile->get_timestamp()); + + istream *file = vfile->open_read_file(true); + if (file == (istream *)NULL) { + egg_cat.error() << "Unable to open " << display_name << "\n"; + return false; + } + + egg_cat.info() + << "Reading " << display_name << "\n"; + + bool read_ok = read(*file); + vfile->close_read_file(file); + return read_ok; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::read +// Access: Public +// Description: Parses the egg syntax contained in the indicated +// input stream. Returns true if the stream was a +// completely valid egg file, false if there were some +// errors, in which case the data may be partially read. +// +// Before you call this routine, you should probably +// call set_egg_filename() to set the name of the egg +// file we're processing, if at all possible. If there +// is no such filename, you may set it to the empty +// string. +//////////////////////////////////////////////////////////////////// +bool EggData:: +read(istream &in) { + // First, dispense with any children we had previously. We will + // replace them with the new data. + clear(); + + // Create a temporary EggData structure to read into. We initialize + // it with a copy of ourselves, so that it will get our _coordsys + // value, if the user set it. + PT(EggData) data = new EggData(*this); + + int error_count; + { + LightMutexHolder holder(egg_lock); + egg_init_parser(in, get_egg_filename(), data, data); + eggyyparse(); + egg_cleanup_parser(); + error_count = egg_error_count(); + } + + data->post_read(); + + steal_children(*data); + (*this) = *data; + + return (error_count == 0); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::merge +// Access: Public +// Description: Appends the other egg structure to the end of this +// one. The other egg structure is invalidated. +//////////////////////////////////////////////////////////////////// +void EggData:: +merge(EggData &other) { + if (get_coordinate_system() == CS_default) { + // If we haven't specified a coordinate system yet, we inherit the + // other one's. + set_coordinate_system(other.get_coordinate_system()); + + } else { + // Otherwise, the other one is forced into our coordinate system + // before we merge. + other.set_coordinate_system(get_coordinate_system()); + } + steal_children(other); +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::load_externals +// Access: Public +// Description: Loads up all the egg files referenced by +// entries within the egg structure, and inserts their +// contents in place of the entries. Searches +// for files in the searchpath, if not found directly, +// and writes error messages to the indicated output +// stream. Returns true if all externals were loaded +// successfully, false otherwise. +//////////////////////////////////////////////////////////////////// +bool EggData:: +load_externals(const DSearchPath &searchpath) { + return + r_load_externals(searchpath, get_coordinate_system(), NULL); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::load_externals +// Access: Public +// Description: Loads up all the egg files referenced by +// entries within the egg structure, and inserts their +// contents in place of the entries. Searches +// for files in the searchpath, if not found directly, +// and writes error messages to the indicated output +// stream. Returns true if all externals were loaded +// successfully, false otherwise. +//////////////////////////////////////////////////////////////////// +bool EggData:: +load_externals(const DSearchPath &searchpath, BamCacheRecord *record) { + return + r_load_externals(searchpath, get_coordinate_system(), record); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::collapse_equivalent_textures +// Access: Public +// Description: Removes duplicate references to the same texture +// image with the same properties. Considers two +// texture references with identical properties, but +// different tref names, to be equivalent, and collapses +// them, choosing one tref name to keep arbitrarily. +// Returns the number of textures removed. +//////////////////////////////////////////////////////////////////// +int EggData:: +collapse_equivalent_textures() { + EggTextureCollection textures; + textures.find_used_textures(this); + return + textures.collapse_equivalent_textures(~EggTexture::E_tref_name, this); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::collapse_equivalent_materials +// Access: Public +// Description: Removes duplicate references to the same material +// with the same properties. Considers two material +// references with identical properties, but different +// mref names, to be equivalent, and collapses them, +// choosing one mref name to keep arbitrarily. Returns +// the number of materials removed. +//////////////////////////////////////////////////////////////////// +int EggData:: +collapse_equivalent_materials() { + EggMaterialCollection materials; + materials.find_used_materials(this); + return + materials.collapse_equivalent_materials(~EggMaterial::E_mref_name, this); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write_egg +// Access: Public +// Description: The main interface for writing complete egg files. +//////////////////////////////////////////////////////////////////// +bool EggData:: +write_egg(Filename filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + filename.set_text(); + vfs->delete_file(filename); + ostream *file = vfs->open_write_file(filename, true, true); + if (file == (ostream *)NULL) { + egg_cat.error() << "Unable to open " << filename << " for writing.\n"; + return false; + } + + bool wrote_ok = write_egg(*file); + vfs->close_write_file(file); + return wrote_ok; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write_egg +// Access: Public +// Description: The main interface for writing complete egg files. +//////////////////////////////////////////////////////////////////// +bool EggData:: +write_egg(ostream &out) { + pre_write(); + + if (egg_precision > 0) { + // Change the egg precision as requested. + streamsize orig_precision = out.precision(); + out.precision((streamsize)egg_precision); + write(out, 0); + out.precision(orig_precision); + } else { + // Use the stream default precision. + write(out, 0); + } + return true; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::set_coordinate_system +// Access: Public +// Description: Changes the coordinate system of the EggData. If the +// coordinate system was previously different, this may +// result in a conversion of the data. +//////////////////////////////////////////////////////////////////// +void EggData:: +set_coordinate_system(CoordinateSystem new_coordsys) { + if (new_coordsys == CS_default) { + new_coordsys = get_default_coordinate_system(); + } + if (new_coordsys != _coordsys && + (_coordsys != CS_default && _coordsys != CS_invalid)) { + // Time to convert the data. + LMatrix4d mat = LMatrix4d::convert_mat(_coordsys, new_coordsys); + LMatrix4d inv = LMatrix4d::convert_mat(new_coordsys, _coordsys); + + r_transform(mat, inv, new_coordsys); + r_transform_vertices(mat); + + // Now we have to update the under_flags to ensure that all the + // cached relative matrices are correct. + update_under(0); + } + + _coordsys = new_coordsys; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::write +// Access: Protected, Virtual +// Description: Writes the egg data out to the indicated output +// stream. +//////////////////////////////////////////////////////////////////// +void EggData:: +write(ostream &out, int indent_level) const { + PT(EggCoordinateSystem) ecs = new EggCoordinateSystem(_coordsys); + ecs->write(out, indent_level); + EggGroupNode::write(out, indent_level); + out << flush; +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggData::post_read +// Access: Private +// Description: Does whatever processing is appropriate after reading +// the data in from an egg file. +//////////////////////////////////////////////////////////////////// +void EggData:: +post_read() { + CoordinateSystem old_coordsys = _coordsys; + _coordsys = find_coordsys_entry(); + + if (_coordsys == CS_default) { + // If the egg file didn't contain a entry, + // assume it's Y-up, by convention. + _coordsys = CS_yup_right; + + } else if (_coordsys == CS_invalid) { + egg_cat.warning() + << "Contradictory entries encountered.\n"; + _coordsys = CS_yup_right; + } + + r_mark_coordsys(_coordsys); + + if (old_coordsys != CS_default) { + // Now if we had a previous definition, enforce it. This might + // convert the data to the given coordinate system. + set_coordinate_system(old_coordsys); + } + + // Fill this in before we automatically resolve pathnames. + _had_absolute_pathnames = has_absolute_pathnames(); + + if (get_auto_resolve_externals()) { + // Resolve filenames that are relative to the egg file. + DSearchPath dir; + dir.append_directory(get_egg_filename().get_dirname()); + resolve_filenames(dir); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggData::pre_write +// Access: Private +// Description: Does whatever processing is appropriate just before +// writing the data out to an egg file. This includes +// verifying that vertex pool names are unique, etc. +//////////////////////////////////////////////////////////////////// +void EggData:: +pre_write() { + // Pull out all of the texture definitions in the file and massage + // them a bit. + EggTextureCollection textures; + textures.extract_textures(this); + + // Remove any textures that aren't being used. + textures.remove_unused_textures(this); + + // Collapse out any textures that are completely equivalent. For + // this purpose, we consider two textures with identical properties + // but different tref names to be different. + textures.collapse_equivalent_textures(~0, this); + + // Make sure all of the textures have unique TRef names. + textures.uniquify_trefs(); + textures.sort_by_tref(); + + // Do the same thing with the materials. + EggMaterialCollection materials; + materials.extract_materials(this); + materials.remove_unused_materials(this); + materials.collapse_equivalent_materials(~0, this); + materials.uniquify_mrefs(); + materials.sort_by_mref(); + + // Now put them all back at the head of the file, after any initial + // comment records. + iterator ci = begin(); + while (ci != end() && (*ci)->is_of_type(EggComment::get_class_type())) { + ++ci; + } + textures.insert_textures(this, ci); + materials.insert_materials(this, ci); + + // Also make sure that the vertex pools are uniquely named. This + // also checks textures and materials, which is kind of redundant + // since we just did that, but we don't mind. + EggPoolUniquifier pu; + pu.uniquify(this); +} diff --git a/pandatool/src/objegg/Sources.pp b/pandatool/src/objegg/Sources.pp index 7e372a8666..fb787d47bf 100644 --- a/pandatool/src/objegg/Sources.pp +++ b/pandatool/src/objegg/Sources.pp @@ -1,25 +1,25 @@ -#begin ss_lib_target - #define TARGET p3objegg - #define LOCAL_LIBS p3converter p3pandatoolbase - #define OTHER_LIBS \ - p3egg:c pandaegg:m \ - p3pipeline:c p3event:c p3pstatclient:c panda:m \ - p3pandabase:c p3pnmimage:c p3mathutil:c p3linmath:c p3putil:c p3express:c \ - p3interrogatedb:c p3prc:c p3dconfig:c p3dtoolconfig:m \ - p3dtoolutil:c p3dtoolbase:c p3dtool:m \ - $[if $[WANT_NATIVE_NET],p3nativenet:c] \ - $[if $[and $[HAVE_NET],$[WANT_NATIVE_NET]],p3net:c p3downloader:c] - - #define UNIX_SYS_LIBS \ - m - - #define SOURCES \ - config_objegg.cxx config_objegg.h \ - objToEggConverter.cxx objToEggConverter.h objToEggConverter.I \ - eggToObjConverter.cxx eggToObjConverter.h - - #define INSTALL_HEADERS \ - objToEggConverter.h objToEggConverter.I \ - eggToObjConverter.h - -#end ss_lib_target +#begin ss_lib_target + #define TARGET p3objegg + #define LOCAL_LIBS p3converter p3pandatoolbase + #define OTHER_LIBS \ + p3egg:c pandaegg:m \ + p3pipeline:c p3event:c p3pstatclient:c panda:m \ + p3pandabase:c p3pnmimage:c p3mathutil:c p3linmath:c p3putil:c p3express:c \ + p3interrogatedb:c p3prc:c p3dconfig:c p3dtoolconfig:m \ + p3dtoolutil:c p3dtoolbase:c p3dtool:m \ + $[if $[WANT_NATIVE_NET],p3nativenet:c] \ + $[if $[and $[HAVE_NET],$[WANT_NATIVE_NET]],p3net:c p3downloader:c] + + #define UNIX_SYS_LIBS \ + m + + #define SOURCES \ + config_objegg.cxx config_objegg.h \ + objToEggConverter.cxx objToEggConverter.h objToEggConverter.I \ + eggToObjConverter.cxx eggToObjConverter.h + + #define INSTALL_HEADERS \ + objToEggConverter.h objToEggConverter.I \ + eggToObjConverter.h + +#end ss_lib_target diff --git a/pandatool/src/objegg/eggToObjConverter.cxx b/pandatool/src/objegg/eggToObjConverter.cxx index 193782ff00..314785a83d 100644 --- a/pandatool/src/objegg/eggToObjConverter.cxx +++ b/pandatool/src/objegg/eggToObjConverter.cxx @@ -1,462 +1,462 @@ -// Filename: eggToObjConverter.cxx -// Created by: drose (19Dec12) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "eggToObjConverter.h" -#include "config_objegg.h" -#include "config_egg.h" -#include "eggData.h" -#include "string_utils.h" -#include "streamReader.h" -#include "virtualFileSystem.h" -#include "eggPolygon.h" -#include "eggPoint.h" -#include "eggLine.h" -#include "dcast.h" - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -EggToObjConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Copy Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -EggToObjConverter(const EggToObjConverter ©) : - EggToSomethingConverter(copy) -{ -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::Destructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter:: -~EggToObjConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::make_copy -// Access: Public, Virtual -// Description: Allocates and returns a new copy of the converter. -//////////////////////////////////////////////////////////////////// -EggToSomethingConverter *EggToObjConverter:: -make_copy() { - return new EggToObjConverter(*this); -} - - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_name -// Access: Public, Virtual -// Description: Returns the English name of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string EggToObjConverter:: -get_name() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_extension -// Access: Public, Virtual -// Description: Returns the common extension of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string EggToObjConverter:: -get_extension() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::supports_compressed -// Access: Published, Virtual -// Description: Returns true if this file type can transparently save -// compressed files (with a .pz extension), false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -supports_compressed() const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_file -// Access: Public, Virtual -// Description: Handles the conversion of the internal EggData to the -// target file format, written to the specified -// filename. -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -write_file(const Filename &filename) { - clear_error(); - - if (_egg_data->get_coordinate_system() == CS_default) { - _egg_data->set_coordinate_system(CS_zup_right); - } - - if (!process(filename)) { - _error = true; - } - return !had_error(); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::process -// Access: Private -// Description: -//////////////////////////////////////////////////////////////////// -bool EggToObjConverter:: -process(const Filename &filename) { - _egg_data->flatten_transforms(); - collect_vertices(_egg_data); - - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - Filename obj_filename = Filename::text_filename(filename); - vfs->delete_file(obj_filename); - ostream *file = vfs->open_write_file(obj_filename, true, true); - if (file == (ostream *)NULL) { - return false; - } - if (egg_precision != 0) { - file->precision(egg_precision); - } - - _current_group = NULL; - - /* - (*file) << "\n#\n" - << "# obj file generated by the following command:\n" - << "# " << get_exec_command() << "\n" - << "#\n\n"; - */ - - write_vertices(*file, "v", 3, _unique_vert3); - write_vertices(*file, "v", 4, _unique_vert4); - write_vertices(*file, "vt", 2, _unique_uv2); - write_vertices(*file, "vt", 3, _unique_uv3); - write_vertices(*file, "vn", 3, _unique_norm); - - write_faces(*file, _egg_data); - - bool success = (file != (ostream *)NULL); - vfs->close_write_file(file); - - return success; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::collect_vertices -// Access: Private -// Description: Recursively walks the egg structure, looking for -// vertices referenced by polygons or points. Any such -// vertices are added to the vertex tables for writing -// to the obj file. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -collect_vertices(EggNode *egg_node) { - if (egg_node->is_of_type(EggPrimitive::get_class_type())) { - EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); - EggPrimitive::iterator pi; - for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { - record_vertex(*pi); - } - - } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { - EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); - - EggGroupNode::iterator ci; - for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { - collect_vertices(*ci); - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_faces -// Access: Private -// Description: Recursively walks the egg structure again, this time -// writing out the face records for any polygons, -// points, or lines encountered. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_faces(ostream &out, EggNode *egg_node) { - if (egg_node->is_of_type(EggPrimitive::get_class_type())) { - const char *prim_type = NULL; - if (egg_node->is_of_type(EggPolygon::get_class_type())) { - prim_type = "f"; - } else if (egg_node->is_of_type(EggPoint::get_class_type())) { - prim_type = "p"; - } else if (egg_node->is_of_type(EggLine::get_class_type())) { - prim_type = "l"; - } - - if (prim_type != NULL) { - write_group_reference(out, egg_node); - - EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); - - out << prim_type; - EggPrimitive::iterator pi; - for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { - VertexDef &vdef = _vmap[(*pi)]; - int vert_index = -1; - int uv_index = -1; - int norm_index = -1; - - if (vdef._vert3_index != -1) { - vert_index = vdef._vert3_index + 1; - } else if (vdef._vert4_index != -1) { - vert_index = vdef._vert4_index + 1 + (int)_unique_vert3.size(); - } - - if (vdef._uv2_index != -1) { - uv_index = vdef._uv2_index + 1; - } else if (vdef._uv3_index != -1) { - uv_index = vdef._uv3_index + 1 + (int)_unique_uv2.size(); - } - - if (vdef._norm_index != -1) { - norm_index = vdef._norm_index + 1; - } - - if (vert_index == -1) { - continue; - } - - if (norm_index != -1) { - if (uv_index != -1) { - out << " " << vert_index << "/" << uv_index << "/" << norm_index; - } else { - out << " " << vert_index << "//" << norm_index; - } - } else if (uv_index != -1) { - out << " " << vert_index << "/" << uv_index; - } else { - out << " " << vert_index; - } - } - out << "\n"; - } - } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { - EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); - - EggGroupNode::iterator ci; - for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { - write_faces(out, *ci); - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_group_reference -// Access: Private -// Description: Writes the "g" tag to describe this polygon's group, -// if needed. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_group_reference(ostream &out, EggNode *egg_node) { - EggGroupNode *egg_group = egg_node->get_parent(); - if (egg_group == _current_group) { - // Same group we wrote last time. - return; - } - - string group_name; - get_group_name(group_name, egg_group); - if (group_name.empty()) { - out << "g default\n"; - } else { - out << "g" << group_name << "\n"; - } - _current_group = egg_group; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::get_group_name -// Access: Private -// Description: Recursively determines the appropriate string to -// write for the "g" tag to describe a particular -// EggGroupNode. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -get_group_name(string &group_name, EggGroupNode *egg_group) { - string name = trim(egg_group->get_name()); - if (!name.empty()) { - group_name += ' '; - - // Remove nonstandard characters. - for (string::const_iterator ni = name.begin(); ni != name.end(); ++ni) { - char c = (*ni); - if (!isalnum(c)) { - c = '_'; - } - group_name += c; - } - } - - // Now recurse. - EggGroupNode *egg_parent = egg_group->get_parent(); - if (egg_parent != NULL) { - get_group_name(group_name, egg_parent); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_vertex -// Access: Private -// Description: Adds the indicated EggVertex to the unique vertex -// tables, for writing later by write_vertices(). -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -record_vertex(EggVertex *vertex) { - VertexDef &vdef = _vmap[vertex]; - - switch (vertex->get_num_dimensions()) { - case 1: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos1()); - break; - case 2: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos2()); - break; - case 3: - vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos3()); - break; - case 4: - vdef._vert4_index = record_unique(_unique_vert4, vertex->get_pos4()); - break; - } - - if (vertex->has_uv("")) { - vdef._uv2_index = record_unique(_unique_uv2, vertex->get_uv("")); - } else if (vertex->has_uvw("")) { - vdef._uv3_index = record_unique(_unique_uv3, vertex->get_uvw("")); - } - - if (vertex->has_normal()) { - vdef._norm_index = record_unique(_unique_norm, vertex->get_normal()); - } -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase4d &vec) { - // We record a zero-based index. Note that we will actually write - // out a one-based index to the obj file, as required by the - // standard. - int index = unique.size(); - UniqueVertices::iterator ui = unique.insert(UniqueVertices::value_type(vec, index)).first; - return (*ui).second; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase3d &vec) { - return record_unique(unique, LVecBase4d(vec[0], vec[1], vec[2], 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, const LVecBase2d &vec) { - return record_unique(unique, LVecBase4d(vec[0], vec[1], 0.0, 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::record_unique -// Access: Private -// Description: Records the indicated vertex value, returning the -// shared index if this value already appears elsewhere -// in the table, or the new unique index if this is the -// first time this value appears. -//////////////////////////////////////////////////////////////////// -int EggToObjConverter:: -record_unique(UniqueVertices &unique, double pos) { - return record_unique(unique, LVecBase4d(pos, 0.0, 0.0, 0.0)); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::write_vertices -// Access: Private -// Description: Actually writes the vertex values recorded in the -// indicated table to the obj output stream. -//////////////////////////////////////////////////////////////////// -void EggToObjConverter:: -write_vertices(ostream &out, const string &prefix, int num_components, - const UniqueVertices &unique) { - // First, sort the list into numeric order. - int num_vertices = (int)unique.size(); - const LVecBase4d **vertices = (const LVecBase4d **)PANDA_MALLOC_ARRAY(num_vertices * sizeof(LVecBase4d *)); - memset(vertices, 0, num_vertices * sizeof(LVecBase4d *)); - UniqueVertices::const_iterator ui; - for (ui = unique.begin(); ui != unique.end(); ++ui) { - int index = (*ui).second; - const LVecBase4d &vec = (*ui).first; - nassertv(index >= 0 && index < num_vertices); - nassertv(vertices[index] == NULL); - vertices[index] = &vec; - } - - for (int i = 0; i < num_vertices; ++i) { - out << prefix; - const LVecBase4d &vec = *(vertices[i]); - for (int ci = 0; ci < num_components; ++ci) { - out << " " << vec[ci]; - } - out << "\n"; - } - PANDA_FREE_ARRAY(vertices); -} - -//////////////////////////////////////////////////////////////////// -// Function: EggToObjConverter::VertexDef::Constructor -// Access: Private -// Description: -//////////////////////////////////////////////////////////////////// -EggToObjConverter::VertexDef:: -VertexDef() : - _vert3_index(-1), - _vert4_index(-1), - _uv2_index(-1), - _uv3_index(-1), - _norm_index(-1) -{ -} +// Filename: eggToObjConverter.cxx +// Created by: drose (19Dec12) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "eggToObjConverter.h" +#include "config_objegg.h" +#include "config_egg.h" +#include "eggData.h" +#include "string_utils.h" +#include "streamReader.h" +#include "virtualFileSystem.h" +#include "eggPolygon.h" +#include "eggPoint.h" +#include "eggLine.h" +#include "dcast.h" + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +EggToObjConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +EggToObjConverter(const EggToObjConverter ©) : + EggToSomethingConverter(copy) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::Destructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter:: +~EggToObjConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::make_copy +// Access: Public, Virtual +// Description: Allocates and returns a new copy of the converter. +//////////////////////////////////////////////////////////////////// +EggToSomethingConverter *EggToObjConverter:: +make_copy() { + return new EggToObjConverter(*this); +} + + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_name +// Access: Public, Virtual +// Description: Returns the English name of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string EggToObjConverter:: +get_name() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_extension +// Access: Public, Virtual +// Description: Returns the common extension of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string EggToObjConverter:: +get_extension() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::supports_compressed +// Access: Published, Virtual +// Description: Returns true if this file type can transparently save +// compressed files (with a .pz extension), false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +supports_compressed() const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_file +// Access: Public, Virtual +// Description: Handles the conversion of the internal EggData to the +// target file format, written to the specified +// filename. +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +write_file(const Filename &filename) { + clear_error(); + + if (_egg_data->get_coordinate_system() == CS_default) { + _egg_data->set_coordinate_system(CS_zup_right); + } + + if (!process(filename)) { + _error = true; + } + return !had_error(); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::process +// Access: Private +// Description: +//////////////////////////////////////////////////////////////////// +bool EggToObjConverter:: +process(const Filename &filename) { + _egg_data->flatten_transforms(); + collect_vertices(_egg_data); + + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + Filename obj_filename = Filename::text_filename(filename); + vfs->delete_file(obj_filename); + ostream *file = vfs->open_write_file(obj_filename, true, true); + if (file == (ostream *)NULL) { + return false; + } + if (egg_precision != 0) { + file->precision(egg_precision); + } + + _current_group = NULL; + + /* + (*file) << "\n#\n" + << "# obj file generated by the following command:\n" + << "# " << get_exec_command() << "\n" + << "#\n\n"; + */ + + write_vertices(*file, "v", 3, _unique_vert3); + write_vertices(*file, "v", 4, _unique_vert4); + write_vertices(*file, "vt", 2, _unique_uv2); + write_vertices(*file, "vt", 3, _unique_uv3); + write_vertices(*file, "vn", 3, _unique_norm); + + write_faces(*file, _egg_data); + + bool success = (file != (ostream *)NULL); + vfs->close_write_file(file); + + return success; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::collect_vertices +// Access: Private +// Description: Recursively walks the egg structure, looking for +// vertices referenced by polygons or points. Any such +// vertices are added to the vertex tables for writing +// to the obj file. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +collect_vertices(EggNode *egg_node) { + if (egg_node->is_of_type(EggPrimitive::get_class_type())) { + EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); + EggPrimitive::iterator pi; + for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { + record_vertex(*pi); + } + + } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { + EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); + + EggGroupNode::iterator ci; + for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { + collect_vertices(*ci); + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_faces +// Access: Private +// Description: Recursively walks the egg structure again, this time +// writing out the face records for any polygons, +// points, or lines encountered. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_faces(ostream &out, EggNode *egg_node) { + if (egg_node->is_of_type(EggPrimitive::get_class_type())) { + const char *prim_type = NULL; + if (egg_node->is_of_type(EggPolygon::get_class_type())) { + prim_type = "f"; + } else if (egg_node->is_of_type(EggPoint::get_class_type())) { + prim_type = "p"; + } else if (egg_node->is_of_type(EggLine::get_class_type())) { + prim_type = "l"; + } + + if (prim_type != NULL) { + write_group_reference(out, egg_node); + + EggPrimitive *egg_prim = DCAST(EggPrimitive, egg_node); + + out << prim_type; + EggPrimitive::iterator pi; + for (pi = egg_prim->begin(); pi != egg_prim->end(); ++pi) { + VertexDef &vdef = _vmap[(*pi)]; + int vert_index = -1; + int uv_index = -1; + int norm_index = -1; + + if (vdef._vert3_index != -1) { + vert_index = vdef._vert3_index + 1; + } else if (vdef._vert4_index != -1) { + vert_index = vdef._vert4_index + 1 + (int)_unique_vert3.size(); + } + + if (vdef._uv2_index != -1) { + uv_index = vdef._uv2_index + 1; + } else if (vdef._uv3_index != -1) { + uv_index = vdef._uv3_index + 1 + (int)_unique_uv2.size(); + } + + if (vdef._norm_index != -1) { + norm_index = vdef._norm_index + 1; + } + + if (vert_index == -1) { + continue; + } + + if (norm_index != -1) { + if (uv_index != -1) { + out << " " << vert_index << "/" << uv_index << "/" << norm_index; + } else { + out << " " << vert_index << "//" << norm_index; + } + } else if (uv_index != -1) { + out << " " << vert_index << "/" << uv_index; + } else { + out << " " << vert_index; + } + } + out << "\n"; + } + } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { + EggGroupNode *egg_group = DCAST(EggGroupNode, egg_node); + + EggGroupNode::iterator ci; + for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { + write_faces(out, *ci); + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_group_reference +// Access: Private +// Description: Writes the "g" tag to describe this polygon's group, +// if needed. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_group_reference(ostream &out, EggNode *egg_node) { + EggGroupNode *egg_group = egg_node->get_parent(); + if (egg_group == _current_group) { + // Same group we wrote last time. + return; + } + + string group_name; + get_group_name(group_name, egg_group); + if (group_name.empty()) { + out << "g default\n"; + } else { + out << "g" << group_name << "\n"; + } + _current_group = egg_group; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::get_group_name +// Access: Private +// Description: Recursively determines the appropriate string to +// write for the "g" tag to describe a particular +// EggGroupNode. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +get_group_name(string &group_name, EggGroupNode *egg_group) { + string name = trim(egg_group->get_name()); + if (!name.empty()) { + group_name += ' '; + + // Remove nonstandard characters. + for (string::const_iterator ni = name.begin(); ni != name.end(); ++ni) { + char c = (*ni); + if (!isalnum(c)) { + c = '_'; + } + group_name += c; + } + } + + // Now recurse. + EggGroupNode *egg_parent = egg_group->get_parent(); + if (egg_parent != NULL) { + get_group_name(group_name, egg_parent); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_vertex +// Access: Private +// Description: Adds the indicated EggVertex to the unique vertex +// tables, for writing later by write_vertices(). +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +record_vertex(EggVertex *vertex) { + VertexDef &vdef = _vmap[vertex]; + + switch (vertex->get_num_dimensions()) { + case 1: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos1()); + break; + case 2: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos2()); + break; + case 3: + vdef._vert3_index = record_unique(_unique_vert3, vertex->get_pos3()); + break; + case 4: + vdef._vert4_index = record_unique(_unique_vert4, vertex->get_pos4()); + break; + } + + if (vertex->has_uv("")) { + vdef._uv2_index = record_unique(_unique_uv2, vertex->get_uv("")); + } else if (vertex->has_uvw("")) { + vdef._uv3_index = record_unique(_unique_uv3, vertex->get_uvw("")); + } + + if (vertex->has_normal()) { + vdef._norm_index = record_unique(_unique_norm, vertex->get_normal()); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase4d &vec) { + // We record a zero-based index. Note that we will actually write + // out a one-based index to the obj file, as required by the + // standard. + int index = unique.size(); + UniqueVertices::iterator ui = unique.insert(UniqueVertices::value_type(vec, index)).first; + return (*ui).second; +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase3d &vec) { + return record_unique(unique, LVecBase4d(vec[0], vec[1], vec[2], 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, const LVecBase2d &vec) { + return record_unique(unique, LVecBase4d(vec[0], vec[1], 0.0, 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::record_unique +// Access: Private +// Description: Records the indicated vertex value, returning the +// shared index if this value already appears elsewhere +// in the table, or the new unique index if this is the +// first time this value appears. +//////////////////////////////////////////////////////////////////// +int EggToObjConverter:: +record_unique(UniqueVertices &unique, double pos) { + return record_unique(unique, LVecBase4d(pos, 0.0, 0.0, 0.0)); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::write_vertices +// Access: Private +// Description: Actually writes the vertex values recorded in the +// indicated table to the obj output stream. +//////////////////////////////////////////////////////////////////// +void EggToObjConverter:: +write_vertices(ostream &out, const string &prefix, int num_components, + const UniqueVertices &unique) { + // First, sort the list into numeric order. + int num_vertices = (int)unique.size(); + const LVecBase4d **vertices = (const LVecBase4d **)PANDA_MALLOC_ARRAY(num_vertices * sizeof(LVecBase4d *)); + memset(vertices, 0, num_vertices * sizeof(LVecBase4d *)); + UniqueVertices::const_iterator ui; + for (ui = unique.begin(); ui != unique.end(); ++ui) { + int index = (*ui).second; + const LVecBase4d &vec = (*ui).first; + nassertv(index >= 0 && index < num_vertices); + nassertv(vertices[index] == NULL); + vertices[index] = &vec; + } + + for (int i = 0; i < num_vertices; ++i) { + out << prefix; + const LVecBase4d &vec = *(vertices[i]); + for (int ci = 0; ci < num_components; ++ci) { + out << " " << vec[ci]; + } + out << "\n"; + } + PANDA_FREE_ARRAY(vertices); +} + +//////////////////////////////////////////////////////////////////// +// Function: EggToObjConverter::VertexDef::Constructor +// Access: Private +// Description: +//////////////////////////////////////////////////////////////////// +EggToObjConverter::VertexDef:: +VertexDef() : + _vert3_index(-1), + _vert4_index(-1), + _uv2_index(-1), + _uv3_index(-1), + _norm_index(-1) +{ +} diff --git a/pandatool/src/objegg/objToEggConverter.cxx b/pandatool/src/objegg/objToEggConverter.cxx index 0db9464e5a..66949fe10f 100644 --- a/pandatool/src/objegg/objToEggConverter.cxx +++ b/pandatool/src/objegg/objToEggConverter.cxx @@ -1,1188 +1,1188 @@ -// Filename: objToEggConverter.cxx -// Created by: drose (07Dec10) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#include "objToEggConverter.h" -#include "config_objegg.h" -#include "eggData.h" -#include "string_utils.h" -#include "streamReader.h" -#include "virtualFileSystem.h" -#include "eggPolygon.h" -#include "nodePath.h" -#include "geomTriangles.h" -#include "geomPoints.h" -#include "colorAttrib.h" -#include "shadeModelAttrib.h" -#include "dcast.h" -#include "triangulator3.h" -#include "config_egg2pg.h" - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -ObjToEggConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Copy Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -ObjToEggConverter(const ObjToEggConverter ©) : - SomethingToEggConverter(copy) -{ -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::Destructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter:: -~ObjToEggConverter() { -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::make_copy -// Access: Public, Virtual -// Description: Allocates and returns a new copy of the converter. -//////////////////////////////////////////////////////////////////// -SomethingToEggConverter *ObjToEggConverter:: -make_copy() { - return new ObjToEggConverter(*this); -} - - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_name -// Access: Public, Virtual -// Description: Returns the English name of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string ObjToEggConverter:: -get_name() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_extension -// Access: Public, Virtual -// Description: Returns the common extension of the file type this -// converter supports. -//////////////////////////////////////////////////////////////////// -string ObjToEggConverter:: -get_extension() const { - return "obj"; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::supports_compressed -// Access: Published, Virtual -// Description: Returns true if this file type can transparently load -// compressed files (with a .pz extension), false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -supports_compressed() const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::supports_convert_to_node -// Access: Published, Virtual -// Description: Returns true if this converter can directly convert -// the model type to internal Panda memory structures, -// given the indicated options, or false otherwise. If -// this returns true, then convert_to_node() may be -// called to perform the conversion, which may be faster -// than calling convert_file() if the ultimate goal is a -// PandaNode anyway. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -supports_convert_to_node(const LoaderOptions &options) const { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::convert_file -// Access: Public, Virtual -// Description: Handles the reading of the input file and converting -// it to egg. Returns true if successful, false -// otherwise. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -convert_file(const Filename &filename) { - clear_error(); - - if (_egg_data->get_coordinate_system() == CS_default) { - _egg_data->set_coordinate_system(CS_zup_right); - } - - if (!process(filename)) { - _error = true; - } - return !had_error(); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::convert_to_node -// Access: Public, Virtual -// Description: Reads the input file and directly produces a -// ready-to-render model file as a PandaNode. Returns -// NULL on failure, or if it is not supported. (This -// functionality is not supported by all converter -// types; see supports_convert_to_node()). -//////////////////////////////////////////////////////////////////// -PT(PandaNode) ObjToEggConverter:: -convert_to_node(const LoaderOptions &options, const Filename &filename) { - clear_error(); - - _root_node = new PandaNode(""); - _current_vertex_data = new VertexData(_root_node, "root"); - - if (!process_node(filename)) { - _error = true; - } - - _current_vertex_data->close_geom(this); - delete _current_vertex_data; - - if (had_error()) { - return NULL; - } - - return _root_node; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process -// Access: Protected -// Description: Reads the file and converts it to egg structures. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process(const Filename &filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *strm = vfs->open_read_file(filename, true); - if (strm == NULL) { - objegg_cat.error() - << "Couldn't read " << filename << "\n"; - return false; - } - - _v_table.clear(); - _vn_table.clear(); - _rgb_table.clear(); - _vt_table.clear(); - _xvt_table.clear(); - _ref_plane_res.set(1.0, 1.0); - _v4_given = false; - _vt3_given = false; - _f_given = false; - - _vpool = new EggVertexPool("vpool"); - _egg_data->add_child(_vpool); - _root_group = new EggGroup("root"); - _egg_data->add_child(_root_group); - _current_group = _root_group; - - StreamReader sr(strm, true); - string line = sr.readline(); - _line_number = 1; - while (!line.empty()) { - line = trim(line); - if (line.empty()) { - line = sr.readline(); - continue; - } - - while (line[line.length() - 1] == '\\') { - // If it ends on a backslash, it's a continuation character. - string line2 = sr.readline(); - ++_line_number; - if (line2.empty()) { - break; - } - line = line.substr(0, line.length() - 1) + trim(line2); - } - - if (line.substr(0, 15) == "#_ref_plane_res") { - process_ref_plane_res(line); - line = sr.readline(); - continue; - } - - if (line[0] == '#') { - line = sr.readline(); - continue; - } - - if (!process_line(line)) { - return false; - } - line = sr.readline(); - ++_line_number; - } - - if (!_f_given) { - generate_egg_points(); - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_line(const string &line) { - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - string tag = words[0]; - if (tag == "v") { - return process_v(words); - } else if (tag == "vt") { - return process_vt(words); - } else if (tag == "xvt") { - return process_xvt(words); - } else if (tag == "xvc") { - return process_xvc(words); - } else if (tag == "vn") { - return process_vn(words); - } else if (tag == "f") { - return process_f(words); - } else if (tag == "g") { - return process_g(words); - } else { - bool inserted = _ignored_tags.insert(tag).second; - if (inserted) { - objegg_cat.info() - << "Ignoring tag " << tag << "\n"; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_ref_plane_res(const string &line) { - // the #_ref_plane_res line is a DRZ extension that defines the - // pixel resolution of the projector device. It's needed to - // properly scale the xvt lines. - - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - if (words.size() != 3) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LPoint3d pos; - okflag &= string_to_double(words[1], _ref_plane_res[0]); - okflag &= string_to_double(words[2], _ref_plane_res[1]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << ":\n"; - return false; - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_v -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_v(vector_string &words) { - if (words.size() != 4 && words.size() != 5 && - words.size() != 7 && words.size() != 8) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LPoint4d pos; - okflag &= string_to_double(words[1], pos[0]); - okflag &= string_to_double(words[2], pos[1]); - okflag &= string_to_double(words[3], pos[2]); - if (words.size() == 5 || words.size() == 8) { - okflag &= string_to_double(words[4], pos[3]); - _v4_given = true; - } else { - pos[3] = 1.0; - } - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - _v_table.push_back(pos); - - // Meshlab format might include an RGB color following the vertex - // position. - if (words.size() == 7 && words.size() == 8) { - size_t si = words.size(); - LVecBase3d rgb; - okflag &= string_to_double(words[si - 3], rgb[0]); - okflag &= string_to_double(words[si - 2], rgb[1]); - okflag &= string_to_double(words[si - 1], rgb[2]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - while (_rgb_table.size() + 1 < _v_table.size()) { - _rgb_table.push_back(LVecBase3d(1.0, 1.0, 1.0)); - } - _rgb_table.push_back(rgb); - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_vt -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_vt(vector_string &words) { - if (words.size() != 3 && words.size() != 4) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LTexCoord3d uvw; - okflag &= string_to_double(words[1], uvw[0]); - okflag &= string_to_double(words[2], uvw[1]); - if (words.size() == 4) { - okflag &= string_to_double(words[3], uvw[2]); - _vt3_given = true; - } else { - uvw[2] = 0.0; - } - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - _vt_table.push_back(uvw); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_xvt -// Access: Protected -// Description: "xvt" is an extended column invented by DRZ. It -// includes texture coordinates in pixel space of the -// projector device, as well as for each camera. We map -// it to the nominal texture coordinates here. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_xvt(vector_string &words) { - if (words.size() < 3) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LTexCoordd uv; - okflag &= string_to_double(words[1], uv[0]); - okflag &= string_to_double(words[2], uv[1]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - - uv[0] /= _ref_plane_res[0]; - uv[1] = 1.0 - uv[1] / _ref_plane_res[1]; - - _xvt_table.push_back(uv); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_xvc -// Access: Protected -// Description: "xvc" is another extended column invented by DRZ. We -// quietly ignore it. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_xvc(vector_string &words) { - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_vn -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_vn(vector_string &words) { - if (words.size() != 4) { - objegg_cat.error() - << "Wrong number of tokens at line " << _line_number << "\n"; - return false; - } - - bool okflag = true; - LVector3d normal; - okflag &= string_to_double(words[1], normal[0]); - okflag &= string_to_double(words[2], normal[1]); - okflag &= string_to_double(words[3], normal[2]); - - if (!okflag) { - objegg_cat.error() - << "Invalid number at line " << _line_number << "\n"; - return false; - } - normal.normalize(); - - _vn_table.push_back(normal); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_f -// Access: Protected -// Description: Defines a face in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_f(vector_string &words) { - _f_given = true; - - PT(EggPolygon) poly = new EggPolygon; - for (size_t i = 1; i < words.size(); ++i) { - EggVertex *vertex = get_face_vertex(words[i]); - if (vertex == NULL) { - return false; - } - poly->add_vertex(vertex); - } - _current_group->add_child(poly); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_g -// Access: Protected -// Description: Defines a group in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_g(vector_string &words) { - EggGroup *group = _root_group; - - // We assume the group names define a hierarchy of more-specific to - // less-specific group names, so that the first group name is the - // bottommost node, and the last group name is the topmost node. - - // Thus, iterate from the back to the front. - size_t i = words.size(); - while (i > 1) { - --i; - EggNode *child = group->find_child(words[i]); - if (child == NULL || !child->is_of_type(EggGroup::get_class_type())) { - child = new EggGroup(words[i]); - group->add_child(child); - } - group = DCAST(EggGroup, child); - } - - _current_group = group; - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::get_face_vertex -// Access: Protected -// Description: Returns or creates a vertex in the vpool according to -// the indicated face reference. -//////////////////////////////////////////////////////////////////// -EggVertex *ObjToEggConverter:: -get_face_vertex(const string &reference) { - VertexEntry entry(this, reference); - - // Synthesize a vertex. - EggVertex synth; - - if (entry._vi != 0) { - if (_v4_given) { - synth.set_pos(LCAST(double, _v_table[entry._vi - 1])); - } else { - LPoint4d pos = _v_table[entry._vi - 1]; - synth.set_pos(LPoint3d(pos[0], pos[1], pos[2])); - } - - if (entry._vi - 1 < (int)_rgb_table.size()) { - // We have a per-vertex color too. - LRGBColord rgb = _rgb_table[entry._vi - 1]; - LColor rgba(rgb[0], rgb[1], rgb[2], 1.0); - synth.set_color(rgba); - } - } - - if (entry._vti != 0) { - // We have a texture coordinate; apply it. - if (_vt3_given) { - synth.set_uvw("", _vt_table[entry._vti - 1]); - } else { - LTexCoord3d uvw = _vt_table[entry._vti - 1]; - synth.set_uv("", LTexCoordd(uvw[0], uvw[1])); - } - } else if (entry._vi - 1 < (int)_xvt_table.size()) { - // We have an xvt texture coordinate. - synth.set_uv("", _xvt_table[entry._vi - 1]); - } - - if (entry._vni != 0) { - // We have a normal; apply it. - synth.set_normal(_vn_table[entry._vni - 1]); - } - - return _vpool->create_unique_vertex(synth); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::generate_egg_points -// Access: Protected -// Description: If an obj file defines no faces, create a bunch of -// EggVertex objects to illustrate the vertex positions -// at least. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter:: -generate_egg_points() { - for (size_t vi = 0; vi < _v_table.size(); ++vi) { - const LVecBase4d &p = _v_table[vi]; - _vpool->make_new_vertex(LVecBase3d(p[0], p[1], p[2])); - } -} - - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_node -// Access: Protected -// Description: Reads the file and converts it to PandaNode structures. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_node(const Filename &filename) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *strm = vfs->open_read_file(filename, true); - if (strm == NULL) { - objegg_cat.error() - << "Couldn't read " << filename << "\n"; - return false; - } - - _v_table.clear(); - _vn_table.clear(); - _rgb_table.clear(); - _vt_table.clear(); - _xvt_table.clear(); - _ref_plane_res.set(1.0, 1.0); - _v4_given = false; - _vt3_given = false; - _f_given = false; - - StreamReader sr(strm, true); - string line = sr.readline(); - _line_number = 1; - while (!line.empty()) { - line = trim(line); - if (line.empty()) { - line = sr.readline(); - continue; - } - - if (line.substr(0, 15) == "#_ref_plane_res") { - process_ref_plane_res(line); - line = sr.readline(); - continue; - } - - if (line[0] == '#') { - line = sr.readline(); - continue; - } - - if (!process_line_node(line)) { - return false; - } - line = sr.readline(); - ++_line_number; - } - - if (!_f_given) { - generate_points(); - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_line_node -// Access: Protected -// Description: -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_line_node(const string &line) { - vector_string words; - tokenize(line, words, " \t", true); - nassertr(!words.empty(), false); - - string tag = words[0]; - if (tag == "v") { - return process_v(words); - } else if (tag == "vt") { - return process_vt(words); - } else if (tag == "xvt") { - return process_xvt(words); - } else if (tag == "xvc") { - return process_xvc(words); - } else if (tag == "vn") { - return process_vn(words); - } else if (tag == "f") { - return process_f_node(words); - } else if (tag == "g") { - return process_g_node(words); - } else { - bool inserted = _ignored_tags.insert(tag).second; - if (inserted) { - objegg_cat.info() - << "Ignoring tag " << tag << "\n"; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_f_node -// Access: Protected -// Description: Defines a face in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_f_node(vector_string &words) { - _f_given = true; - - bool all_vn = true; - int non_vn_index = -1; - - pvector verts; - verts.reserve(words.size() - 1); - for (size_t i = 1; i < words.size(); ++i) { - VertexEntry entry(this, words[i]); - verts.push_back(entry); - if (entry._vni == 0) { - all_vn = false; - non_vn_index = i; - } - } - - if (verts.size() < 3) { - // Not enough vertices. - objegg_cat.error() - << "Degenerate face at " << _line_number << "\n"; - return false; - } - - int synth_vni = 0; - if (!all_vn) { - // Synthesize a normal if we need it. - LNormald normal = LNormald::zero(); - for (size_t i = 0; i < verts.size(); ++i) { - int vi0 = verts[i]._vi; - int vi1 = verts[(i + 1) % verts.size()]._vi; - if (vi0 == 0 || vi1 == 0) { - continue; - } - const LVecBase4d &p0 = _v_table[vi0 - 1]; - const LVecBase4d &p1 = _v_table[vi1 - 1]; - - normal[0] += p0[1] * p1[2] - p0[2] * p1[1]; - normal[1] += p0[2] * p1[0] - p0[0] * p1[2]; - normal[2] += p0[0] * p1[1] - p0[1] * p1[0]; - } - normal.normalize(); - synth_vni = add_synth_normal(normal); - } - - Triangulator3 tri; - int num_tris = 1; - - if (verts.size() != 3) { - // We have to triangulate a higher-order polygon. - for (size_t i = 0; i < verts.size(); ++i) { - const LVecBase4d &p = _v_table[verts[i]._vi - 1]; - tri.add_vertex(p[0], p[1], p[2]); - tri.add_polygon_vertex(i); - } - - tri.triangulate(); - num_tris = tri.get_num_triangles(); - } - - if (_current_vertex_data->_prim->get_num_vertices() + 3 * num_tris > egg_max_indices || - _current_vertex_data->_entries.size() + verts.size() > egg_max_vertices) { - // We'll exceed our specified limit with these triangles; start a new Geom. - _current_vertex_data->close_geom(this); - } - - if (verts.size() == 3) { - // It's already a triangle; add it directly. - _current_vertex_data->add_triangle(this, verts[0], verts[1], verts[2], synth_vni); - - } else { - // Get the triangulated results. - for (int ti = 0; ti < num_tris; ++ti) { - int i0 = tri.get_triangle_v0(ti); - int i1 = tri.get_triangle_v1(ti); - int i2 = tri.get_triangle_v2(ti); - _current_vertex_data->add_triangle(this, verts[i0], verts[i1], verts[i2], synth_vni); - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::process_g_node -// Access: Protected -// Description: Defines a group in the obj file. -//////////////////////////////////////////////////////////////////// -bool ObjToEggConverter:: -process_g_node(vector_string &words) { - _current_vertex_data->close_geom(this); - delete _current_vertex_data; - _current_vertex_data = NULL; - - NodePath np(_root_node); - - // We assume the group names define a hierarchy of more-specific to - // less-specific group names, so that the first group name is the - // bottommost node, and the last group name is the topmost node. - - // Thus, iterate from the back to the front. - size_t i = words.size(); - string name; - while (i > 2) { - --i; - name = words[i]; - NodePath child = np.find(name); - if (!child) { - child = np.attach_new_node(name); - } - np = child; - } - - if (i > 1) { - --i; - name = words[i]; - } - - _current_vertex_data = new VertexData(np.node(), name); - - return true; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::generate_points -// Access: Protected -// Description: If an obj file defines no faces, create a bunch of -// GeomPoints to illustrate the vertex positions at -// least. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter:: -generate_points() { - CPT(GeomVertexFormat) format = GeomVertexFormat::get_v3(); - PT(GeomVertexData) vdata = new GeomVertexData("points", format, GeomEnums::UH_static); - vdata->set_num_rows(_v_table.size()); - GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); - - for (size_t vi = 0; vi < _v_table.size(); ++vi) { - const LVecBase4d &p = _v_table[vi]; - vertex_writer.add_data3d(p[0], p[1], p[2]); - } - - PT(GeomPrimitive) prim = new GeomPoints(GeomEnums::UH_static); - prim->add_next_vertices(_v_table.size()); - prim->close_primitive(); - - PT(Geom) geom = new Geom(vdata); - geom->add_primitive(prim); - - PT(GeomNode) geom_node = new GeomNode("points"); - geom_node->add_geom(geom); - _root_node->add_child(geom_node); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::add_synth_normal -// Access: Private -// Description: Adds a new normal to the synth_vn table, or returns -// an existing normal. In either case returns the -// 1-based index number to the normal. -//////////////////////////////////////////////////////////////////// -int ObjToEggConverter:: -add_synth_normal(const LVecBase3d &normal) { - pair result = _unique_synth_vn_table.insert(UniqueVec3Table::value_type(normal, _unique_synth_vn_table.size())); - UniqueVec3Table::iterator ni = result.first; - int index = (*ni).second; - - if (result.second) { - // If the normal was added to the table, it's a unique normal, and - // now we have to add it to the table too. - _synth_vn_table.push_back(normal); - } - - return index + 1; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexEntry::Constructor -// Access: Public -// Description: Creates a VertexEntry from the n/n/n string format in -// the obj file face reference. -//////////////////////////////////////////////////////////////////// -ObjToEggConverter::VertexEntry:: -VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex) { - _vi = 0; - _vti = 0; - _vni = 0; - _synth_vni = 0; - - vector_string words; - tokenize(obj_vertex, words, "/", false); - nassertv(!words.empty()); - - for (size_t i = 0; i < words.size(); ++i) { - int index; - if (trim(words[i]).empty()) { - index = 0; - } else { - if (!string_to_int(words[i], index)) { - index = 0; - } - } - - switch (i) { - case 0: - _vi = index; - if (_vi < 0) { - _vi = (int)converter->_v_table.size() + _vi; - } - if (_vi < 0 || _vi - 1 >= (int)converter->_v_table.size()) { - _vi = 0; - } - break; - - case 1: - _vti = index; - if (_vti < 0) { - _vti = (int)converter->_vt_table.size() + _vti; - } - if (_vti < 0 || _vti - 1 >= (int)converter->_vt_table.size()) { - _vti = 0; - } - break; - - case 2: - _vni = index; - if (_vni < 0) { - _vni = (int)converter->_vn_table.size() + _vni; - } - if (_vni < 0 || _vni - 1 >= (int)converter->_vn_table.size()) { - _vni = 0; - } - break; - } - } -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::Constructor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -ObjToEggConverter::VertexData:: -VertexData(PandaNode *parent, const string &name) : - _parent(parent), _name(name) -{ - _geom_node = NULL; - - _v4_given = false; - _vt3_given = false; - _vt_given = false; - _rgb_given = false; - _vn_given = false; - - _prim = new GeomTriangles(GeomEnums::UH_static); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::add_vertex -// Access: Public -// Description: Adds a new entry to the vertex data for the indicated -// VertexEntry, or returns an equivalent vertex already -// present. -//////////////////////////////////////////////////////////////////// -int ObjToEggConverter::VertexData:: -add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry) { - pair result; - UniqueVertexEntries::iterator ni; - int index; - - if (entry._vni != 0 || entry._synth_vni != 0) { - // If we are storing a vertex with a normal, see if we - // have already stored a vertex without a normal first. - VertexEntry no_normal(entry); - no_normal._vni = 0; - no_normal._synth_vni = 0; - ni = _unique_entries.find(no_normal); - if (ni != _unique_entries.end()) { - // We did have such a vertex! In this case, repurpose this - // vertex, resetting it to contain this normal. - index = (*ni).second; - _unique_entries.erase(ni); - result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, index)); - nassertr(result.second, index); - nassertr(_entries[index] == no_normal, index); - _entries[index]._vni = entry._vni; - _entries[index]._synth_vni = entry._synth_vni; - return index; - } - } else if (entry._vni == 0 && entry._synth_vni == 0) { - // If we are storing a vertex *without* any normal, see if we have - // already stored a vertex with a normal first. - ni = _unique_entries.lower_bound(entry); - if (ni != _unique_entries.end() && (*ni).first.matches_except_normal(entry)) { - // We had such a vertex, so use it. - index = (*ni).second; - return index; - } - } - - // We didn't already have a vertex we could repurpose, so try to add - // exactly the desired vertex. - result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, _entries.size())); - ni = result.first; - index = (*ni).second; - - if (result.second) { - // If the vertex was added to the table, it's a unique vertex, and - // now we have to add it to the vertex data too. - _entries.push_back(entry); - - if (converter->_v4_given) { - _v4_given = true; - } - if (converter->_vt3_given) { - _vt3_given = true; - } - if (entry._vti != 0) { - _vt_given = true; - } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { - // We have an xvt texture coordinate. - _vt_given = true; - } - if (entry._vi - 1 < (int)converter->_rgb_table.size()) { - // We have a per-vertex color too. - _rgb_given = true; - } - if (entry._vni != 0) { - _vn_given = true; - } - } - - return index; -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::add_triangle -// Access: Public -// Description: Adds a triangle to the primitive, as a triple of -// three VertexEntry objects, which are each added to -// the vertex pool. If synth_vni is not 0, it is -// assigned to the last vertex. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter::VertexData:: -add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, - const VertexEntry &v1, const VertexEntry &v2, - int synth_vni) { - int v0i, v1i, v2i; - - v0i = add_vertex(converter, v0); - v1i = add_vertex(converter, v1); - - if (synth_vni != 0) { - VertexEntry v2n(v2); - v2n._synth_vni = synth_vni; - v2i = add_vertex(converter, v2n); - } else { - v2i = add_vertex(converter, v2); - } - - _prim->add_vertices(v0i, v1i, v2i); - _prim->close_primitive(); -} - -//////////////////////////////////////////////////////////////////// -// Function: ObjToEggConverter::VertexData::close_geom -// Access: Public -// Description: Finishes the current geom and stores it as a child -// in the root. Prepares for new geoms. -//////////////////////////////////////////////////////////////////// -void ObjToEggConverter::VertexData:: -close_geom(const ObjToEggConverter *converter) { - if (_prim->get_num_vertices() != 0) { - // Create a new format that includes only the columns we actually - // used. - PT(GeomVertexArrayFormat) aformat = new GeomVertexArrayFormat; - if (_v4_given) { - aformat->add_column(InternalName::get_vertex(), 4, - GeomEnums::NT_stdfloat, GeomEnums::C_point); - } else { - aformat->add_column(InternalName::get_vertex(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_point); - } - - // We always add normals--if no normals appeared in the file, we - // synthesize them. - aformat->add_column(InternalName::get_normal(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_vector); - - if (_vt_given) { - if (_vt3_given) { - aformat->add_column(InternalName::get_texcoord(), 3, - GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); - } else { - aformat->add_column(InternalName::get_texcoord(), 2, - GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); - } - } - - if (_rgb_given) { - aformat->add_column(InternalName::get_color(), 4, - GeomEnums::NT_uint8, GeomEnums::C_color); - } - - CPT(GeomVertexFormat) format = GeomVertexFormat::register_format(aformat); - - // Create and populate the vertex data. - PT(GeomVertexData) vdata = new GeomVertexData(_name, format, GeomEnums::UH_static); - GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); - GeomVertexWriter normal_writer(vdata, InternalName::get_normal()); - GeomVertexWriter texcoord_writer(vdata, InternalName::get_texcoord()); - GeomVertexWriter color_writer(vdata, InternalName::get_color()); - - for (size_t i = 0; i < _entries.size(); ++i) { - const VertexEntry &entry = _entries[i]; - - if (entry._vi != 0) { - vertex_writer.set_row(i); - vertex_writer.add_data4d(converter->_v_table[entry._vi - 1]); - } - if (entry._vti != 0) { - texcoord_writer.set_row(i); - texcoord_writer.add_data3d(converter->_vt_table[entry._vti - 1]); - } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { - // We have an xvt texture coordinate. - texcoord_writer.set_row(i); - texcoord_writer.add_data2d(converter->_xvt_table[entry._vi - 1]); - } - if (entry._vni != 0) { - normal_writer.set_row(i); - normal_writer.add_data3d(converter->_vn_table[entry._vni - 1]); - } else if (entry._synth_vni != 0) { - normal_writer.set_row(i); - normal_writer.add_data3d(converter->_synth_vn_table[entry._synth_vni - 1]); - } else { - // In this case, the normal isn't used and doesn't matter; we - // fill it in a unit vector just for neatness. - normal_writer.set_row(i); - normal_writer.add_data3d(0, 0, 1); - } - if (_rgb_given) { - if (entry._vi - 1 < (int)converter->_rgb_table.size()) { - color_writer.set_row(i); - color_writer.add_data3d(converter->_rgb_table[entry._vi - 1]); - } - } - } - - // Transform to zup-right. - vdata->transform_vertices(LMatrix4::convert_mat(CS_zup_right, CS_default)); - - // Now create a Geom with this data. - CPT(RenderState) state = RenderState::make_empty(); - if (_rgb_given) { - state = state->add_attrib(ColorAttrib::make_vertex()); - } else { - state = state->add_attrib(ColorAttrib::make_flat(LColor(1, 1, 1, 1))); - } - if (!_vn_given) { - // We have synthesized these normals; specify the flat-shading - // attrib. - state = state->add_attrib(ShadeModelAttrib::make(ShadeModelAttrib::M_flat)); - _prim->set_shade_model(GeomEnums::SM_flat_last_vertex); - } - - PT(Geom) geom = new Geom(vdata); - geom->add_primitive(_prim); - - if (_geom_node == NULL) { - _geom_node = new GeomNode(_name); - _parent->add_child(_geom_node); - } - - _geom_node->add_geom(geom, state); - } - - _prim = new GeomTriangles(GeomEnums::UH_static); - _entries.clear(); - _unique_entries.clear(); -} +// Filename: objToEggConverter.cxx +// Created by: drose (07Dec10) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "objToEggConverter.h" +#include "config_objegg.h" +#include "eggData.h" +#include "string_utils.h" +#include "streamReader.h" +#include "virtualFileSystem.h" +#include "eggPolygon.h" +#include "nodePath.h" +#include "geomTriangles.h" +#include "geomPoints.h" +#include "colorAttrib.h" +#include "shadeModelAttrib.h" +#include "dcast.h" +#include "triangulator3.h" +#include "config_egg2pg.h" + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +ObjToEggConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +ObjToEggConverter(const ObjToEggConverter ©) : + SomethingToEggConverter(copy) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::Destructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter:: +~ObjToEggConverter() { +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::make_copy +// Access: Public, Virtual +// Description: Allocates and returns a new copy of the converter. +//////////////////////////////////////////////////////////////////// +SomethingToEggConverter *ObjToEggConverter:: +make_copy() { + return new ObjToEggConverter(*this); +} + + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_name +// Access: Public, Virtual +// Description: Returns the English name of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string ObjToEggConverter:: +get_name() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_extension +// Access: Public, Virtual +// Description: Returns the common extension of the file type this +// converter supports. +//////////////////////////////////////////////////////////////////// +string ObjToEggConverter:: +get_extension() const { + return "obj"; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::supports_compressed +// Access: Published, Virtual +// Description: Returns true if this file type can transparently load +// compressed files (with a .pz extension), false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +supports_compressed() const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::supports_convert_to_node +// Access: Published, Virtual +// Description: Returns true if this converter can directly convert +// the model type to internal Panda memory structures, +// given the indicated options, or false otherwise. If +// this returns true, then convert_to_node() may be +// called to perform the conversion, which may be faster +// than calling convert_file() if the ultimate goal is a +// PandaNode anyway. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +supports_convert_to_node(const LoaderOptions &options) const { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::convert_file +// Access: Public, Virtual +// Description: Handles the reading of the input file and converting +// it to egg. Returns true if successful, false +// otherwise. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +convert_file(const Filename &filename) { + clear_error(); + + if (_egg_data->get_coordinate_system() == CS_default) { + _egg_data->set_coordinate_system(CS_zup_right); + } + + if (!process(filename)) { + _error = true; + } + return !had_error(); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::convert_to_node +// Access: Public, Virtual +// Description: Reads the input file and directly produces a +// ready-to-render model file as a PandaNode. Returns +// NULL on failure, or if it is not supported. (This +// functionality is not supported by all converter +// types; see supports_convert_to_node()). +//////////////////////////////////////////////////////////////////// +PT(PandaNode) ObjToEggConverter:: +convert_to_node(const LoaderOptions &options, const Filename &filename) { + clear_error(); + + _root_node = new PandaNode(""); + _current_vertex_data = new VertexData(_root_node, "root"); + + if (!process_node(filename)) { + _error = true; + } + + _current_vertex_data->close_geom(this); + delete _current_vertex_data; + + if (had_error()) { + return NULL; + } + + return _root_node; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process +// Access: Protected +// Description: Reads the file and converts it to egg structures. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process(const Filename &filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + istream *strm = vfs->open_read_file(filename, true); + if (strm == NULL) { + objegg_cat.error() + << "Couldn't read " << filename << "\n"; + return false; + } + + _v_table.clear(); + _vn_table.clear(); + _rgb_table.clear(); + _vt_table.clear(); + _xvt_table.clear(); + _ref_plane_res.set(1.0, 1.0); + _v4_given = false; + _vt3_given = false; + _f_given = false; + + _vpool = new EggVertexPool("vpool"); + _egg_data->add_child(_vpool); + _root_group = new EggGroup("root"); + _egg_data->add_child(_root_group); + _current_group = _root_group; + + StreamReader sr(strm, true); + string line = sr.readline(); + _line_number = 1; + while (!line.empty()) { + line = trim(line); + if (line.empty()) { + line = sr.readline(); + continue; + } + + while (line[line.length() - 1] == '\\') { + // If it ends on a backslash, it's a continuation character. + string line2 = sr.readline(); + ++_line_number; + if (line2.empty()) { + break; + } + line = line.substr(0, line.length() - 1) + trim(line2); + } + + if (line.substr(0, 15) == "#_ref_plane_res") { + process_ref_plane_res(line); + line = sr.readline(); + continue; + } + + if (line[0] == '#') { + line = sr.readline(); + continue; + } + + if (!process_line(line)) { + return false; + } + line = sr.readline(); + ++_line_number; + } + + if (!_f_given) { + generate_egg_points(); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_line(const string &line) { + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + string tag = words[0]; + if (tag == "v") { + return process_v(words); + } else if (tag == "vt") { + return process_vt(words); + } else if (tag == "xvt") { + return process_xvt(words); + } else if (tag == "xvc") { + return process_xvc(words); + } else if (tag == "vn") { + return process_vn(words); + } else if (tag == "f") { + return process_f(words); + } else if (tag == "g") { + return process_g(words); + } else { + bool inserted = _ignored_tags.insert(tag).second; + if (inserted) { + objegg_cat.info() + << "Ignoring tag " << tag << "\n"; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_ref_plane_res(const string &line) { + // the #_ref_plane_res line is a DRZ extension that defines the + // pixel resolution of the projector device. It's needed to + // properly scale the xvt lines. + + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + if (words.size() != 3) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LPoint3d pos; + okflag &= string_to_double(words[1], _ref_plane_res[0]); + okflag &= string_to_double(words[2], _ref_plane_res[1]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << ":\n"; + return false; + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_v +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_v(vector_string &words) { + if (words.size() != 4 && words.size() != 5 && + words.size() != 7 && words.size() != 8) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LPoint4d pos; + okflag &= string_to_double(words[1], pos[0]); + okflag &= string_to_double(words[2], pos[1]); + okflag &= string_to_double(words[3], pos[2]); + if (words.size() == 5 || words.size() == 8) { + okflag &= string_to_double(words[4], pos[3]); + _v4_given = true; + } else { + pos[3] = 1.0; + } + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + _v_table.push_back(pos); + + // Meshlab format might include an RGB color following the vertex + // position. + if (words.size() == 7 && words.size() == 8) { + size_t si = words.size(); + LVecBase3d rgb; + okflag &= string_to_double(words[si - 3], rgb[0]); + okflag &= string_to_double(words[si - 2], rgb[1]); + okflag &= string_to_double(words[si - 1], rgb[2]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + while (_rgb_table.size() + 1 < _v_table.size()) { + _rgb_table.push_back(LVecBase3d(1.0, 1.0, 1.0)); + } + _rgb_table.push_back(rgb); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_vt +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_vt(vector_string &words) { + if (words.size() != 3 && words.size() != 4) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LTexCoord3d uvw; + okflag &= string_to_double(words[1], uvw[0]); + okflag &= string_to_double(words[2], uvw[1]); + if (words.size() == 4) { + okflag &= string_to_double(words[3], uvw[2]); + _vt3_given = true; + } else { + uvw[2] = 0.0; + } + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + _vt_table.push_back(uvw); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_xvt +// Access: Protected +// Description: "xvt" is an extended column invented by DRZ. It +// includes texture coordinates in pixel space of the +// projector device, as well as for each camera. We map +// it to the nominal texture coordinates here. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_xvt(vector_string &words) { + if (words.size() < 3) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LTexCoordd uv; + okflag &= string_to_double(words[1], uv[0]); + okflag &= string_to_double(words[2], uv[1]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + + uv[0] /= _ref_plane_res[0]; + uv[1] = 1.0 - uv[1] / _ref_plane_res[1]; + + _xvt_table.push_back(uv); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_xvc +// Access: Protected +// Description: "xvc" is another extended column invented by DRZ. We +// quietly ignore it. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_xvc(vector_string &words) { + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_vn +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_vn(vector_string &words) { + if (words.size() != 4) { + objegg_cat.error() + << "Wrong number of tokens at line " << _line_number << "\n"; + return false; + } + + bool okflag = true; + LVector3d normal; + okflag &= string_to_double(words[1], normal[0]); + okflag &= string_to_double(words[2], normal[1]); + okflag &= string_to_double(words[3], normal[2]); + + if (!okflag) { + objegg_cat.error() + << "Invalid number at line " << _line_number << "\n"; + return false; + } + normal.normalize(); + + _vn_table.push_back(normal); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_f +// Access: Protected +// Description: Defines a face in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_f(vector_string &words) { + _f_given = true; + + PT(EggPolygon) poly = new EggPolygon; + for (size_t i = 1; i < words.size(); ++i) { + EggVertex *vertex = get_face_vertex(words[i]); + if (vertex == NULL) { + return false; + } + poly->add_vertex(vertex); + } + _current_group->add_child(poly); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_g +// Access: Protected +// Description: Defines a group in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_g(vector_string &words) { + EggGroup *group = _root_group; + + // We assume the group names define a hierarchy of more-specific to + // less-specific group names, so that the first group name is the + // bottommost node, and the last group name is the topmost node. + + // Thus, iterate from the back to the front. + size_t i = words.size(); + while (i > 1) { + --i; + EggNode *child = group->find_child(words[i]); + if (child == NULL || !child->is_of_type(EggGroup::get_class_type())) { + child = new EggGroup(words[i]); + group->add_child(child); + } + group = DCAST(EggGroup, child); + } + + _current_group = group; + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::get_face_vertex +// Access: Protected +// Description: Returns or creates a vertex in the vpool according to +// the indicated face reference. +//////////////////////////////////////////////////////////////////// +EggVertex *ObjToEggConverter:: +get_face_vertex(const string &reference) { + VertexEntry entry(this, reference); + + // Synthesize a vertex. + EggVertex synth; + + if (entry._vi != 0) { + if (_v4_given) { + synth.set_pos(LCAST(double, _v_table[entry._vi - 1])); + } else { + LPoint4d pos = _v_table[entry._vi - 1]; + synth.set_pos(LPoint3d(pos[0], pos[1], pos[2])); + } + + if (entry._vi - 1 < (int)_rgb_table.size()) { + // We have a per-vertex color too. + LRGBColord rgb = _rgb_table[entry._vi - 1]; + LColor rgba(rgb[0], rgb[1], rgb[2], 1.0); + synth.set_color(rgba); + } + } + + if (entry._vti != 0) { + // We have a texture coordinate; apply it. + if (_vt3_given) { + synth.set_uvw("", _vt_table[entry._vti - 1]); + } else { + LTexCoord3d uvw = _vt_table[entry._vti - 1]; + synth.set_uv("", LTexCoordd(uvw[0], uvw[1])); + } + } else if (entry._vi - 1 < (int)_xvt_table.size()) { + // We have an xvt texture coordinate. + synth.set_uv("", _xvt_table[entry._vi - 1]); + } + + if (entry._vni != 0) { + // We have a normal; apply it. + synth.set_normal(_vn_table[entry._vni - 1]); + } + + return _vpool->create_unique_vertex(synth); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::generate_egg_points +// Access: Protected +// Description: If an obj file defines no faces, create a bunch of +// EggVertex objects to illustrate the vertex positions +// at least. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter:: +generate_egg_points() { + for (size_t vi = 0; vi < _v_table.size(); ++vi) { + const LVecBase4d &p = _v_table[vi]; + _vpool->make_new_vertex(LVecBase3d(p[0], p[1], p[2])); + } +} + + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_node +// Access: Protected +// Description: Reads the file and converts it to PandaNode structures. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_node(const Filename &filename) { + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + istream *strm = vfs->open_read_file(filename, true); + if (strm == NULL) { + objegg_cat.error() + << "Couldn't read " << filename << "\n"; + return false; + } + + _v_table.clear(); + _vn_table.clear(); + _rgb_table.clear(); + _vt_table.clear(); + _xvt_table.clear(); + _ref_plane_res.set(1.0, 1.0); + _v4_given = false; + _vt3_given = false; + _f_given = false; + + StreamReader sr(strm, true); + string line = sr.readline(); + _line_number = 1; + while (!line.empty()) { + line = trim(line); + if (line.empty()) { + line = sr.readline(); + continue; + } + + if (line.substr(0, 15) == "#_ref_plane_res") { + process_ref_plane_res(line); + line = sr.readline(); + continue; + } + + if (line[0] == '#') { + line = sr.readline(); + continue; + } + + if (!process_line_node(line)) { + return false; + } + line = sr.readline(); + ++_line_number; + } + + if (!_f_given) { + generate_points(); + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_line_node +// Access: Protected +// Description: +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_line_node(const string &line) { + vector_string words; + tokenize(line, words, " \t", true); + nassertr(!words.empty(), false); + + string tag = words[0]; + if (tag == "v") { + return process_v(words); + } else if (tag == "vt") { + return process_vt(words); + } else if (tag == "xvt") { + return process_xvt(words); + } else if (tag == "xvc") { + return process_xvc(words); + } else if (tag == "vn") { + return process_vn(words); + } else if (tag == "f") { + return process_f_node(words); + } else if (tag == "g") { + return process_g_node(words); + } else { + bool inserted = _ignored_tags.insert(tag).second; + if (inserted) { + objegg_cat.info() + << "Ignoring tag " << tag << "\n"; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_f_node +// Access: Protected +// Description: Defines a face in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_f_node(vector_string &words) { + _f_given = true; + + bool all_vn = true; + int non_vn_index = -1; + + pvector verts; + verts.reserve(words.size() - 1); + for (size_t i = 1; i < words.size(); ++i) { + VertexEntry entry(this, words[i]); + verts.push_back(entry); + if (entry._vni == 0) { + all_vn = false; + non_vn_index = i; + } + } + + if (verts.size() < 3) { + // Not enough vertices. + objegg_cat.error() + << "Degenerate face at " << _line_number << "\n"; + return false; + } + + int synth_vni = 0; + if (!all_vn) { + // Synthesize a normal if we need it. + LNormald normal = LNormald::zero(); + for (size_t i = 0; i < verts.size(); ++i) { + int vi0 = verts[i]._vi; + int vi1 = verts[(i + 1) % verts.size()]._vi; + if (vi0 == 0 || vi1 == 0) { + continue; + } + const LVecBase4d &p0 = _v_table[vi0 - 1]; + const LVecBase4d &p1 = _v_table[vi1 - 1]; + + normal[0] += p0[1] * p1[2] - p0[2] * p1[1]; + normal[1] += p0[2] * p1[0] - p0[0] * p1[2]; + normal[2] += p0[0] * p1[1] - p0[1] * p1[0]; + } + normal.normalize(); + synth_vni = add_synth_normal(normal); + } + + Triangulator3 tri; + int num_tris = 1; + + if (verts.size() != 3) { + // We have to triangulate a higher-order polygon. + for (size_t i = 0; i < verts.size(); ++i) { + const LVecBase4d &p = _v_table[verts[i]._vi - 1]; + tri.add_vertex(p[0], p[1], p[2]); + tri.add_polygon_vertex(i); + } + + tri.triangulate(); + num_tris = tri.get_num_triangles(); + } + + if (_current_vertex_data->_prim->get_num_vertices() + 3 * num_tris > egg_max_indices || + _current_vertex_data->_entries.size() + verts.size() > egg_max_vertices) { + // We'll exceed our specified limit with these triangles; start a new Geom. + _current_vertex_data->close_geom(this); + } + + if (verts.size() == 3) { + // It's already a triangle; add it directly. + _current_vertex_data->add_triangle(this, verts[0], verts[1], verts[2], synth_vni); + + } else { + // Get the triangulated results. + for (int ti = 0; ti < num_tris; ++ti) { + int i0 = tri.get_triangle_v0(ti); + int i1 = tri.get_triangle_v1(ti); + int i2 = tri.get_triangle_v2(ti); + _current_vertex_data->add_triangle(this, verts[i0], verts[i1], verts[i2], synth_vni); + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::process_g_node +// Access: Protected +// Description: Defines a group in the obj file. +//////////////////////////////////////////////////////////////////// +bool ObjToEggConverter:: +process_g_node(vector_string &words) { + _current_vertex_data->close_geom(this); + delete _current_vertex_data; + _current_vertex_data = NULL; + + NodePath np(_root_node); + + // We assume the group names define a hierarchy of more-specific to + // less-specific group names, so that the first group name is the + // bottommost node, and the last group name is the topmost node. + + // Thus, iterate from the back to the front. + size_t i = words.size(); + string name; + while (i > 2) { + --i; + name = words[i]; + NodePath child = np.find(name); + if (!child) { + child = np.attach_new_node(name); + } + np = child; + } + + if (i > 1) { + --i; + name = words[i]; + } + + _current_vertex_data = new VertexData(np.node(), name); + + return true; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::generate_points +// Access: Protected +// Description: If an obj file defines no faces, create a bunch of +// GeomPoints to illustrate the vertex positions at +// least. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter:: +generate_points() { + CPT(GeomVertexFormat) format = GeomVertexFormat::get_v3(); + PT(GeomVertexData) vdata = new GeomVertexData("points", format, GeomEnums::UH_static); + vdata->set_num_rows(_v_table.size()); + GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); + + for (size_t vi = 0; vi < _v_table.size(); ++vi) { + const LVecBase4d &p = _v_table[vi]; + vertex_writer.add_data3d(p[0], p[1], p[2]); + } + + PT(GeomPrimitive) prim = new GeomPoints(GeomEnums::UH_static); + prim->add_next_vertices(_v_table.size()); + prim->close_primitive(); + + PT(Geom) geom = new Geom(vdata); + geom->add_primitive(prim); + + PT(GeomNode) geom_node = new GeomNode("points"); + geom_node->add_geom(geom); + _root_node->add_child(geom_node); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::add_synth_normal +// Access: Private +// Description: Adds a new normal to the synth_vn table, or returns +// an existing normal. In either case returns the +// 1-based index number to the normal. +//////////////////////////////////////////////////////////////////// +int ObjToEggConverter:: +add_synth_normal(const LVecBase3d &normal) { + pair result = _unique_synth_vn_table.insert(UniqueVec3Table::value_type(normal, _unique_synth_vn_table.size())); + UniqueVec3Table::iterator ni = result.first; + int index = (*ni).second; + + if (result.second) { + // If the normal was added to the table, it's a unique normal, and + // now we have to add it to the table too. + _synth_vn_table.push_back(normal); + } + + return index + 1; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexEntry::Constructor +// Access: Public +// Description: Creates a VertexEntry from the n/n/n string format in +// the obj file face reference. +//////////////////////////////////////////////////////////////////// +ObjToEggConverter::VertexEntry:: +VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex) { + _vi = 0; + _vti = 0; + _vni = 0; + _synth_vni = 0; + + vector_string words; + tokenize(obj_vertex, words, "/", false); + nassertv(!words.empty()); + + for (size_t i = 0; i < words.size(); ++i) { + int index; + if (trim(words[i]).empty()) { + index = 0; + } else { + if (!string_to_int(words[i], index)) { + index = 0; + } + } + + switch (i) { + case 0: + _vi = index; + if (_vi < 0) { + _vi = (int)converter->_v_table.size() + _vi; + } + if (_vi < 0 || _vi - 1 >= (int)converter->_v_table.size()) { + _vi = 0; + } + break; + + case 1: + _vti = index; + if (_vti < 0) { + _vti = (int)converter->_vt_table.size() + _vti; + } + if (_vti < 0 || _vti - 1 >= (int)converter->_vt_table.size()) { + _vti = 0; + } + break; + + case 2: + _vni = index; + if (_vni < 0) { + _vni = (int)converter->_vn_table.size() + _vni; + } + if (_vni < 0 || _vni - 1 >= (int)converter->_vn_table.size()) { + _vni = 0; + } + break; + } + } +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +ObjToEggConverter::VertexData:: +VertexData(PandaNode *parent, const string &name) : + _parent(parent), _name(name) +{ + _geom_node = NULL; + + _v4_given = false; + _vt3_given = false; + _vt_given = false; + _rgb_given = false; + _vn_given = false; + + _prim = new GeomTriangles(GeomEnums::UH_static); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::add_vertex +// Access: Public +// Description: Adds a new entry to the vertex data for the indicated +// VertexEntry, or returns an equivalent vertex already +// present. +//////////////////////////////////////////////////////////////////// +int ObjToEggConverter::VertexData:: +add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry) { + pair result; + UniqueVertexEntries::iterator ni; + int index; + + if (entry._vni != 0 || entry._synth_vni != 0) { + // If we are storing a vertex with a normal, see if we + // have already stored a vertex without a normal first. + VertexEntry no_normal(entry); + no_normal._vni = 0; + no_normal._synth_vni = 0; + ni = _unique_entries.find(no_normal); + if (ni != _unique_entries.end()) { + // We did have such a vertex! In this case, repurpose this + // vertex, resetting it to contain this normal. + index = (*ni).second; + _unique_entries.erase(ni); + result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, index)); + nassertr(result.second, index); + nassertr(_entries[index] == no_normal, index); + _entries[index]._vni = entry._vni; + _entries[index]._synth_vni = entry._synth_vni; + return index; + } + } else if (entry._vni == 0 && entry._synth_vni == 0) { + // If we are storing a vertex *without* any normal, see if we have + // already stored a vertex with a normal first. + ni = _unique_entries.lower_bound(entry); + if (ni != _unique_entries.end() && (*ni).first.matches_except_normal(entry)) { + // We had such a vertex, so use it. + index = (*ni).second; + return index; + } + } + + // We didn't already have a vertex we could repurpose, so try to add + // exactly the desired vertex. + result = _unique_entries.insert(UniqueVertexEntries::value_type(entry, _entries.size())); + ni = result.first; + index = (*ni).second; + + if (result.second) { + // If the vertex was added to the table, it's a unique vertex, and + // now we have to add it to the vertex data too. + _entries.push_back(entry); + + if (converter->_v4_given) { + _v4_given = true; + } + if (converter->_vt3_given) { + _vt3_given = true; + } + if (entry._vti != 0) { + _vt_given = true; + } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { + // We have an xvt texture coordinate. + _vt_given = true; + } + if (entry._vi - 1 < (int)converter->_rgb_table.size()) { + // We have a per-vertex color too. + _rgb_given = true; + } + if (entry._vni != 0) { + _vn_given = true; + } + } + + return index; +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::add_triangle +// Access: Public +// Description: Adds a triangle to the primitive, as a triple of +// three VertexEntry objects, which are each added to +// the vertex pool. If synth_vni is not 0, it is +// assigned to the last vertex. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter::VertexData:: +add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, + const VertexEntry &v1, const VertexEntry &v2, + int synth_vni) { + int v0i, v1i, v2i; + + v0i = add_vertex(converter, v0); + v1i = add_vertex(converter, v1); + + if (synth_vni != 0) { + VertexEntry v2n(v2); + v2n._synth_vni = synth_vni; + v2i = add_vertex(converter, v2n); + } else { + v2i = add_vertex(converter, v2); + } + + _prim->add_vertices(v0i, v1i, v2i); + _prim->close_primitive(); +} + +//////////////////////////////////////////////////////////////////// +// Function: ObjToEggConverter::VertexData::close_geom +// Access: Public +// Description: Finishes the current geom and stores it as a child +// in the root. Prepares for new geoms. +//////////////////////////////////////////////////////////////////// +void ObjToEggConverter::VertexData:: +close_geom(const ObjToEggConverter *converter) { + if (_prim->get_num_vertices() != 0) { + // Create a new format that includes only the columns we actually + // used. + PT(GeomVertexArrayFormat) aformat = new GeomVertexArrayFormat; + if (_v4_given) { + aformat->add_column(InternalName::get_vertex(), 4, + GeomEnums::NT_stdfloat, GeomEnums::C_point); + } else { + aformat->add_column(InternalName::get_vertex(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_point); + } + + // We always add normals--if no normals appeared in the file, we + // synthesize them. + aformat->add_column(InternalName::get_normal(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_vector); + + if (_vt_given) { + if (_vt3_given) { + aformat->add_column(InternalName::get_texcoord(), 3, + GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); + } else { + aformat->add_column(InternalName::get_texcoord(), 2, + GeomEnums::NT_stdfloat, GeomEnums::C_texcoord); + } + } + + if (_rgb_given) { + aformat->add_column(InternalName::get_color(), 4, + GeomEnums::NT_uint8, GeomEnums::C_color); + } + + CPT(GeomVertexFormat) format = GeomVertexFormat::register_format(aformat); + + // Create and populate the vertex data. + PT(GeomVertexData) vdata = new GeomVertexData(_name, format, GeomEnums::UH_static); + GeomVertexWriter vertex_writer(vdata, InternalName::get_vertex()); + GeomVertexWriter normal_writer(vdata, InternalName::get_normal()); + GeomVertexWriter texcoord_writer(vdata, InternalName::get_texcoord()); + GeomVertexWriter color_writer(vdata, InternalName::get_color()); + + for (size_t i = 0; i < _entries.size(); ++i) { + const VertexEntry &entry = _entries[i]; + + if (entry._vi != 0) { + vertex_writer.set_row(i); + vertex_writer.add_data4d(converter->_v_table[entry._vi - 1]); + } + if (entry._vti != 0) { + texcoord_writer.set_row(i); + texcoord_writer.add_data3d(converter->_vt_table[entry._vti - 1]); + } else if (entry._vi - 1 < (int)converter->_xvt_table.size()) { + // We have an xvt texture coordinate. + texcoord_writer.set_row(i); + texcoord_writer.add_data2d(converter->_xvt_table[entry._vi - 1]); + } + if (entry._vni != 0) { + normal_writer.set_row(i); + normal_writer.add_data3d(converter->_vn_table[entry._vni - 1]); + } else if (entry._synth_vni != 0) { + normal_writer.set_row(i); + normal_writer.add_data3d(converter->_synth_vn_table[entry._synth_vni - 1]); + } else { + // In this case, the normal isn't used and doesn't matter; we + // fill it in a unit vector just for neatness. + normal_writer.set_row(i); + normal_writer.add_data3d(0, 0, 1); + } + if (_rgb_given) { + if (entry._vi - 1 < (int)converter->_rgb_table.size()) { + color_writer.set_row(i); + color_writer.add_data3d(converter->_rgb_table[entry._vi - 1]); + } + } + } + + // Transform to zup-right. + vdata->transform_vertices(LMatrix4::convert_mat(CS_zup_right, CS_default)); + + // Now create a Geom with this data. + CPT(RenderState) state = RenderState::make_empty(); + if (_rgb_given) { + state = state->add_attrib(ColorAttrib::make_vertex()); + } else { + state = state->add_attrib(ColorAttrib::make_flat(LColor(1, 1, 1, 1))); + } + if (!_vn_given) { + // We have synthesized these normals; specify the flat-shading + // attrib. + state = state->add_attrib(ShadeModelAttrib::make(ShadeModelAttrib::M_flat)); + _prim->set_shade_model(GeomEnums::SM_flat_last_vertex); + } + + PT(Geom) geom = new Geom(vdata); + geom->add_primitive(_prim); + + if (_geom_node == NULL) { + _geom_node = new GeomNode(_name); + _parent->add_child(_geom_node); + } + + _geom_node->add_geom(geom, state); + } + + _prim = new GeomTriangles(GeomEnums::UH_static); + _entries.clear(); + _unique_entries.clear(); +} diff --git a/pandatool/src/objegg/objToEggConverter.h b/pandatool/src/objegg/objToEggConverter.h index ba537dbe2a..66fb6d7f37 100644 --- a/pandatool/src/objegg/objToEggConverter.h +++ b/pandatool/src/objegg/objToEggConverter.h @@ -1,152 +1,152 @@ -// Filename: ObjToEggConverter.h -// Created by: drose (07Dec10) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// - -#ifndef OBJTOEGGCONVERTER_H -#define OBJTOEGGCONVERTER_H - -#include "pandatoolbase.h" - -#include "somethingToEggConverter.h" -#include "eggVertexPool.h" -#include "eggGroup.h" -#include "geomVertexData.h" -#include "geomVertexWriter.h" -#include "geomPrimitive.h" -#include "geomNode.h" -#include "pandaNode.h" -#include "pvector.h" -#include "epvector.h" - -//////////////////////////////////////////////////////////////////// -// Class : ObjToEggConverter -// Description : Convert an Obj file to egg data. -//////////////////////////////////////////////////////////////////// -class ObjToEggConverter : public SomethingToEggConverter { -public: - ObjToEggConverter(); - ObjToEggConverter(const ObjToEggConverter ©); - ~ObjToEggConverter(); - - virtual SomethingToEggConverter *make_copy(); - - virtual string get_name() const; - virtual string get_extension() const; - virtual bool supports_compressed() const; - virtual bool supports_convert_to_node(const LoaderOptions &options) const; - - virtual bool convert_file(const Filename &filename); - virtual PT(PandaNode) convert_to_node(const LoaderOptions &options, const Filename &filename); - -protected: - bool process(const Filename &filename); - bool process_line(const string &line); - bool process_ref_plane_res(const string &line); - - bool process_v(vector_string &words); - bool process_vt(vector_string &words); - bool process_xvt(vector_string &words); - bool process_xvc(vector_string &words); - bool process_vn(vector_string &words); - bool process_f(vector_string &words); - bool process_g(vector_string &words); - - EggVertex *get_face_vertex(const string &face_reference); - void generate_egg_points(); - - bool process_node(const Filename &filename); - bool process_line_node(const string &line); - - bool process_f_node(vector_string &words); - bool process_g_node(vector_string &words); - - void generate_points(); - int add_synth_normal(const LVecBase3d &normal); - - // Read from the obj file. - int _line_number; - typedef epvector Vec4Table; - typedef epvector Vec3Table; - typedef epvector Vec2Table; - typedef pmap UniqueVec3Table; - - Vec4Table _v_table; - Vec3Table _vn_table, _rgb_table; - Vec3Table _vt_table; - Vec2Table _xvt_table; - Vec3Table _synth_vn_table; - UniqueVec3Table _unique_synth_vn_table; - LVecBase2d _ref_plane_res; - bool _v4_given, _vt3_given; - bool _f_given; - - pset _ignored_tags; - - // Structures filled when creating an egg file. - PT(EggVertexPool) _vpool; - PT(EggGroup) _root_group; - EggGroup *_current_group; - - // Structures filled when creating a PandaNode directly. - PT(PandaNode) _root_node; - - class VertexEntry { - public: - VertexEntry(); - VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex); - - INLINE bool operator < (const VertexEntry &other) const; - INLINE bool operator == (const VertexEntry &other) const; - INLINE bool matches_except_normal(const VertexEntry &other) const; - - // The 1-based vertex, texcoord, and normal index numbers - // appearing in the obj file for this vertex. 0 if the index - // number is not given. - int _vi, _vti, _vni; - - // The 1-based index number to the synthesized normal, if needed. - int _synth_vni; - }; - typedef pmap UniqueVertexEntries; - typedef pvector VertexEntries; - - class VertexData { - public: - VertexData(PandaNode *parent, const string &name); - - int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); - void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, - const VertexEntry &v1, const VertexEntry &v2, - int synth_vni); - void close_geom(const ObjToEggConverter *converter); - - PT(PandaNode) _parent; - string _name; - PT(GeomNode) _geom_node; - - PT(GeomPrimitive) _prim; - VertexEntries _entries; - UniqueVertexEntries _unique_entries; - - bool _v4_given, _vt3_given; - bool _vt_given, _rgb_given, _vn_given; - }; - - VertexData *_current_vertex_data; - - friend class VertexData; -}; - -#include "objToEggConverter.I" - -#endif +// Filename: ObjToEggConverter.h +// Created by: drose (07Dec10) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef OBJTOEGGCONVERTER_H +#define OBJTOEGGCONVERTER_H + +#include "pandatoolbase.h" + +#include "somethingToEggConverter.h" +#include "eggVertexPool.h" +#include "eggGroup.h" +#include "geomVertexData.h" +#include "geomVertexWriter.h" +#include "geomPrimitive.h" +#include "geomNode.h" +#include "pandaNode.h" +#include "pvector.h" +#include "epvector.h" + +//////////////////////////////////////////////////////////////////// +// Class : ObjToEggConverter +// Description : Convert an Obj file to egg data. +//////////////////////////////////////////////////////////////////// +class ObjToEggConverter : public SomethingToEggConverter { +public: + ObjToEggConverter(); + ObjToEggConverter(const ObjToEggConverter ©); + ~ObjToEggConverter(); + + virtual SomethingToEggConverter *make_copy(); + + virtual string get_name() const; + virtual string get_extension() const; + virtual bool supports_compressed() const; + virtual bool supports_convert_to_node(const LoaderOptions &options) const; + + virtual bool convert_file(const Filename &filename); + virtual PT(PandaNode) convert_to_node(const LoaderOptions &options, const Filename &filename); + +protected: + bool process(const Filename &filename); + bool process_line(const string &line); + bool process_ref_plane_res(const string &line); + + bool process_v(vector_string &words); + bool process_vt(vector_string &words); + bool process_xvt(vector_string &words); + bool process_xvc(vector_string &words); + bool process_vn(vector_string &words); + bool process_f(vector_string &words); + bool process_g(vector_string &words); + + EggVertex *get_face_vertex(const string &face_reference); + void generate_egg_points(); + + bool process_node(const Filename &filename); + bool process_line_node(const string &line); + + bool process_f_node(vector_string &words); + bool process_g_node(vector_string &words); + + void generate_points(); + int add_synth_normal(const LVecBase3d &normal); + + // Read from the obj file. + int _line_number; + typedef epvector Vec4Table; + typedef epvector Vec3Table; + typedef epvector Vec2Table; + typedef pmap UniqueVec3Table; + + Vec4Table _v_table; + Vec3Table _vn_table, _rgb_table; + Vec3Table _vt_table; + Vec2Table _xvt_table; + Vec3Table _synth_vn_table; + UniqueVec3Table _unique_synth_vn_table; + LVecBase2d _ref_plane_res; + bool _v4_given, _vt3_given; + bool _f_given; + + pset _ignored_tags; + + // Structures filled when creating an egg file. + PT(EggVertexPool) _vpool; + PT(EggGroup) _root_group; + EggGroup *_current_group; + + // Structures filled when creating a PandaNode directly. + PT(PandaNode) _root_node; + + class VertexEntry { + public: + VertexEntry(); + VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex); + + INLINE bool operator < (const VertexEntry &other) const; + INLINE bool operator == (const VertexEntry &other) const; + INLINE bool matches_except_normal(const VertexEntry &other) const; + + // The 1-based vertex, texcoord, and normal index numbers + // appearing in the obj file for this vertex. 0 if the index + // number is not given. + int _vi, _vti, _vni; + + // The 1-based index number to the synthesized normal, if needed. + int _synth_vni; + }; + typedef pmap UniqueVertexEntries; + typedef pvector VertexEntries; + + class VertexData { + public: + VertexData(PandaNode *parent, const string &name); + + int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); + void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, + const VertexEntry &v1, const VertexEntry &v2, + int synth_vni); + void close_geom(const ObjToEggConverter *converter); + + PT(PandaNode) _parent; + string _name; + PT(GeomNode) _geom_node; + + PT(GeomPrimitive) _prim; + VertexEntries _entries; + UniqueVertexEntries _unique_entries; + + bool _v4_given, _vt3_given; + bool _vt_given, _rgb_given, _vn_given; + }; + + VertexData *_current_vertex_data; + + friend class VertexData; +}; + +#include "objToEggConverter.I" + +#endif From 3b667a83ed988ff8b0ba391eeb5daedae747642f Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 7 Nov 2015 19:54:06 -0800 Subject: [PATCH 200/200] general: Fix several missing includes. --- dtool/src/cppparser/cppEnumType.cxx | 1 + dtool/src/cppparser/cppPreprocessor.cxx | 5 +++++ dtool/src/cppparser/cppScope.cxx | 1 + dtool/src/cppparser/cppStructType.h | 2 ++ dtool/src/cppparser/cppToken.cxx | 1 + 5 files changed, 10 insertions(+) diff --git a/dtool/src/cppparser/cppEnumType.cxx b/dtool/src/cppparser/cppEnumType.cxx index e3506d0ad1..abb8e595ed 100644 --- a/dtool/src/cppparser/cppEnumType.cxx +++ b/dtool/src/cppparser/cppEnumType.cxx @@ -19,6 +19,7 @@ #include "cppConstType.h" #include "cppScope.h" #include "cppParser.h" +#include "cppIdentifier.h" #include "indent.h" //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index e405f2cf4c..e4e83c13e3 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -20,6 +20,11 @@ #include "cppIdentifier.h" #include "cppTemplateScope.h" #include "cppTemplateParameterList.h" +#include "cppConstType.h" +#include "cppFunctionGroup.h" +#include "cppFunctionType.h" +#include "cppPointerType.h" +#include "cppParameterList.h" #include "cppSimpleType.h" #include "cppGlobals.h" #include "cppCommentBlock.h" diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index 4118668ed4..fc221591c6 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -14,6 +14,7 @@ #include "cppScope.h" +#include "cppParser.h" #include "cppDeclaration.h" #include "cppNamespace.h" #include "cppTypedefType.h" diff --git a/dtool/src/cppparser/cppStructType.h b/dtool/src/cppparser/cppStructType.h index bbbbaa324a..66f9381964 100644 --- a/dtool/src/cppparser/cppStructType.h +++ b/dtool/src/cppparser/cppStructType.h @@ -17,7 +17,9 @@ #include "dtoolbase.h" +#include "cppIdentifier.h" #include "cppExtensionType.h" +#include "cppFunctionGroup.h" #include "cppVisibility.h" #include diff --git a/dtool/src/cppparser/cppToken.cxx b/dtool/src/cppparser/cppToken.cxx index 56b215ad22..5f247fef68 100644 --- a/dtool/src/cppparser/cppToken.cxx +++ b/dtool/src/cppparser/cppToken.cxx @@ -14,6 +14,7 @@ #include "cppToken.h" +#include "cppExpression.h" #include "cppIdentifier.h" #include "cppBison.h"