[osg-users] [forum] DXT texture compression

Roby Urban Chaos urbanchaos at email.it
Tue May 8 05:13:57 PDT 2018


Hi,

I got a segmentation fault during a texture compression when I moved to OSG 3.4.1 / OSG 3.6.0.
With OSG 3.2.1 no problem encountered.


Code:

osg::ref_ptr <'osg::Image'> image = osgDB::readImageFile("building.rgb");

// if valid
osg::ref_ptr <'osg::State'> state = new osg::State;
osg::ref_ptr <'osg::Texture2D'> texture = new osg::Texture2D;

texture->setInternalFormatMode (osg::Texture::USE_S3TC_DXT5_COMPRESSION);

texture->setImage(image.get());

texture->apply(*state.get());

image->readImageFromCurrentTexture(0, true);

osgDB::writeImageFile(*image, "building.dds");




The backtrace (gdb) shows an error on osg::Texture::computeRequiredTextureDimensions after the osg::Texture2D::apply.

Any suggestions or any other solution?

Thank you!

Cheers,
urbanchaos

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73565#73565







More information about the osg-users mailing list