Alright, so I want to add phong shading to a GL-rendered scene or object. I suppose I"m just verifying my idea here. I should be able to do this quite simply by wrapping certain GL functions(glVertex*, glBegin, glEnd, glLight*, glNormal*, glColor), and based on this apply the shading model to many points on the polygon, using GL to draw points of the desired intensity. Clearly this will be slow and an approximation(as the points aren’t mapped to pixels), however, I should be able to get a good approximation this way, no?
What I am planning on doing in the end is implementing most of the graphics pipeline in software(at least for phong-shaded polygons), which, again, is going to be slow, but that’s okay. I’m just trying to learn about phong shading as well as what kind of calculations are involved in the graphics pipeline. In this case, I would clip, rasterize and shade the polygons myself, then pass points (in normalized device coordinates or window coordinates) to GL for rendering.
Does this sound feasible? What are peoples’ ideas, suggestions, etc???