--- Stuart Buchanan  wrote:
> 
> --- Stuart Buchanan wrote:
> > Hi All,
> > 
> > Just a quick note to mention that I've now implemented random tree height,
> and
> > multiple textures as suggested by Curt. Screenshot here:
> > 
> > http://www.nanjika.co.uk/flightgear/forest2.jpg
> > 
> > Still some work to be done, but it is looking more realistic.
> > 
> > Tim - I've been cleaning up my code a bit, so unless you've already started,
> > I'd
> > hold off trying to kick my previous patch into shape for CVS. I should have 
> > a
> > new
> > patch fairly soon.
> 
> A patch for this is now available from
> http:/www.nanjika.co.uk/flightgear/trees.tar.gz.
> 
> Note that there are some additional new files for the tree textures and some
> re-organizing of the code - see the included README.

Doh! I didn't notice that I had changed the FlightGear source too...

The patch below adds the appropriate property value check, and I've updated the
tarball and README to include it.

At some point I'll need to add a setting to the preferences.xml file too, but
first we need to decide whether the trees should be on by default (like the
random objects) or not.

Any opinions?

-Stuart

Index: Scenery/tileentry.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Scenery/tileentry.cxx,v
retrieving revision 1.64
diff -u -r1.64 tileentry.cxx
--- Scenery/tileentry.cxx       20 Dec 2007 23:20:52 -0000      1.64
+++ Scenery/tileentry.cxx       26 Jan 2008 16:18:54 -0000
@@ -266,6 +266,9 @@
 {
     bool use_random_objects =
         fgGetBool("/sim/rendering/random-objects", true);
+        
+    bool use_random_vegetation = 
+        fgGetBool("/sim/rendering/random-vegetation", true);
 
     // try loading binary format
     osg::ref_ptr<SGReaderWriterBTGOptions> options
@@ -273,6 +276,7 @@
     options->setMatlib(globals->get_matlib());
     options->setCalcLights(is_base);
     options->setUseRandomObjects(use_random_objects);
+    options->setUseRandomVegetation(use_random_vegetation);
     osg::Node* node = osgDB::readNodeFile(path, options.get());
     if (node)
       geometry->addChild(node);



      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to