- improve sector portals rendering in softpoly
- fix a softpoly memory leak and change vertex list to be allocated using the frame allocator
This commit is contained in:
parent
b5720ee1e7
commit
f178646e1a
13 changed files with 98 additions and 131 deletions
|
|
@ -74,27 +74,3 @@ void PolyStencilBuffer::Clear(int newwidth, int newheight, uint8_t stencil_value
|
|||
m[i] = 0xffffff00 | stencil_value;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace
|
||||
{
|
||||
int NextBufferVertex = 0;
|
||||
}
|
||||
|
||||
TriVertex *PolyVertexBuffer::GetVertices(int count)
|
||||
{
|
||||
enum { VertexBufferSize = 256 * 1024 };
|
||||
static TriVertex Vertex[VertexBufferSize];
|
||||
|
||||
if (NextBufferVertex + count > VertexBufferSize)
|
||||
return nullptr;
|
||||
TriVertex *v = Vertex + NextBufferVertex;
|
||||
NextBufferVertex += count;
|
||||
return v;
|
||||
}
|
||||
|
||||
void PolyVertexBuffer::Clear()
|
||||
{
|
||||
NextBufferVertex = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue