Hi Alexandre,

This screams out that the plugin is being used in ways that it simply
can't can, the same for your follow up email.  The plugin tries to
achieve a feature in a way that is quite simply the wrong way tackle
it in a general purpose way - it'll only ever work in very constrained
scene graph usage.   The write way to have logos is to add them to
your GraphicsWindow as a HUD camera, much in the way that the stats or
help is currently done in osgViewer.

Robert.

On Tue, Jul 21, 2009 at 10:35 AM, Alexandre
Amalric<[email protected]> wrote:
>
> Hi Robert,
>
> I found an other bug with the logo plugin when using shadows (PSSM + OSG
> latest svn). When shadows are used there is 2 calls from :
>
>
> virtual bool cull(osg::NodeVisitor *visitor, osg::Drawable* drawable,
> osg::State*) const
> 1 time with the default visitor and 1 time with the visitor from the shadow
> implementation wich has a specific traversal mask and a specific viewport
> (in my case 4096*4096) so the logo viewport is updated twice because of the
> code :
>
>
> if
>
> ( vp->width() != logos->getViewport()->width() ||
>
> vp->height() != logos->getViewport()->height() )
>
> {
>
> logos->getViewport()->setViewport( vp->x(), vp->y(), vp->width(),
> vp->height() );
>
> logos->dirtyDisplayList();
>
> }
>
> }
>
> Maybe we could check the _traversalMask from the visitor before updating the
> logo viewport, what do you think about ?
> I know you're not a great fan from this plugin, but I find it very usefull.
>
> Kind regards,
>
> 2009/7/15 Alexandre Amalric <[email protected]>
>>
>> Hi Robert,
>>
>> Is the problem you are seeing triggered by the logo being used when
>> multiple graphics windows are used?
>>
>> Yes it is.
>>
>> Could you try svn/trunk and let me know how you get on.
>>
>> I Tried this morning latest SVN and it's working great with this
>> simple solution.
>>
>> Kind regards,
>>
>> 2009/7/14 Robert Osfield <[email protected]>
>>>
>>> Hi Alexandre,
>>>
>>> I've decided to merged your change rather than look for a more complex
>>> and more general solution, a more general solution can come later.
>>> I've tweaked your changes a little to include returning of true when
>>> the logo is traversed on a window it's not assigned to so the logo
>>> will get culled.
>>>
>>> Could you try svn/trunk and let me know how you get on.
>>>
>>> Cheers,
>>> Robert
>>>
>>> On Mon, Jul 13, 2009 at 5:34 PM, Robert Osfield<[email protected]>
>>> wrote:
>>> > 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<[email protected]> 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
>>> >> [email protected]
>>> >>
>>> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>> >>
>>> >>
>>> >
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>
>> --
>> Alexandre AMALRIC                   Ingénieur R&D
>> ===================================
>> PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
>> http://www.pixxim.fr
>
>
>
> --
> Alexandre AMALRIC                   Ingénieur R&D
> ===================================
> PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
> http://www.pixxim.fr
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to