Jump to content
  • Advertisement


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


Copy to texture?

This topic is 6114 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 Can anyone give me a hint how i copy 2 textures into one with the alpha blending intact? is it possible to set the rendertarget to the surface of the texture and draw the other textures on it as sprites ? (and then set the rendertarget back to the original) Is it also possible to resize a texture in memory? Regards Kristian Mortensen bwt. im using the DX8 sdk

Share this post

Link to post
Share on other sites
You''d have to create a new texture surface, render texture 1 onto it, then render texture 2 on top of it (using alpha blending and transformed verts).
You can''t resize a texture in memory, you need to destroy and recreate it.
You should probably just Lock() both textures and do a manual alpha blend. I don''t know how fast it''d be (profile it), and render to texture isn''t supported on all cards. If you find that the render-to-texture method is faster, you could test whether the cars supports rtt, and fallback to a manual blend if it doesn''t.

HTH, Steve

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!