PDA

View Full Version : Picking is not working properly!



mehmedean
01-09-2010, 03:49 PM
Hi all,

http://tinyurl.com/ybtk9xw (download project here)

I'm doing a 3-D office designer in openGL. I used some picking codes (Scene3D::pickObject, Scene3D::processHits functions in classes.cpp) however when I run the code it doesn't work properly, it is not exact... For instance, when I clicked on the upper part of the two tables, they are not selected (selected one becomes red, otherwise it is blue). Could you help me about this problem? Is it about different data types (glbyte, int vs vs) - maybe there is a conversion error- ? I'm looking for your answers or comments.

zweifel
01-09-2010, 07:33 PM
Be sure the same 3D transformation is applied to the scene being rendered and to the scene being rendered for picking.

_x57_
01-11-2010, 03:20 AM
It is not good style to open more than one topic about the same problem... you already have your answer...

mehmedean
01-11-2010, 04:24 AM
I agree and apologize... Problem is solved, it was because of the reference point of the window, however, now I'm unable to do projection stuff. Another topic :P is coming.