- added some helper code mainly designed to help GZDoom maintain the vertex buffer for the textured automap.

This commit is contained in:
Christoph Oelckers 2016-08-06 19:20:41 +02:00
parent a893013dbb
commit fd7b833ad5
3 changed files with 18 additions and 0 deletions

View File

@ -1897,6 +1897,7 @@ void AM_drawSubsectors()
FDynamicColormap *colormap;
mpoint_t originpt;
screen->StartSimplePolys();
for (int i = 0; i < numsubsectors; ++i)
{
if (subsectors[i].flags & SSECF_POLYORG)
@ -2049,6 +2050,7 @@ void AM_drawSubsectors()
);
}
}
screen->FinishSimplePolys();
}
//=============================================================================

View File

@ -1244,6 +1244,19 @@ void DCanvas::Clear (int left, int top, int right, int bottom, int palcolor, uin
}
}
//==========================================================================
//
// no-ops. This is so that renderer backends can better manage the
// processing of the subsector drawing in the automap
//
//==========================================================================
void DCanvas::StartSimplePolys()
{}
void DCanvas::FinishSimplePolys()
{}
//==========================================================================
//
// DCanvas :: FillSimplePoly

View File

@ -216,6 +216,9 @@ public:
// Fill an area with a texture
virtual void FlatFill (int left, int top, int right, int bottom, FTexture *src, bool local_origin=false);
virtual void StartSimplePolys();
virtual void FinishSimplePolys();
// Fill a simple polygon with a texture
virtual void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
double originx, double originy, double scalex, double scaley, DAngle rotation,