Make sure the viewport is from the GL (bottom left) not the DirectX

(top left).
This commit is contained in:
Jason Edmeades 2003-05-14 00:00:12 +00:00 committed by Alexandre Julliard
parent e1147baa00
commit ec2f96151f
1 changed files with 3 additions and 2 deletions

View File

@ -2331,8 +2331,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(LPDIRECT3DDEVICE8 iface, CONST
glDepthRange(pViewport->MinZ, pViewport->MaxZ);
checkGLcall("glDepthRange");
/* Fixme? Note GL requires lower left, DirectX supplies upper left */
glViewport(pViewport->X, pViewport->Y, pViewport->Width, pViewport->Height);
/* Note: GL requires lower left, DirectX supplies upper left */
glViewport(pViewport->X, (This->PresentParms.BackBufferHeight - (pViewport->Y + pViewport->Height)),
pViewport->Width, pViewport->Height);
checkGLcall("glViewport");