Hello
I have a small issue with regarding texture rendering.
I am using devil libs for loading textures to my program.
In one pc the program load the the textures and displayed fine.
But the same program in another pc, it’s totally white. No texture is rendering.
Since it’s the same program I am bit confused.
Please let me know if u ever faced similar kind of problem, or can some one shed some light?
For your information this is how I load textures
ilInit();
ILuint ILImage;
GLuint textureHandle;
ilGenImages(1,&ILImage);
glGenTextures(1,&textureHandle);
ilBindImage(ILImage);
ILboolean success = ilLoadImage(texturePath.c_str());
glBindTexture(GL_TEXTURE_2D, textureHandle);
// enable automatic mipmap generation
glTexParameteri(GL_TEXTURE_2D, 0x8191, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexImage2D(GL_TEXTURE_2D,
0,
ilGetInteger(IL_IMAGE_BPP),
ilGetInteger(IL_IMAGE_WIDTH),
ilGetInteger(IL_IMAGE_HEIGHT),
0,
ilGetInteger(IL_IMAGE_FORMAT),
GL_UNSIGNED_BYTE,
ilGetData()
);
// release IL image
ilDeleteImages(1, &ILImage);
Thank You