Re: [Flightgear-devel] clearer patch to renderer.*xx - accomodates non 4:3 aspect ratios with osg
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 dave perry wrote: | Tim Moore wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | I've checked in a fix that addresses the non 4:3 problem and also fixes the osgviewer | distortion issue. It turned out to be pretty hairy. Please give the patch a try. | | | | Thanks Tim, | | With today's SimGear and source cvs, I compiled with --enable-osgviewer | and the distortions with resizing are gone. Another issue I had | documented remains. If I don't resize, the hot spot | vertical-coordinates are too low. Once I resize or maximize the screen, | the hot spots are correct. It appears the mouse vertical is initially | off until you resize. I did check this and it seemed to work for me, but I'm probably used to hunting around for the hotspots when I click on stuff. Can you give me a precise example that doesn't work? Also, what's the magic for displaying the hot spots? | | Thanks again for all the effort and desiring to fix it right. | | - Dave Perry I've learned that with graphics related stuff if you don't fix it right the first time, you'll be fixing it again soon :) Tim -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHmxhseDhWHdXrDRURAimhAKDGYf5dEskLjXODEgNWzCyHOVaFxACcD7rR uxUXLdRv0qDBCt6jaxJbYwM= =fIJB -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
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. Two other questions for Tim, or anyone else familiar with OSG/OpenGL: 1) For the diffuse lighting, presumably I should calculate the normal when creating the geometry, and it will appear as gl_Normal in the shader right? 2) I've been finding it impossible to work out how to pass in generic attributes into the shader. I've managed to bind an attribute to a location using program-addBindAttribLocation(textureIndex, 1); but I can't seem to set the attribute afterwards. I should be able to use glVertexAttrib... functions, but they don't compile on Visual Studio. Any ideas ? -Stuart ___ Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
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. That looks very impressive! Really nice. Jon - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
Stuart Buchanan a écrit : 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. Impressive 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. Two other questions for Tim, or anyone else familiar with OSG/OpenGL: 1) For the diffuse lighting, presumably I should calculate the normal when creating the geometry, and it will appear as gl_Normal in the shader right? According to the orange book, yes 2) I've been finding it impossible to work out how to pass in generic attributes into the shader. I've managed to bind an attribute to a location using program-addBindAttribLocation(textureIndex, 1); but I can't seem to set the attribute afterwards. I should be able to use glVertexAttrib... functions, but they don't compile on Visual Studio. Any ideas ? Why not using osg::Geometry::setVertexAttribArray instead of raw gl functions ? Standard OpenGL under windows is 1.1. Extensions have to be loaded manually. OSG should do it for you. -Fred -- Frédéric Bouvier http://my.fotolia.com/frfoto/ Photo gallery http://fgsd.sourceforge.net/FlightGear Scenery Designer - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] clearer patch to renderer.*xx - accomodates non 4:3 aspect ratios with osg
Tim Moore wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 dave perry wrote: | Tim Moore wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | I've checked in a fix that addresses the non 4:3 problem and also fixes the osgviewer | distortion issue. It turned out to be pretty hairy. Please give the patch a try. | | | | Thanks Tim, | | With today's SimGear and source cvs, I compiled with --enable-osgviewer | and the distortions with resizing are gone. Another issue I had | documented remains. If I don't resize, the hot spot | vertical-coordinates are too low. Once I resize or maximize the screen, | the hot spots are correct. It appears the mouse vertical is initially | off until you resize. I did check this and it seemed to work for me, but I'm probably used to hunting around for the hotspots when I click on stuff. Can you give me a precise example that doesn't work? Also, what's the magic for displaying the hot spots? When I start fgfs in the pa24 with the Century IIb, and try and switch the autopilot on (lower left on the panel), clicking from the lower 1/3 of this switch to about 2/3 of the height of the switch below the switch is hot. In other words, the active hot spot is about 2/3 of the height of this switch too low. To display the hot spots, type ctrl-C. All the hot spots are the same distance too low. If you maximize the window, or just resize the window, the active area of the hot spot will be moved up to the right location. Hope this was clear. - Dave Perry - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
--- 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. -Stuart ___ Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Frederic Bouvier wrote: | Stuart Buchanan a écrit : | 2) I've been finding it impossible to work out how to pass in generic attributes | into the shader. I've managed to bind an attribute to a location using | program-addBindAttribLocation(textureIndex, 1); but I can't seem to set the | attribute afterwards. I should be able to use glVertexAttrib... functions, but | they don't compile on Visual Studio. Any ideas ? | | | Why not using osg::Geometry::setVertexAttribArray instead of raw gl | functions ? Standard OpenGL under windows is 1.1. Extensions have to be | loaded manually. OSG should do it for you. Stuart's trying to use attributes to set state before calling a display list, so the array functions aren't usable here. The easiest thing would be to use osg::Drawable::Extensions and look at the OSG source code for examples of using it. Tim -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHm2pJeDhWHdXrDRURApDuAKCpwW4QeDLyXlvkraF5Mjdmm+e6PwCeOIDt uTqUK5Oa63xFl69f6ppa4sk= =7u9W -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
Stuart, Stuart Buchanan a écrit : --- 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. I applied your new patch and I don't have trees, although they were working with the last one. It seems to me that there is a missing bit for flightgear because the setUseRandomVegetation function is never called and stay to false. Maybe there is a patch to options.cxx sitting on your disc. -Fred -- Frédéric Bouvier http://my.fotolia.com/frfoto/ Photo gallery http://fgsd.sourceforge.net/FlightGear Scenery Designer - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
For everybody, to apply the 2nd Stuart's patch ; don't forget adding the TreeBin.cxx and TreeBin.hxx in the file : simgear/scene/tgdb/Makefile.am The patch : Index: Makefile.am === RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/tgdb/Makefile.am,v retrieving revision 1.7 diff -u -r1.7 Makefile.am --- Makefile.am 13 Dec 2007 23:30:25 - 1.7 +++ Makefile.am 26 Jan 2008 18:55:17 - @@ -18,7 +18,8 @@ SGTexturedTriangleBin.hxx \ SGTriangleBin.hxx \ SGVertexArrayBin.hxx \ - GroundLightManager.hxx + GroundLightManager.hxx \ + TreeBin.hxx libsgtgdb_a_SOURCES = \ apt_signs.cxx \ @@ -28,6 +29,7 @@ SGOceanTile.cxx \ SGReaderWriterBTG.cxx \ SGVasiDrawable.cxx \ - GroundLightManager.cxx + GroundLightManager.cxx \ + TreeBin.cxx INCLUDES = -I$(top_srcdir) Then, if you want to test quickly the Trees feature : Index: 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 --- tileentry.cxx 20 Dec 2007 23:20:52 - 1.64 +++ tileentry.cxx 26 Jan 2008 18:56:36 - @@ -273,6 +273,7 @@ options-setMatlib(globals-get_matlib()); options-setCalcLights(is_base); options-setUseRandomObjects(use_random_objects); +options-setUseRandomVegetation(true); osg::Node* node = osgDB::readNodeFile(path, options.get()); if (node) geometry-addChild(node); Now, we need to correct all terrains... to have trees working ; and add corn (with or without OGM) field, wheat field... Le samedi 26 janvier 2008 à 19:29 +0100, Maik Justus a écrit : Hi Fred, Hi Stuart, Frederic Bouvier schrieb am 26.01.2008 19:22: Stuart, Stuart Buchanan a écrit : --- 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. I applied your new patch and I don't have trees, although they were working with the last one. same here (but your new screenshot looks great). Maik It seems to me that there is a missing bit for flightgear because the setUseRandomVegetation function is never called and stay to false. Maybe there is a patch to options.cxx sitting on your disc. -Fred - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
--- 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 - 1.64 +++ Scenery/tileentry.cxx 26 Jan 2008 16:18:54 - @@ -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_ptrSGReaderWriterBTGOptions 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/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
On Sat, 26 Jan 2008 07:30:09 -0600, Jon wrote in message [EMAIL PROTECTED]: 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. That looks very impressive! Really nice. ..aye. Warrants its own release, 1.1, sea level rise or no sea level rise. Tweaks would be allowing larger open clearings, more trees in tighter and larger clusters, and let tree height depend on altitude, you'll see the each tree getting small at the tree limit, size depends on wind and snow coverage. Shape, too, is affected by prevailing wind and wind protection. Why do I have these eerie images of emerging forestry etc simulators? ;o) -- ..med vennlig hilsen = with Kind Regards from Arnt... ;o) ...with a number of polar bear hunters in his ancestry... Scenarios always come in sets of three: best case, worst case, and just in case. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] trees
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Frederic Bouvier wrote: | Stuart Buchanan a écrit : | 2) I've been finding it impossible to work out how to pass in generic attributes | into the shader. I've managed to bind an attribute to a location using | program-addBindAttribLocation(textureIndex, 1); but I can't seem to set the | attribute afterwards. I should be able to use glVertexAttrib... functions, but | they don't compile on Visual Studio. Any ideas ? | | | Why not using osg::Geometry::setVertexAttribArray instead of raw gl | functions ? Standard OpenGL under windows is 1.1. Extensions have to be | loaded manually. OSG should do it for you. Stuart's trying to use attributes to set state before calling a display list, so the array functions aren't usable here. The easiest thing would be to use osg::Drawable::Extensions and look at the OSG source code for examples of using it. Tim -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHm8YOeDhWHdXrDRURAvD3AKDDbFKR9CcgPkIQ6PpUERoVjwfn1ACgso62 zXGPCej0n7pk9jyZjVqHlmg= =6QjO -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Error in compiling FlightGear under Cygwin
Well, for the first time in a very long time I am building the latest and greatest FlightGear. To my delight, plib, simgear, and openscenegraph built flawlessly under cygwin on my old XP box. The FlightGear build stumbled just slightly, but I don't expect this is a big deal. Here's what I got: g++ -DHAVE_CONFIG_H -I. -I../../src/Include -I../.. -I../../src -I/usr/local/include -g -O2 -D_REENTRANT -MT groundnetwork.o -MD -MP -MF .deps/groundnetwork.Tpo -c -o groundnetwork.o groundnetwork.cxx groundnetwork.cxx: In member function `void FGGroundNetwork::checkSpeedAdjustment(int, double, double, double, double, double)': groundnetwork.cxx:794: error: `HUGE' undeclared (first use this function) groundnetwork.cxx:794: error: (Each undeclared identifier is reported only once for each function it appears in.) Any hints as to what would cause something like this? Jon - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Error in compiling FlightGear under Cygwin
On Jan 27, 2008 4:20 AM, Jon S. Berndt [EMAIL PROTECTED] wrote: groundnetwork.cxx:794: error: `HUGE' undeclared (first use this function) groundnetwork.cxx:794: error: (Each undeclared identifier is reported only once for each function it appears in.) Any hints as to what would cause something like this? Looking at the file I believe that should be HUGE_VAL. -- Csaba/Jester - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Error in compiling FlightGear under Cygwin
Looking at the file I believe that should be HUGE_VAL. -- Csaba/Jester Thanks. It works. That was a lot simpler than I was expecting. This probably needs to be fixed in CVS. Jon - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Weekly CVS Changelog Summary: SimGear
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2008-01-21_15:12:44 (curt) /var/cvs/SimGear-0.3/source/NEWS At least update the version and date, we can fill in with more changes as we have time later. 2f585eeea02e2c79d7b1d8c4963bae2d - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Weekly CVS Changelog Summary: FlightGear source
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2008-01-21_15:13:45 (curt) /var/cvs/FlightGear-0.9/source/NEWS At least update the date and version. We can fill in with additional changes as time permits later. 2f585eeea02e2c79d7b1d8c4963bae2d - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel