So I've been using the DevIL library for a while now (along with ILU and ILUT) and have had few problems with it after I got it working. That is, until now. All of a sudden it does not seem to work with any image of any format. I'm using this code:
GLuint myTex;
void Init() {
myTex = ilutGLLoadImage(L"img.tga");
}
void Draw() { // 2D Drawing
glBindTexture(GL_TEXTURE_2D, myTex);
draw::TwoD::Textured::Rectangle(100, 100, 200, 200);
}
The rectangle appears blank white. I checked the function and it seems like it should work fine, so I tried calling ilGetError()
. It returned IL_INVALID_EXTENSION
for nearly every different image I tried. I've tried putting the whole directory and even made sure that I was using the right version of DevIL (unicode) and still it returns this. Any idea what's going on?
Thanks in advance!
Edit:
I've also notices that DevIL returns this even if the file specified does not exist. This makes me think something is wrong with DevIL itself instead of my code.
Edit 2:
So I found out that I placed the unicode DLLs in the project directory (as necessary) but it turns out I linked to the library directories for multi-byte chars. Even after fixing it, the problem continued. I'm stumped by this one.
Edit 3:
Okay sorry for so many edits but I also just found out that the DevIL setup I had in my previous projects still work perfectly. It seems to only be the project I'm using now. All the relevant code is the same (copy/pasted), so I think it has to do with the project properties, but I can't find any differences. Do you know of any way to copy the properties of one project to another in VS2015?