Skip to content

Commit

Permalink
Fix Ogre header warnings breaking the build in MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Apr 10, 2021
1 parent 75065f1 commit 40c9265
Show file tree
Hide file tree
Showing 24 changed files with 141 additions and 8 deletions.
8 changes: 8 additions & 0 deletions ogre2/include/ignition/rendering/ogre2/Ogre2Conversions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@
#include "ignition/rendering/PixelFormat.hh"
#include "ignition/rendering/ogre2/Export.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif

#include <OgreColourValue.h>
#include <OgreVector3.h>
#include <OgrePixelFormat.h>

#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace ignition
{
namespace rendering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#include "ignition/rendering/ogre2/Ogre2RenderTypes.hh"
#include "ignition/rendering/Marker.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreHlmsPso.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace Ogre
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/include/ignition/rendering/ogre2/Ogre2Light.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
#include "ignition/rendering/base/BaseLight.hh"
#include "ignition/rendering/ogre2/Ogre2Node.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreLight.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace Ogre
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/include/ignition/rendering/ogre2/Ogre2Material.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
#include "ignition/rendering/base/BaseMaterial.hh"
#include "ignition/rendering/ogre2/Ogre2Object.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Hlms/Pbs/OgreHlmsPbsPrerequisites.h>
#include <OgreMaterial.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace Ogre
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@
#include "ignition/rendering/ogre2/Export.hh"
#include "ignition/rendering/ogre2/Ogre2RenderTypes.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreMaterial.h>
#include <OgreRenderTargetListener.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace ignition
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
#include "ignition/rendering/ogre2/Ogre2Object.hh"
#include "ignition/rendering/ogre2/Ogre2RenderTargetMaterial.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Compositor/OgreCompositorShadowNode.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace Ogre
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@
#include "ignition/rendering/config.hh"
#include "ignition/rendering/ogre2/Export.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreRenderTargetListener.h>
#include <OgreMaterialManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace ignition
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2Camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@
#include "ignition/rendering/ogre2/Ogre2SelectionBuffer.hh"
#include "ignition/rendering/Utils.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreCamera.h>
#include <OgreItem.h>
#include <OgreSceneManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data for the Ogre2Camera class
class ignition::rendering::Ogre2CameraPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2Conversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
*/
#include "ignition/rendering/ogre2/Ogre2Conversions.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreMatrix4.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

using namespace ignition;
using namespace rendering;
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2DynamicRenderable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@
#include "ignition/rendering/ogre2/Ogre2RenderEngine.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreItem.h>
#include <OgreMesh2.h>
#include <OgreMeshManager2.h>
#include <OgreSceneManager.h>
#include <OgreSubMesh2.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private implementation
class ignition::rendering::Ogre2DynamicRenderablePrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2GaussianNoisePass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#include "ignition/rendering/ogre2/Ogre2GaussianNoisePass.hh"
#include "ignition/rendering/ogre2/Ogre2RenderEngine.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Compositor/OgreCompositorManager2.h>
#include <Compositor/OgreCompositorNodeDef.h>
#include <Compositor/Pass/PassQuad/OgreCompositorPassQuadDef.h>
Expand All @@ -31,6 +34,9 @@
#include <OgreRoot.h>
#include <OgreTechnique.h>
#include <OgreVector3.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data for the Ogre2GaussianNoisePass class
class ignition::rendering::Ogre2GaussianNoisePassPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2GpuRays.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

#include "Ogre2ParticleNoiseListener.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Compositor/OgreCompositorManager2.h>
#include <Compositor/OgreCompositorWorkspace.h>
#include <Compositor/Pass/PassClear/OgreCompositorPassClearDef.h>
Expand All @@ -48,6 +51,9 @@
#include <OgreSceneManager.h>
#include <OgreTechnique.h>
#include <OgreTextureManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace ignition
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2LidarVisual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
#include "ignition/rendering/ogre2/Ogre2Marker.hh"
#include "ignition/rendering/ogre2/Ogre2Geometry.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreSceneNode.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

class ignition::rendering::Ogre2LidarVisualPrivate
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2Light.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
#include "ignition/rendering/ogre2/Ogre2Conversions.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreSceneManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data for the Ogre2Light class
class ignition::rendering::Ogre2LightPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2LightVisual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
#include "ignition/rendering/ogre2/Ogre2Material.hh"
#include "ignition/rendering/ogre2/Ogre2DynamicRenderable.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreSceneNode.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

using namespace ignition;
using namespace rendering;
Expand Down
8 changes: 4 additions & 4 deletions ogre2/src/Ogre2Material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Hlms/Pbs/OgreHlmsPbs.h>
#include <Hlms/Pbs/OgreHlmsPbsDatablock.h>
#include <Hlms/Unlit/OgreHlmsUnlit.h>
#include <Hlms/Unlit/OgreHlmsUnlitDatablock.h>
#include <OgreHlmsManager.h>
#include <OgreMaterialManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
Expand All @@ -36,10 +40,6 @@
#include "ignition/rendering/ogre2/Ogre2RenderEngine.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"

#include <Hlms/Pbs/OgreHlmsPbs.h>
#include <Hlms/Unlit/OgreHlmsUnlit.h>
#include <OgreHlmsManager.h>
#include <OgreMaterialManager.h>

/// \brief Private data for the Ogre2Material class
class ignition::rendering::Ogre2MaterialPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2MaterialSwitcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@
#include "ignition/rendering/ogre2/Ogre2Scene.hh"
#include "ignition/rendering/RenderTypes.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreItem.h>
#include <OgreMaterialManager.h>
#include <OgrePass.h>
#include <OgreSceneManager.h>
#include <OgreTechnique.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

using namespace ignition;
using namespace rendering;
Expand Down
7 changes: 3 additions & 4 deletions ogre2/src/Ogre2Mesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <Animation/OgreSkeletonInstance.h>
#include <Hlms/Pbs/OgreHlmsPbsDatablock.h>
#include <OgreItem.h>
#include <OgreSceneManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
Expand All @@ -32,10 +35,6 @@
#include "ignition/rendering/ogre2/Ogre2Material.hh"
#include "ignition/rendering/ogre2/Ogre2Storage.hh"

#include <Animation/OgreSkeletonInstance.h>
#include <OgreItem.h>
#include <OgreSceneManager.h>

/// brief Private implementation of the Ogre2Mesh class
class ignition::rendering::Ogre2MeshPrivate
{
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2MeshFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#include "ignition/rendering/ogre2/Ogre2Scene.hh"
#include "ignition/rendering/ogre2/Ogre2Storage.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreHardwareBufferManager.h>
#include <OgreItem.h>
#include <OgreKeyFrame.h>
Expand All @@ -48,6 +51,9 @@
#include <OgreSubItem.h>
#include <OgreSubMesh.h>
#include <OgreSubMesh2.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data for the Ogre2MeshFactory class
class ignition::rendering::Ogre2MeshFactoryPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2Node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
#include "ignition/rendering/ogre2/Ogre2Scene.hh"
#include "ignition/rendering/ogre2/Ogre2Storage.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreSceneManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

using namespace ignition;
using namespace rendering;
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2RayQuery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@
#include "ignition/rendering/ogre2/Ogre2RayQuery.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreCamera.h>
#include <OgreItem.h>
#include <OgreMesh2.h>
#include <OgreRay.h>
#include <OgreSceneManager.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data class for Ogre2RayQuery
class ignition::rendering::Ogre2RayQueryPrivate
Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2RenderTargetMaterial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@

#include "ignition/rendering/ogre2/Ogre2RenderTargetMaterial.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreRenderTarget.h>
#include <OgreViewport.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

using namespace ignition::rendering;

Expand Down
6 changes: 6 additions & 0 deletions ogre2/src/Ogre2Scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@
#include "ignition/rendering/ogre2/Ogre2Visual.hh"
#include "ignition/rendering/ogre2/Ogre2WireBox.hh"

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <OgreRoot.h>
#include <OgreSceneManager.h>
#include <Overlay/OgreOverlayManager.h>
#include <Overlay/OgreOverlaySystem.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Private data for the Ogre2Scene class
class ignition::rendering::Ogre2ScenePrivate
Expand Down
Loading

0 comments on commit 40c9265

Please sign in to comment.