Beginner problem with opengl

Started by
1 comment, last by chemfy 13 years, 9 months ago
Hi I have been playing around with opengl a little bit, but now I got a problem I can't figure out.

When I draw something, if I draw it at glTranslatef(0.0, 0.0, 1.5); I see it but when I draw it onto glTranslatef(0.0, 0.0, 1.51); it doesn't get drawn or atleast I'm unable to see it.

Advertisement
It's impossible to tell without seeing some code. However, as a guess, if your eyepoint looks along the +Z axis and you have the far plane of your projection matrix (assuming it's a perspective matrix) set to 1.5, then nothing beyond 1.5 units from your eyepoint will be drawn.

If that's how you have the projection matrix setup, try setting the near plane to something like 0.1, and the far plane to something like 1000.0.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Quote:Original post by Buckeye
It's impossible to tell without seeing some code. However, as a guess, if your eyepoint looks along the +Z axis and you have the far plane of your projection matrix (assuming it's a perspective matrix) set to 1.5, then nothing beyond 1.5 units from your eyepoint will be drawn.

If that's how you have the projection matrix setup, try setting the near plane to something like 0.1, and the far plane to something like 1000.0.


Thanks a lot that was the problem.

This topic is closed to new replies.

Advertisement