Archived

This topic is now archived and is closed to further replies.

toroso

Combine textures

Recommended Posts

Hi All! For my 2D engine, I want to be able to do the following: Load two textures, one which contains the player, and another which I will draw on top of the player in a certain color to signify which team the player belongs to. To do this I could, in the game loop, first draw the player, and then draw the color on top. However, I would like to optimize a bit by preparing a texture consisting of the two before the game starts. Questions: - How do I do this? - Can I draw the second texture with a color modifier (like the color parameter in ID3DXSprite::Draw())?

Share this post


Link to post
Share on other sites
One way of doing it, I guess, would be to use: IDirect3DDevice8::UpdateTexture()

And for modifying the color I could use: IDirect3DDevice8::SetRenderState(D3DRS_TEXTUREFACTOR, Color)

Or can I? Is there a better way to do it?

[edited by - toroso on November 4, 2002 2:58:45 AM]

Share this post


Link to post
Share on other sites