Hi JS,
On Wed, Sep 1, 2010 at 2:27 PM, Jean-Sébastien Guay
<[email protected]> wrote:
>
> Yes, indeed, and this is the case for most uses of OSG. Generally, you'll
> load the scene data first (so the buffered_value will be set to size 0 as
> you don't have any contexts yet) and only then will you create your viewer
> and contexts.
It will initialize with the with the
DisplaySettings::instance()->getMaxNumberOfGraphicsContexts() value.
> Even if you create your viewer first, you generally won't call realize()
> (which creates the contexts) until after all your scene data is loaded,
> because otherwise it would show an empty window for the time you're loading
> the scene data, which users don't like.
osgViewer should be doing the resizeGLObjectBuffers once it knows how
manage contexts it has.
>> On try calling
>> viewer.getSceneData()->resizeGLObjectsBuffers(uint) prior to
>> restarting the viewer threads.
>
> osg::Texture::resizeGLObjectBuffers() does this:
>
> void Texture::resizeGLObjectBuffers(unsigned int maxSize)
> {
> _textureObjectBuffer.resize(maxSize);
> }
>
> but the value that's being resized by the GLObjectsVisitor is
> _texParametersDirtyList, so calling resizeGLObjectBuffers() won't help.
This looks like a bug then, resizeGLObjectBuffers should resize all
buffers than hold per context data.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org