#include <CgOperation.h>
Inheritance diagram for OpenGL::CgOperation:
Public Member Functions | |
CgOperation (unsigned int computationWidth, unsigned int computationHeight, CgProgram *interior, CgProgram *boundary=0, bool normalizedTexCoords=false) | |
void | compute (bool rtt=true) |
void | setOutputTexture (unsigned int texture) |
void | setOutputTexture (unsigned int texture, unsigned int outputWidth, unsigned int outputHeight) |
Protected Member Functions | |
bool | hasBoundaryProgram () const |
unsigned int | getComputationWidth () const |
unsigned int | getComputationHeight () const |
bool | hasNormalizedTexCoords () const |
Private Member Functions | |
virtual void | executeInteriorProgram ()=0 |
virtual void | executeBoundaryProgram ()=0 |
|
Base constructor.
|
|
Performs one computation by executing the interior and boundary CgProgram instances. Before the computation is performed the viewport is set according to the computation width and height.
|
|
Implementation of boundary CgProgram execution, must be supplied by concrete subclasses. Execution is initiated by drawing geometries. Implemented in OpenGL::Flat3dTextureOperation, and OpenGL::Texture2dOperation. |
|
Implementation of interior CgProgram execution, must be supplied by concrete subclasses. Execution is initiated by drawing geometries. Implemented in OpenGL::Flat3dTextureOperation, and OpenGL::Texture2dOperation. |
|
Returns the computation height.
|
|
Returns the computation width.
|
|
Returns whether the CgOperation instance has a boundary CgProgram;
|
|
Returns whether the CgOperation instance uses normalized texture coordinates.
|
|
Sets the output texture used as render target when compute() is called. This function should be used if the output texture dimensions differ from the computation width and height. The texture identifier must be valid in the IoTextureSet instance used by the interior and boundary CgProgram instances.
|
|
Sets the output texture used as render target when compute() is called. The texture identifier must be valid in the IoTextureSet instance used by the interior and boundary CgProgram instances.
|