DXGL r477 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r476‎ | r477 | r478 >
Date:01:45, 4 August 2014
Author:admin
Status:new
Tags:
Comment:
Deinitialize FBO when repairing texture.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -987,6 +987,9 @@
988988 if (This->util->SetFBO(dest) == GL_FRAMEBUFFER_COMPLETE) break;
989989 if (!dest->texture->internalformats[1]) break;
990990 TextureManager_FixTexture(This->texman, dest->texture, (dest->bigbuffer ? dest->bigbuffer : dest->buffer), &dest->dirty);
 991+ This->util->SetFBO((FBO*)NULL);
 992+ dest->fbo.fbcolor = NULL;
 993+ dest->fbo.fbz = NULL;
991994 } while (1);
992995 This->util->SetViewport(0,0,dest->fakex,dest->fakey);
993996 This->util->DepthTest(false);
@@ -1454,6 +1457,9 @@
14551458 if (This->util->SetFBO(target) == GL_FRAMEBUFFER_COMPLETE) break;
14561459 if (!target->texture->internalformats[1]) break;
14571460 TextureManager_FixTexture(This->texman, target->texture, (target->bigbuffer ? target->bigbuffer : target->buffer), &target->dirty);
 1461+ This->util->SetFBO((FBO*)NULL);
 1462+ target->fbo.fbcolor = NULL;
 1463+ target->fbo.fbz = NULL;
14581464 } while (1);
14591465 int clearbits = 0;
14601466 if(dwFlags & D3DCLEAR_TARGET)
@@ -1831,6 +1837,9 @@
18321838 if (!device->glDDS7->texture->internalformats[1]) break;
18331839 TextureManager_FixTexture(This->texman, device->glDDS7->texture,
18341840 (device->glDDS7->bigbuffer ? device->glDDS7->bigbuffer : device->glDDS7->buffer), &device->glDDS7->dirty);
 1841+ This->util->SetFBO((FBO*)NULL);
 1842+ device->glDDS7->fbo.fbcolor = NULL;
 1843+ device->glDDS7->fbo.fbz = NULL;
18351844 } while (1);
18361845 This->util->SetViewport(device->viewport.dwX, device->viewport.dwY, device->viewport.dwWidth, device->viewport.dwHeight);
18371846 This->util->SetDepthRange(device->viewport.dvMinZ,device->viewport.dvMaxZ);