Hi Dženan,

You can't use GraphicsWindowEmbedded and expect any of your traits to
be honoured - it's essentially a non-op class designed to make it very
easy to integrate the OSG with 3rd party graphics contexts, it doesn't
provide any graphics context support itself deferring it all to the
3rd party contexts.  In your case the QGLWidget needs to be set up
with an RGBA buffer.

Robert.

2010/8/16 Dženan Zukić <dzen...@gmail.com>:
> Hi,
>
> I changed the window creation code, but the resulting png still has alpha=1.
>
> Code:
> AdapterWidget::AdapterWidget( QWidget * parent, const char * name, const 
> QGLWidget * shareWidget, WindowFlags f)
>        :QGLWidget(parent, shareWidget, f)
> {
>        osg::ref_ptr<osg::DisplaySettings> ds=osg::DisplaySettings::instance();
>        ds->setMinimumNumAlphaBits(8);
>        osg::ref_ptr<osg::GraphicsContext::Traits> traits=new 
> osg::GraphicsContext::Traits(ds);
>        traits->width=width();
>        traits->height=height();
>        _gw = new osgViewer::GraphicsWindowEmbedded(traits);
>    setFocusPolicy(Qt::ClickFocus);
> }
>
>
>
> Thank you!
>
> Cheers,
> Dženan
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=30790#30790
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to