61 bool has_group_point_sizes;
62 bool has_indexed_colors;
63 float reference_point_size;
77 void set_reference_point_size(
float _reference_point_size);
79 void set_y_view_angle(
float y_view_angle);
81 template <
typename T =
float>
82 void set_point_size_array(
const context& ctx,
const std::vector<T>& point_sizes) { has_point_sizes =
true; set_attribute_array(ctx,
"point_size", point_sizes); }
84 void remove_point_size_array(
const context& ctx);
86 template <
typename T =
unsigned,
typename C = cgv::media::color<
float, cgv::media::RGB, cgv::media::OPACITY> >
87 void set_indexed_color_array(
const context& ctx,
const std::vector<T>& color_indices,
const std::vector<C>& palette) {
88 has_indexed_colors =
true;
89 set_attribute_array(ctx,
"color_index", color_indices);
90 ref_prog().set_uniform_array(ctx,
"palette", palette);
93 template <
typename T =
unsigned,
typename C = cgv::media::color<
float, cgv::media::RGB, cgv::media::OPACITY> >
94 void set_indexed_color_array(
const context& ctx, T* color_index_ptr,
size_t nr_elements,
const std::vector<C>& palette,
unsigned stride = 0) {
95 has_indexed_colors =
true;
96 set_attribute_array(ctx,
"color_index", color_index_ptr, nr_elements, stride);
97 ref_prog().set_uniform_array(ctx,
"palette", palette);
100 void remove_indexed_color_array(
const context& ctx);
102 template <
typename T =
float>
103 void set_group_point_sizes(
const context& ctx,
const std::vector<T>& group_point_sizes) { has_group_point_sizes =
true; ref_prog().set_uniform_array(ctx,
"group_point_sizes", group_point_sizes); }
105 bool validate_attributes(
const context& ctx)
const;
111 void draw(
context& ctx,
size_t start,
size_t count,
112 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.