Hi Robert,
On 6/5/2014 11:01 AM, Robert Osfield wrote:
Hi Judson,
On 5 June 2014 14:44, Judson Weissert <[email protected]> wrote:
If I have 3 distinct rootnodes (one assigned to each viewer, and each
allocated separately), does calling resizeGLObjectBuffers() on one affect
all of them? I expected the answer to be no, but in the debugger, they all
appeared to be using the same data (the memory address of the
GlyphTexture::_glyphsToSubload container seemed to be the same for each).
The models aren't quite distinct as the osgText::Font will be cached
and automatically shared between the scene graphs, the Font manages
the GlyphTexture.
Each of the viewers will need it's own graphics context and thus
contextID. The osgText::Font can handle this fine, but you can't go
having the buffers it uses, it'll automatically reszie but this resize
needs to be single threaded. There is code in osgViewer to do this
for you but are you are creating multiple viewers independently it has
no way too coordinate it, so you're app will need to do this.
Robert.
Yes, after some additional digging, I realized I was sharing a single
osgText::Font object across the viewers. I changed my code so distinct
font obects are created for each viewer, and verified that the
GlyphTexture objects are now distinct as well. I will keep testing to
see if I missed anything else.
Thanks again for your help,
Judson
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org