mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
remove unneeded render queue workaround
This commit is contained in:
parent
18c2b5eb0a
commit
e398c51f8a
@ -225,14 +225,6 @@ void OcclusionQuery::update(float duration)
|
||||
|
||||
mBBQuerySingleObject->setVisible(false);
|
||||
|
||||
// restore old render queues
|
||||
for (std::vector<ObjectInfo>::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; i<object->numAttachedObjects(); ++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() );
|
||||
|
@ -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<ObjectInfo> mObjectsInfo;
|
||||
|
||||
bool mWasVisible;
|
||||
bool mObjectWasVisible;
|
||||
|
Loading…
x
Reference in New Issue
Block a user