- fixed: Hardware camera textures were given a dimension of (0, 0).

This commit is contained in:
Christoph Oelckers 2018-04-14 10:26:56 +02:00
commit ad021cc374
3 changed files with 15 additions and 11 deletions

View file

@ -207,6 +207,11 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
wt->GenTime[0] = screen->FrameTime;
}
}
else
{
w = tex->GetWidth();
h = tex->GetHeight();
}
if (!hwtex->CreateTexture(buffer, w, h, texunit, needmipmap, translation, "FGLTexture.Bind"))
{
// could not create texture
@ -762,7 +767,7 @@ void FMaterial::BindToFrameBuffer()
FHardwareTexture::Unbind(0);
ClearLastTexture();
}
mBaseLayer->mHwTexture->BindToFrameBuffer();
mBaseLayer->mHwTexture->BindToFrameBuffer(mWidth, mHeight);
}
//==========================================================================