libdonut
2.3.2
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. More... | |
Public Attributes | |
Mesh< Vertex, Index, Instance > | mesh |
Mesh data stored on the GPU. More... | |
Material | material |
Material attributes. More... | |
std::size_t | indexCount |
Number of indices stored in the index buffer of the mesh. More... | |
Static Public Attributes | |
static constexpr MeshBufferUsage | VERTICES_USAGE = MeshBufferUsage::STATIC_DRAW |
Hint regarding the intended memory access pattern of the vertex buffer. More... | |
static constexpr MeshBufferUsage | INDICES_USAGE = MeshBufferUsage::STATIC_DRAW |
Hint regarding the intended memory access pattern of the index buffer. More... | |
static constexpr MeshBufferUsage | INSTANCES_USAGE = MeshBufferUsage::STREAM_DRAW |
Hint regarding the intended memory access pattern of the instance buffer. More... | |
static constexpr MeshPrimitiveType | PRIMITIVE_TYPE = MeshPrimitiveType::TRIANGLES |
The type of 3D primitives represented by the mesh vertices. More... | |
static constexpr MeshIndexType | INDEX_TYPE = MeshIndexType::U32 |
Index type of the mesh indices. More... | |
static constexpr std::int32_t | TEXTURE_UNIT_DIFFUSE = 0 |
Texture unit index to use for the Material::diffuseMap. More... | |
static constexpr std::int32_t | TEXTURE_UNIT_SPECULAR = 1 |
Texture unit index to use for the Material::specularMap. More... | |
static constexpr std::int32_t | TEXTURE_UNIT_NORMAL = 2 |
Texture unit index to use for the Material::normalMap. More... | |
static constexpr std::int32_t | TEXTURE_UNIT_EMISSIVE = 3 |
Texture unit index to use for the Material::emissiveMap. More... | |
static constexpr std::int32_t | TEXTURE_UNIT_COUNT = 4 |
Total number of texture units required to render an object. More... | |
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.