gramods
Classes | Public Member Functions | List of all members
gramods::gmGraphics::RasterProcessor Class Reference

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...
 

Detailed Description

Encapsulated OpenGL code for executing a specified fragment shader on every raster point in the current render target.

Member Function Documentation

◆ getProgramId()

GLuint gramods::gmGraphics::RasterProcessor::getProgramId ( )

Returns the program id.

The raster processor must be initialized. Otherwise this method will return zero.

◆ init()

bool gramods::gmGraphics::RasterProcessor::init ( )

Initialize the raster processor.

◆ run()

void gramods::gmGraphics::RasterProcessor::run ( )

Execute the raster processor on the current render target.

◆ setFragmentCode()

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.

◆ setVertexCode()

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.


The documentation for this class was generated from the following files: