wined3d: Let flush_to_framebuffer_drawpixels use a valid rect.
This commit is contained in:
parent
0c4ffe4ff0
commit
8f18eeea35
|
@ -1163,11 +1163,19 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm
|
||||||
checkGLcall("glBindBufferARB");
|
checkGLcall("glBindBufferARB");
|
||||||
}
|
}
|
||||||
|
|
||||||
glDrawPixels(This->lockedRect.right - This->lockedRect.left,
|
/* When the surface is locked we only have to refresh the locked part else we need to update the whole image */
|
||||||
(This->lockedRect.bottom - This->lockedRect.top)-1,
|
if(This->Flags & SFLAG_LOCKED) {
|
||||||
fmt, type,
|
glDrawPixels(This->lockedRect.right - This->lockedRect.left,
|
||||||
mem + bpp * This->lockedRect.left + pitch * This->lockedRect.top);
|
(This->lockedRect.bottom - This->lockedRect.top)-1,
|
||||||
checkGLcall("glDrawPixels");
|
fmt, type,
|
||||||
|
mem + bpp * This->lockedRect.left + pitch * This->lockedRect.top);
|
||||||
|
checkGLcall("glDrawPixels");
|
||||||
|
} else {
|
||||||
|
glDrawPixels(This->currentDesc.Width,
|
||||||
|
This->currentDesc.Height,
|
||||||
|
fmt, type, mem);
|
||||||
|
checkGLcall("glDrawPixels");
|
||||||
|
}
|
||||||
|
|
||||||
if(This->Flags & SFLAG_PBO) {
|
if(This->Flags & SFLAG_PBO) {
|
||||||
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
|
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
|
||||||
|
|
Loading…
Reference in New Issue