FastUIDraw
|
If one wishes to make use of other PainterItemCoverageShaderGLSL fastuidraw_gl_vert_main()/fastuidraw_gl_frag_main() of other shaders (for example to have a simple shader that adds on to a previous shader), a DependencyList provides the means to do so. More...
#include <painter_item_shader_glsl.hpp>
Public Member Functions | |
DependencyList (void) | |
DependencyList (const DependencyList &obj) | |
DependencyList & | add_shader (c_string name, const reference_counted_ptr< const PainterItemCoverageShaderGLSL > &shader) |
DependencyList & | operator= (const DependencyList &rhs) |
void | swap (DependencyList &obj) |
Friends | |
class | PainterItemCoverageShaderGLSL |
If one wishes to make use of other PainterItemCoverageShaderGLSL fastuidraw_gl_vert_main()/fastuidraw_gl_frag_main() of other shaders (for example to have a simple shader that adds on to a previous shader), a DependencyList provides the means to do so.
Each such used shader is given a name by which the caller will use it. In addition, the caller has access to the varyings and shared symbols of the callee as well. A varying or shareable V of an element in the DependencyList is accessed from the parent shader with dep::V where dep is the argument value of name to add_shader(). Note that it is accessed with the scope-resolution operator; the uber-shader assember will convert the scope-resolution operator into acceptable GLSL code.
By using the values of the shareables (embodied in fields symbol_list::m_vert_shareable_values and symbol_list::m_frag_shareable_values), reading and potentially modifying the values of the varyings, one can create effects building off of the built-in shaders of the GLSL module.
Definition at line 123 of file painter_item_shader_glsl.hpp.
fastuidraw::glsl::PainterItemCoverageShaderGLSL::DependencyList::DependencyList | ( | void | ) |
Ctor.
fastuidraw::glsl::PainterItemCoverageShaderGLSL::DependencyList::DependencyList | ( | const DependencyList & | obj | ) |
Copy ctor.
obj | value from which to copy |
DependencyList& fastuidraw::glsl::PainterItemCoverageShaderGLSL::DependencyList::add_shader | ( | c_string | name, |
const reference_counted_ptr< const PainterItemCoverageShaderGLSL > & | shader | ||
) |
Add a shader to the DependencyList's list.
name | name by which to call the shader |
shader | shader to add to this DependencyList |
DependencyList& fastuidraw::glsl::PainterItemCoverageShaderGLSL::DependencyList::operator= | ( | const DependencyList & | rhs | ) |
Assignment operator
rhs | value from which to copy |
void fastuidraw::glsl::PainterItemCoverageShaderGLSL::DependencyList::swap | ( | DependencyList & | obj | ) |
Swap operation
obj | object with which to swap |