Commit b5fd8393 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added function to get renderer id from name

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15950 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 330938ab
......@@ -109,6 +109,15 @@ RendererInfo* RenderManager::getRenderer(QString _name) {
return 0;
}
int RenderManager::getRendererId(QString _name) {
for ( unsigned int i = 0 ; i < availableRenderers_.size() ; ++i)
if ( availableRenderers_[i].name == _name)
return i;
return -1;
}
int RenderManager::countRenderers(ACG::SceneGraph::DrawModes::DrawMode _mode) {
int renderers = 0;
......
......@@ -95,6 +95,13 @@ class DLLEXPORT RenderManager {
*/
RendererInfo* newRenderer(QString _name);
/** \brief get renderer id with the given name
*
* @param _name Name of the renderer
* @return Id of the renderer or -1 if it does not exist
*/
int getRendererId(QString _name);
/** \brief get renderer with the given name
*
* @param _name Name of the renderer
......@@ -134,8 +141,8 @@ class DLLEXPORT RenderManager {
/** \brief set the active renderer
*
* @param _id viewer id
* @param _active name of the renderer
* @param _id viewer id
*/
void setActive(QString _active, int _id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment