Jump to content
  • Advertisement


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


Combine textures

This topic is 5856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!