Make unlock of the backbuffer correctly restore the contents.

This commit is contained in:
Jason Edmeades 2003-09-30 00:20:08 +00:00 committed by Alexandre Julliard
parent 82f46ab1c3
commit ba69d05022
1 changed files with 4 additions and 0 deletions

View File

@ -321,6 +321,8 @@ HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface) {
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 @@ HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface) {
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]);