I’ve checked in the debugger that model, proj, and view come back correctly from
the glGet calls. The object point (0,0,0) I know is on the screen. Any ideas?
Thanks for your response, Syslock. I tried it out. You’re right, If the objZ parameter is non-zero, gluProject does not fail, as you indicated. But I still don’t understand.
I guess I’ve misunderstood what the objX, objY, objZ parameters to gluProject are. I thought that they were the coordinates in opengl space of point of interest, which in this case is the origin of my data display. (It is also the “LookAt” point for gluLookAt in my code.) Should the parameters be something different? Or, does the objZ parameter need to be scaled to [0,1]? Could it be that all points on the x-y plane invalid input to gluProject()? This seems curiously undocumented. I have both the red and blue books…
Best, Lorax
[This message has been edited by Lorax (edited 12-04-2001).]
Hi Syslock,
Well, I knew you were right about the projections, but I had no idea what the projections should look like. After a day of staring at the debugger, and at Appendex F of the red book and reading Steve Baker’s “Matrices can be your Friends”, I finally figured it out. Thanks for your help.
-Lorax
Originally posted by Syslock:
Maybe you should inspect your projections a little more closely. Dump their values out
and see what they are.