rendering a screen sized quad

Hello,

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?

Thanks,
Jan

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.

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)?

Jan

Changing to glOrtho is only modyfing the projection matrix. It is about the same as call glRotatef with modelview matrix.

well, then, change all the perspective/projection stuff. I’ll see…