Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: About projection and translation in perspective

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012

    About projection and translation in perspective

    I have drawn three cubes in my mobile app. but how to set the projection or translation to make this three cubs laid on my screen.

    I have tried:

    1. set the frustum 's parameter bottom to zero to make it look from the same direction. (because we can't see the back of the cube )
    2. set the all objects' z to same value in translation. ( i don't sure it's right")

    but the three objects don't looks on the same plane.

    I want the effect like this

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012

    Re: About projection and translation in perspective

    With perpective projection the cubes are never 100% flat; but the closer they are to the center of the view the flatter they look. You notice how the dice on its own doesn't look the same as the others. You can try varing the field of view angle (FOV).

    You want all the z-value matching if you are looking down the z-axis (the default viewing direction)

    If you want them totally flat look at an orthogonal projection (glOrtho)

Posting Permissions

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