Ion
|
This type defines a function that is used to combine values for two instances of a registered shader input. More...
#include "shaderinputregistry.h"
Public Types | |
typedef std::function< const T(const T &old_value, const T &new_value)> | Type |
This type defines a function that is used to combine values for two instances of a registered shader input.
During traversal, the ShaderState class manages a stack of values for each shader input. By default, each new value for a shader input just replaces the previous value. This function can be defined to change that behavior. For example, it can be used to maintain a cumulative transformation matrix in a Uniform variable. The function is set in the Spec for a shader input and is NULL by default, meaning that standard value replacement should be used.
The callback is passed a reference to the two shader inputs to combine (old_value and new_value) and should return the resulting combined shader input.
Using a struct since we can't use alias templates (C++11).
Definition at line 111 of file shaderinputregistry.h.
typedef std::function<const T(const T& old_value, const T& new_value)> ion::gfx::ShaderInputRegistry::CombineFunction< T >::Type |
Definition at line 112 of file shaderinputregistry.h.