Until now, I worked with gluProject
, perspective projection, and a zoomable square centered on the screen with a lower left vertex (-1,-1,0). I zoom the square adjusting the Z axis.
For example, I zoomed the square to Z=-5, and I call gluProject
with the openGL object parameters (-1,-1,0) to know the window pixels X,Y position of that vertex of the square. It works fine.
But now, I changed my architecture, and now I'm not using Z to zoom, I'm scaling to zoom. I have the square at Z=-1.0f, and initially it is scaled to (0.01f,0.01f,0.0f), is a small square.
Which X,Y,Z values do I have to pass to gluProject
? I'm passing -1,-1,0, and gluProject
is giving me erroneous x,y outPutCoords values, (-101.774124,-226.27419)