- To enable the pipeline to process objects independently, various objects' lighting are not allowed to interact. Therefore OpenGL cannot directly do raytracing and radiosity, altho those are more realistic. For a nice raytracing package, see http://www.povray.org .
- Separate the object definition from the viewing from the lighting.
- Graphical objects are defined principally by their vertices.
- Transform the vertices, and the object is transformed.
- Color the vertices, and the whole object's color is defined by interpolation.
- OpenGL is a state machine.
- Some subroutines set internal variables; others use them.
- You can examine the internal state. (This sounds obvious, and is a good design practice, but not all systems do this.)
- Programming a state machine:
set_color(red) set_viewpoint(roofofcii) start_line(p1) draw_to(p2) start_line(p3) draw_to(p4) set_color(green) ...
- Programming a non-state machine:
draw_line(red,roofofcii,p1,p2) draw_line(red,roofofcii,p3,p4) draw_line(green,...)
- OpenGL omits some functionality.
- ''You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away.'' - Antoine de Saint-Exupery, Wind, Sand and Stars
- Interactive user interfacing, windowing functions are left to the
individual OS.
- These would be hard to make portable since they are OS-specific.
- Nevertheless, a basic package is supplied, in GLUT, the graphics library utility toolkit.
- The major portable windowing system is the X window system.
- It complements OpenGL, which can run on top of it.
- It runs on most platforms.
- It runs over networks.
- Other design choices are possible and have been made in other systems.
- Pipeline steps. (As GPUs get more powerful, this becomes more flexible).
- Vertex processor
- Transform vertices
- Determine their color
- The vertex processor is programmable.
- Clipping and primitive assembly
- Remove the parts of primitives (lines, polygons, etc) that lie outside the clipping volume.
- This changes the vertices.
- Rasterization
- Find the potential pixels, or fragments caused by each graphic primitive.
- Each fragment has position in frame buffer, depth, color, transparancy.
- Fragment processing
- Find frontmost fragment at each location.
- Blend partially transparant fragments.
- The fragment processor is programmable.
- Vertex processor