Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Making Infinite Space in OpenGL

This topic is 5797 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

I set up my viewing planes usually gluPerspective. It looks something like this:

width = screen width
height = screen height
1.0f = near clipping plane
1000.0f = far clipping plane

Keep in mind, your depth buffer is affected by the near and far clipping planes. The near plane cannot be less than zero. Setting the far clipping plane too far out will cause "popping" of objects, since your depth buffer is not linear, but more concentrated closer to the near clipping plane.

Hope that helps.

Interesting quote deleted at request of owner

Share this post

Link to post
Share on other sites
If the object is extremely far away, and you don''t ever wnat to lose sight of it, you could render a scaled down version of it close to the far clipping plane just to keep it visible. Recalculate its size and scale accordingly before you render it. That way you don''t need to resize the viewing frustum, and you maintain the integrity of your depth buffer.

Share this post

Link to post
Share on other sites
Original post by petewood
if you could see things an infinite distance away then the whole sky would be white with stars

It will be, the universe just isn''t old enough.

"Well is the world standard" - The Alchemist
"Not in Canada!" - jonnyfish

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!