From Guillaume Millet, "Please find a small fix to avoid crash of texture Atlas builder in case of textures with NULL image.
If an object is comming with texture and NULL image, the texture atlas builder crash when sorting textures according to texture height. The fix is to skip textures with NULL image when inserting textures in the builder texture list. "
This commit is contained in:
@@ -4409,7 +4409,7 @@ void Optimizer::TextureAtlasVisitor::optimize()
|
||||
bool t_repeat = texture->getWrap(osg::Texture2D::WRAP_T)==osg::Texture2D::REPEAT ||
|
||||
texture->getWrap(osg::Texture2D::WRAP_T)==osg::Texture2D::MIRROR;
|
||||
|
||||
if (!s_repeat && !t_repeat)
|
||||
if (texture->getImage() && !s_repeat && !t_repeat)
|
||||
{
|
||||
_builder.addSource(*titr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user