[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: OpenGL orthographic projection



On Sunday 25 July 2004 16:30, Eero Pajarre wrote:
> Gregor Mückl wrote:
> > Hi!
> >
> >
> >   glOrtho(-1,1,1,-1,-1,1)
>
> I would be a little bit worried about using
> 1 as bottom and -1 as top (3. and 4. parameters), I am not sure
> if this turns the culling around or something....
>
> > I have enlarged the region for testing purposes, but to no avail. Does
> > any one of you OpenGL gurus see something strange in my code?
>
> I am not a guru yet as seen from the previous comment, but
>
> >     glMatrixMode(GL_MODELVIEW);
> >     glLoadIdentity();
> >     glPushMatrix();
> >     glOrtho(-3,3,3,-3,-20,20);
>
> You should load your glortho into the projection
> matrix, and possible initialize the MODELVIEW based on
> your viewpoint position.
>

That was the reason. I've kept staring at it for weeks now without seeing the 
obvious. Thanks a lot!

>
> 			Eero

Gregor