I can’t find a clear explanation, is there really no standard after 1.1? There are inconsistencies between the red book 1.2 and my 1.1 header file.
My issue right now is with mipmaping, the sample code provided doesn’t seem to work. My code:
glGenTextures(1, &text_mud);
glBindTexture(GL_TEXTURE_2D, text_mud);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512,
512, 0, GL_RGBA, GL_UNSIGNED_BYTE, BMP512);
glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, 128,
128, 0, GL_RGBA, GL_UNSIGNED_BYTE, BMP128);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 40);
The above texture init does not render the texture unless I set GL_TEXTURE_MIN_FILTER to GL_NEAREST instead of GL_NEAREST_MIPMAP_NEAREST.
The last line does not compile because GL_TEXTURE_MAX_LOD is undefined in 1.1.