Jump to content
  • Advertisement

Archived

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

woefel

Open GL resizing problems

This topic is 5358 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 a plane consisting of about 128^2 triangles with different heights. After resizing the window, I get a lot of irregular arranged holes in my plane. (Screenshot:http://home.in.tum.de/~wirthw/screen.jpg) In my resize function I call glViewport( 0, 0, (GLint)w, (GLint)h ) and qt calls the paintGL function afterwards with glClear( GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION ); glLoadIdentity(); gluPerspective(60,aspect,1.01,scene->getRad()); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor3f(1.0, 0.0, 1.0); gluLookAt(pov[0], pov[1], pov[2], 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); scene->render(); The render function calls 2 previous generated display lists. pov is the point of view, aspect is calculated as width/height. What am I doing wrong?

Share this post


Link to post
Share on other sites
Advertisement
It looks to me like your camera is too far away from the plane. Try moving it closer. It also might be that the scene is to big for your depth buffer (though I think it is the first thing).

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!