33 bool has_sizes =
false;
34 bool has_orientations =
false;
47 template <
typename T =
float>
48 void set_size(
const context& ctx,
const T& size) {
50 ref_prog().set_attribute(ctx, ref_prog().get_attribute_location(ctx,
"size"), size);
53 template <
typename T =
float>
54 void set_size_array(
const context& ctx,
const std::vector<T>& sizes) {
56 set_attribute_array(ctx,
"size", sizes);
60 void set_size_array(
const context& ctx,
const T* sizes,
size_t nr_elements,
unsigned stride_in_bytes = 0) {
62 set_attribute_array(ctx,
"size", sizes, nr_elements, stride_in_bytes);
65 void remove_size_array(
const context& ctx);
67 template <
typename T =
float>
69 has_orientations =
true;
70 ref_prog().set_attribute(ctx, ref_prog().get_attribute_location(ctx,
"orientation"), orientation);
73 template <
typename T =
float>
75 has_orientations =
true;
76 set_attribute_array(ctx,
"orientation", orientations);
80 void set_orientation_array(
const context& ctx,
const T* orientations,
size_t nr_elements,
unsigned stride_in_bytes = 0) {
81 has_orientations =
true;
82 set_attribute_array(ctx,
"orientation", orientations, nr_elements, stride_in_bytes);
85 void remove_orientation_array(
const context& ctx);
87 bool validate_attributes(
const context& ctx)
const;
89 bool enable(context& ctx);
91 bool disable(context& ctx);
93 void draw(context& ctx,
size_t start,
size_t count,
94 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.