forked from teamnwah/openmw-tes3coop
Avoid creating extra texture unit states on the video material
This commit is contained in:
parent
d50698d7d1
commit
da44141b95
1 changed files with 4 additions and 1 deletions
|
@ -949,7 +949,10 @@ VideoPlayer::VideoPlayer(Ogre::SceneManager* sceneMgr)
|
|||
mVideoMaterial->getTechnique(0)->getPass(0)->setDepthWriteEnabled(false);
|
||||
mVideoMaterial->getTechnique(0)->getPass(0)->setDepthCheckEnabled(false);
|
||||
mVideoMaterial->getTechnique(0)->getPass(0)->setLightingEnabled(false);
|
||||
mVideoMaterial->getTechnique(0)->getPass(0)->createTextureUnitState()->setTextureName("black.png");
|
||||
if(mVideoMaterial->getTechnique(0)->getPass(0)->getNumTextureUnitStates() == 0)
|
||||
mVideoMaterial->getTechnique(0)->getPass(0)->createTextureUnitState()->setTextureName("black.png");
|
||||
else
|
||||
mVideoMaterial->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName("black.png");
|
||||
|
||||
mRectangle = new Ogre::Rectangle2D(true);
|
||||
mRectangle->setCorners(-1.0, 1.0, 1.0, -1.0);
|
||||
|
|
Loading…
Reference in a new issue