/* Demonstrates the projection concepts of distortion, letterboxing, and clipping. Displays a teapot (or some similar object), and defines keyboard callbacks to switch among distortion, letterboxing and clipping. Ignore this demo; it's an aborted attempt at something. Written by Caroline Geiersbach and Scott D. Anderson scott.anderson@acm.org Summer 2003 */ #include #include #include #include void display(void) { int i; twDisplayInit(1,1,1); //glPushMatrix(); glEnable(GL_LIGHTING); twTriple leftLight = {100-16, 16, 16}; twTriple rightLight = {100+16, 16, 16}; twLight1(GL_LIGHT1,leftLight,0.5); twCamera(); twLight1(GL_LIGHT0,rightLight,0.5); glPushMatrix(); glTranslatef(100,0,0); twTriple potColor = {0.1, 0.6, 0.2}; twColor(potColor,0.5,10); glutSolidTeapot(20); //glutSolidSphere(10,30,30); // glPopMatrix(); glPopMatrix(); glFlush(); glutSwapBuffers(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); twInitWindowSize(500,500); glutCreateWindow(argv[0]); glutDisplayFunc(display); twBoundingBox(80,120,-20,20,-20,20); twMainInit(); glutMainLoop(); return 0; }