Hi to everyone, today I stumbled upon a strange problem which I finally solved and I thought I’d get some opinions. I was trying to load a texture to an object. The texture was not showing up until I called:
g_EarthTexture = LoadTextureFile("textures/ev11612_land_ocean_ice_2048.bmp");
glBindTexture(GL_TEXTURE_2D, g_EarthTexture->texID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // line added
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); // line added
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, g_EarthTexture->width,
g_EarthTexture->height, 0, GL_RGB, GL_UNSIGNED_BYTE,
g_EarthTexture->data);
My question is, doesn’t OpenGL provide default parameters for the textures? You have to define each one yourself? If yes, which ones are necessary? My programming environment is VC++ .NET 2003 + GLUT on Win2K. Thanks in advance