My question is the following:
I am rendering a quad with a texture that moves along the Z-axis. However, I am interested in the resulting image on the quad only, not the perspective view of the quad in the distance. How can I setup my viewport/camera so that the quad always fills up the screen regardless of the Z-position of where the quad was rendered.
In other words, I want to disregard the perspective view after the quad is rendered and always view the quad so that it fills my viewport.
try glOrtho to set up 2d mode
use gluOrtho2D after loading the identity on your projection matrix (gluOrtho2D is done to the projection matrix instead of the normal projection stuff)…the 4 parameters are left,right,bottom,and top…all doubles
Here is some code :
glOrtho 0, width, 0, height, -1, 1
//draw your quad with glVertex2i from 0,0 to
hope it helps