PDA

View Full Version : Very Strange Problem



dirtydevil
08-17-2000, 06:37 PM
Please help, I am getting crazy with this problem, and I must solve it fast!

I have made a window management class, that create a window and sets it to work with opengl. After that, I draw opengl stuff and make a swapbuffer, and everithing works fine with Z equal to 0.0

The strange thing is that, when I change the Z value, my triangle doesn't change, doesn't get smaller nor bigger, until it reaches the ortho limit (in my case, is between -12 and 12). I had used glOrtho( -16, 16, -12, 12, -12, 12 );

I have some experience with opengl, but never had seen something like that. In fact, it is my first project whithout using glut.

If you need some code, please advise. I hope someone here have seen the same problem in the past, 'cos I have no idea what to do.

It is very important to me solve that as soon as possible, so thanks A LOT for any help!

Gorg
08-17-2000, 07:06 PM
Orthographic projections( glOrtho ) do not calculate a perspective projection. Whatever the z of an object, it will always look the same size.

To create a perspective projection(object farther from the view point will look smaller, use glFrustum or it's utility function gluPerspective