- glrotatef(45,0,1,0);
- glDepthFunc(GL_LEQUAL);
- glLineWidth(1.5);
- glBegin(GL_quads);
- glColor3f(1, 0, 0); glVertex3f(-0.5, -0.5, 0); //hinten
- glVertex3f(-0.5, 0.5, 0);
- glVertex3f(0.5, 0.5, 0);
- glVertex3f(0.5, -0.5, 0);
- glEnd;
- glDepthMask(true);
- glBegin(GL_LINE_LOOP);
- glColor3f(0, 0, 0); glVertex3f(-0.5, -0.5, 0); //hinten
- glVertex3f(-0.5, 0.5, 0);
- glVertex3f(0.5, 0.5, 0);
- glVertex3f(0.5, -0.5, 0);
- glend;
- glDepthMask(false);
- glBegin(GL_quads);
- glColor3f(1, 0, 0); glVertex3f(-0.5, -0.5, 1); //vorne
- glVertex3f(-0.5, 0.5, 1);
- glVertex3f(0.5, 0.5, 1);
- glVertex3f(0.5, -0.5, 1);
- glEnd;
- glDepthMask(true);
- glBegin(GL_LINE_LOOP);
- glColor3f(0, 0, 0); glVertex3f(-0.5, -0.5, 1); //vorne
- glVertex3f(-0.5, 0.5, 1);
- glVertex3f(0.5, 0.5, 1);
- glVertex3f(0.5, -0.5, 1);
- glend;
- glDepthMask(false);
- glBegin(GL_quads);
- glColor3f(0, 1, 0); glVertex3f(-0.5, 0.5, 0); //oben
- glVertex3f(0.5, 0.5, 0);
- glVertex3f(0.5, 0.5, 1);
- glVertex3f(-0.5, 0.5, 1);
- glEnd;
- glDepthMask(true);
- glBegin(GL_LINE_LOOP);
- glColor3f(0, 0, 0); glVertex3f(-0.5, 0.5, 0); //oben
- glVertex3f(0.5, 0.5, 0);
- glVertex3f(0.5, 0.5, 1);
- glVertex3f(-0.5, 0.5, 1);
- glEnd;
- glDepthMask(false);
- glBegin(GL_quads);
- glColor3f(0, 1, 0); glVertex3f(-0.5, -0.5, 0); //unten
- glVertex3f(-0.5, -0.5, 1);
- glVertex3f(0.5, -0.5, 1);
- glVertex3f(0.5, -0.5, 0);
- glEnd;
- glDepthMask(true);
- glBegin(GL_LINE_LOOP);
- glColor3f(0, 0, 0); glVertex3f(-0.5, -0.5, 0); //unten
- glVertex3f(-0.5, -0.5, 1);
- glVertex3f(0.5, -0.5, 1);
- glVertex3f(0.5, -0.5, 0);
- glEnd;
- glDepthMask(false);