Switching from Ortho to Normal
I''ve made a GUI front-end to my OpenGL app in Ortho, how can I switch back to the proper 3d rendering mode when I want to render my 3D bits and pieces..
WDA
just call glMatrixMode(GL_PROJECTION) and then set the projection matrix to whatever you want (with glLoadMatrixf, glFrustum, gluPerspective or whatever)
emptyhead
Watch out for advice from the successfull, they don''t want company
emptyhead
Watch out for advice from the successfull, they don''t want company
:wq!
I tried:
glViewport(0,0,window_y_size,window_x_size);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)window_y_size/(GLfloat)window_x_size,0.1f,1000.0f);
But it simply isn't working. I try to render my track and it just goes wrong. It kind of renders the last scene rendered in Ortho, not properly it sort of jitters, but my actual scene doesn't appear
WDA
[edited by - witchdrash on March 14, 2003 10:56:21 AM]
glViewport(0,0,window_y_size,window_x_size);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)window_y_size/(GLfloat)window_x_size,0.1f,1000.0f);
But it simply isn't working. I try to render my track and it just goes wrong. It kind of renders the last scene rendered in Ortho, not properly it sort of jitters, but my actual scene doesn't appear
WDA
[edited by - witchdrash on March 14, 2003 10:56:21 AM]
Try setting a much lower or much greater fov.
ie replace 45.0f with eg 0.5f, 10.0f or 80.0f etc
ie replace 45.0f with eg 0.5f, 10.0f or 80.0f etc
Set it to 90, 1, 120 nothing happens I still see the loading bar drawn in Ortho mode, but it isn''t properly drawn as when you move stuff above it it leaves trails e.t.c showing that a new scene isn''t being drawn.
How can I switch between perspective and ortho modes I am really frustrated by this..
How can I switch between perspective and ortho modes I am really frustrated by this..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement