Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
157d6dbf
Commit
157d6dbf
authored
Sep 06, 2017
by
Martin Schultz
Browse files
added qtbaseviewerpicking from qopengl branch
parent
cc3912fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/glWidget/QtBaseViewerPicking.cc
View file @
157d6dbf
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment