View Full Version : rendering a screen sized quad

07-01-2003, 07:22 PM

I simply want my program to render a quad that exactly fits the size of the screen, covering it entirely but not overlapping at the borders.

I guess this is quite simple with setting the right perspective parameters but somehow i don't know where to start.. can anyone expain, maybe with some code?


07-01-2003, 09:04 PM
It depends what projection you used,

if you use glOrtho, then that'll be easy.the whole screen size would be the same size set in the glortho.

if you use gluPerpective. then the opengl use proportional coordinates in measuring distance.At origin(0,0,0),the width span for the viewport is 1.0f .the leftest side is 0(maybe -0.5f) ,the rightest side is 1.0(maybe 0.5f).
if you translate deeper along the z axis ,glTranslatef(0.0f,0.0f,-0.5f) and use 1.0f span will cover the whole screen ,i guess.

07-02-2003, 09:34 AM
the program uses gluPerspective but I thougt it would be the easiest way to change to glOrtho for rendering the quads. Is this a very bad idea (performance)?


07-02-2003, 10:22 AM
Changing to glOrtho is only modyfing the projection matrix. It is about the same as call glRotatef with modelview matrix.

07-02-2003, 01:54 PM
well, then, change all the perspective/projection stuff. I'll see..