From 29fb3ed25905cafd0c2ef327398e2d781e59fc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Sat, 7 Mar 2009 08:41:36 +0000 Subject: [PATCH] Dennis glViewer multiview mode picking patch git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5221 383ad7c9-94d9-4d36-a494-682f7c89f535 --- widgets/glWidget/QtBaseViewerPicking.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/widgets/glWidget/QtBaseViewerPicking.cc b/widgets/glWidget/QtBaseViewerPicking.cc index c6e26ed3..16ac1cf7 100644 --- a/widgets/glWidget/QtBaseViewerPicking.cc +++ b/widgets/glWidget/QtBaseViewerPicking.cc @@ -93,7 +93,11 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget, ACG::Vec3d* _hitPointPtr ) { - GLint x = _mousePos.x(), + GLint w = glWidth(), + h = glHeight(), + l = scenePos().x(), + b = scene()->height () - scenePos().y() - h, + x = _mousePos.x(), y = scene()->height () - _mousePos.y(); GLubyte pixels[9][3]; GLfloat depths[9]; @@ -106,6 +110,7 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget, // prepare GL state makeCurrent(); + glViewport (l, b, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); -- GitLab