forked from mirror/openmw-tes3mp
remove unneeded render queue workaround
This commit is contained in:
parent
18c2b5eb0a
commit
e398c51f8a
2 changed files with 0 additions and 32 deletions
|
@ -225,14 +225,6 @@ void OcclusionQuery::update(float duration)
|
||||||
|
|
||||||
mBBQuerySingleObject->setVisible(false);
|
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;
|
mQuerySingleObjectStarted = false;
|
||||||
mQuerySingleObjectRequested = false;
|
mQuerySingleObjectRequested = false;
|
||||||
}
|
}
|
||||||
|
@ -245,22 +237,6 @@ void OcclusionQuery::occlusionTest(const Ogre::Vector3& position, Ogre::SceneNod
|
||||||
|
|
||||||
mBBQuerySingleObject->setVisible(true);
|
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);
|
mObjectNode->setPosition(position);
|
||||||
// scale proportional to camera distance, in order to always give the billboard the same size in screen-space
|
// 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() );
|
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
|
/// \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
|
class OcclusionQuery : public Ogre::RenderObjectListener, public Ogre::RenderQueueListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -75,7 +68,6 @@ namespace MWRender
|
||||||
float mSunVisibility;
|
float mSunVisibility;
|
||||||
|
|
||||||
Ogre::SceneNode* mObjectNode;
|
Ogre::SceneNode* mObjectNode;
|
||||||
std::vector<ObjectInfo> mObjectsInfo;
|
|
||||||
|
|
||||||
bool mWasVisible;
|
bool mWasVisible;
|
||||||
bool mObjectWasVisible;
|
bool mObjectWasVisible;
|
||||||
|
|
Loading…
Reference in a new issue