|
gramods
|
Encapsulated OpenGL code for executing a specified fragment shader on every raster point in the current render target. More...
#include <RasterProcessor.hh>
Classes | |
| struct | Impl |
Public Member Functions | |
| void | setVertexCode (std::string code) |
| Set the vertex shader code to run in the raster processor. More... | |
| void | setFragmentCode (std::string code) |
| Set the fragment shader code to run in the raster processor. More... | |
| bool | init () |
| Initialize the raster processor. More... | |
| void | run () |
| Execute the raster processor on the current render target. More... | |
| GLuint | getProgramId () |
| Returns the program id. More... | |
Encapsulated OpenGL code for executing a specified fragment shader on every raster point in the current render target.
| GLuint gramods::gmGraphics::RasterProcessor::getProgramId | ( | ) |
Returns the program id.
The raster processor must be initialized. Otherwise this method will return zero.
| bool gramods::gmGraphics::RasterProcessor::init | ( | ) |
Initialize the raster processor.
| void gramods::gmGraphics::RasterProcessor::run | ( | ) |
Execute the raster processor on the current render target.
| void gramods::gmGraphics::RasterProcessor::setFragmentCode | ( | std::string | code | ) |
Set the fragment shader code to run in the raster processor.
This must be called before init. This must be set.
| void gramods::gmGraphics::RasterProcessor::setVertexCode | ( | std::string | code | ) |
Set the vertex shader code to run in the raster processor.
This must be called before init. The default code will set gl_Position to (x y 0 1) where x and y are in the range -1 to 1.