[osg-users] empty scene after resize

Robert Osfield robert.osfield at gmail.com
Tue Jul 15 02:50:47 PDT 2008


Hi Michele,

We should probably add such as catch higher up in the OSG.  I'm
spinning half a dozen plates at this end so would appreciate if you
could chase this up.

Robert.

On Tue, Jul 15, 2008 at 9:36 AM, Michele Bosi <michele.bosi at gmail.com> wrote:
> I just wanted to let you know how I solved my problem: it seems that
> one has to avoid sending the resize events to OSG when the new size
> has zero area, that is, the width or height are == 0. Basically I just
> put the condition "if ( width * height )" in the Qt's resize event
> handler before dispatching the resize event to OSG.
>
> Cheers,
> Michele
>
> On Mon, Jul 14, 2008 at 11:08 PM, Robert Osfield
> <robert.osfield at gmail.com> wrote:
>> Hi Michele,
>>
>> This most likely will be because the viewport is going to 0,0,0,0 size
>> and messing up projection matrix.  I'm afraid I don't have an straight
>> forward solutions to this - it most likely will require so special
>> catch code to handle this problem case.
>>
>> Robert.
>>
>> On Mon, Jul 14, 2008 at 10:05 PM, Michele Bosi <michele.bosi at gmail.com> wrote:
>>> I am sure this is a known problem, but looking on the archives didn't
>>> help, maybe I didn't come up with the right keywords, anyway... I am
>>> using OSG 2.4 (but the problem was already there since OSG 2.0) under
>>> both Win XP and Linux, with the Qt4 wrapper and when I resize the
>>> window to zero width or height and then restore it the content of the
>>> scene disappears (my program has 3d views that can be temprarily
>>> hidden/restored). This behaviour seem not to be related to the driver
>>> but to OSG since with OSG-based programs I get the same problem with
>>> nVidias as well as with ATIs, while other non-OSG-based programs don't
>>> show this problem.
>>>
>>> I suspect that with a zero-area viewport something breaks into the
>>> culling mechanism or some division by zero mixes up some OSG internal
>>> state or matrix.
>>> Does anyone know how to fix or work around this? do I have to reset
>>> something once I detect a non-zero area viewport in my resize event
>>> handler?
>>>
>>> Thanks,
>>> Michele
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list