Hi everyone,
I’m new here and I met a problem of implementation of correct perspective view of a mesh.
I am using realbasic, so the code may look a little different.
Here’s how I did
glMatrixMode(GL_PROJCTION)
glLoadIdentity()
if perspectiveSwitch=true then
glFrustum(-1.0,1.0,-1.0,1.0,99.0,1000.0)
else
glOrtho(-1.0,1.0,-1.0,1.0,0.01,1000.0)
end
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
glClearColor(1.0,1.0,1.0,1.0)
glClearDepth(1.0)
glEnable(GL_DEPTH_TEST)
glDepthFunc(GL_LEQUAL)
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)
glEnable(GL_POLYGON_SMOOTH)
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST)
draw_mesh()
When I change between the perspective view and the orthogonal view, I just don’t see any change.
Where did I make the mistakes?
Thanks for your help.
Regards,
Steven