|
cgv
|
structure to store information on a shader program variable, i.e. More...
#include <context.h>
Public Member Functions | |
| void | compute_sizes (size_t &cnt, size_t &s, size_t &S) const |
| helper member function to compute counts and sizes | |
Public Attributes | |
| std::string | name |
| name as it appears in shaders | |
| cgv::render::type_descriptor | type_descr |
| type descriptor providing information on component and compositions (scalar, vector or matrix) | |
| unsigned | array_size = 0 |
| dimension of arrays | |
| int | program_location |
| location in program, but not for array variables which span multiple locations | |
| std::vector< char > | current_value |
| data storage for the value of the program variable | |
Friends | |
| CGV_API std::ostream & | operator<< (std::ostream &os, const program_variable_info &V) |
| operator to stream out program variable info in text format | |
structure to store information on a shader program variable, i.e.
a uniform or attribute
| void cgv::render::program_variable_info::compute_sizes | ( | size_t & | cnt, |
| size_t & | s, | ||
| size_t & | S | ||
| ) | const |
helper member function to compute counts and sizes
| cnt | reference to variable retrieving component count |
| s | reference to variable retrieving array element size in bytes |
| S | reference to variable retrieving total array size in bytes |
Definition at line 61 of file context.cxx.
References array_size, cgv::type::info::get_type_size(), cgv::type::info::TI_BOOL, and type_descr.
|
friend |
operator to stream out program variable info in text format
Definition at line 76 of file context.cxx.
| unsigned cgv::render::program_variable_info::array_size = 0 |
| std::vector<char> cgv::render::program_variable_info::current_value |
| std::string cgv::render::program_variable_info::name |
| int cgv::render::program_variable_info::program_location |
| cgv::render::type_descriptor cgv::render::program_variable_info::type_descr |
type descriptor providing information on component and compositions (scalar, vector or matrix)
Definition at line 100 of file context.h.
Referenced by compute_sizes().