ryerrabelli / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

DDS textures with partial mipmapping do not render #391

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
DDS textures with only some mipmap levels defined do not render (or render as 
black, not sure which). This happens because GL_TEXTURE_MAX_LEVEL is being set 
wrong in LwjglRenderer, it is set to

glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length);

when it should be set to

glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, img.getMipMapSizes().length - 1);

(GL_TEXTURE_MAX_LEVEL should be the index of the maximum level, not the count 
of levels)

Changing this fixed the issue for me anyway. Using latest trunk from svn

Original issue reported on code.google.com by immort...@gmail.com on 24 Aug 2011 at 11:02

GoogleCodeExporter commented 8 years ago
Specifically SVN r8068

Original comment by immort...@gmail.com on 24 Aug 2011 at 2:18

GoogleCodeExporter commented 8 years ago

Original comment by normen667 on 26 Aug 2011 at 10:11

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 25 Mar 2012 at 4:45

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 1 Jun 2012 at 10:37