gloperate
gloperate copied to clipboard
Generic function wrapper stage
Add a Stage that wraps a given function of the form OutputType(InputType)
. This would reduce the boilerplate code required to write simple stages with one input and one output (generically named "input" and "output").:
// processing function
GLuint limitMSAA(GLuint numMultisamples);
// Stage declaration
using LimitMSAAStage = FunctionStage<GLuint, GLuint, limitMSAA>;
// Alternative declaration of a creator function with Input/Output type deduction
static const auto limitMSAAStage = stageCreator(limitMSAA);
Could be extended/overloaded for functions with 2, 3, 4 inputs.
(Already have some code for this)
A semantically near feature extension would include scripted functions so that the actual functionality can be added, changed, and extended in the pipeline editor.