forked from 0ad/0ad
Increase max VBO size back to 4MB.
Some meshes (e.g. pers_gardens_struct with gentangents enabled) have
>32K vertexes, and won't fit in a 2MB VBO. 0ef6c7555e
had reduced them
from 4MB to 2MB. So just make the VBOs bigger again, and try not to
worry about the waste of memory.
Fixes #3026, #3042.
This was SVN commit r16309.
This commit is contained in:
parent
26d303d854
commit
bb99c42aa5
@ -30,9 +30,9 @@
|
||||
|
||||
// Absolute maximum (bytewise) size of each GL vertex buffer object.
|
||||
// Make it large enough for the maximum feasible mesh size (64K vertexes,
|
||||
// 32 bytes per vertex in ShaderModelRenderer).
|
||||
// 64 bytes per vertex in InstancingModelRenderer).
|
||||
// TODO: measure what influence this has on performance
|
||||
#define MAX_VB_SIZE_BYTES (2*1024*1024)
|
||||
#define MAX_VB_SIZE_BYTES (4*1024*1024)
|
||||
|
||||
CVertexBuffer::CVertexBuffer(size_t vertexSize, GLenum usage, GLenum target)
|
||||
: m_VertexSize(vertexSize), m_Handle(0), m_SysMem(0), m_Usage(usage), m_Target(target)
|
||||
@ -352,4 +352,4 @@ void CVertexBuffer::DumpStatus()
|
||||
bool CVertexBuffer::UseStreaming(GLenum usage)
|
||||
{
|
||||
return (usage == GL_DYNAMIC_DRAW || usage == GL_STREAM_DRAW);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user