Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <mesh.h>
Public Member Functions | |
void | Create (const MeshData &mesh) |
void | Destroy () |
const MeshData & | GetMeshData () const |
const StructuredBuffer & | GetVertexBuffer () const |
const ByteAddressBuffer & | GetIndexBuffer () const |
Private Attributes | |
bool | initialized_ |
MeshData | mesh_data_ |
StructuredBuffer | vertex_buffer_ |
ByteAddressBuffer | index_buffer_ |
A mesh that can be rendered.
This class creates the appropriate buffers for a MeshData. The renderers in Blowbox expect this object. It is usually stored by Entity objects, but you can also keep it seperately, although there isn't much you can do with it by yourself.
void blowbox::Mesh::Create | ( | const MeshData & | mesh | ) |
void blowbox::Mesh::Destroy | ( | ) |
Destroys all buffers held in the Mesh.
const ByteAddressBuffer & blowbox::Mesh::GetIndexBuffer | ( | ) | const |
const MeshData & blowbox::Mesh::GetMeshData | ( | ) | const |
const StructuredBuffer & blowbox::Mesh::GetVertexBuffer | ( | ) | const |
|
private |
A ByteAddressBuffer that has all index data in it for this Mesh.
|
private |
Whether the Mesh has been initialized yet.
|
private |
A StructuredBuffer that has all vertex data in it for this Mesh.