Developer Documentation
|
Interface to add additional rendering functions from within plugins. More...
#include <OpenFlipper/BasePlugin/RenderInterface.hh>
Public Slots | |
virtual void | render (ACG::GLState *_glState, Viewer::ViewerProperties &_properties) |
rendering function More... | |
Public Member Functions | |
virtual | ~RenderInterface () |
Destructor. | |
virtual QAction * | optionsAction () |
Return options menu. More... | |
virtual QString | renderObjectsInfo (bool _outputShaderInfo) |
Return a qstring of the current render objects. More... | |
virtual void | reloadShaders () |
Reload any renderer specific shaders. More... | |
Private Slots | |
virtual void | supportedDrawModes (ACG::SceneGraph::DrawModes::DrawMode &_mode)=0 |
announce required draw modes More... | |
virtual QString | rendererName ()=0 |
announce name for the rendering function More... | |
virtual QString | checkOpenGL ()=0 |
Check OpenGL capabilities. More... | |
Interface to add additional rendering functions from within plugins.
Detailed description
Interface for adding and controlling rendering functions from a plugin.
Definition at line 70 of file RenderInterface.hh.
|
privatepure virtualslot |
Check OpenGL capabilities.
This function has to be implemented and checks, if all required OpenGL extensions are available. If this is not the case, the plugin will be refused by the core to avoid crashes due to insufficient OpenGL support.
You can get the version information in the following way:
|
inlinevirtual |
Return options menu.
If you want an options Menu or menu entry, you can return your action here. It will be shown on top of the renderer list in the options menu.
Reimplemented in DepthPeeling, ToonRenderer, and RenderPickingPlugin.
Definition at line 152 of file RenderInterface.hh.
|
inlinevirtual |
Reload any renderer specific shaders.
This function allows the plugin to reload any renderer specific shaders.
Definition at line 172 of file RenderInterface.hh.
|
inlinevirtualslot |
rendering function
Implement this function to render the scene. You have to traverse the scenegraph in this function. The glContext is made current before this call. If you need to initialize something,you can do it within this function. gl and glew are already setUp here.
Definition at line 142 of file RenderInterface.hh.
|
privatepure virtualslot |
announce name for the rendering function
|
inlinevirtual |
Return a qstring of the current render objects.
In this function your plugin should return a list of the render objects (possibly with additional information). It can be used for debugging purposes.
The IRenderer class already has a function called dumpCurrentRenderObjectsToString() which can be used to implement this function.
_outputShaderInfo | Output shader code along with the render objects |
Reimplemented in DepthPeeling, Renderer, ToonRenderer, and NormalRenderer.
Definition at line 165 of file RenderInterface.hh.
|
privatepure virtualslot |
announce required draw modes
This function is called by the core to get a list of draw modes that are supported by this renderer. If such a draw mode is set and the currently active renderer does not support the given mode, the core will switch to this renderer automatically. If there are multiple renderers capable of rendering the drawmode(s), the core will ask the user for its preference.
_mode | Combined list of drawmodes |