这段代码基本上是围绕中心点的QUAD轨道。问题是当X旋转精细时,它在Z轴上移动时消失,并且看起来没有变化。感觉它在Orthagraphic视图中呈现所有内容。
这是我的第一个OpenGL项目。
OPENGL CODE从这里开始
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode (GL_PROJECTION);
glPushMatrix();
//glRotatef(theta, 0.0f, 0.0f, 1.0f);
glScalef(0.75f, 0.75f, 0.75f);
glTranslatef(planeX, -0.0f, 0.0f);
glBegin(GL_QUADS);
glColor3f(1.0f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, planeZ);
glColor3f(0.0f, 1.0f, 0.0f); glVertex3f(0.0f, 1.0f, planeZ);
glColor3f(0.0f, 0.0f, 1.0f); glVertex3f(1.0f, 1.0f, planeZ);
glColor3f(0.0f, 0.0f, 1.0f); glVertex3f(1.0f, 0.0f, planeZ);
glEnd();
glPopMatrix();
SwapBuffers(hDC);
theta += 1.0f;
planeX = (sin(0.0314159265f*theta));
planeZ = (cos(0.0314159265f*theta));
Sleep (1);
结束此处