]> git.mxchange.org Git - simgear.git/commitdiff
Fix compilation if OSG ref_ptr implicit conversion is not enabled.
authorJames Turner <zakalawe@mac.com>
Fri, 6 Aug 2010 17:42:56 +0000 (18:42 +0100)
committerJames Turner <zakalawe@mac.com>
Fri, 6 Aug 2010 17:42:56 +0000 (18:42 +0100)
simgear/scene/material/TextureBuilder.cxx

index a875b681fc75b03d45674c1f861456e4b84681cb..47565ad548e463baa514d70814ce5eccf4e4edb9 100644 (file)
@@ -570,43 +570,43 @@ Texture* CubeMapBuilder::build(Effect* effect, const SGPropertyNode* props,
                                // Choose correct image
                                switch(n) {
                                case 0:  // Front
-                                       copySubImage(image, width, 0, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_Y, subimg);
+                                       copySubImage(image, width, 0, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_Y, subimg.get());
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
                                        break;
                                case 1:  // Left
-                                       copySubImage(image, 0, height, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_X, subimg);
+                                       copySubImage(image, 0, height, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_X, subimg.get());
                                        cubeTexture->setWrap(osg::Texture2D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
                                        break;
                                case 2:  // Top
-                                       copySubImage(image, width, height, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_Z, subimg);
+                                       copySubImage(image, width, height, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_Z, subimg.get());
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
                                        break;
                                case 3:  // Right
-                                       copySubImage(image, width*2, height, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_X, subimg);
+                                       copySubImage(image, width*2, height, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::POSITIVE_X, subimg.get());
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
                                        break;
                                case 4:  // Back
-                                       copySubImage(image, width, height*2, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_Y, subimg);
+                                       copySubImage(image, width, height*2, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_Y, subimg.get());
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
                                        break;
                                case 5:  // Bottom
-                                       copySubImage(image, width, height*3, width, height, subimg, 0, 0);
-                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_Z, subimg);
+                                       copySubImage(image, width, height*3, width, height, subimg.get(), 0, 0);
+                                       cubeTexture->setImage(TextureCubeMap::NEGATIVE_Z, subimg.get());
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
                                        cubeTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture::CLAMP_TO_EDGE);