#if 0
#include <GLFW/glut.h>GLfloat light_diffuse[] = { 1.0, 0.0, 0.0, 1.0 }; /* Red diffuse light. */
GLfloat light_position[] = { 0.0, 0.0, 5.0, 0.0 }; /* Infinite light location. */GLuint cl1;
GLuint idleCounter = 0;
void
list1(void)
{glBegin(GL_QUADS);
glNormal3f(-1, 0, 0);
glVertex3f(-1, -1, 1);
glVertex3f(-1, -1, -1);
glVertex3f(-1, 1, -1);
glVertex3f(-1, 1, 1);glNormal3f(0, 1, 0);
glVertex3f(-1, 1, 1);
glVertex3f(-1, 1, -1);
glVertex3f(1, 1, -1);
glVertex3f(1, 1, 1);glNormal3f(1, 0, 0);
glVertex3f(1, 1, 1);
glVertex3f(1, 1, -1);
glVertex3f(1, -1, -1);
glVertex3f(1, -1, 1);
//4glNormal3f(0, -1, 0);
glVertex3f(1, -1, 1);
glVertex3f(1, -1, -1);
使用glNormal3f法向量绘制立方体
最新推荐文章于 2023-06-21 12:35:33 发布