- use an indexed vertex buffer to render the flats.

Right now this has no advantage but it allows optimizing the data, e.g. rendering an entire sector in one go instead of per subsector.
This commit is contained in:
Christoph Oelckers 2018-05-19 13:33:28 +02:00
commit fd3681dae2
10 changed files with 202 additions and 9 deletions

View file

@ -95,6 +95,7 @@ public:
class FFlatVertexBuffer : public FVertexBuffer, public FFlatVertexGenerator
{
unsigned int ibo_id;
FFlatVertex *map;
unsigned int mIndex;
std::atomic<unsigned int> mCurIndex;
@ -177,6 +178,11 @@ public:
#endif
uint32_t *GetIndexPointer() const
{
return ibo_id == 0 ? &ibo_data[0] : nullptr;
}
void CheckPlanes(sector_t *sector)
{
FFlatVertexGenerator::CheckPlanes(sector, map);