Some Cleanup of Chapter 2
- You should definitely read the chapter.
- A primitive is an object that the graphics system can draw.
- An attribute is a property of a primitive.
- *GL are described as state machines.
- This is not the finite state machine from automata.
- This is a set a value which is used until it changes.
- Setting the clear color
- By the way, a uniform variable in GLSL will also be a state machine variable.
- We are working on several different systems of coordinates
-
- He discusses polygons.
- When specifying vertexes, be consistent.
- Always go clockwise or counterclockwise.
- You will be happy with this later!
- We tend to like convex polygons
- A line between any two points, inside or on the edge of the polygon are inside or on the edge.
- Generally if we don't have this it is problematic.
- That is a nice property of triangles.
- This is somewhat hard to test for, so most packages don't
- We like simple polygons as well.
- IE none of the edges cross.
- Triangles are good for this as well.
- Why?
-
- Even Odd Winding Rule (count line crossings)
- non-zero winding rule (count line crossings in each direction)
- Simple, convex -> no rule!