Jump to content
  • Advertisement
Sign in to follow this  
lzr

Using D3DX To Load Images From Resources

This topic is 4848 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
Advertisement
Sign in to follow this  

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