-----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Lucas SART
> Sent: 07 September 2012 11:08
> To: [email protected]
> Subject: Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph
>
>Hi, 
>
> I had looking for why it doesn't work. It seems that the first tab camera 
> projection 
> matrix and view matrix are not valid (components = -1.#IND000000000000) and I 
> don't know why. I tryed to look into OSG code but I don't found what is 
> wrong... 
> If someone have an idea it would be great !

Oddly, I think I just encountered this problem yesterday.

If the QT widget ever gets resized to zero (as can happen sometimes during 
setup and intermediate layout stages), and osgQt::GLWidget::resizeEvent is 
called with width and height equal to zero, the camera projection matrix gets 
screwed up due to divide-by-zeroes, and never recovers because resizing always 
takes into account the existing camera matrix.

I solved the problem by preventing osgQt::GLWidget::resizeEvent being called by 
my GLWidget subclass if either dimension was zero. But I suppose it would 
probably be better if a fix was made inside the osgQt library.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to