Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Projection in Ortho

  1. #1
    Junior Member Regular Contributor Swiftless's Avatar
    Join Date
    Apr 2005
    Location
    Australia
    Posts
    118

    Projection in Ortho

    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.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Projection in Ortho

    Use the perspective projection you need, then gluProject / gluUnproject for the "move them per pixel correctly with the mouse position".

  3. #3
    Junior Member Regular Contributor Swiftless's Avatar
    Join Date
    Apr 2005
    Location
    Australia
    Posts
    118

    Re: Projection in Ortho

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •