this seems to be causing my pc to crash horribly when i resize in certain directions, can you spot any obvious discrepancies about what im doing?

*i feel like im one of those bug busting questions in C++ in 21 days, can you spot the bug http://www.opengl.org/discussion_boards/ubb/wink.gif*

Deiussum

05-09-2003, 04:23 AM

glutPostRedisplay();
glutSwapBuffers();

Shouldn't the glutSwapBuffers be done in the Display function? glutPostRedisplay basically just posts a WM_PAINT message, it doesn't actually call your display function. Your display function will likely not be called until after the reshape is done, when the WM_PAINT message is then picked up.

nexusone

05-09-2003, 04:46 AM

As the other person posted the glutPostRedisplay and glutswapbuffers should not be in the reshape.

Also on window reshape, it automatically calls you glutPostRedisplay so you are repeating it twice by puttin it in.

on the glutswapbuffers sould be called at the end of you display routine.