PDA

View Full Version : No perspective.



KraftDinner
10-21-2004, 09:01 AM
how do you initialize such that there is no perspective calculations performed? (glu)

Silkut
10-21-2004, 09:57 AM
you can use a function like this

gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f); and active it with something like this

glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST) the GL_NICEST make a nice view but bad performance on ****ty^graphic card ;)

you can check the tutos on NeHe\'s cpp^gl-win32 tuto webpage (http://nehe.gamedev.net)

hope that helps

Tokage
10-21-2004, 06:51 PM
I'm not too clear about what you're asking, but if what you mean is that objects in the scene shouldn't be displayed in perspective (i.e. diminish in size with distance), then the glOrtho() function should work fine:


glOrtho(xmin, xmax, ymin, ymax, zmin, zmax);