• Advertisement

Archived

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

Copy to texture?

This topic is 5838 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
Advertisement
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