Login  Register

Re: picking

Posted by ul on Dec 25, 2013; 7:29am
URL: https://forum.jogamp.org/picking-tp4031052p4031057.html

Thank you gouessej,

I don't quite understand what you mean by software picking? You mean picking that takes place in data structures held by the application rather than on the GPU?

Sure I could do that but I find this approach better because it's much more general and simpler. It's just drawing as usual (although nothing appears on screen in pick mode). It works with any triangulated surface including when the triangulation is performed by the GPU. For example I draw lots of spheres but I only send position and radius (and some extras) for each sphere to the GPU. The actual triangulation takes place in a Hull shader on the GPU, so the application doesn't even know of any triangulated spheres (or cones, or cylinders, or circles or squares or any other easily parametrized geometric shape).

So certainly I'm hoping the same approach can be used with OpenGL. I guess I could find out by starting porting but it's always nice to know in advance what to expect. That's why I'm asking.