Bug 1332

Summary: Texture Mip Map count checking incorrect
Product: Java3D Reporter: Phil Jordan <p.j.nz>
Component: coreAssignee: Phil Jordan <p.j.nz>
Status: UNCONFIRMED ---    
Severity: normal CC: gouessej
Priority: P4    
Version: tbd   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description Phil Jordan 2016-10-20 00:23:02 CEST
The TextureRetained code assume that all mipmap levels must be present, this is not in any manner correct at the OpenGL driver level



The wrong variable is used in TextureRetained.setLive and clearLive:
a mipmapped image has both how many mips it can have and how many it does have
for example DXT image don't bother with the last 0 sized (x or y) images, this is allowed

this
for (int i = 0; i < maxLevels; i++)
should be
for (int i = 0; i <= maximumLevel; i++)


This method is redundant and also demands every mip-map be present, which is not correct
checkSizes(ImageComponentRetained images[])
It should be removed .



Also relatedly:
TextureCubeMapRetained calls
TextureRetained.checkImageSize(int level, ImageComponent image)
But the maths is wrong for a cube map so it fails incorrectly. A new correct method for maps should be written