diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 709409f1609..971ae6b1de9 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -885,11 +885,8 @@ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - if(parent()) - { dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); - } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); point = unprojectedCoordinatesOf(point);