i use gluBuild2DMipmaps function to load textures.
And in some cases (using some textures) i’ve got “floating point division by zero” exception (in that function). can anybody help me?
//----------
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, w, h, GL_RGB, GL_UNSIGNED_BYTE, data);
//----------
And when I use 4 as second parameter and GL_RGBA as 5th - it works! what is wrong?