PDA

View Full Version : 2D



Ztyx
03-10-2001, 04:57 AM
Could anyone tell how to set the camera/viewport to orthographic mode? (and especially how I update the creen after the modification, which I don't know how to do)

zed
03-10-2001, 01:38 PM
check the faq (link first page)

A027298
03-11-2001, 01:44 PM
Hi

Use for example:
.
.
.
glViewport(0,0,(GLsizei)screenwidth,(GLsizei)scree nheight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0, screenwidth, 0, screenheight);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
.
.
.

You don't need to set a camera.


Bye

A027298

john
03-11-2001, 01:53 PM
>
...
gluOrtho2D(0, screenwidth, 0, screenheight);

...
You don't need to set a camera.
<


<blinks> gluOrtho2D *is* setting the camera, and you DO need to define an orthographic camera for orthographic projection.

cheers,
John