On Wed, Dec 2, 2009 at 10:33 PM, Gerrit Voß <vo...@vossg.org> wrote:

>
> Hi,
>
> again, all for 2.x
>
> On Wed, 2009-12-02 at 13:51 -0200, Pablo Carneiro Elias wrote:
> > Hi all,
> >
> > we've recently found a small problem when using Foregrounds on a
> > viewport. The Foregrounds are not adjusted correctly when the window
> > is resized (using OSG::Window::resize()): the size gets smaller when
> > window grows and bigger when windows shrinks.
>
> Which window are you using ?
>

We're using PassiveWindow, but the testSimpleSceneManager example uses
GLUTWindow and has the same problem (pressing 'q' show statistics
foreground, which gets distorted  when window is resized).

>
> > Thats the scenario: the Window resize() method, called when our window
> > is resized, schedules a resize using setResizePending( true ). The
> > isResizePending() flag is actually checked inside the doResizeGL()
> > method at OSGWindow.cpp (line 2331), which calls glViewport() is the
> > flag is true. But doResizeGL() is not called ever.
>
> correct, this is a leftover. The vieport setup is done deep inside
> the drawing backend.
>
> > A call for glViewport() is not being performed before drawing the
> > foreground, inside the render method of the viewport class.
>
> that should be ok, as long as the viewport has something to render,
> e.g. goes through the backend initialization. If not we might be
> in trouble.
>
> > The problem occurs at OSG tutorial applications as well.
>
> which one ?
>

testSimpleSceneManager program ;)

>
> > Placing a glViewport() before OSGWindow::resize() solved the problem
> > on our application.
>
> that sounds like a PassiveWindow and a PassivewViewport. Which Viewport
> are you using ? If it is a PassiveViewport, than yes the app must make
> sure that the OpenGL viewport size is correct.
>
> > We haven't sent a patch because we're not totally sure about the best
> > place to put the call to doResizeGL().
>
> it should not be needed. As said if it is an empty viewport (e.g. no
> scene) I have to think about it.
>
> kind regards,
>   gerrit
>
>
>
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>


Thanks

Pablo
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to