|
libdonut 2.3.6
Application framework for cross-platform game development in C++20
|
A single 3D mesh with an associated material. More...
#include <donut/graphics/Model.hpp>
Classes | |
| struct | Instance |
| Data layout for the attributes of a single instance of the mesh. More... | |
| struct | Material |
| Material attributes of the mesh. More... | |
| struct | Vertex |
| Data layout for the attributes of a single vertex of the mesh. More... | |
Public Types | |
| using | Index = u32 |
| Data type used in the index buffer of the mesh. | |
Public Attributes | |
| Mesh< Vertex, Index, Instance > | mesh |
| Mesh data stored on the GPU. | |
| Material | material |
| Material attributes. | |
| std::size_t | indexCount |
| Number of indices stored in the index buffer of the mesh. | |
Static Public Attributes | |
| static constexpr MeshBufferUsage | VERTICES_USAGE = MeshBufferUsage::STATIC_DRAW |
| Hint regarding the intended memory access pattern of the vertex buffer. | |
| static constexpr MeshBufferUsage | INDICES_USAGE = MeshBufferUsage::STATIC_DRAW |
| Hint regarding the intended memory access pattern of the index buffer. | |
| static constexpr MeshBufferUsage | INSTANCES_USAGE = MeshBufferUsage::STREAM_DRAW |
| Hint regarding the intended memory access pattern of the instance buffer. | |
| static constexpr MeshPrimitiveType | PRIMITIVE_TYPE = MeshPrimitiveType::TRIANGLES |
| The type of 3D primitives represented by the mesh vertices. | |
| static constexpr MeshIndexType | INDEX_TYPE = MeshIndexType::U32 |
| Index type of the mesh indices. | |
| static constexpr std::int32_t | TEXTURE_UNIT_DIFFUSE = 0 |
| Texture unit index to use for the Material::diffuseMap. | |
| static constexpr std::int32_t | TEXTURE_UNIT_SPECULAR = 1 |
| Texture unit index to use for the Material::specularMap. | |
| static constexpr std::int32_t | TEXTURE_UNIT_NORMAL = 2 |
| Texture unit index to use for the Material::normalMap. | |
| static constexpr std::int32_t | TEXTURE_UNIT_EMISSIVE = 3 |
| Texture unit index to use for the Material::emissiveMap. | |
| static constexpr std::int32_t | TEXTURE_UNIT_COUNT = 4 |
| Total number of texture units required to render an object. | |
A single 3D mesh with an associated material.
The vertices and indices of the mesh are stored on the GPU, together with an associated instance buffer set up for instanced rendering.
| using donut::graphics::Model::Object::Index = u32 |
Data type used in the index buffer of the mesh.
|
staticconstexpr |
Hint regarding the intended memory access pattern of the vertex buffer.
|
staticconstexpr |
Hint regarding the intended memory access pattern of the index buffer.
|
staticconstexpr |
Hint regarding the intended memory access pattern of the instance buffer.
|
staticconstexpr |
The type of 3D primitives represented by the mesh vertices.
|
staticconstexpr |
Index type of the mesh indices.
|
staticconstexpr |
Texture unit index to use for the Material::diffuseMap.
|
staticconstexpr |
Texture unit index to use for the Material::specularMap.
|
staticconstexpr |
Texture unit index to use for the Material::normalMap.
|
staticconstexpr |
Texture unit index to use for the Material::emissiveMap.
|
staticconstexpr |
Total number of texture units required to render an object.
| std::size_t donut::graphics::Model::Object::indexCount |
Number of indices stored in the index buffer of the mesh.