cgv
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cgv::render::shader_program Class Reference

a shader program combines several shader code fragments to a complete definition of the shading pipeline. More...

#include <shader_program.h>

Inheritance diagram for cgv::render::shader_program:
cgv::render::shader_program_base cgv::render::render_component

Public Member Functions

 shader_program (bool _show_code_errors=false)
 create empty shader program and set the option whether errors during shader code attachment should be printed to std::cerr
 
 ~shader_program ()
 call destruct method
 
bool create (const context &ctx)
 create the shader program
 
void destruct (const context &ctx)
 destruct shader program
 
bool attach_code (const context &ctx, const shader_code &code)
 attach a compiled shader code instance that is managed outside of program
 
bool detach_code (const context &ctx, const shader_code &code)
 detach a shader code
 
bool attach_code (const context &ctx, const std::string &source, ShaderType st)
 attach a shader code given as string and managed the created shader code object
 
bool attach_file (const context &ctx, const std::string &file_name, ShaderType st=ST_DETECT, const shader_define_map &defines=shader_define_map())
 read shader code from file, compile and attach to program
 
bool attach_files (const context &ctx, const std::string &base_name, const shader_define_map &defines=shader_define_map())
 read shader code from files with the given base name, compile and attach them
 
bool attach_dir (const context &ctx, const std::string &dir_name, bool recursive)
 collect shader code files from directory, compile and attach.
 
bool attach_program (const context &ctx, std::string file_name, bool show_error=false, const shader_define_map &defines=shader_define_map())
 collect shader code files declared in shader program file, compile and attach them
 
bool link (const context &ctx, bool show_error=false)
 link shaders to an executable program
 
bool is_linked () const
 return whether program is linked
 
bool build_files (const context &ctx, const std::string &base_name, bool show_error=false, const shader_define_map &defines=shader_define_map())
 successively calls create, attach_files and link.
 
bool build_dir (const context &ctx, const std::string &dir_name, bool recursive=false, bool show_error=false)
 successively calls create, attach_dir and link.
 
bool build_program (const context &ctx, const std::string &file_name, bool show_error=false, const shader_define_map &defines=shader_define_map())
 successively calls create, attach_program and link.
 
void set_geometry_shader_info (PrimitiveType input_type, PrimitiveType output_type, int max_output_count=0)
 configure the geometry shader, if count < 1 set it to get_max_nr_geometry_shader_output_vertices
 
bool enable (context &ctx)
 enable the shader program
 
bool disable (context &ctx)
 disable shader program and restore fixed functionality
 
bool is_enabled () const
 check whether program is currently enabled
 
int get_uniform_location (const context &ctx, const std::string &name) const
 query location index of an uniform
 
bool set_material_uniform (const context &ctx, const std::string &name, const cgv::media::illum::surface_material &material, bool generate_error=false)
 set a uniform of type material
 
bool set_textured_material_uniform (const context &ctx, const std::string &name, const textured_material &material, bool generate_error=false)
 set a uniform of type textured_material
 
bool set_light_uniform (const context &ctx, const std::string &name, const cgv::media::illum::light_source &light, bool generate_error=false)
 set a uniform of type light source
 
template<typename T >
bool set_uniform (const context &ctx, const std::string &name, const T &value, bool generate_error=false)
 Set the value of a uniform by name, where the type can be any of int, unsigned, float, vec<int>, vec<unsigned>, vec<float>, mat<float> and the vectors are of dimension 2, 3 or 4 and the matrices of dimensions 2, 3 or 4.
 
template<typename T >
bool set_uniform_array (const context &ctx, const std::string &name, const T &array)
 set uniform array from array array where number elements can be derived from array through array_descriptor_traits; supported array types include cgv::math::vec and std::vector
 
template<typename T >
bool set_uniform_array (const context &ctx, const std::string &name, const T *array, size_t nr_elements, bool generate_error=false)
 set uniform array from an array with nr_elements elements of type T pointed to by array
 
template<typename T >
bool set_uniform (const context &ctx, int loc, const T &value)
 Set the value of a uniform by name, where the type can be any of int, unsigned, float, vec<int>, vec<unsigned>, vec<float>, mat<float> and the vectors are of dimension 2, 3 or 4 and the matrices of dimensions 2, 3 or 4.
 
