Quote:Original post by smart_idiot
*** Source Snippet Removed ***
The value for mouse_depth is a tricky value to get, how far into the screen is the mouse? You can either use gluProject on a known point, and use its depth, making the mouse as far into the screen as that point is, or you can read the data from the depth buffer, and use the point under the mouse, in which case it will follow the surface of the geometry being rendered.
Ok, here's some nice help. A few questions though:
• Is your "mouse_x" and "mouse_y" equivalent to my x_loc and y_loc?
• Correct me if I'm wrong, but isn't the point of this to take the 2D coordinates of the mouse and "UnProject" them so I can know where the mouse is clicking? The mouse doesn't have a 3rd dimension in SDL, so it only gives me 2 dimensions, so where does that put "mouse_depth"?
Also, I still get the "cannot convert..." errors with the matrix arrays. The computer's telling me that the second argument of glGetDoublev() is ONE double, not a double array.