Hi folks,

I'm actually integrate osgWidget as GUI library in our engine. I know
it's beta status, but it's pure OSG and we think a better solution
than other third libraries like CEGUI.

My first test are working well. Now i try to extend simple things,
i.e. add a mechanism to set textures for the widgets. I got the
problem that i couldn't define a texture for a Label, which is an
extension of the main widget class.

This code snippet works well on a osgWidget::Widget:

osgWidget::Widget* left   = new osgWidget::Widget("left");
left->addSize(300.0f, 42.0f);
left->setImage  ("gfx/tga/bar.tga", false);
left->setCanFill(true);
left->setTexCoord(0.0f, 0.0f, osgWidget::Widget::LOWER_LEFT);
left->setTexCoord(1.0f, 0.0f, osgWidget::Widget::LOWER_RIGHT);
left->setTexCoord(1.0f, 1.0f, osgWidget::Widget::UPPER_RIGHT);
left->setTexCoord(0.0f, 1.0f, osgWidget::Widget::UPPER_LEFT);
m_container->addWidget(left);

But when i change the initialization to an osgWidget::Label instance,
i got the label without any texture. Is this a known bug?

I think it should be possible to define a textured background for a
label while you could define the label as semi or non transparent...

Best regards,
Christian

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to