Hi Andreas,

Thanks for the succinct code change to reproduce the problem.  I will
ponder on what might be wrong, and have a little tinker.

I suspect its the internalisation of the Font StateSet's inside the
Text::drawImplementation that is "hiding" the StateSet you are
attaching to the Text itself.  Perhaps the Text::drawImplementation
should just do a state.applyTextureAttribute()...

Robert.

On 8/1/06, Andreas Ekstrand <[EMAIL PROTECTED]> wrote:
To illustrate the problem I attach a modified osgtext example, applying
a state set to the screen-aligned text4. This state set attempts to
force textures to be enabled on the text, avoiding the text to disappear
when pressing 't'. If the state set is applied to the geode it works
fine, but if it's applied to text4 it doesn't work.

/Andreas

Robert Osfield wrote:

> Destroying a graphics context then recreating a new one without the
> scene graph objects knowing will cause plenty of problems because the
> scene graph holds OpenGL object ID's that are invalidated by
> destroying the graphics context, but the OSG doesn't know that they
> are invalid.
>
> The solution to this is to tell the scene graph to relase all its
> OpenGL objects before destroying the graphics context.  The
> osgsimplepager example deliberately has a path that does multiple
> creation and destruction of contexts to show how its done so please
> refer to this.
>
> As for the state inherintance issue, please modify one of the OSG
> examples to reproduce the problem, then I'll have a look at this.
> State inheritance with osgText::Text should now work better than it
> did before since the Font StateSet's is no longer forced to be part of
> the osgText::Text object so you can attach your own state to it
> without it being overriden as it would be before.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to