37 bool has_orientations;
50 template <
typename T =
float>
51 void set_size(
const context& ctx,
const T& size) {
53 ref_prog().set_attribute(ctx, ref_prog().get_attribute_location(ctx,
"size"), size);
56 template <
typename T =
float>
57 void set_size_array(
const context& ctx,
const std::vector<T>& sizes) {
59 set_attribute_array(ctx,
"size", sizes);
63 void set_size_array(
const context& ctx,
const T* sizes,
size_t nr_elements,
unsigned stride_in_bytes = 0) {
65 set_attribute_array(ctx,
"size", sizes, nr_elements, stride_in_bytes);
68 void remove_size_array(
const context& ctx);
70 template <
typename T =
float>
72 has_orientations =
true;
73 ref_prog().set_attribute(ctx, ref_prog().get_attribute_location(ctx,
"orientation"), orientation);
76 template <
typename T =
float>
78 has_orientations =
true;
79 set_attribute_array(ctx,
"orientation", orientations);
83 void set_orientation_array(
const context& ctx,
const T* orientations,
size_t nr_elements,
unsigned stride_in_bytes = 0) {
84 has_orientations =
true;
85 set_attribute_array(ctx,
"orientation", orientations, nr_elements, stride_in_bytes);
88 void remove_orientation_array(
const context& ctx);
90 bool validate_attributes(
const context& ctx)
const;
92 bool enable(context& ctx);
94 bool disable(context& ctx);
96 void draw(context& ctx,
size_t start,
size_t count,
97 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.