Commit 968c820d authored by Jan Möbius's avatar Jan Möbius

Dennis:

Fixed color pick area.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5211 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1cf1080e
......@@ -113,7 +113,7 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget,
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// gluPickMatrix((GLdouble) x, (GLdouble) y, 3, 3, viewport);
glMultMatrixd(projection.get_raw_data());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd(modelview.get_raw_data());
......@@ -139,8 +139,8 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget,
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glReadPixels (x, y, 3, 3, GL_RGB, GL_UNSIGNED_BYTE, pixels);
glReadPixels (x, y, 3, 3, GL_DEPTH_COMPONENT, GL_FLOAT, depths);
glReadPixels (x - 1, y - 1, 3, 3, GL_RGB, GL_UNSIGNED_BYTE, pixels);
glReadPixels (x - 1, y - 1, 3, 3, GL_DEPTH_COMPONENT, GL_FLOAT, depths);
for (int i = 0; i < 9; i++)
{
......
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