Hello
Is there a way to use an extended GLWidget managed by GraphicsWindowQt together
within a custom traits?
Just overwriting GLWidget and give its instance as a parameter to the
GraphicsWindowQt constructor does not work out.
I did following nasty Workaround, but maybe there is a nicer way.
[code]
class GraphicsWindowQt2 : public osgQt::GraphicsWindowQt{
public:
GraphicsWindowQt2(osgQt::GLWidget* widget, osg::GraphicsContext::Traits*
traits)
: osgQt::GraphicsWindowQt(widget){
_traits = traits;
init(NULL,NULL,NULL);
}
};
class QOsgViewer(QWidget* parent) : public osgQT::GLWidget
...
{
...
void init(){
...
camera->setGraphicsContext( new GraphicsWindowQt2(this, traits) );
...
}
...
}
[/code]
If one of you has a better solution, please let me know.
Thank you!
Cheers,
Marco
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39651#39651
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org