OpenGL:正方形旋转小例子
#include<GL/glut.h>#include<stdio.h>void display(void){ glClear(GL_COLOR_BUFFER_BIT); glColor4f(0.2f, 0.4f, 0.6f, 0.0f); glRectf(-0.5f, -0.5f, 0.5f, 0.5f); //glFlush(); glutSwapBuffers();}static float angle