Jump to content
  • Advertisement
Sign in to follow this  
chemfy

Beginner problem with opengl

This topic is 3079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!