I'd consider it highly unlikely that gluProject() doesn't work, you're probably misinterpreting the values it gives you - or the values you pass it.
I haven't ever used gluProject() but I reckon you have to pass world coordinates to it. So my first try would be to take the geometry, apply the appropriate modelview transform to it and pass it to gluProject(). On Wed, Nov 9, 2011 at 1:12 PM, saex <[email protected]> wrote: > 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 changued my arquitecture, 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. > > Wich X,Y,Z values i have to pass to gluProject? i'm passing -1,-1,0, > and gluProject is giving me erroneal x,y outPutCoords values, > (-101.774124,-226.27419) > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

