Commit fdbb2fbf authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - now there is a getViewer() which (similar to getScene) returns the default viewer

parent 301aec7e
......@@ -177,6 +177,12 @@ boost::shared_ptr< WGEViewer > WGraphicsEngine::getViewerByName( std::string nam
return out;
}
boost::shared_ptr< WGEViewer > WGraphicsEngine::getViewer()
{
boost::mutex::scoped_lock lock( m_viewersLock );
return m_viewers[ "main" ];
}
void WGraphicsEngine::threadMain()
{
WLogger::getLogger()->addLogMessage( "Starting Graphics Engine", "GE", LL_INFO );
......
......@@ -139,6 +139,13 @@ public:
*/
boost::shared_ptr< WGEViewer > getViewerByName( std::string name );
/**
* Returns the unnamed view, which is the view for the default scene which can be acquired using getScene().
*
* \return the viewer for the default scene.
*/
boost::shared_ptr< WGEViewer > getViewer();
/**
* Returns the currently selected default font usable in osgText nodes.
*
......
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