mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- fixed: for sectors that have to be drawn per subsector the render state was not applied. resulting in random garbage.
This commit is contained in:
parent
f7446160bb
commit
47ae42d636
1 changed files with 10 additions and 1 deletions
|
@ -198,6 +198,7 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state)
|
|||
else
|
||||
{
|
||||
int index = iboindex;
|
||||
bool applied = false;
|
||||
for (int i = 0; i < sector->subsectorcount; i++)
|
||||
{
|
||||
subsector_t * sub = sector->subsectors[i];
|
||||
|
@ -205,7 +206,8 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state)
|
|||
|
||||
if (di->ss_renderflags[sub->Index()] & renderflags)
|
||||
{
|
||||
state.DrawIndexed(DT_Triangles, index, (sub->numlines - 2) * 3, false);
|
||||
state.DrawIndexed(DT_Triangles, index, (sub->numlines - 2) * 3, !applied);
|
||||
applied = true;
|
||||
flatvertices += sub->numlines;
|
||||
flatprimitives++;
|
||||
}
|
||||
|
@ -285,6 +287,13 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state)
|
|||
//==========================================================================
|
||||
void GLFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if (sector->sectornum == gl_breaksec)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int rel = getExtraLight();
|
||||
|
||||
state.SetNormal(plane.plane.Normal().X, plane.plane.Normal().Z, plane.plane.Normal().Y);
|
||||
|
|
Loading…
Reference in a new issue