ILuint imageName;
GLuint image;
ILboolean success;
// Error check
if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION)
{
return;
}
// Initialization
ilInit();
iluInit();
ilutRenderer(ILUT_OPENGL);
ilGenImages(1, &imageName); // grab a new image name
ilBindImage(imageName); // bind it
// Error should be 0 if everything went well
ILenum Error = ilGetError();
success = ilLoadImage( (const wchar_t*) fileName );
Error = ilGetError();
The Error variable is ALWAYS != 0 (0 is when everything went well) and I don't know what to do. String issues. I hate it. THIS works:
success = ilLoadImage((const wchar_t*)"Z:/mypath/image0.jpg");
But not when I use the variable fileName :( Any help with this would be lovely. Thanks in advance [Edited by - project6 on July 9, 2008 5:30:22 AM]