D3D: Mark FBO textures as render targets. Makes buffered rendering kinda work.

This commit is contained in:
Henrik Rydgard 2014-08-24 13:55:30 +02:00
parent fe1cdb0c4c
commit 1c9f002806

View File

@ -44,7 +44,7 @@ FBO *fbo_create(int width, int height, int num_color_textures, bool z_stencil, F
fbo->height = height;
fbo->colorDepth = colorDepth;
HRESULT rtResult = pD3Ddevice->CreateTexture(fbo->width, fbo->height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &fbo->tex, NULL);
HRESULT rtResult = pD3Ddevice->CreateTexture(fbo->width, fbo->height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &fbo->tex, NULL);
if (FAILED(rtResult)) {
ELOG("Failed to create render target");
delete fbo;