![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <sprite_batch_mesh.hpp>
Public Member Functions | |
SpriteBatchMesh (ID3D11Device &device) | |
SpriteBatchMesh (const SpriteBatchMesh &mesh)=delete | |
SpriteBatchMesh (SpriteBatchMesh &&mesh) noexcept | |
virtual | ~SpriteBatchMesh () |
SpriteBatchMesh & | operator= (const SpriteBatchMesh &mesh)=delete |
SpriteBatchMesh & | operator= (SpriteBatchMesh &&mesh) noexcept |
![]() | |
PrimitiveBatchMesh (ID3D11Device &device, std::size_t nb_vertices, const std::vector< U16 > &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 |
Static Public Member Functions | |
static constexpr std::size_t | MinVerticesPerBatch () noexcept |
static constexpr std::size_t | MaxVerticesPerBatch () noexcept |
static constexpr std::size_t | MinIndicesPerBatch () noexcept |
static constexpr std::size_t | MaxIndicesPerBatch () noexcept |
Static Public Attributes | |
static constexpr std::size_t | s_min_sprites_per_batch = 128 |
static constexpr std::size_t | s_max_sprites_per_batch = 2048 |
static constexpr std::size_t | s_vertices_per_sprite = 4 |
static constexpr std::size_t | s_indices_per_sprite = 6 |
Static Private Member Functions | |
static const std::vector< U16 > | GenerateIndices () |
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 indexed sprite batch meshes.
|
explicit |
|
delete |
Constructs a sprite batch mesh from the given sprite batch mesh.
[in] | mesh | A reference to the sprite batch mesh to copy. |
|
defaultnoexcept |
Constructs a sprite batch mesh by moving the given sprite batch mesh.
[in] | mesh | A reference to the sprite batch mesh to move. |
|
virtualdefault |
Destructs this sprite batch mesh.
|
staticprivate |
Generates the indices of a sprite batch mesh.
|
staticnoexcept |
Returns the maximum number of indices to draw per batch for sprite batch meshes.
|
staticnoexcept |
Returns the maximum number of vertices to draw per batch for sprite batch meshes.
|
staticnoexcept |
Returns the minimum number of indices to draw per batch for sprite batch meshes.
|
staticnoexcept |
Returns the minimum number of vertices to draw per batch for sprite batch meshes.
|
delete |
Copies the given sprite batch mesh to this sprite batch mesh.
[in] | mesh | A reference to the sprite batch mesh to copy. |
|
defaultnoexcept |
Moves the given sprite batch mesh to this sprite batch mesh.
[in] | mesh | A reference to the sprite batch mesh to move. |
|
static |
The number of indices per sprite.
|
static |
The maximum number of sprites to draw per batch (i.e. the maximum number of sprites that can be represented by a single sprite batch mesh) for sprite batch meshes.
|
static |
The minimum number of sprites to draw per batch for sprite batch meshes.
|
static |
The number of vertices per sprite.