template<typename T >
bool set_uniform_array (const context &ctx, int loc, const T &array)
 set uniform array from array array where number elements can be derived from array through array_descriptor_traits; supported array types include cgv::math::vec and std::vector
 
template<typename T >
bool set_uniform_array (const context &ctx, int loc, const T *array, size_t nr_elements)
 set uniform array from an array with nr_elements elements of type T pointed to by array
 
int get_attribute_location (const context &ctx, const std::string &name) const
 query location index of an attribute
 
template<typename T >
bool set_attribute (const context &ctx, const std::string &name, const T &value)
 set constant default value of a vertex attribute by attribute name, if name does not specify an attribute, an error message is generated
 
template<typename T >
bool set_attribute (const context &ctx, int loc, const T &value)
 set constant default value of a vertex attribute by location index
 
- Public Member Functions inherited from cgv::render::shader_program_base
 shader_program_base ()
 initializes members
 
void specify_standard_uniforms (bool view, bool material, bool lights, bool gamma)
 
void specify_standard_vertex_attribute_names (context &ctx, bool color=true, bool normal=true, bool texcoord=true)
 
void specify_vertex_attribute_names (context &ctx, const std::string &position, const std::string &color="", const std::string &normal="", const std::string &texcoord="")
 
bool does_use_view () const
 
bool does_use_material () const
 
bool does_use_lights () const
 
bool does_use_gamma () const
 
void allow_context_to_set_color (bool allow)
 
int get_position_index () const
 
int get_color_index () const
 
bool does_context_set_color () const
 
int get_normal_index () const
 
int get_texcoord_index () const
 
- Public Member Functions inherited from cgv::render::render_component
 render_component ()
 initialize members
 
virtual bool is_created () const
 return whether component has been created
 
void put_id_void (void *ptr) const
 copy the rendering api specific id the component to the memory location of the given pointer.
 
template<typename T >
void put_id (T &id) const
 cast the refence to rendering api specific representation of component id to the specified type
 

Static Public Member Functions

static bool collect_files_from_cache (const std::string &name, std::vector< std::string > &file_names, bool &added_files)
 resolve file name with shader_code::find_file and add file to list if found
 
static bool collect_file (const std::string &file_name, bool use_cache, std::vector< std::string > &file_names)
 resolve file name with shader_code::find_file and add file to list if found
 
static bool collect_files (const std::string &base_name, bool use_cache, std::vector< std::string > &file_names)
 collect shader code files that extent the given base name.
 
static bool collect_dir (const std::string &dir_name, bool recursive, std::vector< std::string > &file_names)
 collect shader code files from directory.
 
static bool collect_program (const std::string &file_name, bool use_cache, std::vector< std::string > &file_names)
 collect shader code files declared in a shader program file.
 
static unsigned int get_max_nr_geometry_shader_output_vertices (const context &ctx)
 return the maximum number of output vertices of a geometry shader
 
static std::vector< shader_define_mapextract_instances (std::string file_name)
 find and parse all instance definitions in a shader program file
 

Protected Member Functions

bool attach_files (const context &ctx, const std::vector< std::string > &file_names, const shader_define_map &defines=shader_define_map())
 attach a list of files
 
void update_state (const context &ctx)
 ensure that the state has been set in the context
 

Static Protected Member Functions

static bool open_program_file (std::string &file_name, bool use_cache, std::string &content, std::vector< cgv::utils::line > &lines, std::string *last_error_ptr=0)
 common code necessary to open file
 

Protected Attributes

bool show_code_errors: 1
 
bool linked: 1
 
bool state_out_of_date: 1
 
int nr_attached_geometry_shaders: 13
 
std::vector< shader_code * > managed_codes
 
- Protected Attributes inherited from cgv::render::shader_program_base
bool is_enabled
 
bool auto_detect_uniforms
 
bool auto_detect_vertex_attributes
 
bool uses_view
 
bool uses_material
 
bool uses_lights
 
bool uses_gamma
 
int position_index
 
int color_index
 
bool context_sets_color
 
int normal_index
 
int texcoord_index
 

Static Protected Attributes

static std::map< std::string, std::string > program_file_cache
 maps used to cache program file contents and valid file names indexed by their respective file name
 
static std::map< std::string, std::vector< std::string > > files_cache
 

Additional Inherited Members

- Public Attributes inherited from cgv::render::shader_program_base
PrimitiveType geometry_shader_input_type
 
