Whoops! I went and broke this one. On purpose. Maybe if you're nice I'll fix it and re-publish it. Otherwise feel free to do so yourself. All you gotta do is take out this catch that makes it quit during init if it can't find a file that I shouldn't have included in the first place. Oh wait, all I posted was the binary. Let me go dig out the code and fix it up for y'all . . .
This demonstrates software texture mapping, all extremely parallel to OpenGL. It's practically a software implementation of OpenGL - at least the subset of functions which I wanted to implement.
- Features:
- Fixed-point precision math
- Perspective-corrected coordinate interpolation
- 1D, 2D, Cube Map and 3D textures
- Texture wrapping: repeat, clamp, and mirror
- Texture magnification filtering: nearest and linear
The real impressive thing to see is how fast this does linear texture filtering. It's practically no slower than it does nearest-neighbor. Of course I'm sure anyone out there with a bit more enthusiasm in hand-optimizing assembly could outperform my own. No texture minimization. No mip-mapping. Sorry folks.
- Texture coordinate generation: linear, spherical, cylindrical, and of course manual
-
Texture Mapping (PPT)
Final Paper (PDF) - [v1] - [v2]
Demo - [bin]