Henri Verbeet : wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments.
Alexandre Julliard
julliard at winehq.org
Mon Jun 8 09:44:46 CDT 2009
Module: wine
Branch: master
Commit: a2244051ef3d5aabf4a5c102b457c2abce5175e9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2244051ef3d5aabf4a5c102b457c2abce5175e9
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Jun 8 10:35:05 2009 +0200
wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments.
---
dlls/wined3d/context.c | 3 +--
dlls/wined3d/device.c | 9 +++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index ba1e100..5c76146 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1660,8 +1660,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
ENTER_GL();
context_bind_fbo((IWineD3DDevice *)This, GL_FRAMEBUFFER_EXT, &context->dst_fbo);
context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, target);
- GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0));
- checkGLcall("glFramebufferRenderbufferEXT");
+ context_attach_depth_stencil_fbo(This, GL_FRAMEBUFFER_EXT, NULL, FALSE);
LEAVE_GL();
} else {
ENTER_GL();
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f1dd938..16e4062 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6176,8 +6176,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
ENTER_GL();
context_bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->dst_fbo);
context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface);
- GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0));
- checkGLcall("glFramebufferRenderbufferEXT");
+ context_attach_depth_stencil_fbo(This, GL_FRAMEBUFFER_EXT, NULL, FALSE);
}
if (rect) {
@@ -6596,8 +6595,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
context_attach_surface_fbo(This, GL_READ_FRAMEBUFFER_EXT, 0, src_surface);
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
checkGLcall("glReadBuffer()");
- GL_EXTCALL(glFramebufferRenderbufferEXT(GL_READ_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0));
- checkGLcall("glFramebufferRenderbufferEXT");
+ context_attach_depth_stencil_fbo(This, GL_READ_FRAMEBUFFER_EXT, NULL, FALSE);
}
LEAVE_GL();
@@ -6644,8 +6642,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
context_attach_surface_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, 0, dst_surface);
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
checkGLcall("glDrawBuffer()");
- GL_EXTCALL(glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0));
- checkGLcall("glFramebufferRenderbufferEXT");
+ context_attach_depth_stencil_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, NULL, FALSE);
}
glDisable(GL_SCISSOR_TEST);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
More information about the wine-cvs
mailing list