PrimitiveType geometry_shader_output_type
 
int geometry_shader_output_count
 
- Public Attributes inherited from cgv::render::render_component
void * handle
 
void * internal_format
 
void * user_data
 
const contextctx_ptr
 keep pointer to my context
 
std::string last_error
 a string that contains the last error
 

Detailed Description

a shader program combines several shader code fragments to a complete definition of the shading pipeline.

Definition at line 27 of file shader_program.h.

Constructor & Destructor Documentation

◆ shader_program()

cgv::render::shader_program::shader_program ( bool  _show_code_errors = false)

create empty shader program and set the option whether errors during shader code attachment should be printed to std::cerr

create empty shader program

Definition at line 176 of file shader_program.cxx.

◆ ~shader_program()

cgv::render::shader_program::~shader_program ( )

call destruct method

Definition at line 185 of file shader_program.cxx.

References cgv::render::render_component::ctx_ptr, destruct(), and cgv::render::context::make_current().

Member Function Documentation

◆ attach_code() [1/2]

bool cgv::render::shader_program::attach_code ( const context ctx,
const shader_code code 
)

◆ attach_code() [2/2]

bool cgv::render::shader_program::attach_code ( const context ctx,
const std::string &  source,
ShaderType  st 
)

attach a shader code given as string and managed the created shader code object

Definition at line 247 of file shader_program.cxx.

References attach_code(), cgv::render::shader_code::compile(), cgv::render::render_component::last_error, and cgv::render::shader_code::set_code().

◆ attach_dir()

bool cgv::render::shader_program::attach_dir ( const context ctx,
const std::string &  dir_name,
bool  recursive 
)

collect shader code files from directory, compile and attach.

Definition at line 279 of file shader_program.cxx.

References attach_files(), and collect_dir().

Referenced by attach_program(), and build_dir().

◆ attach_file()

bool cgv::render::shader_program::attach_file ( const context ctx,
const std::string &  file_name,
ShaderType  st = ST_DETECT,
const shader_define_map defines = shader_define_map() 
)

read shader code from file, compile and attach to program

Definition at line 260 of file shader_program.cxx.

References attach_code(), cgv::render::render_component::last_error, and cgv::render::shader_code::read_and_compile().

Referenced by attach_files(), and attach_program().

◆ attach_files() [1/2]

bool cgv::render::shader_program::attach_files ( const context ctx,
const std::string &  base_name,
const shader_define_map defines = shader_define_map() 
)

read shader code from files with the given base name, compile and attach them

Definition at line 272 of file shader_program.cxx.

References attach_files(), collect_files(), and cgv::render::context::is_shader_file_cache_enabled().

◆ attach_files() [2/2]

bool cgv::render::shader_program::attach_files ( const context ctx,
const std::vector< std::string > &  file_names,
const shader_define_map defines = shader_define_map() 
)
protected

attach a list of files

Definition at line 19 of file shader_program.cxx.

References attach_file(), and cgv::render::render_component::last_error.

Referenced by attach_dir(), attach_files(), attach_program(), and build_files().

◆ attach_program()

bool cgv::render::shader_program::attach_program ( const context ctx,
std::string  file_name,
bool  show_error = false,
const shader_define_map defines = shader_define_map() 
)

◆ build_dir()

bool cgv::render::shader_program::build_dir ( const context ctx,
const std::string &  dir_name,
bool  recursive = false,
bool  show_error = false 
)

successively calls create, attach_dir and link.

Definition at line 477 of file shader_program.cxx.

References attach_dir(), create(), cgv::render::render_component::is_created(), and link().

◆ build_files()

bool cgv::render::shader_program::build_files ( const context ctx,
const std::string &  base_name,
bool  show_error = false,
const shader_define_map defines = shader_define_map() 
)

successively calls create, attach_files and link.

Definition at line 471 of file shader_program.cxx.

References attach_files(), create(), cgv::render::render_component::is_created(), and link().

Referenced by cgv::render::a_buffer::init().

◆ build_program()

bool cgv::render::shader_program::build_program ( const context ctx,
const std::string &  file_name,
bool  show_error = false,
const shader_define_map defines = shader_define_map() 
)

◆ collect_dir()

bool cgv::render::shader_program::collect_dir ( const std::string &  dir_name,
bool  recursive,
std::vector< std::string > &  file_names 
)
static

