Fix bug introduced in r5627 which generated certain rtt's on d3d9 now twice - which broke resetting the d3d9 device.

That check got accidentally deleted while adding support for cubemap rtt's.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5641 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2018-09-04 16:52:08 +00:00
parent 10a3f02aa6
commit 01de5276ae
1 changed files with 4 additions and 2 deletions

View File

@ -351,10 +351,12 @@ void CD3D9Texture::generateRenderTarget()
switch (Type)
{
case ETT_2D:
hr = Device->CreateTexture(Size.Width, Size.Height, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &Texture, NULL);
if (!Texture )
hr = Device->CreateTexture(Size.Width, Size.Height, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &Texture, NULL);
break;
case ETT_CUBEMAP:
hr = Device->CreateCubeTexture(Size.Width, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &CubeTexture, NULL);
if (!CubeTexture)
hr = Device->CreateCubeTexture(Size.Width, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &CubeTexture, NULL);
break;
default:
_IRR_DEBUG_BREAK_IF(true)