Im loading some TGAs… but if I do not use gluBuild2DMipmaps the texture are not shown,
Code:
glBindTexture(GL_TEXTURE_2D,textures[nextFreeGlTextures].glName);
gluBuild2DMipmaps( GL_TEXTURE_2D,
3,
texture->GetImageWidth(),
texture->GetImageHeight(),
GL_RGBA,
GL_UNSIGNED_BYTE,
texture->GetPixels());glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGBA,
texture->GetImageWidth(),
texture->GetImageHeight(),
0,
GL_RGBA ,
GL_UNSIGNED_BYTE,
texture->GetPixels());
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);glTexEnvi(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE);