From e398c51f8a9b641b43658d14639f67301f8d0e11 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 27 Mar 2012 13:13:28 +0200 Subject: [PATCH] remove unneeded render queue workaround --- apps/openmw/mwrender/occlusionquery.cpp | 24 ------------------------ apps/openmw/mwrender/occlusionquery.hpp | 8 -------- 2 files changed, 32 deletions(-) diff --git a/apps/openmw/mwrender/occlusionquery.cpp b/apps/openmw/mwrender/occlusionquery.cpp index c3285a3359..43a742a548 100644 --- a/apps/openmw/mwrender/occlusionquery.cpp +++ b/apps/openmw/mwrender/occlusionquery.cpp @@ -225,14 +225,6 @@ void OcclusionQuery::update(float duration) mBBQuerySingleObject->setVisible(false); - // restore old render queues - for (std::vector::iterator it=mObjectsInfo.begin(); - it!=mObjectsInfo.end(); ++it) - { - if (!mRendering->getScene()->hasMovableObject((*it).name, (*it).typeName)) break; - mRendering->getScene()->getMovableObject((*it).name, (*it).typeName)->setRenderQueueGroup( (*it).oldRenderqueue ); - } - mQuerySingleObjectStarted = false; mQuerySingleObjectRequested = false; } @@ -245,22 +237,6 @@ void OcclusionQuery::occlusionTest(const Ogre::Vector3& position, Ogre::SceneNod mBBQuerySingleObject->setVisible(true); - // we don't want the object to occlude itself - // put it in a render queue _after_ the occlusion query - mObjectsInfo.clear(); - for (int i=0; inumAttachedObjects(); ++i) - { - ObjectInfo info; - MovableObject* obj = object->getAttachedObject(i); - info.name = obj->getName(); - info.typeName = obj->getMovableType(); - info.oldRenderqueue = obj->getRenderQueueGroup(); - - mObjectsInfo.push_back(info); - - object->getAttachedObject(i)->setRenderQueueGroup(RENDER_QUEUE_MAIN+5); - } - mObjectNode->setPosition(position); // scale proportional to camera distance, in order to always give the billboard the same size in screen-space mObjectNode->setScale( Vector3(1,1,1)*(position - mRendering->getCamera()->getRealPosition()).length() ); diff --git a/apps/openmw/mwrender/occlusionquery.hpp b/apps/openmw/mwrender/occlusionquery.hpp index a9fa0b5e4a..b3e5442cfe 100644 --- a/apps/openmw/mwrender/occlusionquery.hpp +++ b/apps/openmw/mwrender/occlusionquery.hpp @@ -18,13 +18,6 @@ namespace MWRender /// /// \brief Implements hardware occlusion queries on the GPU /// - struct ObjectInfo - { - int oldRenderqueue; - std::string name; - std::string typeName; - }; - class OcclusionQuery : public Ogre::RenderObjectListener, public Ogre::RenderQueueListener { public: @@ -75,7 +68,6 @@ namespace MWRender float mSunVisibility; Ogre::SceneNode* mObjectNode; - std::vector mObjectsInfo; bool mWasVisible; bool mObjectWasVisible;