I finally got around to implement frustum clipping. Specifically, I added clipping in NDC space for its efficiency and code simplicity.
There were several issues I had to overcome for this...
1) I had to totally re-organize the way vertex data flowed through my rendering pipeline. Previously, I sent all the vertices into the vertex stage at once, processing them all at once before proceeding to the next stage. This would be a problem, as the extra triangles/vertices that could be potentially be generated by the clipping would require extra memory to store and this space would either have to be pre-allocated buffer thats as big as the maximum number of possible clipped vertices, or a growing buffer (both bad news). Thus, I modified my pipeline so that only a single triangle is sent into the pipeline at a time, and then a small pre-allocated buffer (2^(# clip planes) triangles) would be used to store any extra vertices. The data related to this triangle (and the extra triangles resulting from its clipping) are then propagated through the rendering pipeline until fragments are drawn to the framebuffer.
2) For the actual clipping process, I just send each triangle through a clipping "pipeline", where the output of clipping to one plane, goes into the clipping of the next plane. I should also mention that I used the Sutherland Hodgeman algorithm for this (you basically traverse each edge of the primitive, perform an intersection test, and possibly output new vertices depending on the outcome). I clipped against all 6 frustum planes.
3) Adding the clipping process also revealed several earlier bugs in my code. For example, when mapping to screenspace, I was mapping NDC x,y coordinates from 0 to width/height instead of 0 to width/height minus 1, resulting in out of bounds screen coordinates.
Below is a picture of a cube being clipped to the negative X frustum plane...
.. and another picture of the same cube (camera slightly above cube this time) being clipped to the far plane..
I decided at this point to hold off on any sort of culling until a later point.
.. at last.. I can start tackling scan conversion!!!
Anyway, I'm glad you're able to move on to the next thing. Keep up the good work.