hi,
I’m using glOrtho but the further from the eye the wider my objects are drawn.
see for example this picture: http://users.pandora.be/notfound/light10.gif
All angles are 90degrees, but they sure don’t look like it.
Anyone has had a simular problem? anyone knows how to fix it?
tnx!
Initialisation goes something like this:
glViewport(0,0,width,height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-proj, proj,-proj, proj, proj, -proj);
glTranslatef(0,0,-proj);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
//p244
glEnable(GL_FOG);
glFogi(GL_FOG_MODE,GL_LINEAR);
GLfloat fogColor[4]={0.2,0.2,0.2,1.0};
glFogfv(GL_FOG_COLOR,fogColor);
glFogf(GL_FOG_DENSITY, 0.5 );
glFogf(GL_FOG_START, 0);
glFogf(GL_FOG_END, 1.5*proj);
Drawing goes like this:
glTranslatef(0,0,proj);
doLighting();
doDrawing();
Is there a better way to do the fog then de glTranslatef(0,0,-proj); and the glTranslatef(0,0,proj); ?
that’s my way of trying to move the eyeplane but I’m not sure about that.
PS: I tryed changing near+far+depthclearcolor+depthfunction but doesn’t make a difference to the odd perspective (that’s good, cause it shouldn’t make a difference)
I’ll be glad to have a solution, cause this really bothers me