Login  Register

Re: Big trouble with ceating mipmaps automatically

Posted by adi on Sep 13, 2014; 6:05pm
URL: https://forum.jogamp.org/Big-trouble-with-ceating-mipmaps-automatically-tp4033083p4033144.html

SOLVED!

There are two problems with that.

First, the glGenerateMipmap function works only after 
the following code sequenz was made:

glTexParameteri( GL4.GL_TEXTURE_2D, GL4.GL_TEXTURE_MIN_FILTER, GL4.GL_LINEAR_MIPMAP_LINEAR);
glTexImage2D(GL4.GL_TEXTURE_2D, .......);
glGenerateMipmap(GL4.GL_TEXTURE_2D,);

(there are no chance with GL4.GL_TEXTURE_3D or GL4.GL_TEXTURE_2D_ARRAY in opengl 4.4, because that is
not yet implemented says the runtime)

Second, the texture(...) - and the textureLod(...) inline shader functions handels
the lod counter different. It seems, textureLod works correct.