[Bf-committers] Occlusion Query based selection

Αντώνης Ρυακιωτάκης kalast at gmail.com
Tue Dec 6 10:38:58 CET 2011

Final patch. Made an interface for both methods
(glRenderMode(GL_SELECT) and glBeginQueryARB(GL_SAMPLES_PASSED) )

build on graphicall: graphicall.org/747/


We can't have depth information with this method, meaning that the
first visible object does not always gets selected. In the
manipulator's case this may be annoying since the widgets tend to
overlap frequently. Selecting objects this way can also be annoying
too (though we can usually bypass by alt-selecting). For manipulator
the GL_SELECT method could be enforced so that at least we get the
correct behaviour there.

All testers have reported speedups in object mode. And of course using
it is fully controllable through user preferences. If this is
cosidered for inclusion the tradeoffs should be clear but seeing how
some people can't even use selection in heavy scenes I expect it to be
of big help, even at this state.

Next target: test glReadPixels for getting depth info. If all else
fails maybe depth information can be extracted by plain old
camera-to-object or to-bounding-box distance. Not as exact but a minor
improvement nevertheless.

People in the blenderartists thread also suggest using raycasting for
selection. This will make the driver-related headaches go away. My
personal concern is more over the memory footprint of such an

More information about the Bf-committers mailing list