I am using opengl on Windows XP. The program is developed in Compaq Visul Fortran version 6.6. In my application I switch beteen perspective and orthografic projection with the following code:
if (projmode .eq. ID_PROJ_MODE_PERSP) then
call fgluPerspective(vAngle,aspect,znear,zfar)
call fglTranslatef(xor,yor,0.0)
else
ytop =-yor+dify
ybtm =-yor-dify
xrght =-xor+difx
xleft =-xor-difx
call fglOrtho(xleft,xrght,ybtm,ytop,znear,zfar)
end if
In the perspective view the depth calculation works fine and round surfaces looks smooth (see figure 1), but in the orthografic view the depth calculation seems wrong (see figure 2). Is there extra calls or parameters to set in order to get the orthografic projection to work?
Figure 1: Perspective view
Figure 2: Orthografic view