I am confused in the relation between ndc to screen coordinate system. What i did was
select screen coordinates (for example touch points on the screen).
then pass the screen coordinates to gluUnproject. i set the depth variable(third variable of gluUnproject) to 0.0f.
then i multiply the object coordinates to modelviewmatrix and projectionmatrix.
after that I clipped the space. then i divide the clip space coordinate with W
- at last i scaled the ndc coordinates to screen coordinates.
- so the result was equal to coordinates which i first chose except Z coordinates. actually the result of Z was equal to -1.0f
after this I changed the gluUnproject`s third variable to 1.0f which i suppose the result was equal to 0.0f. But the result was 1.0f.
So here is the question what is relation between normalized coordinate system and screen coordinate system. how do i set the depth variable of gluUnproject function?