Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Unbrained

OpenGL Take OpenGL coords is impossible

This topic is 5327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m trying to get the OpenGL coordinates for almost four months. I did some proofs but I only get the Y coordinate, cause the X and Z were always the same, and thier values were 0.0 or 1.0 or -1.0. I know the functions are gluProject and gluUnproject, but I don''t know if I have to enable a state, or put the model matrix in a way, or... I don''t know what. I read the OpenGL Programming Book, the Red Book, but It doesn''t help me. It just have the description for the functions. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
What do you mean by OpenGL-coordinates? Worldspace coordinates, or 2D projected coordinates?
From your post I assume you want worldspace. Then I would look for "picking".

Share this post


Link to post
Share on other sites
quote:
Original post by Unbrained
Hi,

I''m trying to get the OpenGL coordinates for almost four months. I did some proofs but I only get the Y coordinate, cause the X and Z were always the same, and thier values were 0.0 or 1.0 or -1.0.

I know the functions are gluProject and gluUnproject, but I don''t know if I have to enable a state, or put the model matrix in a way, or... I don''t know what.

I read the OpenGL Programming Book, the Red Book, but It doesn''t help me. It just have the description for the functions.

Thanks.


I''m not sure what you''re asking, but read the blue book (see the FAQ for the online version).

Share this post


Link to post
Share on other sites
I just posted a little bit on gluProject and gluUnProject. Maybe it will help:

http://www.gamedev.net/community/forums/topic.asp?topic_id=201670
http://www.gamedev.net/community/forums/topic.asp?topic_id=201999

HTH.

Share this post


Link to post
Share on other sites
Well,

I''m talking about both coordinates, Windows and OpenGL scene.
But, my problem is that I don''t know how obtain these coords with the gluUnproject and gluProject functions.

I read the JahToasted''s articles ( thanks for it ) and someone said something about put the Reder Mode in GL_SELECT ( glRenderMode(GL_SELECT) ), and what the hell does this mean ? If I don''t put this state on I can''t take the coords?

Thanks for all responses !!!!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!