• Advertisement
Sign in to follow this  

Resource File Problem

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