Frederic Bouvier said: > Jim Wilson wrote : > > >Erik Hofman said: > > > > > > > >>Jim Wilson wrote: > >> > >> > >>><not part of cvs logtext> > >>>Note the diff file has been renamed from the earlier submission. This version > >>>works better with more complex models. > >>></not part of cvs logtext> > >>> > >>>This patch adds support to the model animation system for modifying > >>>emissive > >>>states on the fly so that it is possible to make "lights" appear to dimm. > >>> > >>> > >>It's committed. Thanks. > >>I have to figure out how you did this, the alpha-blend patch seemed to > >>be broken at the moment, probably because of a change in plib :-/ > >> > >> > >> > > > >Hah. That's funny, I didn't even notice that code and it does almost the same > >thing. I'll fix the alpha-blend and send a patch...unless you've already > >gotten it. The exact same code with the GL_DIFFUSE instead of GL_EMISSION, > >with a couple other minor changes should work. Note that the material states > >are often shared by different branches so it is important to clone the one(s) > >you want to modify. > > > > > > Jim, > > You should have a look at the constructor of your new animation. There > are 2 unused local variables that have the same name than 2 members that > should be initialized with 0. > > Something like the code below. > > -Fred > > cvs -z4 -q diff -u simgear\scene\model\animation.cxx (in directory > I:\FlightGear\cvs\SimGear\) > Index: simgear/scene/model/animation.cxx > =================================================================== > RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/scene/model/animation.cxx,v > retrieving revision 1.29 > diff -u -r1.29 animation.cxx > --- simgear/scene/model/animation.cxx 29 Jan 2005 10:31:25 -0000 1.29 > +++ simgear/scene/model/animation.cxx 29 Jan 2005 19:27:12 -0000 > @@ -1123,8 +1123,8 @@ > _color1 = props->getFloatValue("emiss-green", 0.0); > _color2 = props->getFloatValue("emiss-blue", 0.0); > _old_brightness = 0; > - ssgSimpleState* _cached_material; > - ssgSimpleState* _cloned_material; > + _cached_material = 0; > + _cloned_material = 0; > } >
Tsk, tsk. I cut and pasted those from the function where they were originally local...just to remind me to initialize them in the constructor. That's from hurrying too much after getting an idea. Probably I should add other standard supported items to it (e.g. interpolation, offsets) as well. Best, Jim _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d