[osg-users] OSG_TEXTURE_POOL_SIZE issue

Robert Osfield robert.osfield at gmail.com
Sun Oct 9 05:47:28 PDT 2016

On 9 October 2016 at 11:27, Wojciech Lewandowski
<w.p.lewandowski at gmail.com> wrote:
> Hi, Robert. Thanks for quick response.
>> Perhaps a flag in osg::Texture might be appropriate to declare whether
>> this Texture is
>> suitable for reuse or not.
> Perhaps. However, I have the feeling that this flag would be equivalent to
> checking if (image != NULL) in current 3.5.5 OSG code base context. I don't
> see how already assigned and active image-less texture coud survive such
> Take operation without a callback (or similar mechanism) to let texture
> owner refresh it before apply.

In design of the texture pool assumes that if the image is NULL then
the texture can't be taken.  If this isn't being upheld then it looks
like a bug.

> Considering need for supporting multiple
> contexts and fact that such refresh callback would require action in draw
> stage, I see this postulate (for a refresh callback) as hard to implement
> and probably not used by users in practice. So I conclude that (image !=
> NULL) is probably a sufficient check for now ;-). Did I skip some use case ?

One case would be people assigning an osg::Image to textures that are
assigned to an FBO.

FYI, I'm just quickly checking posts, I'm not working at a dev
computer so I can't review code or spend long things deeply about a
topic. so my response are really preliminary :-)

Could you modify one to OSG examples to illustrate the problem so
others can reproduce it.  I have paged databases to test against, but
not the particular FBO usage that you are using along with it.


More information about the osg-users mailing list