Commit 6b563bcf authored by Jan Möbius's avatar Jan Möbius

Fixed SceneGraph multipass and single pass rendering.

Previously the standard enter and leave functions had been active for picking too,
resulting in picking failiures when e.g. Blending was active.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8857 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f7b89e44
......@@ -474,23 +474,9 @@ bool scenegraphRegionPick( const unsigned int _examiner,
void traverse( ACG::SceneGraph::MouseEventAction &_action ) {
// Single pass action, as the mouse action will only update the graph.
// If its changed, it will be set to dirty and an automatic redraw is triggered.
ACG::SceneGraph::traverse(sceneGraphRootNode_, _action,viewerProperties().glState() );
ACG::SceneGraph::traverse(sceneGraphRootNode_, _action );
}
//Warning : Dont use template function as external static pointer for examiner widget is not resolved correctly!!
void traverse( const unsigned int _examiner, ACG::SceneGraph::MouseEventAction &_action ) {
if ( _examiner >= examiner_widgets_.size() ) {
std::cerr << "Wrong examiner id" << std::endl;
return;
}
// Single pass action, as the mouse action will only update the graph.
// If its changed, it will be set to dirty and an automatic redraw is triggered.
ACG::SceneGraph::traverse(sceneGraphRootNode_, _action,viewerProperties(_examiner).glState() );
}
const std::string pickMode () {
// No seperate draw modes available all should have the same so take first
return viewerProperties().pickMode();
......
......@@ -264,8 +264,6 @@ bool scenegraphRegionPick( const unsigned int _examiner,
DLLEXPORT
void traverse( ACG::SceneGraph::MouseEventAction &_action );
/// Execute Scenegraph traversal with action and a specified examiner
void traverse( const unsigned int _examiner, ACG::SceneGraph::MouseEventAction &_action );
/// Get the current Picking mode
DLLEXPORT
......
......@@ -604,12 +604,12 @@ void glViewer::drawScene_mono()
}
}
ACG::SceneGraph::DrawAction action( properties_.drawMode() , false);
ACG::SceneGraph::DrawAction action( properties_.drawMode(), *glstate_ , false);
ACG::SceneGraph::traverse_multipass(sceneGraphRoot_, action, *glstate_, properties_.drawMode() );
if( blending_ )
{
ACG::SceneGraph::DrawAction action(properties_.drawMode(), true);
ACG::SceneGraph::DrawAction action(properties_.drawMode(), *glstate_, true);
ACG::SceneGraph::traverse_multipass(sceneGraphRoot_, action, *glstate_, properties_.drawMode());
}
......
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