collect shader code files from directory.

If the directory does not exist search it in the shader path of the shader configuration returned by get_shader_config(). Returns true if at least one shader code file has been collected.

Definition at line 106 of file shader_program.cxx.

References cgv::data::ref_ptr< T, is_ref_counted >::empty(), and cgv::render::get_shader_config().

Referenced by attach_dir(), and collect_program().

◆ collect_file()

bool cgv::render::shader_program::collect_file ( const std::string &  file_name,
bool  use_cache,
std::vector< std::string > &  file_names 
)
static

resolve file name with shader_code::find_file and add file to list if found

Definition at line 46 of file shader_program.cxx.

References collect_files_from_cache(), and cgv::render::shader_code::find_file().

Referenced by collect_program().

◆ collect_files()

bool cgv::render::shader_program::collect_files ( const std::string &  base_name,
bool  use_cache,
std::vector< std::string > &  file_names 
)
static

collect shader code files that extent the given base name.

Returns true if at least one shader code file has been collected.

Definition at line 72 of file shader_program.cxx.

References collect_files_from_cache(), and cgv::render::shader_code::find_file().

Referenced by attach_files(), and collect_program().

◆ collect_files_from_cache()

bool cgv::render::shader_program::collect_files_from_cache ( const std::string &  name,
std::vector< std::string > &  file_names,
bool &  added_files 
)
static

resolve file name with shader_code::find_file and add file to list if found

Definition at line 30 of file shader_program.cxx.

Referenced by collect_file(), and collect_files().

◆ collect_program()

bool cgv::render::shader_program::collect_program ( const std::string &  file_name,
bool  use_cache,
std::vector< std::string > &  file_names 
)
static

collect shader code files declared in a shader program file.

Program files have the extension glpr and contain lines of the form command:argument. The following commands can be used

  • file:file_name ... calls attach_file(ctx,file_name)
  • vertex_file:file_name ... calls attach_file(ctx,file_name,ST_VERTEX)
  • geometry_file:file_name ... calls attach_file(ctx,file_name,ST_GEOMETRY)
  • fragment_file:file_name ... calls attach_file(ctx,file_name,ST_FRAGMENT)
  • files:base_name ... calls attach_files(ctx,base_name)
  • dir:dir_name ... calls attach_dir(ctx,dir_name,false)
  • rec_dir:dir_name ... calls attach_dir(ctx,dir_name,true)
  • program:file_name ... calls attach_program(file_name) recursively take care, not to generate cyclic includes.
  • geometry_shader_info:input_type;output_type;max_output_count ... calls set_geometry_shader_info with input_type, output_type and max_output_count as arguments, where the primitive types are one out of points,lines,lines_adjacency,line_strip,line_strip_adjacency,line_loop, triangles,triangles_adjacency,triangle_strip,triangle_strip_adjacency,triangle_fan, quads,quad_strip,polygon. Returns true if at least one shader code file has been collected.

Definition at line 128 of file shader_program.cxx.

References collect_dir(), collect_file(), collect_files(), collect_program(), cgv::render::shader_code::decode_if_base64(), cgv::render::shader_code::find_file(), cgv::render::get_shader_config(), cgv::base::read_data_file(), cgv::utils::split_to_lines(), and cgv::utils::to_string().

Referenced by collect_program().

◆ create()

bool cgv::render::shader_program::create ( const context ctx)

create the shader program

Definition at line 195 of file shader_program.cxx.

References cgv::render::render_component::ctx_ptr, and destruct().

Referenced by build_dir(), build_files(), and build_program().

◆ destruct()

◆ detach_code()

bool cgv::render::shader_program::detach_code ( const context ctx,
const shader_code code 
)

detach a shader code

Definition at line 230 of file shader_program.cxx.

References cgv::render::shader_code::get_shader_type(), and cgv::render::render_component::last_error.

◆ disable()

◆ enable()

◆ extract_instances()

std::vector< shader_define_map > cgv::render::shader_program::extract_instances ( std::string  file_name)
static

find and parse all instance definitions in a shader program file

Definition at line 317 of file shader_program.cxx.

References cgv::utils::token::begin, cgv::utils::is_space(), open_program_file(), cgv::utils::split_to_tokens(), and cgv::utils::to_string().

◆ get_attribute_location()

int cgv::render::shader_program::get_attribute_location ( const context ctx,
const std::string &  name 
) const

