- changed a bit more stuff that doesn't need to be routed through the OpenGL interface anymore.
This commit is contained in:
parent
f7c7c8d1c5
commit
54de0bf59f
22 changed files with 70 additions and 104 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue