OpenGL Selection Mode
-
wrote on 7 Mar 2014, 03:34 last edited by
Hi all,
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.
-
wrote on 2 Apr 2014, 18:55 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