|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <platform/graphics/indexBuffer.h>
Public Member Functions | |
| IndexFormat | format () const |
| IndexBuffer (GraphicsDevice *graphicsDevice, IndexFormat format, int numIndices) | |
| virtual void * | nativeBuffer () const |
| int | numIndices () const |
| virtual bool | setData (const std::vector< uint8_t > &data) |
| const std::vector< uint8_t > & | storage () const |
| virtual | ~IndexBuffer ()=default |
Protected Attributes | |
| GraphicsDevice * | _device = nullptr |
| std::vector< uint8_t > | _storage |
An index buffer stores index values into a VertexBuffer. Indexed graphical primitives can normally use less memory than unindexed primitives (if vertices are shared).
Typically, index buffers are set on Mesh objects.
Definition at line 27 of file indexBuffer.h.
| visutwin::canvas::IndexBuffer::IndexBuffer | ( | GraphicsDevice * | graphicsDevice, |
| IndexFormat | format, | ||
| int | numIndices ) |
Definition at line 16 of file indexBuffer.cpp.
References _device, format(), and numIndices().
Referenced by visutwin::canvas::MetalIndexBuffer::MetalIndexBuffer().
|
virtualdefault |
|
inline |
Definition at line 33 of file indexBuffer.h.
Referenced by IndexBuffer(), visutwin::canvas::MetalIndexBuffer::MetalIndexBuffer(), and visutwin::canvas::MetalIndexBuffer::setData().
|
inlinevirtual |
Reimplemented in visutwin::canvas::MetalIndexBuffer.
Definition at line 37 of file indexBuffer.h.
|
inline |
Definition at line 35 of file indexBuffer.h.
Referenced by IndexBuffer(), visutwin::canvas::MetalIndexBuffer::MetalIndexBuffer(), and visutwin::canvas::MetalIndexBuffer::setData().
|
inlinevirtual |
Reimplemented in visutwin::canvas::MetalIndexBuffer.
Definition at line 39 of file indexBuffer.h.
|
inline |
CPU-side index data. Used by BatchManager to read indices for merging.
Definition at line 42 of file indexBuffer.h.
References _storage.
|
protected |
Definition at line 48 of file indexBuffer.h.
Referenced by IndexBuffer(), and visutwin::canvas::MetalIndexBuffer::setData().
|
protected |
Definition at line 49 of file indexBuffer.h.
Referenced by visutwin::canvas::MetalIndexBuffer::setData(), and storage().