![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <primitive_batch_mesh.hpp>
Public Member Functions | |
PrimitiveBatchMesh (ID3D11Device &device, std::size_t nb_vertices, const std::vector< IndexT > &indices, D3D11_PRIMITIVE_TOPOLOGY primitive_topology=D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST) | |
PrimitiveBatchMesh (const PrimitiveBatchMesh &mesh)=delete | |
PrimitiveBatchMesh (PrimitiveBatchMesh &&mesh) noexcept | |
virtual | ~PrimitiveBatchMesh () |
PrimitiveBatchMesh & | operator= (const PrimitiveBatchMesh &mesh)=delete |
PrimitiveBatchMesh & | operator= (PrimitiveBatchMesh &&mesh) noexcept |
const BufferLock | Lock (ID3D11DeviceContext &device_context, D3D11_MAP map_type, D3D11_MAPPED_SUBRESOURCE &mapped_buffer) |
![]() | |
virtual | ~Mesh () |
Mesh & | operator= (const Mesh &mesh)=delete |
Mesh & | operator= (Mesh &&mesh) noexcept |
std::size_t | GetNumberOfVertices () const noexcept |
std::size_t | GetNumberOfIndices () const noexcept |
std::size_t | GetVertexSize () const noexcept |
DXGI_FORMAT | GetIndexFormat () const noexcept |
D3D11_PRIMITIVE_TOPOLOGY | GetPrimitiveTopology () const noexcept |
void | BindMesh (ID3D11DeviceContext &device_context) const noexcept |
void | BindMesh (ID3D11DeviceContext &device_context, D3D11_PRIMITIVE_TOPOLOGY topology) const noexcept |
void | Draw (ID3D11DeviceContext &device_context) const noexcept |
void | Draw (ID3D11DeviceContext &device_context, std::size_t start_index, std::size_t nb_indices) const noexcept |
Private Member Functions | |
void | SetupVertexBuffer (ID3D11Device &device, std::size_t nb_vertices) |
void | SetupIndexBuffer (ID3D11Device &device, const std::vector< IndexT > &indices) |
Additional Inherited Members | |
![]() | |
Mesh (std::size_t vertex_size, DXGI_FORMAT index_format, D3D11_PRIMITIVE_TOPOLOGY primitive_topology) | |
Mesh (const Mesh &mesh)=delete | |
Mesh (Mesh &&mesh) noexcept | |
void | SetNumberOfVertices (std::size_t nb_vertices) noexcept |
void | SetNumberOfIndices (std::size_t nb_indices) noexcept |
![]() | |
ComPtr< ID3D11Buffer > | m_vertex_buffer |
ComPtr< ID3D11Buffer > | m_index_buffer |
A class of primitive batch meshes.
VertexT | The vertex type. |
IndexT | The index type. |
|
explicit |
Constructs a primitive batch mesh.
[in,out] | device | A reference to the device. |
[in] | nb_vertices | The number of vertices. |
[in] | indices | A reference to the vector containing the indices. |
[in] | primitive_topology | The primitive topology. |
|
delete |
Constructs a primitive batch mesh from the given primitive batch mesh.
[in] | mesh | A reference to the primitive batch mesh to copy. |
|
noexcept |
Constructs a primitive batch mesh by moving the given primitive batch mesh.
[in] | mesh | A reference to the primitive batch mesh to move. |
|
virtual |
Destructs this primitive batch mesh.
const BufferLock mage::rendering::PrimitiveBatchMesh< VertexT, IndexT >::Lock | ( | ID3D11DeviceContext & | device_context, |
D3D11_MAP | map_type, | ||
D3D11_MAPPED_SUBRESOURCE & | mapped_buffer | ||
) |
Locks the vertex buffer of this primitive batch mesh.
[in,out] | device_context | A reference to the device context. |
[in] | map_type | The map type specifying the CPU's read and write permissions for the vertex buffer of this primitive batch mesh. |
[in,out] | mapped_buffer | A reference to map the vertex buffer of this primitive batch mesh to. |
Exception | Failed to map the vertex buffer of this primitive batch mesh. |
|
delete |
Copies the given primitive batch mesh to this primitive batch mesh.
[in] | mesh | A reference to the primitive batch mesh to copy. |
|
noexcept |
Moves the given primitive batch mesh to this primitive batch mesh.
[in] | mesh | A reference to the primitive batch mesh to move. |
|
private |
Sets up the index buffer of this primitive batch mesh.
[in,out] | device | A reference to the device. |
[in] | indices | A reference to the vector containing the indices. |
Exception | Failed to setup the index buffer of this primitive batch mesh. |
|
private |
Sets up the vertex buffer of this primitive batch mesh.
[in,out] | device | A reference to the device. |
[in] | nb_vertices | The number of vertices. |
Exception | Failed to setup the vertex buffer of this primitive batch mesh. |