Archived

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

woefel

Open GL resizing problems

Recommended Posts

woefel    122
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
tHiSiSbOb    463
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