- glPushMatrix();
- static float light1_pos[] = { 0.0, 0.4, 0.0, 1.0 };
- static float light1_dir[] = { 0.0, 1.0, 0.0, 1.0 };
- glLightfv(GL_LIGHT1, GL_POSITION, light1_pos);
- glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, light1_dir);
- //Glühlampe
- glPushMatrix();
- setColor(1, 1, 0);
- glRotatef(-30, 1, 0, 0);
- glTranslatef(0, 2, 3.5);
- glRotatef(90, 1, 0, 0);
- glScalef(1, 1, 1);
- myCylinder();
- glPopMatrix();