View Full Version : Quake like view
10-25-2000, 12:38 AM
Hello, could someone explain me hot to set the opengl properties (orthogonal matrix,depth buffer, etc...) to have a view like quake or any 3d game.
currently, my depth buffer hide objects which are not very far, i would like my model to be more and more little and be hidden,graduatly.
excuse my poor english
10-25-2000, 08:24 AM
What do you mean, the depth buffer hides objects which are not very far? Do they disappear quickly when they move away from the viewer?
10-25-2000, 10:01 AM
Well, i want to zoom out gradually
currently, in my project, my object(a cube) go far to the wiew but when it dissapears, the cube is big, not very very big, but too much for what i want to do, in fact, i need my depth buffer to be more deep
is it better understandable ? (sorry if not)
It disappears because you set the far plane (The furthest distance you can see) too close. I also think if you want a Quake look then use gluPerspective (needs glu.h and glu.lib linked) instead of glOrtho. It makes things look smaller the further away they are.
Try using something like this where Width and Height are the width and height of the window.
gluPerspective(90.0f, (double)Width/(double)Height, 1, 4096);
je te donne mon adresse..Si t'as des questions, je commence l'OpenGl moi aussi et c'est tres interessant...
Pour ta question..comme tu as vu..tu dois utiliser la fonction glPerspective et non glOrtho pour creer ta vue.....
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.