With regards to the original question, when switching contexts it usually
happens that text is suddenly displayed as rectangles.

I am not sure of what is happening in the background, but my problem was
solved when I set shareAllGLContexts() to true on the RenderSurface.
Other than that I have also observed the same problem mentioned by Andreas,
that changing the texture mode on the root nodes tend to change the
rendering of text, even though the StateSet is set to PROTECTED.

Regards, Werner.

_______________________________________________
Werner LindgÄrd, Programmerer
Telephone   +47 67 81 70 00
Direct line     +47 67 81 70 68
[EMAIL PROTECTED]

ViaNova Systems AS
Leif Tronstads Plass 4, P.O.Box 434
N-1302 Sandvika, Norway
________________________________________________

http://www.vianova.no
http://www.novapoint.com

________________________________________________



                                                                       
             Andreas Ekstrand                                          
             <andreas.ekstrand                                         
             @remograph.com>                                            To
             Sent by:                  osg users                       
             osg-users-bounces         <[email protected]>  
             @openscenegraph.n                                          cc
             et                                                        
                                                                   Subject
                                       Re: [osg-users] About osgText::Text
             01.08.2006 08:30                                          
                                                                       
                                                                       
             Please respond to                                         
                 osg users                                             
             <[EMAIL PROTECTED]                                         
               enegraph.net>                                           
                                                                       
                                                                       



Hi,

I think I have the same, or at least a similar, problem. I attach the
same subgraph to two group nodes, one with a state set defining the draw
mode as FILL and one setting the draw mode to LINE, to achieve contours
around my polygons. The subgraph also contains text drawables and to
avoid contours around these I define a new state set on them, setting
the draw mode to FILL and PROTECTED. Now, if I set this state set on the
geode containing the text it all works fine, but if I apply the state
set on the text drawable, rectangles are shown around my text. Also, if
I turn off textures on the top state set, my text disappears if the
state set is applied to the text drawables, even if I have turned on
textures in the text drawable state set.

So it seems that protecting state modes suddenly doesn't work on text
drawables. This worked fine in OSG 1.0.

Regards,
Andreas Ekstrand


Robert Osfield wrote:

> Hi Chen,
>
> On 7/31/06, chen shan <[EMAIL PROTECTED]> wrote:
>
>> You are right. The text is correct when it first is displayed. But
>> when I
>> switch to another scene graph, the presentation happen.
>
>
> Ok, there is the big important bit of information missing..  Clearlly
> how to are doing the "switch to another scene graph" is the root of
> the problem.
>
> Still way too little information to guess at what might be wrong.  How
> are you doing the switch?  Are multiple graphics contexts involved?
> Multiple viewers?
>
> 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