#include <cg_program.h>
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 |
typedef std::map<std::string, std::string> OpenTissue::cg::Program::name_type_map |
OpenTissue::cg::Program::Program | ( | ) | [inline] |
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] |
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] |
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] |
CGcontext OpenTissue::cg::Program::m_context [protected] |
bool OpenTissue::cg::Program::m_loaded [protected] |
CGprofile OpenTissue::cg::Program::m_profile [protected] |
CGprogram OpenTissue::cg::Program::m_program [protected] |
program_type OpenTissue::cg::Program::m_type [protected] |
name_type_map OpenTissue::cg::Program::m_uniforms [protected] |