From b380e71832d5bc35aded3deee5e1752d23e3d79f Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 2 Apr 2012 14:32:21 +0200 Subject: [PATCH] fixed underwater wireframe mode --- apps/openmw/mwrender/renderingmanager.hpp | 3 --- apps/openmw/mwrender/water.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwrender/renderingmanager.hpp b/apps/openmw/mwrender/renderingmanager.hpp index 81907a938..fc32b4dd2 100644 --- a/apps/openmw/mwrender/renderingmanager.hpp +++ b/apps/openmw/mwrender/renderingmanager.hpp @@ -31,11 +31,8 @@ namespace Ogre { - class Camera; - class Viewport; class SceneManager; class SceneNode; - class RaySceneQuery; class Quaternion; class Vector3; } diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index 9de55e3a5..cbf9c5b29 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -70,7 +70,7 @@ void Water::toggle() void Water::checkUnderwater(float y) { - if ((mIsUnderwater && y > mTop) || !mWater->isVisible()) + if ((mIsUnderwater && y > mTop) || !mWater->isVisible() || mCamera->getPolygonMode() != Ogre::PM_SOLID) { try { Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", false); @@ -78,7 +78,7 @@ void Water::checkUnderwater(float y) mIsUnderwater = false; } - if (!mIsUnderwater && y < mTop && mWater->isVisible()) + if (!mIsUnderwater && y < mTop && mWater->isVisible() && mCamera->getPolygonMode() == Ogre::PM_SOLID) { try { Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", true);