Also, some sample programs doesn't show anything since I mistakenly call glutSwapBuffers while I just initialized single buffer. (polyoffset.c and hud.c had this bug.) Now I fixed them. (at leat I believe so...) Let me know if you have any problem with the samples.
You may notice that a sample named postredisplay.c is posted which was not presented in the lecture today. This sample is to show you how to use the function glutPostRedisplay. When you press the space bar, the color of the rectangle will be switched between red and white. We expect the color changes immediately after we press the space bar, and this is why we call the function at the end of keyboard callback. Without this, the color changes only when the window needs to be refreshed. (so that the display callback is called) To see the effect, try commenting out the line calling glutPostRedisplay and see how it works. Without the call, you have to force the display callback is called by, for example, covering the window with another window and then removing it away.
name: Minho Kim id: 20090000 passcodes: (1)1a2b (2)2b3c (3)abcd |