]> git.mxchange.org Git - simgear.git/commitdiff
Move definition of SGRawBase<...>::printOn out of simgear namespace
authorTim Moore <timoore@redhat.com>
Sun, 19 Jul 2009 20:39:16 +0000 (22:39 +0200)
committerTim Moore <timoore@redhat.com>
Sun, 19 Jul 2009 20:39:16 +0000 (22:39 +0200)
They are declared in the global namespace, and MSVC insists that they be
defined there.

simgear/props/props.cxx
simgear/scene/material/Effect.cxx

index abd20b19545a27de76cece21e461c12c68314eb6..f15c10ca006e58b83d6c1fb68b9655e56d0eb7ec 100644 (file)
@@ -2299,8 +2299,6 @@ SGPropertyChangeListener::unregister_property (SGPropertyNode * node)
     _properties.erase(it);
 }
 
-namespace simgear
-{
 template<>
 std::ostream& SGRawBase<SGVec3d>::printOn(std::ostream& stream) const
 {
@@ -2314,6 +2312,8 @@ std::ostream& SGRawBase<SGVec3d>::printOn(std::ostream& stream) const
     return stream;
 }
 
+namespace simgear
+{
 template<>
 std::istream& readFrom<SGVec3d>(std::istream& stream, SGVec3d& result)
 {
@@ -2322,7 +2322,7 @@ std::istream& readFrom<SGVec3d>(std::istream& stream, SGVec3d& result)
     }
     return stream;
 }
-
+}
 template<>
 std::ostream& SGRawBase<SGVec4d>::printOn(std::ostream& stream) const
 {
@@ -2336,6 +2336,8 @@ std::ostream& SGRawBase<SGVec4d>::printOn(std::ostream& stream) const
     return stream;
 }
 
+namespace simgear
+{
 template<>
 std::istream& readFrom<SGVec4d>(std::istream& stream, SGVec4d& result)
 {
@@ -2344,7 +2346,6 @@ std::istream& readFrom<SGVec4d>(std::istream& stream, SGVec4d& result)
     }
     return stream;
 }
-
 }
 
 // end of props.cxx
index 92ba1f9c3a38c62c362237b41aa1c76afdbea4a5..1c465700ad5d936202746e74cf6f019b0b7a5ef5 100644 (file)
@@ -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")))