I've finally worked out the big questions surrounding a wireframe engine, now I'm trying to fill these triangles in with solid colors. This results in two problems:

1. The function I use to fill the shapes is limited to triangles, and even this function is framerate killingly slow.

2. My models don't look right because their polygons draw on top of each other, regardless of their positions relative to the camera.

These problems rule out using this engine for an actual game, which is my ultimate goal. Any help would be greatly appreciated.