Jump to content
  • Advertisement
Sign in to follow this  
int01h

OpenGL Window size affects distance render?

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

Gents, take a look at this image: http://hirobo.expro.pl/strange.jpg http://hirobo.expro.pl/strange2.jpg This is a small (320 300) OPENGL window, it renders an aquarium with 10x10x10 cubes inside. What's so strange is that on the left side of the picture i can see that the render distance allows me to see whole cube - the front face and back face also. But take a look at the right one, it 'cuts' some of the "farest" points of my cube, what causes that? I don't have anything else here - than: auxSolidCube(),glBindTexture, glScalef and Translatef... Is it caused by the window size ? Is there any chance to tell opengl to render 'deeper' ? edit: removed caps from subject. [Edited by - phantom on June 25, 2006 10:52:07 AM]

Share this post


Link to post
Share on other sites
Advertisement
Looks like the near and far plane aren't set appropriately given the scale and placement of your geometry. You're most likely calling glFrustum() or gluPerspective() somewhere in your app. The last two parameters are the near and far plane distances; try moving the near plane in and far plane out.

[Edited by - jyk on June 25, 2006 12:25:21 PM]

Share this post


Link to post
Share on other sites
This behaviour is caused by the values you used for the near and far clipping planes. If you use something like gluPerspective(), try lesser values for znear and greater values for zfar parameters.

Share this post


Link to post
Share on other sites
could it be that his window resize (if he has one) isn't correct? so it isn't able to recalculate the actual viewport correctly?

Share this post


Link to post
Share on other sites
Quote:
Original post by supercat1
could it be that his window resize (if he has one) isn't correct? so it isn't able to recalculate the actual viewport correctly?


What do you mean saying "If i have one" and it's incorrect ?

I create OpenGL window dynamically and the application has its size defined as static so that's right i cannot modify the size of the window, but it was the point of this app to be small gl one...

Thanks for any suggestion...

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.

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!