The problems I have right now are:
- I want to implement basic triangle 2D screen-space clipping. Which itself is not a big deal but I do not want to implement a polygon filling scan-line algorithm. A polygon may be the outcome of a triangle clipped against a rectangular clip window. So what is there to do ? Either clip a triangle which produces a polygon and implement a "simple" scanline algorithm to fill that polygon. The other option is of course to split the triangle into a series of triangles. Either way has its intricacies.
- As mentioned in yesterday's I want to implement homogenous clipping for triangles. Which makes things even more complicated then a simple 2D clipper. The reason is that not only a triangle can be split into a series of triangles during the clipping process but also extra state is necessary. Remember, we do not only clip the triangle and generate new triangles that form the clipped triangle but we have to generate appropriate values for associated color, texture and normal data.
- I want the filling of the z-buffer and the filling of the framebuffer to be separate. Although expensive, I want to maintain this separation for flexibility.
For all the people who want to do some graphics stuff I recommend the following books. At least they served my understanding quite well.
- Practical Linear Algebra: A Geometry Toolbox
- Computer Graphics: Principles and Practise
- Real-time Rendering
- Math for 3D Game Programming & Computer Graphics
Happy reading