Assignment 6(due 10 AM on Wednesday, 5/21)
Read the Angel text Chapter 7 (and 9) and review earlier chapters as necessary.
Imagine you are tasked with implementing the conventional fixed function graphics pipeline completely in software. You will be designing the system components and their interfaces, using object oriented techniques, where you rely on interfaces and class hierarchies to specify the building blocks and how they interact. For input, the pipeline is driven by the OpenGL API, and for output you will presume a FrameBuffer object holds the resultant image. Restrict your model to the very basics of OpenGL (and not, for instance, pixel-processing extensions, accumulation buffers, and other advanced techniques).
-
Define the FrameBuffer object (i.e., provide an interface FrameBuffer which any basic frame buffer would implement). What methods are provided? What kinds of data (think in terms of objects all the way down to Pixel).
-
Think of every kind of data passed into or through the pipeline in object oriented terms. A Vertex, a Matrix, a Clip Plane, etc. Define those in some detail (think of them as Java classes, as wrappers around some data and methods that operate on that data). Where does a polygon (triangle or quadrilateral) become assembled? What kind of an object would it be (that is, it comes in as a sequence of vertices, but then, how does it become a closed unit to be filled? Where in the pipeline does that occur?
-
If the overall pipeline is GraphicsPipeline, what instances of objects does it have as global or state instance variables? Consider that GraphicsPipeline implements OpenGL, i.e., has a method for every method in OpenGL. Clearly many of the methods we've been introduced to in OpenGL can be thought of in terms of setters (of state variables). But that's just part of the story, and only at the beginning of the pipeline. What additional methods would you envision operate on the subsequent stages of the pipeline?
-
Create a UML class diagram(s) for GraphicsPipeline showing what objects it owns. These would presumably include a Rasterizer, etc.
-
What is the basic pipeline in terms of data flow? Create a UML sequence diagram showing what kinds of objects pass down the the various stages. Some stages create transformations of data values; some create new data. Start with just sending vertices with vertex colors through from start to end ending in filled polygons. Illustrate the cascading of calls for the progression of data through the pipeline for a simple quad, say.
Read the text and explore supplemental sources to understand the basic pipeline. Google is your friend. If you come across an OO version of the pipeline, please tell me, but I suspect that this sort of treatment is novel.
Submit as a PDF file by 10 AM before class (providing me time to assimilate for class).
Copyright 2008 Kent A. Stevens, University of Oregon. All Rights Reserved.