Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
OpenGL Selection Mode
stevewang last edited by
I want to do some data visualization with picking function using GLWidget.
I learned that the selection mode in OpenGL is deprecated. So can I ask whether it is still supported in QT GLWidget? If not, what is the best way to do my task? (I had over 1M points and lines to visualize)
Thank you very much.
ZapB last edited by
QGLWidget supports whatever features that the underlying OpenGL provides. If you want to use the deprecated picking mode then you need a non-Core profile context if using OpenGL >= 3.2 or a context <= version 3.1.
I would suggest however that you do not write new code using deprecated features.
Picking in modern OpenGL is done in different ways. Typically either you
perform a ray cast form the eye point through the cursor point and calculate which of your objects the ray passes through and select the nearest one.
use colour picking as described at "this article":http://antongerdelan.net/opengl/colourpicking.html