URL |
Description |
OpenGL Picking using Ray Tracing |
This blog post explains a common and versatile approach to OpenGL picking called "ray picking". An example in pseudo-code is given below. |
Picking Made Easy in OpenGL |
- Tell the hardware that we are in picking (“selection”) mode.
- Ask the hardware to pretend it is drawing the scene. Go through all the motions, just don’t actually color any pixels.
- As part of drawing the scene, we occasionally give the hardware “names” for the objects we are drawing.
- Whenever the hardware finds that it would have colored a pixel within a certain tolerance of the cursor, it returns to us the object “name” that it is currently holding. This tells you what set of drawn objects must have passed near the cursor.
- Tell the hardware that we are back in drawing (“render”) mode.
|
Picking in OpenGL |
Describes an old way of picking. |
Slow glRenderMode |
I've started noticing a dramatic drop in the performance of OpenGL rendering in SELECT mode. That is, after a call glRenderMode(GL_SELECT);. GL_SELECT is meant to be faster than regular rendering, because it only needs to render the geometry, and not shading or textures but recent drivers (since July 2007) have started slowing this operation down dramatically. |