The PostProcessor Interface can be used to add additional image post processing functions to OpenFlipper. For example you get the rendered image in the usual buffers. Afterwards you can add a post processor doing for example edge detection or taking the depth image from the buffer and render it to the main image.
Example Code for functions:
_input[0]->bindColorTex(0);
_output.bind();
static void draw(GLSL::Program *_prog=0)
Draw the screen quad.
static ShaderCache * getInstance()
Return instance of the ShaderCache singleton.
GLSL::Program * getProgram(const ShaderGenDesc *_desc, const std::vector< unsigned int > &_mods)
Query a dynamically generated program from cache.
void use()
Enables the program object for using.
void setUniform(const char *_name, GLint _value)
Set int uniform to specified value.
To use the PostProcessorInterface:
-
include PostProcessorInterface.hh in your plugins header file
-
derive your plugin from the class PostProcessorInterface
-
add Q_INTERFACES(PostProcessorInterface) to your plugin class
-
And add the signals or slots you want to use to your plugin class (You don't need to implement all of them)