Hi everyone. I am a bit confused about how aspect ratio fits into the OpenGL environment. Please look at my situation.
- gluLookAt() to set ‘eye’, ‘lookAt’, and z-axis up
- Displaying a 2D bitmap in scene.
- Use gluLookAt to change ‘eyeY’ position ±1 (since z-axis is up, changing eyeY will move the eye closer or further away from scene)
- Linear mapping each pixel of the bitmap to x & z.
- (trying to figure out how y relates to shift)
So, I have two questions:
- Traversing pixel by pixel and linearly mapping to x & z is ok because the aspect ratio is maintained, right?
- How can I get a pixel location for y that is proportional to x & z? Do I need to use the MODELVIEW matrix? Or is it a simple ratio?
Thank you