Drawing a textured triangle with CPU instead of GPU
- by Jenko
I understand the benefits of GPU rendering and such, but for a certain limited application I need to render textured triangles purely using CPU.
I've built a 3D engine capable of object handling, transform, projection, culling and the likes ... now all I need is a little code snippet that draws a single textured triangle onto a bitmap... any language accepted!
Inputs: Texture bitmap, Triangle U/V/W coords, Triangle X/Y screen coords
Output: The textured triangle drawn at the given screen coords
I've currently been using a platform function to draw triangles to screen, but I'm looking to handle it myself to speeden up the process.