Right now it's API looks like this: https://github.com/dpjudas/dpDoom/blob/ ... triangle.h
, although I might still make some minor adjustments that makes it more flexible.
Shortly explained, you call TriangleDrawer::draw with a "object to world" transform matrix (TriMatrix), a list of vertices (TriVertex, position, texcoord, light level), a draw mode controlling if its triangles, fans or strips, a cull mode (clockwise vs counter-clockwise), the sprite/plane/wall clip buffers and a texture. And that's it! - it renders those vertices like if you had called glDrawArrays in OpenGL.
You can find a simple example of how to call it at https://github.com/dpjudas/dpDoom/blob/ ... e.cpp#L904
, where it draws a cube. Top and bottom uses a cap color fill, the rest texturing. Just below that function you can see a more complex example where it draws a dome.
I'm probably going to make it a little bit more flexible with the vertices so that you can use different input than TriVertex. This is mostly because I could imagine that the modeldef stuff got its own vertex struct and converting all that to a TriVertex would be a pain.