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.

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.

A call for glViewport() is not being performed before drawing the
foreground, inside the render method of the viewport class. The problem
occurs at OSG tutorial applications as well.
Placing a glViewport() before OSGWindow::resize() solved the problem on our
application.

We haven't sent a patch because we're not totally sure about the best place
to put the call to doResizeGL().

Best regards

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