Commit fd711c57 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Combine two glScalef calls into one.

parent 44b89153
...@@ -2826,15 +2826,15 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock ...@@ -2826,15 +2826,15 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
*/ */
glTranslatef(1.0 / stateblock->viewport.Width, -1.0/ stateblock->viewport.Height, -1.0); glTranslatef(1.0 / stateblock->viewport.Width, -1.0/ stateblock->viewport.Height, -1.0);
checkGLcall("glTranslatef (1.0 / width, -1.0 / height, -1.0)"); checkGLcall("glTranslatef (1.0 / width, -1.0 / height, -1.0)");
glScalef(1.0, 1.0, 2.0); if (stateblock->wineD3DDevice->render_offscreen) {
checkGLcall("glScalef");
/* D3D texture coordinates are flipped compared to OpenGL ones, so /* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */ * render everything upside down when rendering offscreen. */
if (stateblock->wineD3DDevice->render_offscreen) { glScalef(1.0, -1.0, 2.0);
glScalef(1.0, -1.0, 1.0); } else {
checkGLcall("glScalef"); glScalef(1.0, 1.0, 2.0);
} }
checkGLcall("glScalef");
glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]); glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]);
checkGLcall("glLoadMatrixf"); checkGLcall("glLoadMatrixf");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment