wined3d: Correctly draw transformed and untransformed vertices in the same scene.
This commit is contained in:
parent
a96ef0bac8
commit
d7f94bf7c9
@ -182,8 +182,13 @@ void d3ddevice_set_ortho(IWineD3DDeviceImpl *This) {
|
|||||||
width = This->stateBlock->viewport.Width;
|
width = This->stateBlock->viewport.Width;
|
||||||
minZ = This->stateBlock->viewport.MinZ;
|
minZ = This->stateBlock->viewport.MinZ;
|
||||||
maxZ = This->stateBlock->viewport.MaxZ;
|
maxZ = This->stateBlock->viewport.MaxZ;
|
||||||
|
if(!This->untransformed) {
|
||||||
TRACE("Calling glOrtho with %f, %f, %f, %f\n", width, height, -minZ, -maxZ);
|
TRACE("Calling glOrtho with %f, %f, %f, %f\n", width, height, -minZ, -maxZ);
|
||||||
glOrtho(X, X + width, Y + height, Y, -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");
|
checkGLcall("glOrtho");
|
||||||
|
|
||||||
/* Window Coord 0 is the middle of the first pixel, so translate by half
|
/* Window Coord 0 is the middle of the first pixel, so translate by half
|
||||||
@ -258,6 +263,7 @@ static void primitiveInitState(
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* Untransformed, so relies on the view and projection matrices */
|
/* Untransformed, so relies on the view and projection matrices */
|
||||||
|
This->untransformed = TRUE;
|
||||||
|
|
||||||
if (!useVS && (This->last_was_rhw || !This->modelview_valid)) {
|
if (!useVS && (This->last_was_rhw || !This->modelview_valid)) {
|
||||||
/* Only reapply when have to */
|
/* Only reapply when have to */
|
||||||
|
@ -513,6 +513,7 @@ typedef struct IWineD3DDeviceImpl
|
|||||||
UINT alphafunc;
|
UINT alphafunc;
|
||||||
BOOL texture_shader_active; /* TODO: Confirm use is correct */
|
BOOL texture_shader_active; /* TODO: Confirm use is correct */
|
||||||
BOOL last_was_notclipped;
|
BOOL last_was_notclipped;
|
||||||
|
BOOL untransformed;
|
||||||
|
|
||||||
/* State block related */
|
/* State block related */
|
||||||
BOOL isRecordingState;
|
BOOL isRecordingState;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user