- 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:
parent
5ec47d8b4f
commit
fd3681dae2
10 changed files with 202 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue