[dx83] Restore backbuf
Jason Edmeades
us at the-edmeades.demon.co.uk
Sat Sep 27 09:43:04 CDT 2003
When updating the back buffer directly, on unlock we have to draw it
back to the screen. However, due to GL having a different y coordinate
system to directx, we need it upside down. (Note this call doesnt work
for glReadPixels (unfortunately) which is why the lock code has to read
line by line but the unlock can draw it all back in one go).
Changelog
Make unlock of the backbuffer correctly restore the contents.
Jason
-------------- next part --------------
diff -u3 dlls/d3d8/dx82/surface.c dlls/d3d8/surface.c
--- dlls/d3d8/dx82/surface.c 2003-09-19 20:51:46.000000000 +0100
+++ dlls/d3d8/surface.c 2003-09-27 16:29:33.000000000 +0100
@@ -321,6 +321,8 @@
vcheckGLcall("glIntegerv");
glGetIntegerv(GL_CURRENT_RASTER_POSITION, &prev_rasterpos[0]);
vcheckGLcall("glIntegerv");
+ glPixelZoom(1.0, -1.0);
+ vcheckGLcall("glPixelZoom");
if (This == This->Device->backBuffer) {
glDrawBuffer(GL_BACK);
@@ -361,6 +363,8 @@
FIXME("Unsupported Format %u in locking func\n", This->myDesc.Format);
}
+ glPixelZoom(1.0,1.0);
+ vcheckGLcall("glPixelZoom");
glDrawBuffer(prev_draw);
vcheckGLcall("glDrawBuffer");
glRasterPos3iv(&prev_rasterpos[0]);
More information about the wine-patches
mailing list