Hi Alexander,

I've just reviewed your change and as it won't be thread safe it's not
appropriate to merge.  Looking at the wider code it looks to me like
the resize of the buffer hasn't got through to the Text3D.  I'm not
the original author of this particular code so I'm trying to get my
head around exactly how it should be working, but am still a bit
confused.

For a while I've felt that adding the auto scaling and rotation into
osgText::Text and Text3D was a mistake and that this functionality
should be done at a high level node such as osg::AutoTransform.  The
other alternative which would probably be better is to compute the
local position matrices on the fly in the drawImplementation method
and not cache anything - this approach wouldn't require the public
interface to change.

Robert.

On Thu, Feb 3, 2011 at 1:20 PM, Alexander Sinditskiy
<[email protected]> wrote:
> Hi,
>
> i found the problem in the text3d.
>
> the way to produce this problem:
>
> first, you must have:
>        a scene with text3d node and some other objects for orientation, for 
> example - grid.
>        one graphic context.(first window)
>
> you see text good, without any problems...
>
> then need to create new grapic context for scene (second window)
> and look on second window - Text3d have in second window another position 
> than in first window.
>
> i try to debug it ->
> file: src/osgText/Text3D.cpp
>
> during first run for the second context, we want to take the cache but have 
> not exist yet. Matrixs in the _autoTransformCache not valid.
>
>
> Code:
> void Text3D::drawImplementation(osg::RenderInfo& renderInfo) const
> ...
> osg::Matrix modelview(_autoTransformCache[contextID]._matrix);
> ...
>
>
>
> i suggest to  compute _autoTransformCache for this context.
>
> please look patch.
>
> Thank you!
>
> Cheers,
> Alexander
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=36325#36325
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to