diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 8d9cd6b3dc..f51a2e8b2a 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -1473,7 +1473,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; } 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; } 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__; 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; 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);