mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 17:45:34 +00:00
Fix exit crash
This commit is contained in:
parent
8845c0cee1
commit
301efb411e
2 changed files with 7 additions and 7 deletions
|
@ -44,18 +44,18 @@ OcclusionQuery::OcclusionQuery(OEngine::Render::OgreRenderer* renderer, SceneNod
|
||||||
|
|
||||||
mBBNodeReal = mRendering->getScene()->getRootSceneNode()->createChildSceneNode();
|
mBBNodeReal = mRendering->getScene()->getRootSceneNode()->createChildSceneNode();
|
||||||
|
|
||||||
static Ogre::MeshPtr plane = MeshManager::getSingleton().createPlane("occlusionbillboard",
|
static Ogre::Mesh* plane = MeshManager::getSingleton().createPlane("occlusionbillboard",
|
||||||
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::Plane(Ogre::Vector3(0,0,1), 0), 1, 1, 1, 1, true, 1, 1, 1, Vector3::UNIT_Y);
|
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::Plane(Ogre::Vector3(0,0,1), 0), 1, 1, 1, 1, true, 1, 1, 1, Vector3::UNIT_Y).get();
|
||||||
plane->_setBounds(Ogre::AxisAlignedBox::BOX_INFINITE);
|
plane->_setBounds(Ogre::AxisAlignedBox::BOX_INFINITE);
|
||||||
|
|
||||||
mBBQueryTotal = mRendering->getScene()->createEntity(plane);
|
mBBQueryTotal = mRendering->getScene()->createEntity("occlusionbillboard");
|
||||||
mBBQueryTotal->setCastShadows(false);
|
mBBQueryTotal->setCastShadows(false);
|
||||||
mBBQueryTotal->setVisibilityFlags(RV_OcclusionQuery);
|
mBBQueryTotal->setVisibilityFlags(RV_OcclusionQuery);
|
||||||
mBBQueryTotal->setRenderQueueGroup(RQG_OcclusionQuery+1);
|
mBBQueryTotal->setRenderQueueGroup(RQG_OcclusionQuery+1);
|
||||||
mBBQueryTotal->setMaterialName("QueryTotalPixels");
|
mBBQueryTotal->setMaterialName("QueryTotalPixels");
|
||||||
mBBNodeReal->attachObject(mBBQueryTotal);
|
mBBNodeReal->attachObject(mBBQueryTotal);
|
||||||
|
|
||||||
mBBQueryVisible = mRendering->getScene()->createEntity(plane);
|
mBBQueryVisible = mRendering->getScene()->createEntity("occlusionbillboard");
|
||||||
mBBQueryVisible->setCastShadows(false);
|
mBBQueryVisible->setCastShadows(false);
|
||||||
mBBQueryVisible->setVisibilityFlags(RV_OcclusionQuery);
|
mBBQueryVisible->setVisibilityFlags(RV_OcclusionQuery);
|
||||||
mBBQueryVisible->setRenderQueueGroup(RQG_OcclusionQuery+1);
|
mBBQueryVisible->setRenderQueueGroup(RQG_OcclusionQuery+1);
|
||||||
|
|
|
@ -46,10 +46,10 @@ BillboardObject::BillboardObject( const String& textureName,
|
||||||
mMaterial = sh::Factory::getInstance().createMaterialInstance ("BillboardMaterial"+StringConverter::toString(bodyCount), material);
|
mMaterial = sh::Factory::getInstance().createMaterialInstance ("BillboardMaterial"+StringConverter::toString(bodyCount), material);
|
||||||
mMaterial->setProperty("texture", sh::makeProperty(new sh::StringValue(textureName)));
|
mMaterial->setProperty("texture", sh::makeProperty(new sh::StringValue(textureName)));
|
||||||
|
|
||||||
static Ogre::MeshPtr plane = MeshManager::getSingleton().createPlane("billboard",
|
static Ogre::Mesh* plane = MeshManager::getSingleton().createPlane("billboard",
|
||||||
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::Plane(Ogre::Vector3(0,0,1), 0), 1, 1, 1, 1, true, 1, 1, 1, Vector3::UNIT_Y);
|
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::Plane(Ogre::Vector3(0,0,1), 0), 1, 1, 1, 1, true, 1, 1, 1, Vector3::UNIT_Y).get();
|
||||||
plane->_setBounds(Ogre::AxisAlignedBox::BOX_INFINITE);
|
plane->_setBounds(Ogre::AxisAlignedBox::BOX_INFINITE);
|
||||||
mEntity = sceneMgr->createEntity(plane);
|
mEntity = sceneMgr->createEntity("billboard");
|
||||||
mEntity->setMaterialName("BillboardMaterial"+StringConverter::toString(bodyCount));
|
mEntity->setMaterialName("BillboardMaterial"+StringConverter::toString(bodyCount));
|
||||||
mEntity->setVisibilityFlags(RV_Sky);
|
mEntity->setVisibilityFlags(RV_Sky);
|
||||||
mEntity->setCastShadows(false);
|
mEntity->setCastShadows(false);
|
||||||
|
|
Loading…
Reference in a new issue