|
Hello
With opengl >4.3 ist seems that glu.gluBuild2DMipmaps ist deprecated.
Now in want set automatically some Mipmaps, but nothing works.
I have tested it with this code sequenz but it fails, only a base map
can be created, but no mipmaps:
gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_MIN_FILTER, GL4.GL_LINEAR_MIPMAP_LINEAR);
gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_BASE_LEVEL, 0);
gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_MAX_LEVEL, 2);
gl.glTexImage3D( GL4.GL_TEXTURE_3D, 0, format, width, height, 1, 0, format, GL4.GL_UNSIGNED_BYTE, null );
gl.glTexSubImage3D( GL4.GL_TEXTURE_3D, 0, 0, 0, 0, width(), height, 1, format, GL4.GL_UNSIGNED_BYTE, datas);
gl.glGenerateMipmap( GL4.GL_TEXTURE_3D );
Have somewhere a tip, how i can this resolve?
|