30 bool has_radii =
false;
32 bool has_tangents =
false;
47 template <
typename T =
float>
48 void set_radius_array(
const context& ctx,
const std::vector<T>& radii) { has_radii =
true; set_attribute_array(ctx,
"radius", radii); }
50 template <
typename T =
float>
51 void set_radius_array(
const context& ctx,
const T* radii,
size_t nr_elements,
unsigned stride_in_bytes = 0) { has_radii =
true; set_attribute_array(ctx,
"radius", radii, nr_elements, stride_in_bytes); }
53 void remove_radius_array(
const context& ctx);
55 template <
typename T =
float>
56 void set_tangent_array(
const context& ctx,
const std::vector<T>& tangents) { has_tangents =
true; set_attribute_array(ctx,
"tangent", tangents); }
58 template <
typename T =
float>
59 void set_tangent_array(
const context& ctx,
const T* tangents,
size_t nr_elements,
unsigned stride_in_bytes = 0) { has_tangents =
true; set_attribute_array(ctx,
"tangent", tangents, nr_elements, stride_in_bytes); }
61 void remove_tangent_array(
const context& ctx);
63 bool validate_attributes(
const context& ctx)
const override;
65 bool enable(context& ctx)
override;
67 bool disable(context& ctx)
override;
69 void draw(context& ctx,
size_t start,
size_t count,
70 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1)
override;
base class for all drawables, which is independent of the used rendering API.