From 5e9076ec10368ddd1c0dd92c35a61b4fbe8e62c5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 3 Jul 2006 20:28:26 +0000 Subject: [PATCH] From Brede Johansen, set the default value of texture wrap mode to REPEAT to fix problem with database without .attr files. --- src/osgPlugins/OpenFlight/PaletteRecords.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/OpenFlight/PaletteRecords.cpp b/src/osgPlugins/OpenFlight/PaletteRecords.cpp index 8131e81b6..f174e32b3 100644 --- a/src/osgPlugins/OpenFlight/PaletteRecords.cpp +++ b/src/osgPlugins/OpenFlight/PaletteRecords.cpp @@ -270,17 +270,12 @@ protected: osg::ref_ptr stateset = new osg::StateSet; osg::Texture2D* texture = new osg::Texture2D; + texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::REPEAT); + texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::REPEAT); texture->setResizeNonPowerOfTwoHint(true); texture->setImage(image.get()); stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); - // Blend mode moved to Face. - //if (image->isImageTranslucent()) - //{ - // stateset->setAttributeAndModes(new osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE_MINUS_SRC_ALPHA),osg::StateAttribute::ON); - // stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); - //} - // Read attribute file std::string attrname = filename + ".attr"; osg::ref_ptr attr = dynamic_cast(osgDB::readObjectFile(attrname,document.getOptions()));