- changed a bit more stuff that doesn't need to be routed through the OpenGL interface anymore.

This commit is contained in:
Christoph Oelckers 2018-10-28 14:25:29 +01:00
commit 54de0bf59f
22 changed files with 70 additions and 104 deletions

View file

@ -379,6 +379,25 @@ void FFlatVertexBuffer::CheckUpdate(sector_t *sector)
//
//==========================================================================
std::pair<FFlatVertex *, unsigned int> FFlatVertexBuffer::AllocVertices(unsigned int count)
{
FFlatVertex *p = GetBuffer();
auto index = mCurIndex.fetch_add(count);
auto offset = index;
if (index + count >= BUFFER_SIZE_TO_USE)
{
// If a single scene needs 2'000'000 vertices there must be something very wrong.
I_FatalError("Out of vertex memory. Tried to allocate more than %u vertices for a single frame", index + count);
}
return std::make_pair(p, index);
}
//==========================================================================
//
//
//
//==========================================================================
void FFlatVertexBuffer::Copy(int start, int count)
{
Map();