Stefan Dösinger : wined3d: Correctly draw transformed and untransformed vertices in the same scene.
Module: wine Branch: master Commit: d7f94bf7c93fac6267b45c63a88dcf5fb1c86d43 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d7f94bf7c93fac6267b45c63... Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Aug 21 18:28:05 2006 +0200 wined3d: Correctly draw transformed and untransformed vertices in the same scene. --- dlls/wined3d/drawprim.c | 10 ++++++++-- dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 5eb71f1..c2ed58c 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -182,8 +182,13 @@ void d3ddevice_set_ortho(IWineD3DDeviceI width = This->stateBlock->viewport.Width; minZ = This->stateBlock->viewport.MinZ; maxZ = This->stateBlock->viewport.MaxZ; - TRACE("Calling glOrtho with %f, %f, %f, %f\n", width, height, -minZ, -maxZ); - glOrtho(X, X + width, Y + height, Y, -minZ, -maxZ); + if(!This->untransformed) { + TRACE("Calling glOrtho with %f, %f, %f, %f\n", width, height, -minZ, -maxZ); + glOrtho(X, X + width, Y + height, Y, -minZ, -maxZ); + } else { + TRACE("Calling glOrtho with %f, %f, %f, %f\n", width, height, 1.0, -1.0); + glOrtho(X, X + width, Y + height, Y, 1.0, -1.0); + } checkGLcall("glOrtho"); /* Window Coord 0 is the middle of the first pixel, so translate by half @@ -258,6 +263,7 @@ static void primitiveInitState( } else { /* Untransformed, so relies on the view and projection matrices */ + This->untransformed = TRUE; if (!useVS && (This->last_was_rhw || !This->modelview_valid)) { /* Only reapply when have to */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 35b3a02..cfb8a7d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -513,6 +513,7 @@ #define NEEDS_DI UINT alphafunc; BOOL texture_shader_active; /* TODO: Confirm use is correct */ BOOL last_was_notclipped; + BOOL untransformed; /* State block related */ BOOL isRecordingState;
participants (1)
-
Alexandre Julliard