Skip to content

Commit

Permalink
Address ign-rendering4 Windows warnings (#213)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Jan 28, 2021
1 parent 843888a commit 530014b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/ignition/rendering/base/BaseLidarVisual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ namespace ignition
mtl->SetCastShadows(false);
mtl->SetReceiveShadows(false);
mtl->SetLightingEnabled(false);
mtl->SetMetalness(0.0);
mtl->SetMetalness(0.0f);
mtl->SetReflectivity(0.0);
}

Expand All @@ -476,7 +476,7 @@ namespace ignition
mtl->SetCastShadows(false);
mtl->SetReceiveShadows(false);
mtl->SetLightingEnabled(false);
mtl->SetMetalness(0.0);
mtl->SetMetalness(0.0f);
mtl->SetReflectivity(0.0);
}

Expand All @@ -490,7 +490,7 @@ namespace ignition
mtl->SetCastShadows(false);
mtl->SetReceiveShadows(false);
mtl->SetLightingEnabled(false);
mtl->SetMetalness(0.5);
mtl->SetMetalness(0.5f);
mtl->SetReflectivity(0.2);
}

Expand All @@ -505,7 +505,7 @@ namespace ignition
mtl->SetCastShadows(false);
mtl->SetReceiveShadows(false);
mtl->SetLightingEnabled(false);
mtl->SetMetalness(0.1);
mtl->SetMetalness(0.1f);
mtl->SetReflectivity(0.2);
}
return;
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2ParticleEmitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@

// Note this include is placed in the src file because
// otherwise ogre produces compile errors
#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Hlms/Pbs/OgreHlmsPbsDatablock.h>
#include <Hlms/Unlit/OgreHlmsUnlitDatablock.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include "ignition/rendering/ogre2/Ogre2Conversions.hh"
#include "ignition/rendering/ogre2/Ogre2Includes.hh"
Expand Down
6 changes: 3 additions & 3 deletions src/WireBox_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ void WireBoxTest::WireBox(const std::string &_renderEngine)
wireBox->SetMaterial(mat);
MaterialPtr wireBoxMat = wireBox->Material();
ASSERT_NE(nullptr, wireBoxMat);
EXPECT_EQ(math::Color(0.6, 0.7, 0.8), wireBoxMat->Ambient());
EXPECT_EQ(math::Color(0.3, 0.8, 0.2), wireBoxMat->Diffuse());
EXPECT_EQ(math::Color(0.4, 0.9, 1.0), wireBoxMat->Specular());
EXPECT_EQ(math::Color(0.6f, 0.7f, 0.8f), wireBoxMat->Ambient());
EXPECT_EQ(math::Color(0.3f, 0.8f, 0.2f), wireBoxMat->Diffuse());
EXPECT_EQ(math::Color(0.4f, 0.9f, 1.0f), wireBoxMat->Specular());

// Clean up
engine->DestroyScene(scene);
Expand Down

0 comments on commit 530014b

Please sign in to comment.