Commit 157d6dbf authored by Martin Schultz's avatar Martin Schultz
Browse files

added qtbaseviewerpicking from qopengl branch

parent cc3912fb
......@@ -171,13 +171,18 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget,
glViewport (l, b, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMultMatrixd(projection.get_raw_data());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd(modelview.get_raw_data());
ACG::GLState::disable(GL_LIGHTING);
if (properties_.glState().compatibilityProfile())
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMultMatrixd(projection.get_raw_data());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd(modelview.get_raw_data());
ACG::GLState::disable(GL_LIGHTING);
}
ACG::GLState::disable(GL_BLEND);
ACG::GLState::enable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
......@@ -188,11 +193,14 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget,
ACG::SceneGraph::traverse_multipass(sceneGraphRoot_, action,properties_.glState() );
// restore GL state
glMatrixMode( GL_PROJECTION );
glLoadMatrixd(projection.get_raw_data());
glMatrixMode( GL_MODELVIEW );
glLoadMatrixd(modelview.get_raw_data());
ACG::GLState::enable(GL_LIGHTING);
if (properties_.glState().compatibilityProfile())
{
glMatrixMode(GL_PROJECTION);
glLoadMatrixd(projection.get_raw_data());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd(modelview.get_raw_data());
ACG::GLState::enable(GL_LIGHTING);
}
properties_.glState().set_clear_color (clear_color);
......
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