Hi Sean,<div><br></div><div>This is just my opinion, but it is best to use the vtkCellPicker for picking - it is implemented 100% on the CPU and does not utilize OpenGL whatsoever (and for big, complex geometry it can be accelerated with a vtkCellLocator).  But I realize that isn't quite what you were asking, hopefully someone who is familiar with VTK's hardware-accelerated pickers will chime in re: the OpenGL code.</div>

<div><br></div><div> - David</div><div><br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 2:10 PM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
I (and my coworkers) know next to nothing about OpenGL (part of why we use VTK-- as an abstraction), but here goes anyway... :)<br>
<br>
VTK seems to do picking by using the 'fixed-function pipeline', specifically by doing:<br>
<br>
glRenderMode(GL_SELECT);<br>
<br>
then:<br>
<br>
GLuint hits = glRenderMode(GL_RENDER);<br>
<br>
My understanding is that this technique is deprecated (assuming I've not been misinformed).<br>
<br>
So, what would be the correct way to re-implement VTK's picking?<br>
<br>
(I ask because the current technique is problematic in a certain beta OS, which is under NDA for a couple more weeks.)<br>
<br>
Someone suggested to me a 'color coding' technique like this:<br>
<<a href="http://www.lighthouse3d.com/opengl/picking/index.php3?color1" target="_blank">http://www.lighthouse3d.com/opengl/picking/index.php3?color1</a>><br>
<br>
But I don't know if that's appropriate.<br>
<br>
Thanks for any pointers,<br>
<br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer              Montréal, Québec, Canada<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br></div>