45 void set_eye_pos(
vec3 ep) { eye_pos = ep; }
55 template <
typename T =
float>
56 void set_radius_array(
const context& ctx,
const std::vector<T>& radii) { has_radii =
true; set_attribute_array(ctx,
"radius", radii); }
58 template <
typename T =
float>
59 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); }
61 void remove_radius_array(
const context& ctx);
63 template <
typename T =
float>
64 void set_tangent_array(
const context& ctx,
const std::vector<T>& tangents) { has_tangents =
true; set_attribute_array(ctx,
"tangent", tangents); }
66 template <
typename T =
float>
67 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); }
69 void remove_tangent_array(
const context& ctx);
71 bool validate_attributes(
const context& ctx)
const;
73 bool enable(context& ctx);
75 bool disable(context& ctx);
77 void draw(context& ctx,
size_t start,
size_t count,
78 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
base class for all drawables, which is independent of the used rendering API.