mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- Fixed: D3DFB::DrawTextureV() did not disable the scissor test if it was needed but SetStyle()
decided there was nothing to draw. In practical terms, this means that if your weapon is completely invisible, the game would not draw anything outside of the main play area because the scissor test would be left on for the entire frame and not just the weapon's quad. Making the call to SetStyle() before the scissor check is enough to fix this. SVN r3412 (trunk)
This commit is contained in:
parent
8f8f937f9b
commit
76b5e7ef60
1 changed files with 11 additions and 10 deletions
|
@ -2981,6 +2981,16 @@ void STACK_ARGS D3DFB::DrawTextureV (FTexture *img, double x, double y, uint32 t
|
||||||
x1 -= (parms.texwidth - parms.windowright) * xscale;
|
x1 -= (parms.texwidth - parms.windowright) * xscale;
|
||||||
u1 = float(u1 - (parms.texwidth - parms.windowright) * uscale);
|
u1 = float(u1 - (parms.texwidth - parms.windowright) * uscale);
|
||||||
}
|
}
|
||||||
|
parms.bilinear = false;
|
||||||
|
|
||||||
|
D3DCOLOR color0, color1;
|
||||||
|
BufferedTris *quad = &QuadExtra[QuadBatchPos];
|
||||||
|
|
||||||
|
if (!SetStyle(tex, parms, color0, color1, *quad))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
float vscale = 1.f / tex->Box->Owner->Height / yscale;
|
float vscale = 1.f / tex->Box->Owner->Height / yscale;
|
||||||
if (y0 < parms.uclip)
|
if (y0 < parms.uclip)
|
||||||
|
@ -3023,16 +3033,6 @@ void STACK_ARGS D3DFB::DrawTextureV (FTexture *img, double x, double y, uint32 t
|
||||||
D3DDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE);
|
D3DDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
parms.bilinear = false;
|
|
||||||
|
|
||||||
D3DCOLOR color0, color1;
|
|
||||||
BufferedTris *quad = &QuadExtra[QuadBatchPos];
|
|
||||||
|
|
||||||
if (!SetStyle(tex, parms, color0, color1, *quad))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
quad->Texture = tex->Box->Owner->Tex;
|
quad->Texture = tex->Box->Owner->Tex;
|
||||||
if (parms.bilinear)
|
if (parms.bilinear)
|
||||||
{
|
{
|
||||||
|
@ -3548,6 +3548,7 @@ void D3DFB::EndQuadBatch()
|
||||||
}
|
}
|
||||||
else if ((quad->Flags & BQF_Paletted) == BQF_CustomPalette)
|
else if ((quad->Flags & BQF_Paletted) == BQF_CustomPalette)
|
||||||
{
|
{
|
||||||
|
assert(quad->Palette != NULL);
|
||||||
SetPaletteTexture(quad->Palette->Tex, quad->Palette->RoundedPaletteSize, quad->Palette->BorderColor);
|
SetPaletteTexture(quad->Palette->Tex, quad->Palette->RoundedPaletteSize, quad->Palette->BorderColor);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in a new issue