mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:30:58 +00:00
wined3d: Combine two glScalef calls into one.
This commit is contained in:
parent
44b8915371
commit
fd711c57df
|
@ -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);
|
||||
checkGLcall("glTranslatef (1.0 / width, -1.0 / height, -1.0)");
|
||||
glScalef(1.0, 1.0, 2.0);
|
||||
if (stateblock->wineD3DDevice->render_offscreen) {
|
||||
/* D3D texture coordinates are flipped compared to OpenGL ones, so
|
||||
* render everything upside down when rendering offscreen. */
|
||||
glScalef(1.0, -1.0, 2.0);
|
||||
} else {
|
||||
glScalef(1.0, 1.0, 2.0);
|
||||
}
|
||||
checkGLcall("glScalef");
|
||||
|
||||
/* D3D texture coordinates are flipped compared to OpenGL ones, so
|
||||
* render everything upside down when rendering offscreen. */
|
||||
if (stateblock->wineD3DDevice->render_offscreen) {
|
||||
glScalef(1.0, -1.0, 1.0);
|
||||
checkGLcall("glScalef");
|
||||
}
|
||||
glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]);
|
||||
checkGLcall("glLoadMatrixf");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue