Jump to content
  • Advertisement
Sign in to follow this  
Sir Sapo

Resource File Problem

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

Hey everyone, I've embedded a PNG inside the resource file of my program, and I want to be able to load it up into my program. I've been using DevIL to load my PNGs from filenames, but I'm not sure how to laod one from a resoure file. Can anyone tell me how? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I haven't tried DevIL, but I'd look into using the usual win32 calls LoadResource to get a handle and then LockResource to get a pointer to the raw bytes. From there you should be able to use ilLoadL in the DevIL library which just takes a pointer to a bag of bytes and interprets them as you tell it.

Share this post


Link to post
Share on other sites
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!