[PATCH 4/5] wined3d: Let the context handle the draw buffer in fb_copy_to_texture_hwstretch().

Henri Verbeet hverbeet at codeweavers.com
Sun Dec 13 15:04:00 CST 2009


---
 dlls/wined3d/surface.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6c8bb36..59dda6e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3320,7 +3320,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
     glTexParameteri(texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP);
     glTexParameteri(texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP);
 
-    glDrawBuffer(drawBuffer);
+    context_set_draw_buffer(context, drawBuffer);
     glReadBuffer(drawBuffer);
 
     glBegin(GL_QUADS);
@@ -3397,9 +3397,6 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
             glTexCoord2f((float) fbwidth / (float) Src->pow2Width, (float) fbheight / (float) Src->pow2Height);
             glVertex2i(fbwidth, 0);
         glEnd();
-    } else {
-        /* Restore the old draw buffer */
-        glDrawBuffer(GL_BACK);
     }
     glDisable(texture_target);
     checkGLcall("glDisable(texture_target)");
-- 
1.6.4.4




More information about the wine-patches mailing list