forked from teamnwah/openmw-tes3coop
Make sure not to add duplicate viewports (Fixes #1832)
Wasn't a problem while testing reload() on linux. Maybe an implementation difference with Ogre's D3D rendersystem?
This commit is contained in:
parent
7b2070de5a
commit
f4b5662562
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ namespace Render
|
||||||
void SelectionBuffer::setupRenderTarget()
|
void SelectionBuffer::setupRenderTarget()
|
||||||
{
|
{
|
||||||
mRenderTarget = mTexture->getBuffer()->getRenderTarget();
|
mRenderTarget = mTexture->getBuffer()->getRenderTarget();
|
||||||
|
mRenderTarget->removeAllViewports();
|
||||||
Ogre::Viewport* vp = mRenderTarget->addViewport(mCamera);
|
Ogre::Viewport* vp = mRenderTarget->addViewport(mCamera);
|
||||||
vp->setOverlaysEnabled(false);
|
vp->setOverlaysEnabled(false);
|
||||||
vp->setBackgroundColour(Ogre::ColourValue(0, 0, 0, 0));
|
vp->setBackgroundColour(Ogre::ColourValue(0, 0, 0, 0));
|
||||||
|
@ -65,6 +66,7 @@ namespace Render
|
||||||
{
|
{
|
||||||
Ogre::MaterialManager::getSingleton ().addListener (this);
|
Ogre::MaterialManager::getSingleton ().addListener (this);
|
||||||
|
|
||||||
|
mTexture->load();
|
||||||
if (mRenderTarget == NULL)
|
if (mRenderTarget == NULL)
|
||||||
setupRenderTarget();
|
setupRenderTarget();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue