lukem95 wrote:wndproc that looks pretty cool, nice concept
open source?
I'm afraid, no. But the concepts aren't that hard to program.
If you want to program your own 3D software renderer, follow these steps:
1) Write (or take over) a basic math library with matrix and vector support.
2) Write a triangle drawing algorithm (<- was the most tricky part).
3) Extract vertex- and index buffer data from any 3d object.
4) Transform vertex data into screen space (by multiplying with world, view and projection matrices).
5) Add some animation or mouse interaction, by modifying the world matrix.
6) Draw the transformed triangles to a backbuffer (color information) and a z-buffer (floating point buffer holding depth values), using the z-buffer for clipping.
7) Apply a simple diffuse lightning vertex shader for a nice color shading.
8.) Copy the backbuffer to screen and clear z- and backbuffers for the next frame.
9) Loop steps 4 to 8.
If you run into trouble, check
http://www.gamedev.net or send me a message.