◆ get_max_nr_geometry_shader_output_vertices()

unsigned int cgv::render::shader_program::get_max_nr_geometry_shader_output_vertices ( const context ctx)
static

return the maximum number of output vertices of a geometry shader

Definition at line 510 of file shader_program.cxx.

Referenced by update_state().

◆ get_uniform_location()

int cgv::render::shader_program::get_uniform_location ( const context ctx,
const std::string &  name 
) const

◆ is_enabled()

bool cgv::render::shader_program::is_enabled ( ) const
inline

check whether program is currently enabled

Definition at line 126 of file shader_program.h.

Referenced by cgv::render::gl::cover_screen(), disable(), and enable().

◆ is_linked()

bool cgv::render::shader_program::is_linked ( ) const

return whether program is linked

Definition at line 543 of file shader_program.cxx.

Referenced by cgv::render::gl::image_drawable::draw(), enable(), and vr_test::init_frame().

◆ link()

bool cgv::render::shader_program::link ( const context ctx,
bool  show_error = false 
)

◆ open_program_file()

bool cgv::render::shader_program::open_program_file ( std::string &  file_name,
bool  use_cache,
std::string &  content,
std::vector< cgv::utils::line > &  lines,
std::string *  last_error_ptr = 0 
)
staticprotected

◆ set_attribute() [1/2]

◆ set_attribute() [2/2]

template<typename T >
bool cgv::render::shader_program::set_attribute ( const context ctx,
int  loc,
const T &  value 
)
inline

set constant default value of a vertex attribute by location index

Definition at line 198 of file shader_program.h.

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

◆ set_geometry_shader_info()

void cgv::render::shader_program::set_geometry_shader_info ( PrimitiveType  input_type,
PrimitiveType  output_type,
int  max_output_count = 0 
)

configure the geometry shader, if count < 1 set it to get_max_nr_geometry_shader_output_vertices

configure the geometry shader

Definition at line 549 of file shader_program.cxx.

Referenced by attach_program().

◆ set_light_uniform()

bool cgv::render::shader_program::set_light_uniform ( const context ctx,
const std::string &  name,
const cgv::media::illum::light_source light,
bool  generate_error = false 
)

set a uniform of type light source

Definition at line 638 of file shader_program.cxx.

References set_uniform().

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

◆ set_material_uniform()

bool cgv::render::shader_program::set_material_uniform ( const context ctx,
const std::string &  name,
const cgv::media::illum::surface_material material,
bool  generate_error = false 
)

set a uniform of type material

Definition at line 597 of file shader_program.cxx.

References set_uniform().

Referenced by cgv::render::context::set_current_material(), cgv::render::context::set_material(), and set_textured_material_uniform().

◆ set_textured_material_uniform()

bool cgv::render::shader_program::set_textured_material_uniform ( const context ctx,
const std::string &  name,
const textured_material material,
bool  generate_error = false 
)

◆ set_uniform() [1/2]

template<typename T >
bool cgv::render::shader_program::set_uniform ( const context ctx,
const std::string &  name,
const T &  value,
bool  generate_error = false 
)
inline

Set the value of a uniform by name, where the type can be any of int, unsigned, float, vec<int>, vec<unsigned>, vec<float>, mat<float> and the vectors are of dimension 2, 3 or 4 and the matrices of dimensions 2, 3 or 4.

Definition at line 139 of file shader_program.h.

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

Referenced by cgv::render::configure_color_scale(), vr::configure_seethrough_shader_program(), vr_test::draw(), cgv::render::gl::image_drawable::draw(), cgv::render::render_info::draw(), cgv::render::arrow_renderer::enable(), cgv::render::box_renderer::enable(), cgv::render::box_wire_renderer::enable(), cgv::render::cone_renderer::enable(), cgv::render::ellipsoid_renderer::enable(), cgv::render::group_renderer::enable(), cgv::render::line_renderer::enable(), cgv::render::normal_renderer::enable(), cgv::render::point_renderer::enable(), cgv::render::rectangle_renderer::enable(), cgv::render::slab_renderer::enable(), cgv::render::sphere_renderer::enable(), cgv::render::spline_tube_renderer::enable(), cgv::render::surfel_renderer::enable(), cgv::render::volume_renderer::enable(), cgv::render::a_buffer::enable(), vr_test::finish_draw(), cgv::render::a_buffer::finish_frame(), cgv::plot::plot3d::init(), cgv::render::a_buffer::init_frame(), cgv::render::clod_point_renderer::reduce_buffer(), cgv::render::clod_point_renderer::reduce_buffer_init(), cgv::render::clod_point_renderer::reduce_chunks(), cgv::render::clod_point_renderer::reduce_points(), cgv::render::gl::gl_context::ref_default_shader_program(), cgv::render::gl::render_to_texture3D(), cgv::render::context::set_current_gamma(), cgv::render::context::set_current_lights(), cgv::render::context::set_current_view(), set_light_uniform(), cgv::render::gl::set_lighting_parameters(), set_material_uniform(), cgv::plot::plot_base::set_plot_uniforms(), and set_textured_material_uniform().

