/* An OpenGL demo of a medium birch tree. Copyright (C) 2006 by Agnes Chang This program is released under the GNU General Public License. Submitted for CS 307 Creative Scene Assignment Prototype for one scene in final project Based on show-object-natural.cc by Scott D. Anderson, Fall 2006 */ #include #include #include #include #include //#include "achang.cpp" #include void display(void) { twDisplayInit(); twCamera(); glPushAttrib(GL_ALL_ATTRIB_BITS); GLfloat pos[] = { 0.0, 0.0, 1.0, 0.0 }; glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glLightfv(GL_LIGHT0, GL_POSITION, pos); achangBirchMedium(false); glPopAttrib(); glFlush(); glutSwapBuffers(); } int main(int argc, char* argv[]) { /* Ready to start doing OpenGL */ glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutInitWindowSize(500,500); glutCreateWindow(argv[0]); glutDisplayFunc(display); twBoundingBox(-1,1,0,2,-1,1); twMainInit(); glutMainLoop(); return (0); }