]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/TextureBuilder.cxx
Improved tile cache priority scheme.
[simgear.git] / simgear / scene / material / TextureBuilder.cxx
index 61b62dfec78221d92dd16fb6ce4426c1c18d3b82..0e487a99bd7c84b39c173d7001abf6d4bebe96f8 100644 (file)
@@ -135,7 +135,7 @@ void TextureUnitBuilder::buildAttribute(Effect* effect, Pass* pass,
     catch (BuilderException& ) {
         SG_LOG(SG_INPUT, SG_ALERT, "No image file, "
             << "maybe the reader did not set the filename attribute, "
-            << "using white on " << pass->getName());
+            << "using white for type '" << type << "' on '" << pass->getName() << "', in " << prop->getPath() );
         texture = StateAttributeFactory::instance()->getWhiteTexture();
     }
     pass->setTextureAttributeAndModes(unit, texture);
@@ -236,8 +236,8 @@ void setAttrs(const TexTuple& attrs, Texture* tex,
             = osgDB::Registry::instance()->readImage(imageName, options);
         if (result.success()) {
             osg::ref_ptr<osg::Image> image = result.getImage();
-            image = computeMipmap( image, attrs.get<7>() );
-            tex->setImage(GL_FRONT_AND_BACK, image);
+            image = computeMipmap( image.get(), attrs.get<7>() );
+            tex->setImage(GL_FRONT_AND_BACK, image.get());
             int s = image->s();
             int t = image->t();
             if (s <= t && 32 <= s) {