Go to the documentation of this file.
9 #ifndef EAGINE_SHAPES_DRAWING_HPP
10 #define EAGINE_SHAPES_DRAWING_HPP
12 #include "../identifier.hpp"
13 #include "../reflect/map_enumerators.hpp"
14 #include "../tags.hpp"
15 #include "../types.hpp"
47 template <
typename Selector>
50 return enumerator_map_type<primitive_type, 11>{
84 template <
typename Selector>
87 return enumerator_map_type<attrib_data_type, 7>{
98 enumerator_mapping(type_identity<attrib_data_type>, value_tree_tag) noexcept {
99 return enumerator_map_type<attrib_data_type, 6>{
122 template <
typename Selector>
125 return enumerator_map_type<index_data_type, 4>{
133 enumerator_mapping(type_identity<index_data_type>, value_tree_tag) noexcept {
134 return enumerator_map_type<index_data_type, 3>{
141 using UT = std::underlying_type_t<index_data_type>;
142 return UT(l) < UT(r);
146 using UT = std::underlying_type_t<index_data_type>;
147 return UT(l) > UT(r);
151 using UT = std::underlying_type_t<index_data_type>;
152 return UT(l) <= UT(r);
156 using UT = std::underlying_type_t<index_data_type>;
157 return UT(l) >= UT(r);
199 #endif // EAGINE_SHAPES_DRAWING_HPP
span_size_t first
The index of the first element.
Definition: drawing.hpp:164
Draw operation parameters.
Definition: drawing.hpp:162
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
primitive_type
The shape primitive type enumeration.
Definition: drawing.hpp:22
std::uint16_t patch_vertices
The number of vertices per patch.
Definition: drawing.hpp:176
@ unsigned_16
Unsigned 16-bit integer.
Common code is placed in this namespace.
Definition: eagine.hpp:21
span_size_t count
The count of elements.
Definition: drawing.hpp:167
@ line_loop
Close line loops.
@ lines
Individual line segments.
bool cw_face_winding
Whether the shape faces have clockwise winding (or counterclockwise).
Definition: drawing.hpp:188
@ unsigned_32
Unsigned 32-bit integer.
@ triangles_adjacency
Individual triangles with adjacency.
@ uint_16
Unsigned 16-bit integer.
primitive_type mode
The primitive type.
Definition: drawing.hpp:179
std::uint32_t primitive_restart_index
The primitive restart index value.
Definition: drawing.hpp:173
@ uint_32
Unsigned 32-bit integer.
@ triangle_strip
Triangle strips.
@ triangle_fan
Triangle fans.
std::uint32_t phase
The drawing phase (shader-dependent).
Definition: drawing.hpp:170
@ tetrahedrons
Tetrahedrons (represented as lines with adjacency).
@ int_32
Signed 32-bit integer.
attrib_data_type
Shape vertex attribute data type enumeration.
Definition: drawing.hpp:67
@ int_16
Signed 16-bit integer.
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
@ points
Individual points.
index_data_type idx_type
The index data type.
Definition: drawing.hpp:182
@ quads
Quadrilaterals (represented as lines with adjacency).
bool primitive_restart
Whether primitive restart is enabled.
Definition: drawing.hpp:185
@ triangles
Individual triangles.
index_data_type
Shape element index type enumeration.
Definition: drawing.hpp:111
constexpr draw_operation() noexcept
Default constructor.
Definition: drawing.hpp:191
@ unsigned_8
Unsigned 8-bit integer.