wined3d: Attempt to clean up fbos only if a gl surface is destroyed.

This commit is contained in:
Stefan Dösinger 2007-07-18 23:13:58 +02:00 committed by Alexandre Julliard
parent 6f457ac63b
commit 327aa543a4
1 changed files with 13 additions and 11 deletions

View File

@ -6443,7 +6443,8 @@ static void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IW
case WINED3DRTYPE_SURFACE: {
unsigned int i;
/* Cleanup any FBO attachments */
/* Cleanup any FBO attachments if d3d is enabled */
if(This->d3d_initialized) {
for (i = 0; i < GL_LIMITS(buffers); ++i) {
if (This->fbo_color_attachments[i] == (IWineD3DSurface *)resource) {
bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo);
@ -6456,6 +6457,7 @@ static void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IW
set_depth_stencil_fbo(iface, NULL);
This->fbo_depth_attachment = NULL;
}
}
break;
}