Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Vitual class used as a callback to update the state of the projection, view and transform matrices of a GLSLProgram or fixed function pipeline.
More...
#include <Renderer.hpp>
Public Member Functions | |
| virtual void | programFirstUse (const Renderer *caller, const GLSLProgram *glsl, const Transform *transform, const Camera *camera, bool first_overall)=0 |
| This function is called whenever a new GLSLProgram (or the NULL one, i.e. | |
| virtual void | programTransfChange (const Renderer *caller, const GLSLProgram *glsl, const Transform *transform, const Camera *camera)=0 |
| This function is called whenever the Transform changes with respect to the current GLSLProgram (including the NULL one, i.e. | |
Vitual class used as a callback to update the state of the projection, view and transform matrices of a GLSLProgram or fixed function pipeline.
| virtual void vl::ProjViewTranfCallback::programFirstUse | ( | const Renderer * | caller, |
| const GLSLProgram * | glsl, | ||
| const Transform * | transform, | ||
| const Camera * | camera, | ||
| bool | first_overall | ||
| ) | [pure virtual] |
This function is called whenever a new GLSLProgram (or the NULL one, i.e.
the fixed function pipeline) is being activated for the first time in the current rendering. This callback is most useful to initialize the GLSLProgram with the current projection and view matrices, besides the current Actor's transform.
| caller | The Renderer object calling this function. |
| glsl | The GLSLProgram being activated. If NULL the fixed function pipeline is being activated. |
| transform | The transform of the current Actor being rendered. |
| camera | The Camera used for the rendering from which you can retrieve the projection and view matrices. |
| first_overall | If true it means that the rendering has just started. Useful if you want to initialized your callback object. |
Implemented in vl::ProjViewTranfCallbackStandard.
| virtual void vl::ProjViewTranfCallback::programTransfChange | ( | const Renderer * | caller, |
| const GLSLProgram * | glsl, | ||
| const Transform * | transform, | ||
| const Camera * | camera | ||
| ) | [pure virtual] |
This function is called whenever the Transform changes with respect to the current GLSLProgram (including the NULL one, i.e.
the fixed function pipeline). This callback is most useful to update the GLSLProgram with the current Actor's transform matrix.
| caller | The Renderer object calling this function. |
| glsl | The GLSLProgram being activated. If NULL the fixed function pipeline is being activated. |
| transform | The transform of the current Actor being rendered. |
| camera | The Camera used for the rendering from which you can retrieve the projection and view matrices. |
Implemented in vl::ProjViewTranfCallbackStandard.