<div dir="ltr">Here is the repro code. I made it as simple as I could. Please note that it only shows the core of the problem. One may argue that with this limit I set here in example, we have no room for last RTT texture anyway. But the problem will show up too if I increase the TEX_POOL limit to store 3 RTT textures, but will initially fill the memory with other textures (with images of different resolution or format). Once memory size of these initial textures + newly added RTT passes TEXTURE_POOL_SIZE, the problem will show up when one of the RTTs is added later... <div><br></div><div>Cheers,</div><div>Wojtek </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-09 20:17 GMT+02:00 Wojciech Lewandowski <span dir="ltr"><<a href="mailto:w.p.lewandowski@gmail.com" target="_blank">w.p.lewandowski@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">Could you modify one to OSG examples to illustrate the problem so<br></span><span style="font-size:12.8px">others can reproduce it. I have paged databases to test against, but<br></span><span style="font-size:12.8px">not the particular FBO usage that you are using along with it.</span></blockquote><div><br></div></span><div>Ok. I'll try to make a repro. I do believe however that in our case we do not attach images to FBO but empty textures. And those textures are scraped. I wrote 'I believe' because its not all my code, maybe someone attached images somewhere to debug. I will double check and include this case in repro if its true.</div><div><br></div><div>Wojtek</div><div class="m_-4551344535219423238gmail-yj6qo m_-4551344535219423238gmail-ajU" style="font-size:12.8px"></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-10-09 14:47 GMT+02:00 Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 9 October 2016 at 11:27, Wojciech Lewandowski<br>
<span><<a href="mailto:w.p.lewandowski@gmail.com" target="_blank">w.p.lewandowski@gmail.com</a>> wrote:<br>
> Hi, Robert. Thanks for quick response.<br>
><br>
>> Perhaps a flag in osg::Texture might be appropriate to declare whether<br>
>> this Texture is<br>
>> suitable for reuse or not.<br>
><br>
><br>
> Perhaps. However, I have the feeling that this flag would be equivalent to<br>
> checking if (image != NULL) in current 3.5.5 OSG code base context. I don't<br>
> see how already assigned and active image-less texture coud survive such<br>
> Take operation without a callback (or similar mechanism) to let texture<br>
> owner refresh it before apply.<br>
<br>
</span>In design of the texture pool assumes that if the image is NULL then<br>
the texture can't be taken. If this isn't being upheld then it looks<br>
like a bug.<br>
<span><br>
> Considering need for supporting multiple<br>
> contexts and fact that such refresh callback would require action in draw<br>
> stage, I see this postulate (for a refresh callback) as hard to implement<br>
> and probably not used by users in practice. So I conclude that (image !=<br>
> NULL) is probably a sufficient check for now ;-). Did I skip some use case ?<br>
<br>
</span>One case would be people assigning an osg::Image to textures that are<br>
assigned to an FBO.<br>
<br>
FYI, I'm just quickly checking posts, I'm not working at a dev<br>
computer so I can't review code or spend long things deeply about a<br>
topic. so my response are really preliminary :-)<br>
<br>
Could you modify one to OSG examples to illustrate the problem so<br>
others can reproduce it. I have paged databases to test against, but<br>
not the particular FBO usage that you are using along with it.<br>
<span class="m_-4551344535219423238HOEnZb"><font color="#888888"><br>
Robert.<br>
</font></span><div class="m_-4551344535219423238HOEnZb"><div class="m_-4551344535219423238h5">______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>