I have been on and off developing in OpenGL for several years.
Until recently, I have not had any need going beyond the functionality of version 1.4, but am currently on a bigger project.
This project contains perhaps thousands of objects and millions of polygons. Occlusion reduces this a ways, but real time flow (high fps) and continuous mouse cursor updates (thus picking) are required.
I have come across several pages talking about the “good old” OpenGL picking not being supported, or significantly slowed down with OpenGL 3.0 and newer. Developers are reporting a severe performance drop and sometimes seconds lag when picking.
( Here’s a thread as an example
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=283142 )
OpenGL.org still refer to the “good old” picking method through their pages:
- On the menu: Coding Resources -> Sample Code & Tutorials
- Link: Beginning OpenGL
- Link: Picking tutorial
- Takes you to: http://www.opengl.org/code/detail/picking_tutorial/
And the most recent reference card still lists the same functions:
http://www.khronos.org/files/opengl41-quick-reference-card.pdf
On page 5, under “Special Functions”:
Selection [5.2]
Determine which primitives are drawn into a
region of a window. The region is defined by the
current model-view and perspective matrices.
void InitNames(void);
void PopName(void);
void PushName(uint name);
void LoadName(uint name);
int RenderMode(enum mode);
mode: RENDER, SELECT, FEEDBACK
void SelectBuffer(sizei n, uint *buffer);
The functions seem to still be supported, but are they potentially terribly slow, are they supported by all, and are they obsolete (as some say) or discouraged?
If the “good old way is” discouraged, what other picking methods are recommended for a program of large scale with loads of models to draw and pick?
(Imagine a 3D reconstruction of our world.)
Thank you!