◆ set_uniform() [2/2]

template<typename T >
bool cgv::render::shader_program::set_uniform ( const context ctx,
int  loc,
const T &  value 
)
inline

Set the value of a uniform by name, where the type can be any of int, unsigned, float, vec<int>, vec<unsigned>, vec<float>, mat<float> and the vectors are of dimension 2, 3 or 4 and the matrices of dimensions 2, 3 or 4.

Definition at line 171 of file shader_program.h.

◆ set_uniform_array() [1/4]

template<typename T >
bool cgv::render::shader_program::set_uniform_array ( const context ctx,
const std::string &  name,
const T &  array 
)
inline

set uniform array from array array where number elements can be derived from array through array_descriptor_traits; supported array types include cgv::math::vec and std::vector

Definition at line 149 of file shader_program.h.

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

Referenced by cgv::render::configure_color_scale(), cgv::render::configure_color_scale(), cgv::render::cone_renderer::enable(), cgv::render::gl::set_lighting_parameters(), cgv::plot::plot_base::set_mapping_uniforms(), and cgv::plot::plot_base::set_plot_uniforms().

◆ set_uniform_array() [2/4]

template<typename T >
bool cgv::render::shader_program::set_uniform_array ( const context ctx,
const std::string &  name,
const T *  array,
size_t  nr_elements,
bool  generate_error = false 
)
inline

set uniform array from an array with nr_elements elements of type T pointed to by array

Definition at line 159 of file shader_program.h.

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

◆ set_uniform_array() [3/4]

template<typename T >
bool cgv::render::shader_program::set_uniform_array ( const context ctx,
int  loc,
const T &  array 
)
inline

set uniform array from array array where number elements can be derived from array through array_descriptor_traits; supported array types include cgv::math::vec and std::vector

Definition at line 176 of file shader_program.h.

◆ set_uniform_array() [4/4]

template<typename T >
bool cgv::render::shader_program::set_uniform_array ( const context ctx,
int  loc,
const T *  array,
size_t  nr_elements 
)
inline

set uniform array from an array with nr_elements elements of type T pointed to by array

Definition at line 181 of file shader_program.h.

◆ update_state()

void cgv::render::shader_program::update_state ( const context ctx)
protected

ensure that the state has been set in the context

Definition at line 516 of file shader_program.cxx.

References get_max_nr_geometry_shader_output_vertices().

Referenced by enable(), and link().

Member Data Documentation

◆ files_cache

std::map< std::string, std::vector< std::string > > cgv::render::shader_program::files_cache
staticprotected

Definition at line 32 of file shader_program.h.

◆ linked

bool cgv::render::shader_program::linked
protected

Definition at line 35 of file shader_program.h.

◆ managed_codes

std::vector<shader_code*> cgv::render::shader_program::managed_codes
protected

Definition at line 39 of file shader_program.h.

◆ nr_attached_geometry_shaders

int cgv::render::shader_program::nr_attached_geometry_shaders
protected

Definition at line 37 of file shader_program.h.

◆ program_file_cache

std::map< std::string, std::string > cgv::render::shader_program::program_file_cache
staticprotected

maps used to cache program file contents and valid file names indexed by their respective file name

Definition at line 31 of file shader_program.h.

Referenced by open_program_file().

◆ show_code_errors

bool cgv::render::shader_program::show_code_errors
protected

Definition at line 34 of file shader_program.h.

◆ state_out_of_date

bool cgv::render::shader_program::state_out_of_date
protected

Definition at line 36 of file shader_program.h.


The documentation for this class was generated from the following files: