Sorry.  It keeps trying to encrypt the message.

Robert

While continuing to build a model that results in the problem, I discovered 
something I didn't see before.  The IVE model had an incorrect number of mipmap 
levels (it had 8) for a 32x32 texture.  It makes sense that glTexStorage2D 
would generate INVALID_OPERATION in this case.  Rebuilding the model from a 
source with uncompressed textures and recompressing the textures worked.  The 
original model was converted with a much older version of OSG, pre OSG 3 for 
sure.

So I was barking up the wrong tree:)

That addresses my specific issue without needing a change to OSG 3.4.0.  
However, I still think it is worth trying for the OSX case.


Trajce

In osg/Texture.cpp, function applyTexImage2D(), find the line:

useTexStorage &= sizedInternalFormat != 0;

add the following after the line:

if ( useTexStorage && compressed_image && numMipmapLevels > 2 )
{
    numMipmapLevels -= 2;
}

This is clearly not production quality as it assumes block size is 4 and 
complete mipmaps to 1x1.  It should be enough to check the approach.  You may 
have to set GL_TEXTURE_MAX_LEVEL if the driver thinks the texture is 
incomplete, but I didn't have that issue.

Scott
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to