| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/opengl/cubeenvmirrortechniquegl.h>

Public Member Functions | |
| CubeEnvMirrorTechniqueGL (int textureResolution=256, TextureGL::FilterMode filter=TextureGL::LINEAR) | |
| ~CubeEnvMirrorTechniqueGL () | |
| void | setTextureResolution (int) |
| int | getTextureResolution () const |
| Gets the resolution of the texture map. | |
| void | setFilter (TextureGL::FilterMode) |
| TextureGL::FilterMode | getFilter () const |
| virtual void | start (Engine *) |
| virtual void | stop (Engine *) |
| virtual bool | preparePass (Engine *) |
| virtual void | finishPass (Engine *) |
| virtual void | nextPass (Engine *) |
| virtual bool | prepareEval (Engine *engine, const Shape *shape) |
| virtual void | finishEval (Engine *engine, const Shape *shape) |
| virtual bool | canBeUsed (Engine *engine) const |
| VRS_TYPEINFO (CubeEnvMirrorTechniqueGL, TechniqueGL) | |
| VRS_SERIALIZABLE (CubeEnvMirrorTechniqueGL) | |
Classes | |
| struct | CubeMapInfo |
| VRS::CubeEnvMirrorTechniqueGL::CubeEnvMirrorTechniqueGL | ( | int | textureResolution = 256, |
|
| TextureGL::FilterMode | filter = TextureGL::LINEAR | |||
| ) |
OpenGL-Technique for evaluating CubeEnvMirror and matching Mirrored attributes. Needs hardware with support for cube-environment-mapping, and a p-buffer, which is created with a resolution of textureResolution and the given filter mode. Linear filtering gives a more ray-trace like view, Mipmap blures the texture somewhat, which may or may not look better. (Mipmap will be a bit slower, though (but only about 5%). This technique also implements perturbing the reflection due to a bumpmap eventually stored in a CubeEnvMirror attribute, in case also ARB vertex and fragment programs or the NV_texture_shader extension must be available on the hardware. If those extensions are missing, the reflection will be anyway rendered without perturbation due to the bumpmap.
| VRS::CubeEnvMirrorTechniqueGL::~CubeEnvMirrorTechniqueGL | ( | ) |
| void VRS::CubeEnvMirrorTechniqueGL::setTextureResolution | ( | int | ) |
Sets the resolution of the p-buffer resp. the texture map, which is the base of the cube environment map.
| int VRS::CubeEnvMirrorTechniqueGL::getTextureResolution | ( | ) | const |
Gets the resolution of the texture map.
| void VRS::CubeEnvMirrorTechniqueGL::setFilter | ( | TextureGL::FilterMode | ) |
Sets the filtering of the texture that is generated to contain the mirrored image.
| TextureGL::FilterMode VRS::CubeEnvMirrorTechniqueGL::getFilter | ( | ) | const |
Gets the filtering of the texture that is generated to contain the mirrored image.
| virtual void VRS::CubeEnvMirrorTechniqueGL::start | ( | Engine * | ) | [virtual] |
Starts a technique. For all techniques in the scene graph, this method is called at the end of the pretraversal. The default behaviour is to add all passes in the pass array to the current TechniqueProcessor. If this is expected, subclasses should call "Technique::class()".
Reimplemented from VRS::Technique.
| virtual void VRS::CubeEnvMirrorTechniqueGL::stop | ( | Engine * | ) | [virtual] |
Stops a technique. For all techniques in the scene graph, this method is called in the method "stop()" of the TechniqueProcessor.
Reimplemented from VRS::Technique.
| virtual bool VRS::CubeEnvMirrorTechniqueGL::preparePass | ( | Engine * | ) | [virtual] |
For an active technique, this method is invoked before the traversal of the scene graph in a rendering pass. Settings of the low-level rendering system valid for the whole rendering pass should be made here. "preparePass()" can return false, which indicates that the technique does not need to evaluate the scene graph. However, if at least one of the active techniques returns true, the scene graph is evaluated.
Implements VRS::Technique.
| virtual void VRS::CubeEnvMirrorTechniqueGL::finishPass | ( | Engine * | ) | [virtual] |
For an active technique, this method is invoked after the traversal of the scene graph. The changes made in "preparePass()" should be undone here
Implements VRS::Technique.
| virtual void VRS::CubeEnvMirrorTechniqueGL::nextPass | ( | Engine * | ) | [virtual] |
For an active technique, this method is also invoked after the traversal of the scene graph. If a technique decides that it needs to redo a rendering pass, it can tell the TechniqueProcessor here, using "addPass()"
Reimplemented from VRS::Technique.
| virtual bool VRS::CubeEnvMirrorTechniqueGL::prepareEval | ( | Engine * | engine, | |
| const Shape * | shape | |||
| ) | [virtual] |
For an active Technique, this method is invoked before the evaluation of a shape. Settings of the low-level rendering system only needed for certain shapes (usually indicated by special attributes) should be applied here. "prepareEval()" can forbid the evaluation of a shape by returning false. In this case, even when all other active techniques return true, the shape is not evaluated.
Implements VRS::Technique.
| virtual void VRS::CubeEnvMirrorTechniqueGL::finishEval | ( | Engine * | engine, | |
| const Shape * | shape | |||
| ) | [virtual] |
For an active Technique, this method is invoked after the evaluation of a shape (also when shape evaluation was forbidden in "prepareEval()"). Changes made in "prepareEval()" should be undone here.
Implements VRS::Technique.
| virtual bool VRS::CubeEnvMirrorTechniqueGL::canBeUsed | ( | Engine * | ) | const [virtual] |
May check for extensions of the low rendering system which would be necessary for the technique to run.
Reimplemented from VRS::Technique.
| VRS::CubeEnvMirrorTechniqueGL::VRS_TYPEINFO | ( | CubeEnvMirrorTechniqueGL | , | |
| TechniqueGL | ||||
| ) |
| VRS::CubeEnvMirrorTechniqueGL::VRS_SERIALIZABLE | ( | CubeEnvMirrorTechniqueGL | ) |