CSCI 360

Fall 2015, Test 1


  1. [12 points] GLUT
    1. Describe glut. What is it, what services does it provide?
    2. Describe the glutMainLoop function.
    3. Describe the following functions and how they interact with glutMainLoop
      • glutDisplayFunc
      • glutPostRedisplay
    4. Select any two of the following glut functions and describe the purpose of those function
      • glutTimerFunc
      • glutInitWindowSize
      • glutWireTeapot
      • glutKeyboardFunc
  2. [10 points] OpenGL Pipeline
    1. Describe the process OpenGL uses to transform 3 dimensional objects from modeling coordinates to pixels on the screen. Describe OpenGL prior to 3.0.
    2. Include a discussion of how the programmer influences each of the stages.
    3. Draw a diagram to accompany this description.
  3. [12 points] Transformations
      Consider the following code segment:
      glLoadIdentity();                 // I
      glRotatef(90,0,1,0);              // R
      glTranslatef(-2,2,2)              // T
      glScaleF(3,3,3);                  // S
      glutWireCube(1)                   // cube centered at origin
      	 
    1. Select one transformation listed above and give the 4x4 transformation matrix to which it is equivalent.
    2. Draw a series of diagrams showing how the cube will move from modeling coordinates to the final position. Label each step with the corresponding openGL command.
    3. Using the matrices named in the comments, give the final transformation matrix. (You do not need to write 4x4 matrices, just the variables given in the comments.)
    4. Explain how such transformations impact graphics hardware.
  4. [10 points] Opengl supports two methods of drawing objects: immediate mode and retained mode. Explain each of these modes. Discuss advantages/disadvantages of each.
  5. [6 points] Explain the difference in scenes produced with glFrustum and glOrtho