PDA

View Full Version : Projection in Ortho



Swiftless
07-04-2006, 09:35 PM
I am working originally in projection space with some 3d objects drawn. I am then drawing some objects in orthogonal space so that I can move them per pixel correctly with the mouse position. But I also want to be able to apply 3d rotations to this object.

How can I do a 3D rotation on an object drawn in Orthgonal space?

Keep in mind that when I rotate it, I want perspective and everything to still take place.

Or is there a different way to move it with the mouse so that it still uses correct pixel placement in the window? eg: 100,100 is 100 pixels from the top and 100 pixels from the left.

Thanks.

ZbuffeR
07-05-2006, 05:10 AM
Use the perspective projection you need, then gluProject / gluUnproject for the "move them per pixel correctly with the mouse position".

Swiftless
07-05-2006, 08:58 PM
Thanks, I have done this.

Is there an equation I can use instead though?

Because when I move the mouse, I find that even though it is only an insignificant change, the frames per second still drop witg gluUnProject.