Hi Robert, I just noticed that the ResizeNonPowerOfTwoHint of osg::Texture objects are not properly saved in the newer serializer formats. I believe this is caused by incorrectly specified default values.
In the Texture.cpp file for the serializer, the default for the hint is set to "false". However, the actual default value in Texture.cpp is the compile time conditional "!OSG_GLES2_FEATURES && !OSG_GL3_FEATURES". On my machine this turns out to be true. So if I save the texture to osgb/osgt with the resize hint set to false, it isn't actually written out since the serializer assumes it's the default value. But when the texture is loaded, the default of true remains unchanged. I guess you could modify the serializer to use the same default, but this might cause problems if the file is saved/loaded on two different machines with different default values. Since the default value is conditional, I would propose that the value of the hint is always written to the file. I'm not very familiar with the serializer code, so I'm not sure if this is even possible. I was hoping you or somebody that is more familiar with the code could look into this and apply an appropriate patch. Cheers, Farshid
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
