Drawing a textured triangle with CPU instead of GPU
Posted
by
Jenko
on Game Development
See other posts from Game Development
or by Jenko
Published on 2011-11-13T06:30:06Z
Indexed on
2011/11/13
10:11 UTC
Read the original article
Hit count: 388
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.
© Game Development or respective owner