1 #ifndef DONUT_GRAPHICS_TEXTURED_QUAD_HPP
2 #define DONUT_GRAPHICS_TEXTURED_QUAD_HPP
50 static constexpr std::array<Vertex, 4>
VERTICES{{
51 {.coordinates{0.0f, 0.0f}},
52 {.coordinates{0.0f, 1.0f}},
53 {.coordinates{1.0f, 0.0f}},
54 {.coordinates{1.0f, 1.0f}},
Generic abstraction of a GPU vertex array object and its associated buffers.
Definition: Mesh.hpp:226
MeshBufferUsage
Hint to the graphics driver implementation regarding the intended access pattern of a particular GPU ...
Definition: Mesh.hpp:44
MeshPrimitiveType
Specification of which kind of graphical primitive is defined by an associated sequence of vertices i...
Definition: Mesh.hpp:60
@ TRIANGLE_STRIP
Each point, except the first two, forms a filled triangle with the previous two points.
Data layout for the attributes of a single instance of the mesh.
Definition: TexturedQuad.hpp:34
vec4 textureOffsetAndScale
Texture offset (xy) and texture scale (zw) to apply to the texture coordinates before sampling the te...
Definition: TexturedQuad.hpp:36
mat3 transformation
Transformation to apply to the vertex positions.
Definition: TexturedQuad.hpp:35
vec4 tintColor
Tint color to use when rendering.
Definition: TexturedQuad.hpp:37
Data layout for the attributes of a single vertex of the mesh.
Definition: TexturedQuad.hpp:24
vec2 coordinates
Shared vertex position and texture coordinates.
Definition: TexturedQuad.hpp:25
Square 2D mesh for textured rendering.
Definition: TexturedQuad.hpp:18
static constexpr std::int32_t TEXTURE_UNIT_COUNT
Total number of texture units required to render a textured quad.
Definition: TexturedQuad.hpp:58
static constexpr MeshPrimitiveType PRIMITIVE_TYPE
The type of 3D primitives represented by the mesh vertices.
Definition: TexturedQuad.hpp:47
static constexpr std::int32_t TEXTURE_UNIT
Main texture unit index to use in the shader.
Definition: TexturedQuad.hpp:57
Mesh< Vertex, NoIndex, Instance > mesh
Mesh data stored on the GPU.
Definition: TexturedQuad.hpp:63
static constexpr MeshBufferUsage VERTICES_USAGE
Hint regarding the intended memory access pattern of the vertex buffer.
Definition: TexturedQuad.hpp:41
static constexpr std::array< Vertex, 4 > VERTICES
The constant vertex data stored in the mesh.
Definition: TexturedQuad.hpp:50
static constexpr MeshBufferUsage INSTANCES_USAGE
Hint regarding the intended memory access pattern of the instance buffer.
Definition: TexturedQuad.hpp:44