It seems a little misleading or a bug that Texture2D::getNumImages()
always returns 1 even if the _image member variable is NULL. Shouldn't
it return 0 if the _image member is NULL? 

I know it seems odd to have a Texture2D with a NULL _image, but I took a
look at the ive reader and it appears that if it fails to read the image
file then the Texture2D's _image will end up being NULL. See below:

>> From ive reader plugin Texture2D::read()

    IncludeImageMode includeImg = (IncludeImageMode)in->readChar();

    osg::Image *image = in->readImage(includeImg);
    if(image) {
        setImage(image);
    }

Alex
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to