From: Tim Moore Date: Sun, 19 Jul 2009 20:39:16 +0000 (+0200) Subject: Move definition of SGRawBase<...>::printOn out of simgear namespace X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f308c9ec3c64eb32a6b851acf0fe5e290f6b5c7;p=simgear.git Move definition of SGRawBase<...>::printOn out of simgear namespace They are declared in the global namespace, and MSVC insists that they be defined there. --- diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index abd20b19..f15c10ca 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -2299,8 +2299,6 @@ SGPropertyChangeListener::unregister_property (SGPropertyNode * node) _properties.erase(it); } -namespace simgear -{ template<> std::ostream& SGRawBase::printOn(std::ostream& stream) const { @@ -2314,6 +2312,8 @@ std::ostream& SGRawBase::printOn(std::ostream& stream) const return stream; } +namespace simgear +{ template<> std::istream& readFrom(std::istream& stream, SGVec3d& result) { @@ -2322,7 +2322,7 @@ std::istream& readFrom(std::istream& stream, SGVec3d& result) } return stream; } - +} template<> std::ostream& SGRawBase::printOn(std::ostream& stream) const { @@ -2336,6 +2336,8 @@ std::ostream& SGRawBase::printOn(std::ostream& stream) const return stream; } +namespace simgear +{ template<> std::istream& readFrom(std::istream& stream, SGVec4d& result) { @@ -2344,7 +2346,6 @@ std::istream& readFrom(std::istream& stream, SGVec4d& result) } return stream; } - } // end of props.cxx diff --git a/simgear/scene/material/Effect.cxx b/simgear/scene/material/Effect.cxx index 92ba1f9c..1c465700 100644 --- a/simgear/scene/material/Effect.cxx +++ b/simgear/scene/material/Effect.cxx @@ -415,6 +415,7 @@ void MaterialBuilder::buildAttribute(Effect* effect, Pass* pass, if ((color = getEffectPropertyChild(effect, prop, "emissive-back"))) mat->setEmission(Material::BACK, getColor(color)); const SGPropertyNode* shininess = 0; + mat->setShininess(Material::FRONT_AND_BACK, 0.0f); if ((shininess = getEffectPropertyChild(effect, prop, "shininess"))) mat->setShininess(Material::FRONT_AND_BACK, shininess->getFloatValue()); if ((shininess = getEffectPropertyChild(effect, prop, "shininess-front")))