After checking in the new camera and grid code for the
project, I spent the the afternoon trying to figure out how to get the different
colors onto our ships including a cool glow effect.
Here’s what I came up with.
Through a much frustration and a little magic from the
“Advanced 3D Game Programming” book, I finally got the texture ops to work.
Scott helped me convert Alex’s battleship map into a .tga
with an alpha channel.

The white parts have no alpha. This may come back to bite me
(as you’ll see later), but I’m plowing through with this.
First I just tried this:
SetTextureColorStage(g_pDevice,
0, D3DTA_TEXTURE, D3DTOP_SELECTARG1, 0);

Notice how you can see space and other parts of the ship
behind it? That’s where I think having the alpha channel hurt me. Now I had to
worry about the alpha channel.
Adding a line to support the alpha didn’t work too great. I
got the parts of the ship filled in, but they weren’t colored. Check this out:
SetTextureAlphaStage(g_pDevice,
0, D3DTA_DIFFUSE, D3DTOP_SELECTARG1, 0);

Finally, after mucking with the flags for many minutes, I
came up with the combination that works:
SetTextureColorStage(g_pDevice,
0, D3DTA_TEXTURE, D3DTOP_BLENDTEXTUREALPHA,
D3DTA_DIFFUSE);
SetTextureAlphaStage(g_pDevice,
0, D3DTA_DIFFUSE, D3DTOP_SELECTARG1, 0);

Boy, that was enough for today. I’m not finished yet though…
I’m working on getting a cool glow effect on the ships now. Scott’s
helping me out with the glow maps and Ian sent me a link to some cool technology
that’ll help. Think TRON2.0
http://developer.nvidia.com/docs/io/4000/D3DTutorial_EffectsNV.pdf
Joe