- implement camera textures

This commit is contained in:
Magnus Norddahl 2019-05-29 05:45:19 +02:00
commit a1229be5c6
17 changed files with 112 additions and 194 deletions

View file

@ -84,6 +84,17 @@ DCanvas *PolyHardwareTexture::GetImage(FTexture *tex, int translation, int flags
return mCanvas.get();
}
PolyDepthStencil *PolyHardwareTexture::GetDepthStencil(FTexture *tex)
{
if (!mDepthStencil)
{
int w = tex->GetWidth();
int h = tex->GetHeight();
mDepthStencil.reset(new PolyDepthStencil(w, h));
}
return mDepthStencil.get();
}
void PolyHardwareTexture::AllocateBuffer(int w, int h, int texelsize)
{
if (!mCanvas || mCanvas->GetWidth() != w || mCanvas->GetHeight() != h)