Hi Alexandre,

I believe your changes suggest a deeper problem with the
design/implementation of the logo.  The plugin is a very early hack
that hasn't really been fully updated to take advantage of various
modern OSG features, I don't have time right now for a full rewrite
though.

Is the problem you are seeing triggered by the logo being used when
multiple graphics windows are used?

It does look like code assumes a single view per graphics window,
something that isn't always true with the OSG these days.  In the
Producer days when this plugin was written one couldn't easily have
multiple views per window, but these days it's trivial and common
place thing to do. If the logo was attached in a window with multiple
views that all shared the same scene graph we'd end up with the
viewport being updated multiple times, with the last view's viewport
taking precedence.

One possible solution would be to have the callback ignore the cull
visitor's viewport and use the whole graphics windows dimensions, so
the logo would be placed relative to the window rather than the last
rendered viewport.

All in all though, putting a logo in the scene graph is not the best
way of tackling the task of adding logo's - it'd be much better to use
a slave camera attached to the viewer/viewer.

Thougts?

Robert.

On Mon, Jul 6, 2009 at 3:57 PM, Alexandre Amalric<alex.pix...@gmail.com> wrote:
> Hi osg-users,
>
> I'm using osg svn version 2.9.5 and I've apparently found a bug in osgPlugin
> logo.
>
> When using more than one view logosCullCallback function is called without
> checking context ID from the cull visitor is equal to logo _contextID
> variable. It involves updating logo's viewport with different sizes.
> So I made a fix well working, at least the way I use the plugin.
>
> I'm not used to post fix so I attached the modified cpp files in current
> mail, hope it helps...
>
> Code I added is indicated with comment :
>
> // AA DD/MM/YY Fix
> Kind regards
> --
> Alexandre AMALRIC                   Ingénieur R&D
> ===================================
> PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
> http://www.pixxim.fr
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to