Forget my last post...
To test I changed the test i speak about from
if ((_lastAppliedProgramObject!=0) &&
(previousLastAppliedProgramObject==_lastAppliedProgramObject) &&
_defineMap.changed)
to
if ((_lastAppliedProgramObject!=0) &&
(previousLastAppliedProgramObject!=_lastAppliedProgramObject) &&
_defineMap.changed)
And it seams to solve the problem (no more unecessary useprogram)...It don't
seams to break the stuff but I'm not sure
mp3butcher wrote:
> Ok I believe to understand that it's the call to
> state->initializeExtensionProcs that induces one unecessary useprogram per
> frame... so not a disaster in fact
>
>
> mp3butcher wrote:
> > Hi scrawl
> > We'll all right but nevertheless unnecessary bind happens
> > the bug seams to come from State.cpp l 616
> > The unessesary useprogram doesn't use the lazy state updating system
> > but this strange test I doubt to understand the purpose
> >
> > Code:
> >
> > if ((_lastAppliedProgramObject!=0) &&
> > (previousLastAppliedProgramObject==_lastAppliedProgramObject) &&
> > _defineMap.changed)
> > {
> > //OSG_NOTICE<<"State::apply() Program already applied
> > ("<<(previousLastAppliedProgramObject==_lastAppliedProgramObject)<<") and
> > _defineMap.changed= "<<_defineMap.changed<<std::endl;
> > if (_lastAppliedProgramObject)
> > _lastAppliedProgramObject->getProgram()->apply(*this);
> > }
> >
> >
> >
> >
> > scrawl wrote:
> > > Hi Julien,
> > >
> > > I believe I submitted the same change in the past but it was rejected.
> > > You may be interested in this topic:
> > > http://forum.openscenegraph.org/viewtopic.php?t=15587
> > >
> > > Robert says that the check is not necessary because " the lazy state
> > > updating mechanism in osg::State should avoid calling
> > > osg::Program::apply()".
> > >
> > > Cheers,
> > > Jannik
> >
>
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67900#67900
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org