Back to class index
IndexBuffer[Class Summary]
indexData
indexDataBytes
numIndices
gpuIndexDataBytes
indexType
primType
indexBuffer
name
ctor
~dtor
ctor
operator=(rhs)
Create(...) (+1 overload)
Deinit()
SetIndex(n,vertexIndex)
GetIndex(n)[const]
GetPointer(n) (+1 overload)
GetOffset(n)[const]
AllocateCpuMemory()
AllocateGpuMemory()
UpdateToGpu()
HasCpuMemory()[const]
CpuSizeBytes()[const]
HasGpuMemory()[const]
GpuSizeBytes()[const]
FreeCpuMemory()
FreeGpuMemory()
CpuPtr() (+1 overload)
SetNumIndices(size)
NumIndices()[const]
NumPrimitives()[const]
UsedSizeBytes()[const]
IndexSizeBytes()[const]
SaveToFile(handle)
LoadFromFile(...)
OptimizeForVertexCaches()
CompressIndices(allow8BitIndices)
Name()[const]
NumIndicesNeededToRenderNPrimitives(...)[static]
NumPrimivivesFromNIndices(...)[static]

IndexBuffer::CompressIndices

Syntax

void IndexBuffer::CompressIndices(bool allow8BitIndices);

Reallocates this IndexBuffer to minimize the number of bytes per index.

If this index buffer only refers to at most 256 vertices and allow8BitIndices==true, reallocates this index buffer to utilize 8-bit indices. If only at most 65536 vertices are used, reallocates this index buffer to utilize 16-bit indices.

Work in progress:

Todo: in void IndexBuffer::CompressIndices(bool allow8BitIndices):
Handle strip restart index depending on primitive type!

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index