Hello

By the way, is there an easy way to implement a hud display in the
foreground, that draws 3D hud elements like coord systems or triads or the
like to overlay some logical information. The Elements would have to always
keep the same dimensions but move and rotate with the main scene. Currently
I implement it by hand by copying and modifying the monitored objects world
matrix and attach some little object right in front of the camera plane,
but I could imagine some better or even opensg/opengl built in mechanism.

What is the exact use of a foreground, only overpainting the scene or is
there more functionality?

Any idea? Currently I am using 1.8

Mit freundlichen Grüßen

Georg Wünsch.

--------------------------------------------
Dr.-Ing. Georg Wünsch

machineering GmbH & Co. KG
Simulation und Automatisierung
Pfrontener Platz 25a
80686 München

Tel: 0049-(0)89-55271364 oder 0049-(0)163-202-77-61
Mail: georg.wuen...@machineering.de
Web: www.machineering.de
--------------------------------------------
machineering GmbH & Co. KG: HRA 94550 Amtsgericht München
machineering Verwaltungs-GmbH: HRB 181877 Amtsgericht München
Geschäftsführer: Dr.-Ing. Georg Wünsch 
--------------------------------------------


-----Ursprüngliche Nachricht-----
Von: Gerrit Voß [mailto:vo...@vossg.org] 
Gesendet: Donnerstag, 3. Dezember 2009 01:33
An: opensg-users@lists.sourceforge.net
Betreff: Re: [Opensg-users] OSG::Foreground resizing problem


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 ?

> 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 ?

> 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


------------------------------------------------------------------------------
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