RenderProcessor Class Reference
The base class for all processor classes that render to RenderPorts. More...
#include <renderprocessor.h>
Public Member Functions | |
| virtual void | invalidate (int inv=INVALID_RESULT) |
| In addition to the invalidations performed by the Processor base class, the results of all RenderPort outports are invalidated. | |
| virtual void | sizeOriginChanged (RenderPort *p) |
| Notifies the Processor of a changed SizeOrigin on port p. | |
| virtual void | portResized (RenderPort *p, tgt::ivec2 newsize) |
| Requests a resize of RenderPort p to newsize. | |
| virtual bool | testSizeOrigin (const RenderPort *p, void *so) const |
| Test if a textureContainerChanged on port p with so would result in a conflict. | |
| const std::vector< RenderPort * > & | getPrivateRenderPorts () const |
| Returns the registered private render ports of this processor. | |
Protected Member Functions | |
| virtual void | process ()=0 |
| This method is called when the processor should be processed. | |
| virtual void | initialize () throw (VoreenException) |
| Initializes all private RenderPorts. | |
| virtual void | deinitialize () throw (VoreenException) |
| Deinitializes all private RenderPorts. | |
| virtual void | beforeProcess () |
| Calls adjustRenderOutportDimensions(). | |
| virtual void | adjustRenderOutportDimensions () |
| Adjusts the dimensions of all render outports to the size of the largest render outport (if the outports have no size origin assigned). | |
| void | manageRenderTargets () |
| Allocate or deallocate RenderTargets in outports. | |
| void | addPrivateRenderPort (RenderPort *port) |
| void | addPrivateRenderPort (RenderPort &port) |
| void | renderQuad () |
| Renders a screen aligned quad. | |
| virtual std::string | generateHeader () |
| This generates the header that will be used at the beginning of the shaders. | |
| virtual void | setGlobalShaderParameters (tgt::Shader *shader, tgt::Camera *camera=0, tgt::ivec2 screenDim=tgt::ivec2(-1)) |
| Sets some uniforms potentially needed by every shader. | |
Protected Attributes | |
| bool | portResizeVisited_ |
| used for cycle prevention during render port size propagation | |
Static Protected Attributes | |
| static const std::string | loggerCat_ |
| category used in logging | |
Detailed Description
The base class for all processor classes that render to RenderPorts.
Definition at line 46 of file renderprocessor.h.
Member Function Documentation
| void addPrivateRenderPort | ( | RenderPort * | port | ) | [protected] |
- Todo:
- documentation
Definition at line 277 of file renderprocessor.cpp.
| void beforeProcess | ( | ) | [protected, virtual] |
Calls adjustRenderOutportDimensions().
- See also:
- Processor::beforeProcess
Reimplemented from Processor.
Reimplemented in ImageSource, MeshEntryExitPoints, ExplosionProxyGeometry, and RaytracingEntryExitPoints.
Definition at line 166 of file renderprocessor.cpp.
| std::string generateHeader | ( | ) | [protected, virtual] |
This generates the header that will be used at the beginning of the shaders.
It includes the necessary defines that are to be used with the shaders.
- Note:
- If you overwrite this function in a subclass, you have to the call the superclass' function first and append your additions to its result!
Reimplemented in GeometryProcessor, Compositor, ExplosionCompositor, ImageOverlay, NonMinMaxSuppression, HalfAngleSlicer, SingleVolumeSlicer, and ConnectedComponents2D.
Definition at line 354 of file renderprocessor.cpp.
| const std::vector< RenderPort * > & getPrivateRenderPorts | ( | ) | const |
Returns the registered private render ports of this processor.
- See also:
- addPrivateRenderPort
Definition at line 404 of file renderprocessor.cpp.
| void invalidate | ( | int | inv = INVALID_RESULT |
) | [virtual] |
In addition to the invalidations performed by the Processor base class, the results of all RenderPort outports are invalidated.
- See also:
- Processor::invalidate
Reimplemented from Processor.
Reimplemented in CanvasRenderer, VolumeRaycaster, ImageSequenceSource, ImageSource, ClippingPlaneWidget, SlicePositionRenderer, QuadView, ImageSelector, and ImageSequenceLoopInitiator.
Definition at line 79 of file renderprocessor.cpp.
| void portResized | ( | RenderPort * | p, | |
| tgt::ivec2 | newsize | |||
| ) | [virtual] |
Requests a resize of RenderPort p to newsize.
This default implementation resizes all (render-) outports and private ports to newsize and requests a resize on all (render-) inports.
viewportChanged(newsize) is called on all CameraProperties and the Processor is invalidated.
- Parameters:
-
p The RenderPort to resize. (Not automatically resized to allow interaction coarseness) newsize The requested size.
Reimplemented in VolumeRaycaster, Gabor, QuadView, MultiScale, RenderStore, and SingleScale.
Definition at line 230 of file renderprocessor.cpp.
| void setGlobalShaderParameters | ( | tgt::Shader * | shader, | |
| tgt::Camera * | camera = 0, |
|||
| tgt::ivec2 | screenDim = tgt::ivec2(-1) | |||
| ) | [protected, virtual] |
Sets some uniforms potentially needed by every shader.
- Note:
- This function should be called for every shader before every rendering pass!
- Parameters:
-
shader the shader to set up camera camera whose position is passed to uniform cameraPosition_, also needed for passing matrices screenDim dimensions of the render target's viewport. Is no parameter is passed, the dimensions of the first outport is chosen.
Definition at line 317 of file renderprocessor.cpp.
| void sizeOriginChanged | ( | RenderPort * | p | ) | [virtual] |
Notifies the Processor of a changed SizeOrigin on port p.
This default implementation notifies all (render-) inports of this change.
If p has a NULL sizeOrigin this is only propagated if all outports have a NULL sizeOrigin.
Reimplemented in QuadView, RenderStore, and SingleScale.
Definition at line 97 of file renderprocessor.cpp.