Advertisement Jump to content
Sign in to follow this  

Using D3DX To Load Images From Resources

This topic is 4911 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

I've asked this question a number of times on a number of forums, and yet, no one seems to have the answer! Has anyone managed to load textures from resources that are not BMP files using D3DXCreateTextureFromResource/D3DXCreateTextureFromResourceEx? If so, please tell me how you did it. Here is what I have in the resource script: Ball RT_RCDATA "ball.png" And here is how I create the texture: D3DXCreateTextureFromResource(Device, NULL, "Ball", &Ball); I don't understand what is going on. In the documentation it says, "The resource being loaded must be of type RT_BITMAP or RT_RCDATA. Resource type RT_RCDATA is used to load formats other than bitmaps (such as .tga, .jpg, and .dds)." I'm loading a PNG and I've got it loaded as type RT_RCDATA, so everything should be fine. Please help, Leeran

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!