Wednesday, November 19, 2008

GL Mouse Picking and Selection

Oh eh.
I think I might might have a solution to the mouse picking problem.

Could it be:

1. viewport problem?
2. matrix transformation problem?
3. z-buffer depth search problem - check in function processHits();

Read this: http://www.opengl.org/resources/faq/technical/transformations.htm

Wow! Very nice!!!!

3D Computer Graphics Tutorial:

http://www.jimbrooks.org/web/opengl/tutorials/

EDIT:
Was looking at the visitor stats and realised a lot of people come to this post when searching for OpenGL mouse picking. I've solved it.
Point is, if you want to pick in 3D; there's no straight forward way to doing that entirely in mouse.
What you can do is, specify another keyboard key + one mouse action for z-coordinate. Why? cause glut mouse function only specifies x,y coordinates. That's the easiest way to doing it.

No comments: