Advertisement Jump to content


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


Copying an image to a texture. (directX8)

This topic is 6546 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. My problem is that I should somehow copy an image (surface or texture) to a texture but I don''t know how. I tried to do it with CopyRects() but since it takes pointers to surfaces, not textures I coudln''t get it to work. Are there any functions to copy a surface to a texture (or a texture to a texture)? Or should I lock the texture and copy it myself? The source image is smaller than the destination texture (stretching not needed) and some sort of colorkeying (or alpha testing) should be used when copying. I loaded the destination texture with D3DXCreateTextureFromFileA() So i have no idea what format it is or anything. I''m using direct3d with directX8 so I can''t use directdraw functions. Commando Commando''s Base

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!