Hi Thomas, Then load is called when no texture object is available so that the GL texture object has to be created when downloading the image data, while subload is called when there is a texture object available but the image data has a changed, where texture subloading should be used. Texture subloading is far more efficient that having to create the texture objects and copying the data is certainly the way it should be used. Read this as lots of loads == ineffcient, lots of subloads == more efficient.
With the latest OSG in svn/trunk and the 2.9.x series there is support for texture object pool that is able to reuse texture objects which shouldn't effect things, other than enable better reuse and hence more subloads instead of loads. Robert. On Fri, Aug 20, 2010 at 2:21 PM, Thomas Hogarth <[email protected]> wrote: > Hi All > I've been using texture2d subload callbacks for quite a while now to stream > video images into power of 2 textures. I also have a Texture Rectangle > version which runs fine on 80% of machines I use so it's not often I run the > Texture2D version. > Any how, yesterday a client was complaining that her screen had gone black > and upon investigation I found that suddenly my > osg::Texture2D::SubloadCallback was calling load nearly every frame then > calling subload only occasionally. This has also caused my memory use to go > crazy (ouput looks a bit like the below) > LOAD TEX > SUB LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > LOAD TEX > SUB LOAD TEX > LOAD TEX > I know it's something I must have changed but was wondering if anyone could > point me to specifically what makes load get called instead of subload. > Cheers > Tom > PS > If only you could see the result on screen, it seems to be using images > captured from the cam a good ten mins ago and spitting them back out at me. > It's like a time portal > PPS > Side note about IPhone port. I finally started learning CMake last night, > which so far seems pretty straight forward. I'll let you know how I get on. > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

