Hi Andre,

I'm finding it difficult to guess what your after/what problems your
seeing.  The best I can do is say as a general note, one would
typically use control the rendering order via
StateSet::setRenderingDetails(..) from within the scene graph rather
attempting to set globals.

Robert.

On Mon, Dec 14, 2009 at 2:06 PM, Andre Simoes <[email protected]> wrote:
> Hello There.
>
> I've been reading alot of e-mails regarding drawing of objects in sequence,
> like a simple OpenGL program that draws each Geometry independently of its
> complexibility and cost to the GPU.
>
> And for now I'm working in an OSG scenario in which I'm doing a toolkit that
> generates widgets in 2D Orthographic mode. Almost all of the components are
> being drawn with LIGHTING disabled because they are unecessary for the case.
> And with or without RenderBin::TRAVERSAL_ORDER option enabled I can add a
> widget as a child of other widget without problems by using
> osg::Group::insertChild( 0, child ).
>
> The problem is when I try to draw osgText::Texts inside components as
> children. They simply not appear on the screen.
> - if i create them and set their StateSet as setGlobalDefaults the text
> appears as a Child of other widgets ( But in this case i loose color and
> background transparency control of the text and is something i would not
> like to loose ).
> - If i draw them without a widget on the screen the Text appears.
>
> After that I thought that TRAVERSAL_ORDER could solve the problem. But
> TRAVERSAL_ORDER is not solving the problem.
>
> I'm doing on the initial part of my code before creating any X Window with
> osgViewer::View... :
>
> int main( void )
> {
>         using namespace osgUtil;
>         RenderBin::setDefaultRenderBinSortMode( RenderBin::TRAVERSAL_ORDER
> );
>         RenderBin::SortMode s = RenderBin::getDefaultRenderBinSortMode();
>
>         /// window init
>        /// widget init
>
>        return viewer.run();
> }
>
> My questions are:
> - Am I looking to the right option (RenderBin::TRAVERSAL_ORDER ) ?
> - Am I setting TRAVERSAL_ORDER in the right way ?
>
> Sorry to ask but i already lost one week searching for documentation about
> this problem and no good results.
>
> Kind Regards
> Andre
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to