Index buffer no longer permit 8 bits index size

Modern graphics cards don't like 8 bits index size, so I introduced
"Large indices" option, it means 32 bits indices when used otherwise the
index size is 16 bits


Former-commit-id: 213902de6704ceef16c6ea311ba0c6c5d2f6e665
This commit is contained in:
Lynix
2012-12-02 17:01:02 +01:00
parent 437c7047c9
commit b06acfcffd
4 changed files with 68 additions and 137 deletions

View File

@@ -15,19 +15,20 @@ class NAZARA_API NzIndexBuffer : public NzResource
{
public:
NzIndexBuffer(NzBuffer* buffer, unsigned int startIndex, unsigned int indexCount);
NzIndexBuffer(unsigned int length, nzUInt8 indexSize, nzBufferStorage storage = nzBufferStorage_Software, nzBufferUsage usage = nzBufferUsage_Static);
NzIndexBuffer(unsigned int length, bool largeIndices = false, nzBufferStorage storage = nzBufferStorage_Software, nzBufferUsage usage = nzBufferUsage_Static);
NzIndexBuffer(const NzIndexBuffer& indexBuffer);
~NzIndexBuffer();
bool Fill(const void* data, unsigned int offset, unsigned int length);
NzBuffer* GetBuffer() const;
nzUInt8 GetIndexSize() const;
unsigned int GetIndexCount() const;
void* GetPointer();
const void* GetPointer() const;
unsigned int GetStartIndex() const;
bool HasLargeIndices() const;
bool IsHardware() const;
bool IsSequential() const;