3#include "group_renderer.h"
5#include "gl/lib_begin.h"
9 class CGV_API point_renderer;
15 extern CGV_API point_renderer&
ref_point_renderer(context& ctx,
int ref_count_change = 0);
57 bool has_group_point_sizes;
58 bool has_indexed_colors;
59 bool has_depth_offsets;
60 float reference_point_size;
74 void set_reference_point_size(
float _reference_point_size);
76 void set_y_view_angle(
float y_view_angle);
78 template <
typename T =
float>
79 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); }
81 void remove_point_size_array(
const context& ctx);
83 template <
typename T =
float>
84 void set_depth_offset_array(
const context& ctx,
const std::vector<T>& depth_offsets) { has_depth_offsets =
true; set_attribute_array(ctx,
"depth_offset", depth_offsets); }
86 void remove_depth_offset_array(
const context& ctx);
88 template <
typename T =
unsigned,
typename C = cgv::media::color<
float,cgv::media::RGB,cgv::media::OPACITY> >
89 void set_indexed_color_array(
const context& ctx,
const std::vector<T>& color_indices,
const std::vector<C>& palette) {
90 has_indexed_colors =
true;
91 set_attribute_array(ctx,
"color_index", color_indices);
92 ref_prog().set_uniform_array(ctx,
"palette", palette);
95 void remove_indexed_color_array(
const context& ctx);
97 template <
typename T =
float>
98 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); }
100 bool validate_attributes(
const context& ctx)
const;
102 bool enable(context& ctx);
104 bool disable(context& ctx);
106 void draw(context& ctx,
size_t start,
size_t count,
107 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
117#include <cgv/config/lib_end.h>
the self reflection handler is passed to the virtual self_reflect() method of cgv::base::base.
attribute array manager used to upload arrays to gpu
base class for all drawables, which is independent of the used rendering API.
abstract renderer class that provides functionality for grouping primitives
renderer that supports point splatting
void set_depth_offset_array(const context &ctx, const std::vector< T > &depth_offsets)
set per point depth offsets
a shader program combines several shader code fragments to a complete definition of the shading pipel...
std::map< std::string, std::string > shader_define_map
typedef for shader define map data structure
point_renderer & ref_point_renderer(context &ctx, int ref_count_change)
reference to a singleton point renderer that can be shared among drawables
this reflection traits implementation is used for external self_reflect implementations of instances ...
render style used for group information
float blend_width_in_pixel
set to 1 in constructor
rgba halo_color
color of halo with opacity channel
bool use_group_point_size
whether to use the
float default_depth_offset
default value for depth offset used to support layering
float halo_width_in_pixel
set to 0 in constructor
bool measure_point_size_in_pixel
whether to measure point size in pixels or in world space relative to reference_pixel_size passed to ...
float halo_color_strength
strength in [0,1] of halo color with respect to color of primitive
bool screen_aligned
whether to span point splat in screen aligned coordinate system
float percentual_halo_width
set to 0 in constructor
bool blend_points
set to true in constructor
float point_size
default value assigned to point size attribute in enable method of point renderer,...
base class for all render styles