Take OpenGL coords is impossible

Started by
3 comments, last by Unbrained 20 years, 3 months ago
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.
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".
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).

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

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.
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 !!!!

This topic is closed to new replies.

Advertisement