cgv
Loading...
Searching...
No Matches
cgv::render Namespace Reference

namespace for api independent GPU programming More...

Namespaces

namespace  gl
 namespace for opengl specific GPU programming
 

Classes

class  a_buffer
 This class provides a_buffer functionality. More...
 
struct  array_descriptor_traits
 
struct  array_descriptor_traits< cgv::math::vec< T > >
 
struct  array_descriptor_traits< std::vector< T > >
 
class  arrow_render_data
 
struct  arrow_render_style
 style of a point More...
 
struct  arrow_render_style_reflect
 
class  arrow_renderer
 renderer that supports point splatting More...
 
struct  attribute_array
 
class  attribute_array_binding
 the attribute_array_binding allows to define vertex attributes (i.e. More...
 
class  attribute_array_binding_base
 base class for attribute_array_bindings More...
 
class  attribute_array_manager
 attribute array manager used to upload arrays to gpu More...
 
class  box_render_data
 Render data for box geometry with support for the box_renderer. More...
 
class  box_render_data_base
 A base class for storing render data usable with the box_renderer and box_wire_renderer. More...
 
struct  box_render_style
 boxes use surface render styles More...
 
struct  box_render_style_reflect
 
class  box_renderer
 renderer that supports point splatting More...
 
class  box_wire_render_data
 Render data for box geometry with support for the box_wire_renderer. More...
 
struct  box_wire_render_style
 box wires extend line render styles More...
 
struct  box_wire_render_style_reflect
 
class  box_wire_renderer
 renderer that supports point splatting More...
 
struct  callback_drawable
 as a drawable can manage only a single context, this callback drawable is a work around for the case when a drawable should draw in several contexts (i.e. More...
 
class  clipped_view
 extends the view class with information on z clipping planes and scene extent and supports clipping plane computation from scene extent. More...
 
class  clod_point_buffer_manager
 
struct  clod_point_render_style
 render style for sphere rendere More...
 
struct  clod_point_render_style_reflect
 
class  clod_point_renderer
 
class  color_map
 
class  cone_render_data
 Render data for cone geometry with support for the cone_renderer. More...
 
struct  cone_render_style
 
struct  cone_render_style_reflect
 
class  cone_renderer
 renderer that supports raycasting of cones More...
 
class  context
 base class for all drawables, which is independent of the used rendering API. More...
 
struct  context_config
 configuration object used to define context parameters that need to be set already at creation time More...
 
struct  context_factory_registration
 
struct  draw_call
 
class  drawable
 base class for all drawables, which is independent of the used rendering API. More...
 
struct  element_descriptor_traits
 
struct  element_descriptor_traits< cgv::math::fmat< T, N, M > >
 
struct  element_descriptor_traits< cgv::math::fvec< T, N > >
 
struct  element_descriptor_traits< cgv::math::mat< T > >
 
struct  element_descriptor_traits< cgv::math::quaternion< T > >
 
struct  element_descriptor_traits< cgv::math::vec< T > >
 
struct  element_descriptor_traits< cgv::media::color< T, cm, am > >
 
class  ellipsoid_render_data
 Render data for ellipsoid geometry with support for the ellipsoid_renderer. More...
 
struct  ellipsoid_render_style
 render style for ellipsoid rendere More...
 
struct  ellipsoid_render_style_reflect
 
class  ellipsoid_renderer
 renderer that supports splatting of ellipsoids More...
 
class  frame_buffer
 this class encapsulate frame buffers that live on the GPU and can be used as destination for the render process. More...
 
class  frame_buffer_base
 base interface for framebuffer More...
 
class  generic_render_data
 
class  generic_renderer
 
class  gl_color_map
 
struct  group_render_style
 render style used for group information More...
 
struct  group_render_style_reflect
 
class  group_renderer
 abstract renderer class that provides functionality for grouping primitives More...
 
class  line_render_data
 Render data for line geometry with support for the line_renderer. More...
 
struct  line_render_style
 style of a line More...
 
struct  line_render_style_reflect
 
class  line_renderer
 renderer that supports point splatting More...
 
class  managed_frame_buffer
 provides a class that manages a frame buffer along with its attachments More...
 
class  mesh_render_info
 the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as well as an attribute array binding object. More...
 
class  multi_pass_drawable
 helper class to control multiple render passes in init_frame and after_finish methods of drawable. More...
 
struct  normal_render_style
 
struct  normal_render_style_reflect
 
class  normal_renderer
 renderer that supports rendering point normals More...
 
struct  performance_measurement
 
class  performance_monitor
 This class allows to monitor the performance of a set of tasks that are repeatedly executed over time. More...
 
struct  performance_task
 
class  point_render_data
 Render data for point geometry with support for the point_renderer. More...
 
struct  point_render_style
 style of a point More...
 
struct  point_render_style_reflect
 
class  point_renderer
 renderer that supports point splatting More...
 
class  rectangle_render_data
 Render data for rectangle geometry with support for the rectangle_renderer. More...
 
struct  rectangle_render_style
 configuration of rectangle renderer More...
 
struct  rectangle_render_style_reflect
 
class  rectangle_renderer
 renderer that supports plane rendering More...
 
class  render_buffer
 this class encapsulate render buffers that live on the GPU which must support frame buffer objects for this to work. More...
 
class  render_buffer_base
 base interface for a render_buffer More...
 
class  render_component
 base interface for all render components More...
 
struct  render_config
 configuration object used to define render view creation parameters including error handling configuration More...
 
class  render_data_base
 A base class for storing render data and style usable with the default renderers provided in the cgv::render namespace. More...
 
class  render_info
 the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as well as an attribute array binding object. More...
 
struct  render_style
 base class for all render styles More...
 
class  renderer
 abstract base class for all renderers that handles a shader program and position / color attribute More...
 
class  shader_code
 a shader code object holds a code fragment of a geometry vertex or fragment shader and can be added to a shader program. More...
 
struct  shader_config
 a globally unique shader config is registered by default when the cgv library is used. More...
 
class  shader_library
 provides a shader library that handles shader loading More...
 
class  shader_program
 a shader program combines several shader code fragments to a complete definition of the shading pipeline. More...
 
class  shader_program_base
 base interface for shader programs More...
 
struct  slab_render_style
 
struct  slab_render_style_reflect
 
class  slab_renderer
 renderer that supports point splatting More...
 
class  sphere_render_data
 Render data for sphere geometry with support for the sphere_renderer. More...
 
struct  sphere_render_style
 render style for sphere rendere More...
 
struct  sphere_render_style_reflect
 
class  sphere_renderer
 renderer that supports splatting of spheres More...
 
struct  spline_tube_render_style
 
struct  spline_tube_render_style_reflect
 
class  spline_tube_renderer
 renderer that supports point splatting More...
 
class  stereo_view
 extends the clipped view with information on eye distance and parallax zero information. More...
 
struct  surface_render_style
 style of a point More...
 
struct  surface_render_style_reflect
 
class  surface_renderer
 base classes for renderers that support surface rendering More...
 
class  surfel_render_data
 Render data for surfel geometry with support for the surfel_renderer. More...
 
struct  surfel_render_style
 style of a surfel More...
 
struct  surfel_render_style_reflect
 
class  surfel_renderer
 renderer that supports point splatting More...
 
class  texture
 the texture class encapsulates all functionality independent of the rendering api. More...
 
class  texture_base
 base interface for a texture More...
 
class  textured_material
 class that extends obj_material with the management of textures More...
 
struct  textured_rectangle
 This type provides a simple helper class to store rectangles with texture coordinates. More...
 
struct  type_descriptor
 compact type description of data that can be sent to the context; convertible to int More...
 
struct  vertex_attribute
 
class  vertex_buffer
 a vertex buffer is an unstructured memory block on the GPU. More...
 
class  vertex_buffer_base
 base interface for a vertex buffer More...
 
class  view
 defines a symmetric view with the following quantities: More...
 
struct  volume_render_style
 style of a volume More...
 
class  volume_renderer
 renderer that supports point splatting More...
 
struct  window_transformation
 parameters necessary to define window transformation More...
 

Typedefs

typedef cgv::data::ref_ptr< context_configcontext_config_ptr
 type of ref counted pointer to context creation configuration
 
typedef cgv::data::ref_ptr< render_configrender_config_ptr
 type of ref counted pointer to render configuration
 
typedef context *(* context_creation_function_type) (RenderAPI api, unsigned int w, unsigned int h, const std::string &title, bool show)
 
typedef cgv::data::ref_ptr< shader_configshader_config_ptr
 type of ref counted pointer to shader configuration
 
typedef std::map< std::string, std::string > shader_define_map
 typedef for shader define map data structure
 

Enumerations

enum  GPUVendorID { GPU_VENDOR_UNKNOWN , GPU_VENDOR_AMD , GPU_VENDOR_INTEL , GPU_VENDOR_NVIDIA }
 IDs for GPU vendors. More...
 
enum  ElementType { ET_VALUE , ET_VECTOR , ET_MATRIX }
 different compond types for data elements More...
 
enum  RenderAPI { RA_OPENGL , RA_DIRECTX }
 enumeration of rendering APIs which can be queried from the context More...
 
enum  RenderPass {
  RP_NONE , RP_MAIN , RP_STEREO , RP_SHADOW_MAP ,
  RP_SHADOW_VOLUME , RP_OPAQUE_SURFACES , RP_TRANSPARENT_SURFACES , RP_PICK ,
  RP_USER_DEFINED
}
 Enumeration of different render passes, which can be queried from the context and used to specify a new render pass. More...
 
enum  RenderPassFlags {
  RPF_NONE = 0 , RPF_SET_PROJECTION = 1 , RPF_SET_MODELVIEW = 1 << 1 , RPF_SET_MODELVIEW_PROJECTION ,
  RPF_SET_LIGHTS = 1 << 2 , RPF_SET_MATERIAL = 1 << 3 , RPF_SET_LIGHTS_ON = 1 << 4 , RPF_ENABLE_MATERIAL = 1 << 5 ,
  RPF_SET_LIGHTING , RPF_CLEAR_COLOR = 1 << 6 , RPF_CLEAR_DEPTH = 1 << 7 , RPF_CLEAR_STENCIL = 1 << 8 ,
  RPF_CLEAR_ACCUM = 1 << 9 , RPF_CLEAR_ALL , RPF_DRAWABLES_INIT_FRAME = 1 << 10 , RPF_SET_STATE_FLAGS = 1 << 11 ,
  RPF_SET_CLEAR_COLOR = 1 << 12 , RPF_SET_CLEAR_DEPTH = 1 << 13 , RPF_SET_CLEAR_STENCIL = 1 << 14 , RPF_SET_CLEAR_ACCUM = 1 << 15 ,
  RPF_DRAWABLES_DRAW = 1 << 16 , RPF_DRAWABLES_FINISH_FRAME = 1 << 17 , RPF_DRAW_TEXTUAL_INFO = 1 << 18 , RPF_DRAWABLES_AFTER_FINISH = 1 << 19 ,
  RPF_HANDLE_SCREEN_SHOT = 1 << 20 , RPF_ALL = (1 << 21) - 1 , RPF_DEFAULT
}
 available flags that can be queried from the context and set for a new render pass More...
 
enum  MaterialSide { MS_NONE , MS_FRONT , MS_BACK , MS_FRONT_AND_BACK }
 different sides of a material More...
 
enum  IlluminationMode { IM_OFF , IM_ONE_SIDED , IM_TWO_SIDED }
 different illumination modes More...
 
enum  CullingMode { CM_OFF , CM_BACKFACE , CM_FRONTFACE }
 different culling modes More...
 
enum  BlendFunction {
  BF_ZERO , BF_ONE , BF_SRC_COLOR , BF_ONE_MINUS_SRC_COLOR ,
  BF_DST_COLOR , BF_ONE_MINUS_DST_COLOR , BF_SRC_ALPHA , BF_ONE_MINUS_SRC_ALPHA ,
  BF_DST_ALPHA , BF_ONE_MINUS_DST_ALPHA , BF_CONSTANT_COLOR , BF_ONE_MINUS_CONSTANT_COLOR ,
  BF_CONSTANT_ALPHA , BF_ONE_MINUS_CONSTANT_ALPHA , BF_SRC_ALPHA_SATURATE , BF_SRC1_COLOR ,
  BF_ONE_MINUS_SRC1_COLOR , BF_SRC1_ALPHA , BF_ONE_MINUS_SRC1_ALPHA
}
 different blend functions More...
 
enum  TextureWrap {
  TW_REPEAT = 0 , TW_CLAMP = 1 , TW_CLAMP_TO_EDGE = 2 , TW_CLAMP_TO_BORDER = 3 ,
  TW_MIRROR_CLAMP = 4 , TW_MIRROR_CLAMP_TO_EDGE = 5 , TW_MIRROR_CLAMP_TO_BORDER = 6 , TW_MIRRORED_REPEAT = 7 ,
  TW_LAST
}
 different texture wrap modes More...
 
enum  TextureFilter {
  TF_NEAREST = 0 , TF_LINEAR = 1 , TF_NEAREST_MIPMAP_NEAREST = 2 , TF_LINEAR_MIPMAP_NEAREST = 3 ,
  TF_NEAREST_MIPMAP_LINEAR = 4 , TF_LINEAR_MIPMAP_LINEAR = 5 , TF_ANISOTROP = 6 , TF_LAST
}
 different texture filter More...
 
enum  TextureType {
  TT_UNDEF , TT_1D = 1 , TT_2D , TT_3D ,
  TT_1D_ARRAY , TT_2D_ARRAY , TT_CUBEMAP , TT_MULTISAMPLE_2D ,
  TT_MULTISAMPLE_2D_ARRAY , TT_BUFFER
}
 different texture types More...
 
enum  TextureCubeSides {
  TCS_PLUS_X , TCS_MINUS_X , TCS_PLUS_Y , TCS_MINUS_Y ,
  TCS_PLUS_Z , TCS_MINUS_Z
}
 the six different sides of a cube More...
 
enum  PrimitiveType {
  PT_UNDEF , PT_POINTS , PT_LINES , PT_LINES_ADJACENCY ,
  PT_LINE_STRIP , PT_LINE_STRIP_ADJACENCY , PT_LINE_LOOP , PT_TRIANGLES ,
  PT_TRIANGLES_ADJACENCY , PT_TRIANGLE_STRIP , PT_TRIANGLE_STRIP_ADJACENCY , PT_TRIANGLE_FAN ,
  PT_QUADS , PT_QUAD_STRIP , PT_POLYGON , PT_PATCHES ,
  PT_LAST
}
 different primitive types More...
 
enum  TextureSampling { TS_CELL = 0 , TS_VERTEX = 1 }
 different sampling strategies for rendering to textures that steer the computation of the tex_coord input to the fragment shader More...
 
enum  CompareFunction {
  CF_LEQUAL , CF_GEQUAL , CF_LESS , CF_GREATER ,
  CF_EQUAL , CF_NOTEQUAL , CF_ALWAYS , CF_NEVER
}
 different comparison functions used for depth testing or texture comparisons More...
 
enum  AccessType { AT_READ_ONLY , AT_WRITE_ONLY , AT_READ_WRITE }
 different access types More...
 
enum  TextAlignment {
  TA_NONE = 0 , TA_LEFT = 1 , TA_RIGHT = 2 , TA_TOP = 4 ,
  TA_BOTTOM = 8 , TA_TOP_LEFT = TA_LEFT + TA_TOP , TA_TOP_RIGHT = TA_RIGHT + TA_TOP , TA_BOTTOM_LEFT = TA_LEFT + TA_BOTTOM ,
  TA_BOTTOM_RIGHT = TA_RIGHT + TA_BOTTOM
}
 different text alignments More...
 
enum  VertexBufferType {
  VBT_UNDEF = -1 , VBT_VERTICES , VBT_INDICES , VBT_TEXTURE ,
  VBT_UNIFORM , VBT_FEEDBACK , VBT_STORAGE , VBT_ATOMIC_COUNTER ,
  VBT_INDIRECT
}
 Provides vertex buffer types to allow implicit binding. More...
 
enum  VertexBufferUsage {
  VBU_STREAM_DRAW , VBU_STREAM_READ , VBU_STREAM_COPY , VBU_STATIC_DRAW ,
  VBU_STATIC_READ , VBU_STATIC_COPY , VBU_DYNAMIC_DRAW , VBU_DYNAMIC_READ ,
  VBU_DYNAMIC_COPY
}
 Provides vertex buffer usage hints as defined in OpenGL. More...
 
enum  BufferTypeBits {
  BTB_COLOR_BIT = 1 , BTB_DEPTH_BIT = 2 , BTB_COLOR_AND_DEPTH_BITS = 3 , BTB_STENCIL_BIT = 4 ,
  BTB_ALL_BITS = 7
}
 Bits for the selection of different buffer types. More...
 
enum  ShaderType {
  ST_DETECT , ST_COMPUTE , ST_VERTEX , ST_TESS_CONTROL ,
  ST_TESS_EVALUATION , ST_GEOMETRY , ST_FRAGMENT
}
 different shader types More...
 
enum  FrameBufferType {
  FB_0 = 0 , FB_1 = 1 , FB_2 = 2 , FB_3 = 3 ,
  FB_4 = 4 , FB_5 = 5 , FB_6 = 6 , FB_7 = 7 ,
  FB_BACK = 128 , FB_FRONT = 129 , FB_LEFT = 512 , FB_RIGHT = 1024 ,
  FB_BACK_LEFT = FB_BACK+FB_LEFT , FB_BACK_RIGHT = FB_BACK+FB_RIGHT , FB_FRONT_LEFT = FB_FRONT+FB_LEFT , FB_FRONT_RIGHT = FB_FRONT+FB_RIGHT
}
 different frame buffer types which can be combined together with or More...
 
enum  ContextIntegerConstant { MAX_NR_GEOMETRY_SHADER_OUTPUT_VERTICES }
 integer constants that can be queried from context More...
 
enum  PerformanceMonitoringBar { PMB_MIN , PMB_MAX , PMB_CUR , PMB_AVG }
 different items that can be shown in the long bar More...
 
enum  ArrowHeadLengthMode { AHLM_RELATIVE_TO_RADIUS = 1 , AHLM_RELATIVE_TO_LENGTH = 2 , AHLM_MINIMUM_OF_RADIUS_AND_LENGTH = 3 }
 different modes to compute the head length of an arrow More...
 
enum  DrawCallType { RCT_ARRAYS , RCT_INDEXED , RCT_ARRAYS_INSTANCED , RCT_INDEXED_INSTANCED }
 
enum  AlphaMode { AM_OPAQUE = 0 , AM_MASK = 1 , AM_BLEND = 2 , AM_MASK_AND_BLEND = 3 }
 
enum  VertexAttributeID {
  VA_BY_NAME = -1 , VA_POSITION , VA_NORMAL , VA_TEXCOORD ,
  VA_COLOR
}
 
enum  RectangleTextureMode {
  RTM_REPLACE = 0 , RTM_REPLACE_ALPHA , RTM_MULTIPLY_COLOR , RTM_MULTIPLY_SECONDARY_COLOR ,
  RTM_MULTIPLY_BORDER_COLOR , RTM_MIX_COLOR_AND_SECONDARY_COLOR , RTM_MIX_COLOR_AND_BORDER_COLOR , RTM_MIX_SECONDARY_COLOR_AND_COLOR ,
  RTM_MIX_BORDER_COLOR_AND_COLOR , RTM_RED_MIX_COLOR_AND_SECONDARY_COLOR , RTM_RED_MIX_COLOR_AND_BORDER_COLOR , RTM_RED_MIX_SECONDARY_COLOR_AND_COLOR ,
  RTM_RED_MIX_BORDER_COLOR_AND_COLOR
}
 different modes to use texture during rectangle rendering More...
 
enum  RectangleBoderMode { RBM_SEPARATE = 0 , RBM_WIDTH , RBM_HEIGHT , RBM_MIN }
 different modes to compute relative border with for rectangle rendering More...
 
enum  ColorMapping {
  CM_NONE = 0 , CM_COLOR_FRONT = 1 , CM_COLOR_BACK = 2 , CM_COLOR = CM_COLOR_FRONT | CM_COLOR_BACK ,
  CM_OPACITY_FRONT = 4 , CM_OPACITY_BACK = 8 , CM_OPACITY = CM_OPACITY_FRONT | CM_OPACITY_BACK , CM_COLOR_AND_OPACITY = CM_COLOR | CM_OPACITY
}
 color and opacity can be mapped independently to surface material More...
 

Functions

void configure_color_scale (cgv::render::context &ctx, cgv::render::shader_program &prog, cgv::media::ColorScale cs, float window_zero_position=0.5f)
 convenience function to configure a shader that uses color_scale.glsl with a single color scale
 
void configure_color_scale (cgv::render::context &ctx, cgv::render::shader_program &prog, cgv::media::ColorScale cs[2], float window_zero_position[2])
 convenience function to configure a shader that uses color_scale.glsl with two color scales
 
render_config_ptr get_render_config ()
 return a pointer to the current shader configuration
 
std::string get_render_pass_name (RenderPass rp)
 convert render pass type into string
 
std::string to_string (TextureWrap wrap)
 convert texture wrap to string
 
std::string to_string (TextureType tt)
 convert texture type to string
 
std::string to_string (TextureCubeSides tcs)
 convert texture cube side to string
 
std::string to_string (PrimitiveType pt)
 convert primitive type to string
 
std::string to_string (TextureFilter filter_type)
 convert texture filter to string
 
void compute_face_normals (const float *vertices, float *normals, const int *vertex_indices, int *normal_indices, int nr_faces, int face_degree)
 
void tesselate_unit_dodecahedron_or_icosahedron (context &c, bool dual, bool flip_normals, bool edges)
 render an icosahedron at a given center.
 
std::vector< context_creation_function_type > & ref_context_creation_functions ()
 
void register_context_factory (context_creation_function_type fp)
 registration context creation functions
 
contextcreate_context (RenderAPI api, unsigned int w, unsigned int h, const std::string &title, bool show)
 construct a context of the given size.
 
template<typename T >
type_descriptor get_element_type (const T &element)
 
template<typename T >
type_descriptor get_array_type (const T &arr)
 
shader_config_ptr get_shader_config ()
 return a reference to the current shader configuration
 
void destruct_texture (context &ctx, texture *&T)
 
arrow_rendererref_arrow_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton surfel renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< arrow_render_style, arrow_render_style_reflectget_reflection_traits (const arrow_render_style &)
 
box_rendererref_box_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton box renderer that is shared among drawables
 
cgv::reflect::extern_reflection_traits< box_render_style, box_render_style_reflectget_reflection_traits (const box_render_style &)
 
box_wire_rendererref_box_wire_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton box_wire renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< box_wire_render_style, box_wire_render_style_reflectget_reflection_traits (const box_wire_render_style &)
 
clod_point_rendererref_clod_point_renderer (context &ctx, int ref_count_change)
 
cgv::reflect::extern_reflection_traits< clod_point_render_style, clod_point_render_style_reflectget_reflection_traits (const clod_point_render_style &)
 
cone_rendererref_cone_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton cone renderer that is shared among drawables
 
cgv::reflect::extern_reflection_traits< cone_render_style, cone_render_style_reflectget_reflection_traits (const cone_render_style &)
 
ellipsoid_rendererref_ellipsoid_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton ellipsoid renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< ellipsoid_render_style, ellipsoid_render_style_reflectget_reflection_traits (const ellipsoid_render_style &)
 
 DEFINE_GENERIC_RENDER_DATA_CLASS (generic_render_data_vec3, 1, vec3, position)
 Defines a generic render data class using attributes: vec3 position.
 
 DEFINE_GENERIC_RENDER_DATA_CLASS (generic_render_data_vec3_rgb, 2, vec3, position, rgb, color)
 Defines a generic render data class using attributes: vec3 position rgb color.
 
 DEFINE_GENERIC_RENDER_DATA_CLASS (generic_render_data_vec3_rgba, 2, vec3, position, rgba, color)
 Defines a generic render data class using attributes: vec3 position rgba color.
 
cgv::render::TextureFilter map_gl_to_tex_filter (GLenum tf)
 
cgv::render::TextureWrap map_gl_to_tex_wrap (GLenum tw)
 
cgv::render::PrimitiveType map_gl_to_primitive_type (GLenum pt)
 
cgv::render::type_descriptor get_element_type (const fx::gltf::Accessor &accessor)
 
void add_attribute (cgv::render::attribute_array &aa, const fx::gltf::Document &doc, const fx::gltf::Accessor &accessor, cgv::render::VertexAttributeID va_id, const std::string &name="")
 
void extract_additional_information (const fx::gltf::Document &doc, box3 &box, size_t &vertex_count)
 extract bounding box and vertex count from gltf document
 
bool build_render_info (const std::string &file_name, const fx::gltf::Document &doc, cgv::render::context &ctx, cgv::render::render_info &R)
 construct render info from gltf document
 
void extract_mesh (const std::string &file_name, const fx::gltf::Document &doc, cgv::media::mesh::simple_mesh< float > &mesh, int mesh_index=-1, int primitive_index=-1)
 extract simple mesh form gltf document
 
bool write_gltf (const std::string &file_name, const cgv::render::render_info &R)
 NOT IMPLEMENTED YET.
 
cgv::reflect::extern_reflection_traits< group_render_style, group_render_style_reflectget_reflection_traits (const group_render_style &)
 
line_rendererref_line_renderer (context &ctx, int ref_count_change)
 
cgv::reflect::extern_reflection_traits< line_render_style, line_render_style_reflectget_reflection_traits (const line_render_style &)
 
normal_rendererref_normal_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton normal renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< normal_render_style, normal_render_style_reflectget_reflection_traits (const normal_render_style &)
 
point_rendererref_point_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton point renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< point_render_style, point_render_style_reflectget_reflection_traits (const cgv::render::point_render_style &)
 
cgv::reflect::enum_reflection_traits< RectangleTextureModeget_reflection_traits (const RectangleTextureMode &texture_mode)
 allow to use RectangleTextureMode in self reflection
 
cgv::reflect::enum_reflection_traits< RectangleBoderModeget_reflection_traits (const RectangleBoderMode &border_mode)
 allow to use RectangleBoderMode in self reflection
 
rectangle_rendererref_rectangle_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton plane renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< rectangle_render_style, rectangle_render_style_reflectget_reflection_traits (const cgv::render::rectangle_render_style &)
 
slab_rendererref_slab_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton slab renderer that is shared among drawables
 
cgv::reflect::extern_reflection_traits< slab_render_style, slab_render_style_reflectget_reflection_traits (const slab_render_style &)
 
sphere_rendererref_sphere_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton sphere renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< sphere_render_style, sphere_render_style_reflectget_reflection_traits (const sphere_render_style &)
 
spline_tube_rendererref_spline_tube_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton spline tube renderer that is shared among drawables
 
cgv::reflect::extern_reflection_traits< spline_tube_render_style, spline_tube_render_style_reflectget_reflection_traits (const spline_tube_render_style &)
 
void set_material_uniform (cgv::render::shader_program &prog, cgv::render::context &ctx, const std::string &name, const cgv::media::illum::surface_material &material)
 
void set_gl_material_color (GLenum side, const cgv::media::illum::phong_material::color_type &c, float alpha, GLenum type)
 
void set_gl_material (const cgv::media::illum::phong_material &mat, MaterialSide ms, float alpha=1.0f)
 
cgv::reflect::extern_reflection_traits< surface_render_style, surface_render_style_reflectget_reflection_traits (const surface_render_style &)
 
surfel_rendererref_surfel_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton surfel renderer that can be shared among drawables
 
cgv::reflect::extern_reflection_traits< surfel_render_style, surfel_render_style_reflectget_reflection_traits (const surfel_render_style &)
 
volume_rendererref_volume_renderer (context &ctx, int ref_count_change=0)
 reference to a singleton volume renderer that is shared among drawables
 
methods that can be called only with a context
template<class int_type >
bool is_power_of_two (int_type i)
 
template<class int_type >
int_type power_of_two_ub (int_type i)
 

Variables

class CGV_API vertex_buffer
 
const int nr_backgrounds = 5
 
float background_colors []
 
float black [4] = { 0, 0, 0, 1 }
 
float white [4] = { 1, 1, 1, 1 }
 
float gray [4] = { 0.25f, 0.25f, 0.25f, 1 }
 
float green [4] = { 0, 1, 0, 1 }
 
float brown [4] = { 0.3f, 0.1f, 0, 1 }
 
float dark_red [4] = { 0.4f, 0, 0, 1 }
 
float cyan [4] = { 0, 1, 1, 1 }
 
float yellow [4] = { 1, 1, 0, 1 }
 
float red [4] = { 1, 0, 0, 1 }
 
float blue [4] = { 0, 0, 1, 1 }
 
class CGV_API drawable
 
class CGV_API textured_material
 
class CGV_API context
 
class CGV_API texture
 
class CGV_API render_buffer
 
class CGV_API frame_buffer
 
class CGV_API shader_code
 
class CGV_API shader_program
 
class CGV_API arrow_renderer
 
class CGV_API box_renderer
 
class CGV_API box_wire_renderer
 
class CGV_API cone_renderer
 
class CGV_API ellipsoid_renderer
 
class CGV_API normal_renderer
 
class CGV_API point_renderer
 
class CGV_API rectangle_renderer
 
class CGV_API slab_renderer
 
class CGV_API sphere_renderer
 
class CGV_API spline_tube_renderer
 
class CGV_API surfel_renderer
 
class CGV_API volume_renderer
 

Detailed Description

namespace for api independent GPU programming

Typedef Documentation

◆ context_config_ptr

type of ref counted pointer to context creation configuration

Definition at line 571 of file context.h.

◆ context_creation_function_type

typedef context *(* cgv::render::context_creation_function_type) (RenderAPI api, unsigned int w, unsigned int h, const std::string &title, bool show)

Definition at line 1483 of file context.h.

◆ render_config_ptr

type of ref counted pointer to render configuration

Definition at line 605 of file context.h.

◆ shader_config_ptr

type of ref counted pointer to shader configuration

Definition at line 46 of file shader_code.h.

◆ shader_define_map

typedef std::map<std::string, std::string> cgv::render::shader_define_map

typedef for shader define map data structure

Definition at line 52 of file shader_code.h.

Enumeration Type Documentation

◆ AccessType

different access types

Definition at line 266 of file context.h.

◆ AlphaMode

enum cgv::render::AlphaMode

Definition at line 21 of file render_info.h.

◆ ArrowHeadLengthMode

different modes to compute the head length of an arrow

Definition at line 20 of file arrow_renderer.h.

◆ BlendFunction

different blend functions

Definition at line 150 of file context.h.

◆ BufferTypeBits

Bits for the selection of different buffer types.

Enumerator
BTB_COLOR_BIT 

color buffer type

BTB_DEPTH_BIT 

depth buffer type

BTB_COLOR_AND_DEPTH_BITS 

color and depth buffer types

BTB_STENCIL_BIT 

stencil buffer type

BTB_ALL_BITS 

all buffer types

Definition at line 461 of file context.h.

◆ ColorMapping

color and opacity can be mapped independently to surface material

Definition at line 13 of file surface_renderer.h.

◆ CompareFunction

different comparison functions used for depth testing or texture comparisons

Definition at line 253 of file context.h.

◆ ContextIntegerConstant

integer constants that can be queried from context

Definition at line 508 of file context.h.

◆ CullingMode

different culling modes

Definition at line 143 of file context.h.

◆ DrawCallType

enum cgv::render::DrawCallType

Definition at line 14 of file render_info.h.

◆ ElementType

different compond types for data elements

Definition at line 39 of file context.h.

◆ FrameBufferType

different frame buffer types which can be combined together with or

Definition at line 488 of file context.h.

◆ GPUVendorID

IDs for GPU vendors.

Definition at line 31 of file context.h.

◆ IlluminationMode

different illumination modes

Definition at line 136 of file context.h.

◆ MaterialSide

different sides of a material

Definition at line 128 of file context.h.

◆ PerformanceMonitoringBar

different items that can be shown in the long bar

Definition at line 15 of file performance_monitor.h.

◆ PrimitiveType

different primitive types

Definition at line 225 of file context.h.

◆ RectangleBoderMode

different modes to compute relative border with for rectangle rendering

Definition at line 37 of file rectangle_renderer.h.

◆ RectangleTextureMode

different modes to use texture during rectangle rendering

Definition at line 20 of file rectangle_renderer.h.

◆ RenderAPI

enumeration of rendering APIs which can be queried from the context

Definition at line 70 of file context.h.

◆ RenderPass

Enumeration of different render passes, which can be queried from the context and used to specify a new render pass.

Enumerator
RP_NONE 

no renderpass

RP_MAIN 

the main rendering pass triggered by the redraw event

RP_STEREO 

rendering of second eye

RP_SHADOW_MAP 

construction of shadow map

RP_SHADOW_VOLUME 

construction of shadow map

RP_OPAQUE_SURFACES 

opaque surface rendering using z-Buffer

RP_TRANSPARENT_SURFACES 

transparent surface rendering using depth peeling

RP_PICK 

in picking pass a small rectangle around the mouse is rendered

RP_USER_DEFINED 

user defined renderpass

Definition at line 77 of file context.h.

◆ RenderPassFlags

available flags that can be queried from the context and set for a new render pass

Enumerator
RPF_NONE 

no frame initialization is performed

RPF_SET_PROJECTION 

whether to set default projection matrix

RPF_SET_MODELVIEW 

whether to set default modelview matrix

RPF_SET_MODELVIEW_PROJECTION 

whether to set default modelview and projection matrix

RPF_SET_LIGHTS 

whether to define default lights

RPF_SET_MATERIAL 

whether to define default material

RPF_SET_LIGHTS_ON 

whether to turn on default lights

RPF_ENABLE_MATERIAL 

whether to enable material

RPF_SET_LIGHTING 

whether to define and enable default lighting

RPF_CLEAR_COLOR 

whether to clear the color buffer

RPF_CLEAR_DEPTH 

whether to clear the depth buffer

RPF_CLEAR_STENCIL 

whether to clear the depth buffer

RPF_CLEAR_ACCUM 

whether to clear the accumulation buffer

RPF_CLEAR_ALL 

whether to clear all buffers

RPF_DRAWABLES_INIT_FRAME 

whether to call the init_frame method of the drawables

RPF_SET_STATE_FLAGS 

whether to set depth buffer and culling flags

RPF_SET_CLEAR_COLOR 

whether to set the clear color

RPF_SET_CLEAR_DEPTH 

whether to set the clear color

RPF_SET_CLEAR_STENCIL 

whether to set the clear color

RPF_SET_CLEAR_ACCUM 

whether to set the accumulation buffer clear color

RPF_DRAWABLES_DRAW 

whether to call draw and finish_draw methods of drawables

RPF_DRAWABLES_FINISH_FRAME 

whether to call finish frame method of drawables

RPF_DRAW_TEXTUAL_INFO 

whether to draw textual information

RPF_DRAWABLES_AFTER_FINISH 

whether to call after finish method of drawables

RPF_HANDLE_SCREEN_SHOT 

whether to perform a screen shot if this was scheduled

RPF_ALL 

all flags set, defines default render pass

RPF_DEFAULT 

all flags set, defines default render pass

Definition at line 93 of file context.h.

◆ ShaderType

different shader types

Definition at line 485 of file context.h.

◆ TextAlignment

different text alignments

Enumerator
TA_NONE 

no alignment

TA_LEFT 

center of left edge of text bounds

TA_RIGHT 

center of right edge of text bounds

TA_TOP 

center of top edge of text bounds

TA_BOTTOM 

center of bottom edge of text bounds

TA_TOP_LEFT 

top left corner of text bounds

TA_TOP_RIGHT 

top right corner of text bounds

TA_BOTTOM_LEFT 

bottom left corner of text bounds

TA_BOTTOM_RIGHT 

bottom right corner of text bounds

Definition at line 273 of file context.h.

◆ TextureCubeSides

the six different sides of a cube

Definition at line 215 of file context.h.

◆ TextureFilter

different texture filter

Definition at line 189 of file context.h.

◆ TextureSampling

different sampling strategies for rendering to textures that steer the computation of the tex_coord input to the fragment shader

Enumerator
TS_CELL 

for texture resulution N x M x L the tex_coord ranges from [1/2N, 1/2M, 1/2L] to [1-1/2N, 1-1/2M, 1-1/2P]

TS_VERTEX 

tex_coord ranges from [0,0,0] to [1,1,1]

Definition at line 246 of file context.h.

◆ TextureType

different texture types

Definition at line 201 of file context.h.

◆ TextureWrap

different texture wrap modes

Definition at line 173 of file context.h.

◆ VertexAttributeID

enum cgv::render::VertexAttributeID

Definition at line 28 of file render_info.h.

◆ VertexBufferType

Provides vertex buffer types to allow implicit binding.

Enumerator
VBT_UNDEF 

The buffer has no type.

VBT_VERTICES 

The buffer contains vertices and will be bound to GL_ARRAY_BUFFER.

VBT_INDICES 

The buffer contains indices and will be bound to GL_ELEMENT_ARRAY_BUFFER.

VBT_TEXTURE 

The buffer contains texture data and will be bound to GL_TEXTURE_BUFFER.

VBT_UNIFORM 

The buffer contains uniforms and will be bound to GL_UNIFORM_BUFFER.

VBT_FEEDBACK 

The buffer is used for transform&feedback and will be bound to GL_TRANSFORM_FEEDBACK_BUFFER.

VBT_STORAGE 

The buffer contains arbitrary data and will be bound to GL_SHADER_STORAGE_BUFFER.

VBT_ATOMIC_COUNTER 

The buffer contains atomic counter and will be bound to GL_ATOMIC_COUNTER_BUFFER.

VBT_INDIRECT 

The buffer contains indirect draw commands and will be bound to GL_DRAW_INDIRECT_BUFFER.

Definition at line 414 of file context.h.

◆ VertexBufferUsage

Provides vertex buffer usage hints as defined in OpenGL.

Enumerator
VBU_STREAM_DRAW 

Modified once and used at most a few times; Modified by the application, and used as the source for GL drawing and image specification commands.

VBU_STREAM_READ 

Modified once and used at most a few times; Modified by reading data from the GL, and used to return that data when queried by the application.

VBU_STREAM_COPY 

Modified once and used at most a few times; Modified by reading data from the GL, and used as the source for GL drawing and image specification commands.

VBU_STATIC_DRAW 

Modified once and used many times; Modified by the application, and used as the source for GL drawing and image specification commands.

VBU_STATIC_READ 

Modified once and used many times; Modified by reading data from the GL, and used to return that data when queried by the application.

VBU_STATIC_COPY 

Modified once and used many times; Modified by reading data from the GL, and used as the source for GL drawing and image specification commands.

VBU_DYNAMIC_DRAW 

Modified repeatedly and used many times; Modified by the application, and used as the source for GL drawing and image specification commands.

VBU_DYNAMIC_READ 

Modified repeatedly and used many times; Modified by reading data from the GL, and used to return that data when queried by the application.

VBU_DYNAMIC_COPY 

Modified repeatedly and used many times; Modified by reading data from the GL, and used as the source for GL drawing and image specification commands.

Definition at line 427 of file context.h.

Function Documentation

◆ add_attribute()

void cgv::render::add_attribute ( cgv::render::attribute_array aa,
const fx::gltf::Document doc,
const fx::gltf::Accessor accessor,
cgv::render::VertexAttributeID  va_id,
const std::string &  name = "" 
)

Definition at line 87 of file gltf_support.cxx.

◆ build_render_info()

◆ compute_face_normals()

void cgv::render::compute_face_normals ( const float vertices,
float normals,
const int vertex_indices,
int normal_indices,
int  nr_faces,
int  face_degree 
)

Definition at line 1034 of file context.cxx.

◆ configure_color_scale() [1/2]

CGV_API void cgv::render::configure_color_scale ( cgv::render::context ctx,
cgv::render::shader_program prog,
cgv::media::ColorScale  cs,
float  window_zero_position = 0.5f 
)

convenience function to configure a shader that uses color_scale.glsl with a single color scale

Parameters
ctxrender context
progshader program using the color scale
cscolor scale index that can surpass cgv::media::CS_NAMED to index named color scales
window_zero_positionwindow_zero_position which is mapped to center of a bipolar color scale

Definition at line 6 of file color_scale.cxx.

References cgv::render::shader_program::set_uniform(), and cgv::render::shader_program::set_uniform_array().

Referenced by cgv::plot::plot_base::set_mapping_uniforms().

◆ configure_color_scale() [2/2]

CGV_API void cgv::render::configure_color_scale ( cgv::render::context ctx,
cgv::render::shader_program prog,
cgv::media::ColorScale  cs[2],
float  window_zero_position[2] 
)

convenience function to configure a shader that uses color_scale.glsl with two color scales

Parameters
ctxrender context
progshader program using the color scales
cscolor scale indices that can surpass cgv::media::CS_NAMED to index named color scales
window_zero_positionwindow space positions of attribute value zero which is mapped to center of a bipolar color scale

Definition at line 20 of file color_scale.cxx.

References cgv::render::shader_program::set_uniform_array().

◆ create_context()

CGV_API context * cgv::render::create_context ( RenderAPI  api,
unsigned int  w,
unsigned int  h,
const std::string &  title,
bool  show 
)

construct a context of the given size.

This is primarily used to create a context without a window for console applications that render into a frame buffer object only. After usage you need to delete the context by hand.

This is primarily used to create a context without a window for console applications that render into a frame buffer object only. The newly created context will be current right after creation. After usage you need to delete the context by hand.

Definition at line 2443 of file context.cxx.

References cgv::render::context::make_current().

◆ destruct_texture()

void cgv::render::destruct_texture ( context ctx,
texture *&  T 
)

Definition at line 99 of file textured_material.cxx.

◆ extract_additional_information()

CGV_API void cgv::render::extract_additional_information ( const fx::gltf::Document doc,
box3 box,
size_t &  vertex_count 
)

extract bounding box and vertex count from gltf document

Definition at line 97 of file gltf_support.cxx.

References cgv::media::axis_aligned_box< T, N >::add_point(), and cgv::media::axis_aligned_box< T, N >::invalidate().

◆ extract_mesh()

CGV_API void cgv::render::extract_mesh ( const std::string &  file_name,
const fx::gltf::Document doc,
cgv::media::mesh::simple_mesh< float > &  mesh,
int  mesh_index = -1,
int  primitive_index = -1 
)

extract simple mesh form gltf document

extraction can be restricted to a mesh and within the mesh to a primitive by specifying the corresponsing indices as parameters to this function. The number of meshes can be extracted from the gltf document via doc.meshes.size() and the number of primitives for a given mesh with doc.meshes[mesh_index].primitives.size(). CAREFULL: works only in cases were all meshes and primitives have same vertex attribute configuration.

Definition at line 328 of file gltf_support.cxx.

References cgv::media::mesh::simple_mesh< T >::clear(), cgv::media::mesh::simple_mesh< T >::get_nr_positions(), cgv::media::mesh::simple_mesh_base::group_index(), cgv::media::mesh::simple_mesh_base::material_index(), cgv::media::mesh::simple_mesh_base::new_corner(), cgv::media::mesh::simple_mesh_base::new_group(), cgv::media::mesh::simple_mesh_base::new_material(), cgv::media::mesh::simple_mesh< T >::new_normal(), cgv::media::mesh::simple_mesh< T >::new_position(), cgv::media::mesh::simple_mesh< T >::new_tex_coord(), cgv::media::mesh::simple_mesh_base::ref_material(), cgv::media::illum::textured_surface_material::set_name(), cgv::media::mesh::simple_mesh_base::start_face(), and cgv::utils::to_string().

◆ get_array_type()

template<typename T >
type_descriptor cgv::render::get_array_type ( const T &  arr)

Definition at line 125 of file element_traits.h.

◆ get_element_type() [1/2]

cgv::render::type_descriptor cgv::render::get_element_type ( const fx::gltf::Accessor accessor)

Definition at line 59 of file gltf_support.cxx.

◆ get_element_type() [2/2]

template<typename T >
type_descriptor cgv::render::get_element_type ( const T &  element)

Definition at line 67 of file element_traits.h.

◆ get_reflection_traits() [1/18]

Definition at line 135 of file arrow_renderer.cxx.

◆ get_reflection_traits() [2/18]

CGV_API cgv::reflect::extern_reflection_traits< box_render_style, box_render_style_reflect > cgv::render::get_reflection_traits ( const box_render_style )

Definition at line 143 of file box_renderer.cxx.

◆ get_reflection_traits() [3/18]

Definition at line 117 of file box_wire_renderer.cxx.

◆ get_reflection_traits() [4/18]

Definition at line 189 of file point_renderer.cxx.

◆ get_reflection_traits() [5/18]

◆ get_reflection_traits() [6/18]

Definition at line 476 of file clod_point_renderer.cxx.

◆ get_reflection_traits() [7/18]

CGV_API cgv::reflect::extern_reflection_traits< cone_render_style, cone_render_style_reflect > cgv::render::get_reflection_traits ( const cone_render_style )

Definition at line 189 of file cone_renderer.cxx.

◆ get_reflection_traits() [8/18]

Definition at line 106 of file ellipsoid_renderer.cxx.

◆ get_reflection_traits() [9/18]

Definition at line 112 of file group_renderer.cxx.

◆ get_reflection_traits() [10/18]

CGV_API cgv::reflect::extern_reflection_traits< line_render_style, line_render_style_reflect > cgv::render::get_reflection_traits ( const line_render_style )

Definition at line 180 of file line_renderer.cxx.

◆ get_reflection_traits() [11/18]

Definition at line 70 of file normal_renderer.cxx.

◆ get_reflection_traits() [12/18]

CGV_API cgv::reflect::enum_reflection_traits< RectangleBoderMode > cgv::render::get_reflection_traits ( const RectangleBoderMode border_mode)

allow to use RectangleBoderMode in self reflection

Definition at line 27 of file rectangle_renderer.cxx.

◆ get_reflection_traits() [13/18]

CGV_API cgv::reflect::enum_reflection_traits< RectangleTextureMode > cgv::render::get_reflection_traits ( const RectangleTextureMode texture_mode)

allow to use RectangleTextureMode in self reflection

Definition at line 8 of file rectangle_renderer.cxx.

◆ get_reflection_traits() [14/18]

CGV_API cgv::reflect::extern_reflection_traits< slab_render_style, slab_render_style_reflect > cgv::render::get_reflection_traits ( const slab_render_style )

Definition at line 146 of file slab_renderer.cxx.

◆ get_reflection_traits() [15/18]

Definition at line 129 of file sphere_renderer.cxx.

◆ get_reflection_traits() [16/18]

◆ get_reflection_traits() [17/18]

Definition at line 147 of file surface_renderer.cxx.

◆ get_reflection_traits() [18/18]

Definition at line 180 of file surfel_renderer.cxx.

◆ get_render_config()

CGV_API render_config_ptr cgv::render::get_render_config ( )

return a pointer to the current shader configuration

Definition at line 122 of file context.cxx.

Referenced by cgv::render::context::context(), and cgv::render::context::error().

◆ get_render_pass_name()

CGV_API std::string cgv::render::get_render_pass_name ( RenderPass  rp)

convert render pass type into string

the main rendering pass triggered by the redraw event

rendering of second eye

construction of shadow map

construction of shadow map

opaque surface rendering using z-Buffer

transparent surface rendering using depth peeling

in picking pass a small rectangle around the mouse is rendered

Definition at line 728 of file context.cxx.

Referenced by cgv::render::context::render_pass().

◆ get_shader_config()

CGV_API shader_config_ptr cgv::render::get_shader_config ( )

◆ is_power_of_two()

template<class int_type >
bool cgv::render::is_power_of_two ( int_type  i)

Definition at line 236 of file texture.cxx.

◆ map_gl_to_primitive_type()

cgv::render::PrimitiveType cgv::render::map_gl_to_primitive_type ( GLenum  pt)

Definition at line 38 of file gltf_support.cxx.

◆ map_gl_to_tex_filter()

cgv::render::TextureFilter cgv::render::map_gl_to_tex_filter ( GLenum  tf)

Definition at line 9 of file gltf_support.cxx.

◆ map_gl_to_tex_wrap()

cgv::render::TextureWrap cgv::render::map_gl_to_tex_wrap ( GLenum  tw)

Definition at line 23 of file gltf_support.cxx.

◆ power_of_two_ub()

template<class int_type >
int_type cgv::render::power_of_two_ub ( int_type  i)

Definition at line 250 of file texture.cxx.

◆ ref_arrow_renderer()

CGV_API arrow_renderer & cgv::render::ref_arrow_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton surfel renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file arrow_renderer.cxx.

References cgv::render::renderer::manage_singleton().

Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::clear(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), and cgv::render::gl::gl_implicit_surface_drawable_base::init().

◆ ref_box_renderer()

CGV_API box_renderer & cgv::render::ref_box_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton box renderer that is shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 14 of file box_renderer.cxx.

References cgv::render::renderer::manage_singleton().

Referenced by cgv::plot::plot3d::clear(), vr_test::clear(), cgv::render::gl::gl_implicit_surface_drawable_base::clear(), vr_test::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::plot::plot3d::init(), vr_test::init(), and cgv::render::gl::gl_implicit_surface_drawable_base::init().

◆ ref_box_wire_renderer()

CGV_API box_wire_renderer & cgv::render::ref_box_wire_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton box_wire renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 14 of file box_wire_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_clod_point_renderer()

CGV_API clod_point_renderer & cgv::render::ref_clod_point_renderer ( context ctx,
int  ref_count_change 
)

Definition at line 28 of file clod_point_renderer.cxx.

◆ ref_cone_renderer()

CGV_API cone_renderer & cgv::render::ref_cone_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton cone renderer that is shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file cone_renderer.cxx.

References cgv::render::renderer::manage_singleton().

Referenced by cgv::plot::plot3d::clear(), vr_test::clear(), cgv::render::gl::gl_implicit_surface_drawable_base::clear(), vr_test::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw_implicit_surface(), cgv::render::gl::gl_implicit_surface_drawable_base::finish_frame(), cgv::plot::plot3d::init(), vr_test::init(), and cgv::render::gl::gl_implicit_surface_drawable_base::init().

◆ ref_context_creation_functions()

std::vector< context_creation_function_type > & cgv::render::ref_context_creation_functions ( )

Definition at line 2423 of file context.cxx.

◆ ref_ellipsoid_renderer()

CGV_API ellipsoid_renderer & cgv::render::ref_ellipsoid_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton ellipsoid renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file ellipsoid_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_line_renderer()

CGV_API line_renderer & cgv::render::ref_line_renderer ( context ctx,
int  ref_count_change 
)

Definition at line 9 of file line_renderer.cxx.

◆ ref_normal_renderer()

CGV_API normal_renderer & cgv::render::ref_normal_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton normal renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file normal_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_point_renderer()

CGV_API point_renderer & cgv::render::ref_point_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton point renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 8 of file point_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_rectangle_renderer()

CGV_API rectangle_renderer & cgv::render::ref_rectangle_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton plane renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 36 of file rectangle_renderer.cxx.

References cgv::render::renderer::manage_singleton().

Referenced by cgv::plot::plot_base::clear(), and cgv::plot::plot_base::init().

◆ ref_slab_renderer()

CGV_API slab_renderer & cgv::render::ref_slab_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton slab renderer that is shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file slab_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_sphere_renderer()

CGV_API sphere_renderer & cgv::render::ref_sphere_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton sphere renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file sphere_renderer.cxx.

References cgv::render::renderer::manage_singleton().

Referenced by vr_test::clear(), cgv::render::gl::gl_implicit_surface_drawable_base::clear(), vr_test::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw_implicit_surface(), vr_view_interactor::draw_vr_kits(), vr_test::init(), and cgv::render::gl::gl_implicit_surface_drawable_base::init().

◆ ref_spline_tube_renderer()

CGV_API spline_tube_renderer & cgv::render::ref_spline_tube_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton spline tube renderer that is shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file spline_tube_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_surfel_renderer()

CGV_API surfel_renderer & cgv::render::ref_surfel_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton surfel renderer that can be shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 7 of file surfel_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ ref_volume_renderer()

CGV_API volume_renderer & cgv::render::ref_volume_renderer ( context ctx,
int  ref_count_change = 0 
)

reference to a singleton volume renderer that is shared among drawables

the second parameter is used for reference counting. Use +1 in your init method, -1 in your clear method and default 0 argument otherwise. If internal reference counter decreases to 0, singleton renderer is destructed.

Definition at line 9 of file volume_renderer.cxx.

References cgv::render::renderer::manage_singleton().

◆ register_context_factory()

CGV_API void cgv::render::register_context_factory ( context_creation_function_type  fp)

registration context creation functions

Definition at line 2430 of file context.cxx.

◆ set_gl_material()

void cgv::render::set_gl_material ( const cgv::media::illum::phong_material mat,
MaterialSide  ms,
float  alpha = 1.0f 
)

Definition at line 71 of file surface_renderer.cxx.

◆ set_gl_material_color()

void cgv::render::set_gl_material_color ( GLenum  side,
const cgv::media::illum::phong_material::color_type c,
float  alpha,
GLenum  type 
)

Definition at line 65 of file surface_renderer.cxx.

◆ set_material_uniform()

void cgv::render::set_material_uniform ( cgv::render::shader_program prog,
cgv::render::context ctx,
const std::string &  name,
const cgv::media::illum::surface_material material 
)

Definition at line 10 of file surface_renderer.cxx.

◆ tesselate_unit_dodecahedron_or_icosahedron()

void cgv::render::tesselate_unit_dodecahedron_or_icosahedron ( context c,
bool  dual,
bool  flip_normals,
bool  edges 
)

◆ to_string() [1/5]

CGV_API std::string cgv::render::to_string ( PrimitiveType  pt)

convert primitive type to string

Definition at line 997 of file context.cxx.

◆ to_string() [2/5]

CGV_API std::string cgv::render::to_string ( TextureCubeSides  tcs)

convert texture cube side to string

Definition at line 988 of file context.cxx.

◆ to_string() [3/5]

CGV_API std::string cgv::render::to_string ( TextureFilter  filter_type)

convert texture filter to string

Definition at line 1008 of file context.cxx.

◆ to_string() [4/5]

CGV_API std::string cgv::render::to_string ( TextureType  tt)

convert texture type to string

Definition at line 979 of file context.cxx.

◆ to_string() [5/5]

CGV_API std::string cgv::render::to_string ( TextureWrap  wrap)

convert texture wrap to string

Definition at line 968 of file context.cxx.

◆ write_gltf()

CGV_API bool cgv::render::write_gltf ( const std::string &  file_name,
const cgv::render::render_info R 
)

NOT IMPLEMENTED YET.

Definition at line 453 of file gltf_support.cxx.

Variable Documentation

◆ arrow_renderer

Definition at line 9 of file arrow_renderer.h.

◆ background_colors

float cgv::render::background_colors[]
Initial value:
= {
0,0,0,0,
1.0f, 0.4f, 0.5f,0,
0.4f, 1, 0.7f,0,
0.5f, 0.5f, 1,0,
1,1,1,0,
}

Definition at line 21 of file context.cxx.

◆ black

CGV_API float cgv::render::black = { 0, 0, 0, 1 }

Definition at line 1023 of file context.cxx.

◆ blue

CGV_API float cgv::render::blue = { 0, 0, 1, 1 }

Definition at line 1032 of file context.cxx.

◆ box_renderer

Definition at line 9 of file box_renderer.h.

◆ box_wire_renderer

Definition at line 9 of file box_wire_renderer.h.

◆ brown

CGV_API float cgv::render::brown = { 0.3f, 0.1f, 0, 1 }

Definition at line 1027 of file context.cxx.

◆ cone_renderer

Definition at line 10 of file cone_renderer.h.

◆ context

class CGV_API cgv::render::context

Definition at line 297 of file context.h.

◆ cyan

CGV_API float cgv::render::cyan = { 0, 1, 1, 1 }

Definition at line 1029 of file context.cxx.

◆ dark_red

CGV_API float cgv::render::dark_red = { 0.4f, 0, 0, 1 }

Definition at line 1028 of file context.cxx.

◆ drawable

class CGV_API cgv::render::drawable

Definition at line 27 of file context.h.

◆ ellipsoid_renderer

Definition at line 9 of file ellipsoid_renderer.h.

◆ frame_buffer

Definition at line 515 of file context.h.

◆ gray

CGV_API float cgv::render::gray = { 0.25f, 0.25f, 0.25f, 1 }

Definition at line 1025 of file context.cxx.

◆ green

CGV_API float cgv::render::green = { 0, 1, 0, 1 }

Definition at line 1026 of file context.cxx.

◆ normal_renderer

Definition at line 9 of file normal_renderer.h.

◆ nr_backgrounds

const int cgv::render::nr_backgrounds = 5

Definition at line 20 of file context.cxx.

◆ point_renderer

Definition at line 9 of file point_renderer.h.

◆ rectangle_renderer

Definition at line 11 of file rectangle_renderer.h.

◆ red

CGV_API float cgv::render::red = { 1, 0, 0, 1 }

Definition at line 1031 of file context.cxx.

◆ render_buffer

Definition at line 514 of file context.h.

◆ shader_code

class CGV_API cgv::render::shader_code

Definition at line 516 of file context.h.

◆ shader_program

Definition at line 517 of file context.h.

◆ slab_renderer

Definition at line 9 of file slab_renderer.h.

◆ sphere_renderer

Definition at line 9 of file sphere_renderer.h.

◆ spline_tube_renderer

Definition at line 9 of file spline_tube_renderer.h.

◆ surfel_renderer

Definition at line 9 of file surfel_renderer.h.

◆ texture

class CGV_API cgv::render::texture

Definition at line 513 of file context.h.

◆ textured_material

Definition at line 28 of file context.h.

◆ vertex_buffer

Definition at line 10 of file attribute_array_binding.h.

◆ volume_renderer

Definition at line 10 of file volume_renderer.h.

◆ white

CGV_API float cgv::render::white = { 1, 1, 1, 1 }

Definition at line 1024 of file context.cxx.

◆ yellow

CGV_API float cgv::render::yellow = { 1, 1, 0, 1 }

Definition at line 1030 of file context.cxx.