Jump to content
  • Advertisement
Sign in to follow this  
Jenison

DevIL - ilGenImages question

This topic is 4083 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'm using DevIL for image loading. However, every time I call ilGenImages it return the same number. No matter how many times I call it. It loads textures fine, I can get the first one set. But every one after that as the same number and thus I cant bind any other image but the first one. I have a program where I dont know how many images I will be loading at all. Its completely user dependent. I'm really at a loss here.
private bool loadFile(string file)
{
	Il.ilGenImages(1, out _image);
	Il.ilBindImage(_image);
	if(Il.ilLoadImage(file))
...
}


am I missing something?

Share this post


Link to post
Share on other sites
Advertisement
Consider using this ilut function:

(C notation)
GLuint ilutGLLoadImage(filename);

You can just store and later bind its return value as a new texture name, but you'll have to delete the texture yourself when you're done.

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!