Hi, it's difficult to answer questions like this. If you can post the files you modified, one of us could compile it and see what's going on. Regards, -Fred
----- Mail original ----- > Hello, > This is my first try with mailing-list, I am icecode in IRC, Icecode > GL in forum and a few time ago I've been involved in trying to > return shadows back in FlightGear, exploring the big world of > shaders and effects. But when Z-fighting ( > http://en.wikipedia.org/wiki/Z-fighting ) problem appeared, I needed > glPolygonOffset ( > http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml ). > After reading the OSG documentation ( > http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00523.html > ), I got this code at Simgear's Effect.cxx: > > struct PolygonOffsetBuilder : public PassAttributeBuilder > > > { > > > void buildAttribute(Effect* effect, Pass* pass, const > > SGPropertyNode* > > prop, > > > const SGReaderWriterXMLOptions* options) > > > { > > > if (!isAttributeActive(effect, prop)) > > > return; > > > const SGPropertyNode* pfactor > > > = getEffectPropertyChild(effect, prop, "factor"); > > > const SGPropertyNode* punits > > > = getEffectPropertyChild(effect, prop, "units"); > > > ref_ptr<PolygonOffset> polyoffset = new PolygonOffset; > > > int factor, units; > > > if (pfactor) > > > factor = pfactor->getIntValue(); > > > if (punits) > > > units = punits->getIntValue(); > > > polyoffset->setFactor(factor); > > > polyoffset->setUnits(units); > > > pass->setAttributeAndModes(polyoffset.get()); > > > } > > > }; > > > InstallAttributeBuilder<PolygonOffsetBuilder> > > installPolygonOffset("polygon-offset"); > > I correctly did the #include <osg/PolygonOffset> at the start of > file. Compilation goes OK, but when I run FG, this message appears a > couple of times: > > skipping unknown pass attribute polygon-offset > > What can be the problem? Sorry if it is a silly mistake, but I am a > newbie in the effects things etc. If you want to know anything more > about the shadows, I am trying to implement the shadow volumes ( > http://en.wikipedia.org/wiki/Shadow_volume ) technique, using > stencil. Info of progress, .vert and .eff at forum topic: > http://www.flightgear.org/forums/viewtopic.php?f=47&t=13648 . > Cheers. > ------------------------------------------------------------------------------ > Get your Android app more play: Bring it to the BlackBerry PlayBook > in minutes. BlackBerry App World™ now supports Android™ > Apps > for the BlackBerry® PlayBook™. Discover just how easy and > simple > it is! http://p.sf.net/sfu/android-dev2dev > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel
------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel