Making Infinite Space in OpenGL

Started by
4 comments, last by Prozak 21 years, 5 months ago
How do I, using OpenGL, make an infinite space? when I rotate stuff, som object that are too far away get hidden... How can I at least increase the amount of space viewed? Thanx,

[Hugo Ferreira][Positronic Dreams][Stick Soldiers]
"Please Review my WebSite!".

Advertisement
I set up my viewing planes usually gluPerspective. It looks something like this:
gluPerspective(75.0f,(GLfloat)width/(GLfloat)height,1.0f,1000.0f);

Where:
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
----------------Amusing quote deleted at request of owner
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.
It's not what you're taught, it's what you learn.
if you could see things an infinite distance away then the whole sky would be white with stars
quote: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.



Gyzmo
==============================
"Well is the world standard" - The Alchemist
"Not in Canada!" - jonnyfish
Gyzmo=============================="Well is the world standard" - The Alchemist"Not in Canada!" - jonnyfish
fog it up...beyotch! a black fog really makes distance look convincing
I love me and you love you.

This topic is closed to new replies.

Advertisement