3 #include "surface_renderer.h"
5 #include "gl/lib_begin.h"
9 class CGV_API rounded_cone_renderer;
17 struct CGV_API rounded_cone_render_style :
public surface_render_style
24 bool enable_ambient_occlusion;
31 vec3 tex_coord_scaling;
33 float cone_angle_factor;
34 std::vector<vec3> sample_dirs;
36 rounded_cone_render_style();
58 std::string build_define_string();
60 bool build_shader(
context& ctx, std::string defines =
"");
64 template <
typename T =
float>
65 void set_radius_array(
const context& ctx,
const std::vector<T>& radii) { has_radii =
true; set_attribute_array(ctx, ref_prog().get_attribute_location(ctx,
"radius"), radii); }
67 template <
typename T =
float>
68 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, ref_prog().get_attribute_location(ctx,
"radius"), radii, nr_elements, stride_in_bytes); }
70 bool validate_attributes(
const context& ctx)
const;
72 bool disable(context& ctx);
74 void draw(context& ctx,
size_t start,
size_t count,
75 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
78 struct CGV_API rounded_cone_render_style_reflect :
public rounded_cone_render_style
86 #include <cgv/config/lib_end.h>