Hey, I'm having a problem with DevIL that's only recently occurred, when I load an image using either ilutGLLoadImage or ilLoadImage (both report no errors) anything I then render to the screen appears faded (Not at 100% alpha) even if I'm just rendering a normal coloured quad (the quad renders fine when I don't load the image)
Does anyone have any clue as to why this may be happening?
The code I'm using to load the images is:
<--- Begin code
ILenum e;
GLenum g;
ILuint tempHandle;
ilGenImages(1, &tempHandle);
ilBindImage(tempHandle);
if(!ilLoadImage(filename.c_str()))
{
e = ilGetError();
return;
}
m_format = ilGetInteger(IL_IMAGE_FORMAT);
m_width = ilGetInteger(IL_IMAGE_WIDTH);
m_height = ilGetInteger(IL_IMAGE_HEIGHT);
m_bpp = ilGetInteger(IL_IMAGE_BPP);
glGenTextures(1, &m_id);
glBindTexture(GL_TEXTURE_2D, m_id);
while (g = glGetError())
{
const unsigned char* err = gluErrorString(g);
printf("%d", g);
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, m_bpp, m_width, m_height, 0, m_format, GL_UNSIGNED_BYTE, ilGetData());
ilDeleteImage(tempHandle);
while (g = glGetError())
{
const unsigned char* err = gluErrorString(g);
printf("%d", g);
}
<--- end code
(Neither glGetError or ilGetError report a problem, and I am Initialising il, ilu, and ilut (and setting the renderer for ilut)
I'm using C++, Visual studio 2008 (although the problem is the same on Visual Studio 2005) on Windows XP SP3
Hopefully someone has a clue what's wrong as I'd hate to end up using something else
Thankyou for your time
Andrew
I responded to this here: https://sourceforge.net/forum/message.php?msg_id=7327961