Buffer size changes.

This commit is contained in:
Jordan Woyak 2013-02-21 23:12:53 -06:00
parent f16dcfe6f6
commit 21bd5be753
1 changed files with 19 additions and 16 deletions

View File

@ -7,25 +7,28 @@ class PointerWrap;
class VertexManager
{
private:
// What are the actual values?
static const u32 SMALLEST_POSSIBLE_VERTEX = 1;
static const u32 LARGEST_POSSIBLE_VERTEX = 188;
static const u32 MAX_PRIMITIVES_PER_COMMAND = (u16)-1;
public:
enum
{
// values from OGL backend
//MAXVBUFFERSIZE = 0x1FFFF,
//MAXIBUFFERSIZE = 0xFFFF,
// values from DX9 backend
//MAXVBUFFERSIZE = 0x50000,
//MAXIBUFFERSIZE = 0xFFFF,
// values from DX11 backend
MAXVBUFFERSIZE = 0x50000,
MAXIBUFFERSIZE = 0xFFFF,
};
// values from OGL backend
//static const u32 MAXVBUFFERSIZE = 0x1FFFF;
// values from DX9/11 backend
static const u32 MAXVBUFFERSIZE = MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX;
// We may convert triangle-fans to triangle-lists, almost 3x as many indices.
// Watching for a full index buffer would probably be smarter than this calculation.
static const u32 MAXIBUFFERSIZE = MAXVBUFFERSIZE * 3 / SMALLEST_POSSIBLE_VERTEX;
//static const u32 MAXIBUFFERSIZE = MAX_PRIMITIVES_PER_COMMAND * 3;
VertexManager();
virtual ~VertexManager(); // needs to be virtual for DX11's dtor
// needs to be virtual for DX11's dtor
virtual ~VertexManager();
static void AddVertices(int _primitive, u32 _numVertices);