• Advertisement
Sign in to follow this  

DevIL - ilGenImages question

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