hi,
I am confused on why my texture came out a different color?
I have a bmp file of a cloud, skyblue color on the background and white clouds. BUt when i load it on a square the color becomes
pinkish for background and cloud is white? Why pink-ish?
here are my settings:
glBindTexture(GL_TEXTURE_2D, textureNum);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexEnvf(GL_TEXTURE_2D,GL_TEXTURE_ENV_COLOR,GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D,0,4,infoheader.biWidth,infoheader.biHeight,0,GL_RGBA,GL_UNSIGNED_BYTE,filesize);
gluBuild2DMipmaps(GL_TEXTURE_2D,4,infoheader.biWidth,infoheader.biHeight,GL_RGBA,GL_UNSIGNED_BYTE,filesize);
free(filesize);
and my main.cpp( part of it) :
glBegin(GL_QUADS);
glTexCoord2f(1,1); glVertex3f(1.0f,0.0f,2.0f);
glTexCoord2f(0,1); glVertex3f(1.0f,-2.0f,2.0f);
glTexCoord2f(0,0); glVertex3f(-1.0f,-2.0f,2.0f);
glTexCoord2f(1,0); glVertex3f(-1.0f,0.0f,2.0f);