• Advertisement
Sign in to follow this  

gluProject to UV coordinates

This topic is 2803 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

The thing is,
i have my 3d coords converted to 2D window coordinates,
but i need them to be UV-like coords where we start from -1 and end at 1.

Kinda in hurry, i seem not to imagine how do i convert my 2d window coordinates to obtain UV range coords.

[source lang=cpp]
#define GAME_X 1024
#define GAME_Y 768

//windowcoords obtained from gluProject

//Below this will give me a values from 0 to 1

Can someone please shed a bit of light on this ?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement