FastUIDraw
|
A varying_list lists all the in's of a frag shader (and their names) which is the same as the out's of the vertex shader which which it is paired. More...
#include <varying_list.hpp>
Public Types | |
enum | interpolator_type_t { interpolator_smooth, interpolator_noperspective, interpolator_flat, interpolator_uint, interpolator_int, interpolator_number_types } |
Enumeration to define the interpolator type of a varying. More... | |
Public Member Functions | |
varying_list (void) | |
varying_list (const varying_list &rhs) | |
varying_list & | add_float (c_string pname) |
varying_list & | add_float_flat (c_string pname) |
varying_list & | add_float_noperspective (c_string pname) |
varying_list & | add_int (c_string pname) |
varying_list & | add_uint (c_string pname) |
varying_list & | add_varying (c_string pname, enum interpolator_type_t q) |
varying_list & | add_varying_alias (c_string name, c_string src_name) |
c_array< const c_string > | alias_varying_names (void) const |
c_array< const c_string > | alias_varying_source_names (void) const |
varying_list & | operator= (const varying_list &rhs) |
void | swap (varying_list &obj) |
c_array< const c_string > | varyings (enum interpolator_type_t q) const |
A varying_list lists all the in's of a frag shader (and their names) which is the same as the out's of the vertex shader which which it is paired.
A varying is ALWAYS a SCALAR. The varyings of shaders should -never- be declared in the shader code. Instead, each varying should be declared in the varying_list object passed to the shader object's ctor. The GLSL module will share the varyings across different shaders within the uber-shader. Indeed, the number of varying the uber-shader has is not the sum of the varyings across all the shaders, but rather is the maximum number of varyings across the shaders present in the uber-shader.
Definition at line 50 of file varying_list.hpp.
Enumeration to define the interpolator type of a varying.
Definition at line 57 of file varying_list.hpp.
fastuidraw::glsl::varying_list::varying_list | ( | void | ) |
Ctor.
fastuidraw::glsl::varying_list::varying_list | ( | const varying_list & | rhs | ) |
Copy ctor.
rhs | value from which to copy |
|
inline |
Add an uint varying, equivalent to
Definition at line 158 of file varying_list.hpp.
|
inline |
Add an uint varying, equivalent to
Definition at line 170 of file varying_list.hpp.
|
inline |
Add an uint varying, equivalent to
Definition at line 182 of file varying_list.hpp.
|
inline |
Add an uint varying, equivalent to
Definition at line 146 of file varying_list.hpp.
|
inline |
Add an uint varying, equivalent to
Definition at line 134 of file varying_list.hpp.
varying_list& fastuidraw::glsl::varying_list::add_varying | ( | c_string | pname, |
enum interpolator_type_t | q | ||
) |
Add a varying
pname | name by which to reference the varying |
q | interpolator type of the varying |
varying_list& fastuidraw::glsl::varying_list::add_varying_alias | ( | c_string | name, |
c_string | src_name | ||
) |
Add an alias to a varying. The use case being if a fixed varying is used in two different roles and aliasing the name makes the GLSL shader code more readable.
name | the new identifier to reference an existing varying |
src_name | the varying referenced by name, which should be a string value that has been passed as the first argument to add_varying() or add_varying_alias(). |
Returns the alias names of the aliases, i.e. the values of the first argument of calls to add_varying_alias().
Returns the source names of the aliases, i.e. the values of the second argument of calls to add_varying_alias().
varying_list& fastuidraw::glsl::varying_list::operator= | ( | const varying_list & | rhs | ) |
Assignment operator.
rhs | value from which to copy |
void fastuidraw::glsl::varying_list::swap | ( | varying_list & | obj | ) |
Swap operation
obj | object with which to swap |
c_array<const c_string> fastuidraw::glsl::varying_list::varyings | ( | enum interpolator_type_t | q | ) | const |
Returns the names of the varyings of the specified interpolator type.
q | interpolator type |