Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

OpenTissue::cg::Program Class Reference

#include <cg_program.h>

List of all members.

Classes

struct  RecurseParams

Public Types

enum  program_type { vertex_program, fragment_program }
typedef std::map< std::string,
std::string
name_type_map

Public Member Functions

 Program ()
void enable ()
void disable ()
bool load_from_text (program_type type, std::string const &program_text)
bool load_from_file (program_type type, std::string const &filename)
bool is_program_loaded () const
CGprogram get_program_ID ()
name_type_map get_uniforms_map ()
void set_modelview_projection_matrix (std::string const &name="ModelViewProj")
void set_modelview_inverse_transpose (std::string const &name="ModelViewIT")
void set_modelview_inverse_matrix (std::string const &name="ModelViewI")
void set_texture_matrix (std::string const &name="TexMatrix")
void set_float_param (std::string const &name, float const value)
void set_float_param (std::string const &name, float const value0, float const value1)
void set_float_param (std::string const &name, float const value0, float const value1, float const value2)
void set_float_param (std::string const &name, float const value0, float const value1, float const value2, float const value3)
void set_float_array_param (std::string const &name, int const number_of_elements, float const *values)
void set_float3_array_param (std::string const &name, int const number_of_elements, float const *values)
void set_floatNxN_array_param (std::string const &name, int number_of_elements, float const *values)
void enable_client_state (std::string const &name)
void disable_client_state (std::string const &name)
template<typename texture_pointer >
void set_input_texture (std::string const &name, texture_pointer texture)
void set_attribute_pointer (std::string const &name, int size, int type, unsigned int stride, const void *pointer)

Protected Member Functions

template<typename texture_type >
CGparameter get_texture_param (std::string const &name, texture_type const &texture) const
CGparameter get_uniform_param (std::string const &name) const
CGparameter get_attribute_param (std::string const &name) const

Protected Attributes

program_type m_type
CGprogram m_program
CGprofile m_profile
CGcontext m_context
name_type_map m_uniforms
bool m_loaded

Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
vertex_program 
fragment_program 

Constructor & Destructor Documentation

OpenTissue::cg::Program::Program (  )  [inline]

Member Function Documentation

void OpenTissue::cg::Program::disable (  )  [inline]
void OpenTissue::cg::Program::disable_client_state ( std::string const &  name  )  [inline]
void OpenTissue::cg::Program::enable (  )  [inline]
void OpenTissue::cg::Program::enable_client_state ( std::string const &  name  )  [inline]
CGparameter OpenTissue::cg::Program::get_attribute_param ( std::string const &  name  )  const [inline, protected]
CGprogram OpenTissue::cg::Program::get_program_ID (  )  [inline]
template<typename texture_type >
CGparameter OpenTissue::cg::Program::get_texture_param ( std::string const &  name,
texture_type const &  texture 
) const [inline, protected]
CGparameter OpenTissue::cg::Program::get_uniform_param ( std::string const &  name  )  const [inline, protected]
name_type_map OpenTissue::cg::Program::get_uniforms_map (  )  [inline]
bool OpenTissue::cg::Program::is_program_loaded (  )  const [inline]
bool OpenTissue::cg::Program::load_from_file ( program_type  type,
std::string const &  filename 
) [inline]
bool OpenTissue::cg::Program::load_from_text ( program_type  type,
std::string const &  program_text 
) [inline]
void OpenTissue::cg::Program::set_attribute_pointer ( std::string const &  name,
int  size,
int  type,
unsigned int  stride,
const void *  pointer 
) [inline]
void OpenTissue::cg::Program::set_float3_array_param ( std::string const &  name,
int const   number_of_elements,
float const *  values 
) [inline]
void OpenTissue::cg::Program::set_float_array_param ( std::string const &  name,
int const   number_of_elements,
float const *  values 
) [inline]
void OpenTissue::cg::Program::set_float_param ( std::string const &  name,
float const   value0,
float const   value1 
) [inline]
void OpenTissue::cg::Program::set_float_param ( std::string const &  name,
float const   value0,
float const   value1,
float const   value2 
) [inline]
void OpenTissue::cg::Program::set_float_param ( std::string const &  name,
float const   value0,
float const   value1,
float const   value2,
float const   value3 
) [inline]
void OpenTissue::cg::Program::set_float_param ( std::string const &  name,
float const   value 
) [inline]
void OpenTissue::cg::Program::set_floatNxN_array_param ( std::string const &  name,
int  number_of_elements,
float const *  values 
) [inline]
template<typename texture_pointer >
void OpenTissue::cg::Program::set_input_texture ( std::string const &  name,
texture_pointer  texture 
) [inline]
void OpenTissue::cg::Program::set_modelview_inverse_matrix ( std::string const &  name = "ModelViewI"  )  [inline]
void OpenTissue::cg::Program::set_modelview_inverse_transpose ( std::string const &  name = "ModelViewIT"  )  [inline]
void OpenTissue::cg::Program::set_modelview_projection_matrix ( std::string const &  name = "ModelViewProj"  )  [inline]
void OpenTissue::cg::Program::set_texture_matrix ( std::string const &  name = "TexMatrix"  )  [inline]

Member Data Documentation

CGcontext OpenTissue::cg::Program::m_context [protected]
CGprofile OpenTissue::cg::Program::m_profile [protected]
CGprogram OpenTissue::cg::Program::m_program [protected]

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