It depends on which type of texture
mapping you wanna do, there are several
ways and optimizations. if you want to
texture map a quadrangle i offer you
to download the ABUSE source code
(it's a side scrolling game), i have
got this source from x2ftp.oulu.fi
There's a nice texture mapper function
among too many other useful functions.
If you want just to rotate a texture
map, for example a tile based game in
which the tile mapped ground rotates
there are some optimizations to do,
Have you ever seen the Seek 'n Destroy
game from Safari? they have done such
thing, the rotate the tile mapped
ground, the method they used was to
divide a whole 360 degrees of rotation
into some steps, for example each
10 degrees, then they have precalced
and saved the result so there is no
texture calculations done in runtime,
it's all precalced
I'm a game developer, we have developed
a game like Seek 'n Destroy but with
too much better quality and features,
it supports not only rotations but scaling
as the chop moves up or down there
are some tricks to do in such engines.
Some ideas are :
First notice that if you want to
texture map a quadrangle, which is
symetric around it's center ,you can
only calculate the pixels for half
of your quad the other half can be
calced using the first half.
If you do just rotate a bitmap
(no scaling) the best way is to
precalculate the pixel offsets and
save them as your game data.
And a really big optimization is :
if you want to texture map several
quads with the same rotation angle and
the same size (like a tiled ground)
you can texture map only one tile in
a buffer and use the same pixel offsets
for all other quads (tiles).
Our game uses the last method and
runs fast in 640x480x256 mode under
windows (with Direct X). if you want
some screen shots from the game please
email me.
Hope you are making a great game