Original Post
🔒 Locked
gluUnProject()
Advertisement
Okapota,
I think the parameter you''re referring to is actually listed as the winz parameter. It''s a depth range coordinate that is normally set between 0.0 and 1.0, in other words, the near and far clipping planes.
I get the impression, based on your question, that you''re trying to use a mouse cursor to select objects in a 3D space? If you try playing with different values for winz, you''ll notice that the function returns obj z values that become much less precise the closer you set winz to the far clipping plane. I decided to use gluProject() instead for each object in my space and plug the return values into an array representing screen coordinates. That way, my mouse knows what its pointing at
I''m sure its not the ideal solution but so far, it seems to work well enough.
Anyway, probably not the answer you were looking for, but maybe it helps a little
I think the parameter you''re referring to is actually listed as the winz parameter. It''s a depth range coordinate that is normally set between 0.0 and 1.0, in other words, the near and far clipping planes.
I get the impression, based on your question, that you''re trying to use a mouse cursor to select objects in a 3D space? If you try playing with different values for winz, you''ll notice that the function returns obj z values that become much less precise the closer you set winz to the far clipping plane. I decided to use gluProject() instead for each object in my space and plug the return values into an array representing screen coordinates. That way, my mouse knows what its pointing at
Anyway, probably not the answer you were looking for, but maybe it helps a little
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement