Re: [osg-users] OSG 2.8.4 VS2010 build problem DLL versioning
Hi all, Paul did some digging, and thinks that maybe this trunk patch: http://www.openscenegraph.org/projects/osg/changeset/11904 Might have been the fix for this. This appears to have been the work of Sukender and Wang Rui. I've copied them on this. Maybe they can tell us if this is the magic fairy dust we need in order to make 2.8.x build properly on VS2010. This patch seems to be too old and do not match the actual sources... (on 2.8.4 ) I was not able to apply it. Sorry but I'm not (yet) a CMake master so I can't create a patch myself. If anyone can help us fixing this ... Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] G++ version problem
Good morning, On Monday 04 April 2011, Grahame Bowland wrote: > `__sync_bool_compare_and_swap_4' src.cxx:(.text+0x78): undefined reference > to `__sync_bool_compare_and_swap_4' collect2: ld returned 1 exit status > gmake[1]: *** [cmTryCompileExec] Error 1 > gmake: *** [cmTryCompileExec/fast] Error 2 > > It does seem the builtins are disabled. As Alberto said probably because > they're not available for the default 32-bit compiler target, Here's the > 'g++ -v' output: > > Using built-in specs. > Target: i686-pc-linux-gnu > Configured with: ./configure --prefix=/opt/gcc-4.4.3 > --with-mpfr=/opt/mpfr-2.3.2 --enable-languages=c,c++,objc Thread model: > posix > gcc version 4.4.3 (GCC) There is a configure time switch in gcc that changes the default architecture. Distributions usually have their compiler configured for something that includes support for atomics. But your hand configured gcc uses the really conservative i386 (not i486, really 80386) default which did not have any smp support at this very old time. So either give -march=i686 or something sensible for your project to the c and c++ flags when doing the cmake configure step. Or rebuild gcc with the configure flag --with-cpu=i686 or something sensible for your build environment. Then rebuild osg from scratch. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] G++ version problem
On Fri, 2011-04-01 at 12:06 +0200, Alberto Luaces wrote: > > The gcc _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS test should pass for both > > gcc 4.4.3 and 4.5.2. I used plenty of gcc versions prior to 4.4.3 and > > it worked fine. I'm currently using gcc 4.4.5 on this system and it > > pick up on _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS fine. > > > > This make me wonder why your build with 4.4.3 isn't picking up on the > > atomic support correctly. Has anyone else had problems with picking > > up on the atmoic support? > > A reason can be the fact that some systems select different default > architectures. If you are using a 32 bit system instead of amd64, and > say your compiler is set by default to produce 586 or 686 compatible > binaries, chances are that the gcc builtins are deactivated. You would > have to specify the target architecture explicitly, > eg. -march=native. Those default configurations can be checked with `gcc > -v'. Here's the output of the test from CMakeError.log: Performing C++ SOURCE FILE Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS failed with the following output: Change Dir: /scratch/grahame/test/OpenSceneGraph-2.8.2-rc4/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build gmake[1]: Entering directory `/scratch/grahame/test/OpenSceneGraph-2.8.2-rc4/CMakeFiles/CMakeTmp' /opt/toolchain32/bin/cmake -E cmake_progress_report /scratch/grahame/test/OpenSceneGraph-2.8.2-rc4/CMakeFiles/CMakeTmp/CMakeFiles 1 Building CXX object CMakeFiles/cmTryCompileExec.dir/src.cxx.o /opt/gcc-4.4.3/bin/g++-Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -W unused -fpermissive -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -o CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c /scratch/grahame/test/Op enSceneGraph-2.8.2-rc4/CMakeFiles/CMakeTmp/src.cxx Linking CXX executable cmTryCompileExec /opt/toolchain32/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 /opt/gcc-4.4.3/bin/g++ -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas - Wunused -fpermissive -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS CMakeFiles/cmTryCompileExec.dir/src.cxx.o -o cmTryCompileExec -rdynami c gmake[1]: Leaving directory `/scratch/grahame/test/OpenSceneGraph-2.8.2-rc4/CMakeFiles/CMakeTmp' CMakeFiles/cmTryCompileExec.dir/src.cxx.o: In function `main': src.cxx:(.text+0x4c): undefined reference to `__sync_bool_compare_and_swap_4' src.cxx:(.text+0x78): undefined reference to `__sync_bool_compare_and_swap_4' collect2: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec] Error 1 gmake: *** [cmTryCompileExec/fast] Error 2 It does seem the builtins are disabled. As Alberto said probably because they're not available for the default 32-bit compiler target, Here's the 'g++ -v' output: Using built-in specs. Target: i686-pc-linux-gnu Configured with: ./configure --prefix=/opt/gcc-4.4.3 --with-mpfr=/opt/mpfr-2.3.2 --enable-languages=c,c++,objc Thread model: posix gcc version 4.4.3 (GCC) Thanks for all the help! Cheers Grahame ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] osgdem .asc file seems to build terrain backwards?
Hi, Well... I've confirmed that if I "flip" the picture of my model 180 degrees horizontally... It is correct... Now... How still do I avoid getting that way in the first place? And/or... how can I correct this? I have done ... gdal_translate xx.asc xx.tif gdal_addo -r average xx.tif 2 4 8 16 32 osgdem -l 8 -v 0.2 -o la_jolla.ive Thank you! Cheers, tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38189#38189 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
On 4/3/2011 10:59 AM, Martin Haffner wrote: > I think I know what you mean. You said a LOD node is meant to be used with > roughly the same geometry and I feared it would be a problem to add the > geometry of a road segment and all the trees under the same node since the > tree bounding spheres differ a lot from the road segment bounding sphere. But, the LOD is the bounding sphere of everything under it. So, the bounding sphere of the high-LOD road and trees will be nearly the same as the low-LOD version. > But I guess thats no problem because the road segment sphere is so huge it > roughly encases all the "little" tree bounding spheres and thus the group > node bounding sphere of the road and the trees would roughly be of the size > of the road sphere. Thus the trees would not change the LOD behaviour very > much. Is this right? No. Ignore the road sphere and the tree spheres. What's important is the sum of both. If it's important to you, you could always set the center and radius manually, so that they're always the same. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
I think I know what you mean. You said a LOD node is meant to be used with roughly the same geometry and I feared it would be a problem to add the geometry of a road segment and all the trees under the same node since the tree bounding spheres differ a lot from the road segment bounding sphere. But I guess thats no problem because the road segment sphere is so huge it roughly encases all the "little" tree bounding spheres and thus the group node bounding sphere of the road and the trees would roughly be of the size of the road sphere. Thus the trees would not change the LOD behaviour very much. Is this right? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38187#38187 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
On 4/3/2011 10:25 AM, Martin Haffner wrote: > I see. One more little question: I have a lot of objects (for example trees) > along a road segment. > Sure, I could give each tree an LOD node (one LOD node for each tree) but I > guess it would be smarter if I did use the same LOD node for the segment. As > I said I want to make a LOD node for each road segment and each LOD node has > 3 child geodes. osg will pick one child node (based on the distance) and > depending on which child node it picks I want to render all corresponding > trees of this segment in the same level of detail. > For example: Lets look at road segment2. Segment2 has one LOD node with 3 > ranges. Openscenegraph picks the last one (the low poly one) because the node > is far away. Now I want to render ALL objects along this lane in low polygon > mode too. If I render a road segment with high tessellation I want to render > ALL objects of this road segment with high tessellation too etc. > How could I achieve this with osg? Just make one LOD Node for each segment. This should have multiple children, one for each level of detail. These children should be Groups. Each Group should have children for the road, and trees. If that doesn't explain it well enough, I can elaborate, but I must go grocery shopping now. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
I see. One more little question: I have a lot of objects (for example trees) along a road segment. Sure, I could give each tree an LOD node (one LOD node for each tree) but I guess it would be smarter if I did use the same LOD node for the segment. As I said I want to make a LOD node for each road segment and each LOD node has 3 child geodes. osg will pick one child node (based on the distance) and depending on which child node it picks I want to render all corresponding trees of this segment in the same level of detail. For example: Lets look at road segment2. Segment2 has one LOD node with 3 ranges. Openscenegraph picks the last one (the low poly one) because the node is far away. Now I want to render ALL objects along this lane in low polygon mode too. If I render a road segment with high tessellation I want to render ALL objects of this road segment with high tessellation too etc. How could I achieve this with osg? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38185#38185 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
On 4/3/2011 9:38 AM, Martin Haffner wrote: > The question I am asking this: I have a long road (lets say 3km) and I want > to divide the road in segments (say 200m per segment). Now I want to use LOD > for the segments. For example if the camera is close to segment 2, segment 2 > should be rendered with high poly count. The adjacent segments 1 and 3 with > medium poly count and segments with are even further away with low poly count. > How would I achieve this with openscenegraph (I am very new to osg)? > My current idea: One root group node for the whole track with N child group > nodes (one for each segment). Then each segment node (of type group) has one > child: an LOD node with 3 children: 3 geodes with high, mid and low polygon > geometry entries. > Is this correct or am I totally wrong? That's fine. That's nothing like your original questioning. Basically, the LOD Node is intended that each of its children should roughly be representations of the same entity, in the same place, but with different degrees of detail. So, using it as intended (as you propose here) should be fine. Getting weird with extreme transforms to move the children about relative to each other is a recipe for a mess. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
The question I am asking this: I have a long road (lets say 3km) and I want to divide the road in segments (say 200m per segment). Now I want to use LOD for the segments. For example if the camera is close to segment 2, segment 2 should be rendered with high poly count. The adjacent segments 1 and 3 with medium poly count and segments with are even further away with low poly count. How would I achieve this with openscenegraph (I am very new to osg)? My current idea: One root group node for the whole track with N child group nodes (one for each segment). Then each segment node (of type group) has one child: an LOD node with 3 children: 3 geodes with high, mid and low polygon geometry entries. Is this correct or am I totally wrong? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38183#38183 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
On 4/3/2011 9:27 AM, Martin Haffner wrote: > Thanks for your fast reply! > Ok, lets say I have 2 matrix transform nodes. One makes a huge translate to > the right (x axis) and the other a huge translation fo the left. Each matrix > transform node has one geode as a child, which renders a tree. > If I add these 2 matrix transform to a LOD node (at ranges (0,100) and > (100,1000)), then the following happens: The bounding spheres of the geodes > are propagated upwards to the matrix transform nodes. The bounding spheres > are again propagated upwards to the LOD node and a new big sphere is computed > with encloses both bounding spheres (in other words: the LOD node now has a > huge sphere that encases both tree bounding spheres). > The distances (0,100,1000) always mean: The distance from the camera to the > center of the LOD sphere. > Is this correct? I think so. But, I could be wrong. It should be pretty easy to put some breakpoints inside the LOD code and watch exactly what happens. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
Thanks for your fast reply! Ok, lets say I have 2 matrix transform nodes. One makes a huge translate to the right (x axis) and the other a huge translation fo the left. Each matrix transform node has one geode as a child, which renders a tree. If I add these 2 matrix transform to a LOD node (at ranges (0,100) and (100,1000)), then the following happens: The bounding spheres of the geodes are propagated upwards to the matrix transform nodes. The bounding spheres are again propagated upwards to the LOD node and a new big sphere is computed with encloses both bounding spheres (in other words: the LOD node now has a huge sphere that encases both tree bounding spheres). The distances (0,100,1000) always mean: The distance from the camera to the center of the LOD sphere. Is this correct? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38181#38181 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Can't build version osg 2.9.11 for IOS using CMake
Hi, there's a pending submission for the readme, I added a working command line to it. Here's the command line to get a working xcode project for buildong osg for a ios-device: $ cmake -G Xcode \ -D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \ -D CMAKE_CXX_FLAGS:STRING="-ftree-vectorize -fvisibility-inlines-hidden -mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.1 -mno-thumb" \ -D BUILD_OSG_APPLICATIONS:BOOL=OFF \ -D OSG_BUILD_FRAMEWORKS:BOOL=OFF \ -D OSG_WINDOWING_SYSTEM:STRING=IOS \ -D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \ -D CMAKE_OSX_ARCHITECTURES:STRING="armv6;armv7" \ -D CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk \ -D OSG_GL1_AVAILABLE:BOOL=OFF \ -D OSG_GL2_AVAILABLE:BOOL=OFF \ -D OSG_GLES1_AVAILABLE:BOOL=ON \ -D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \ -D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \ -D OSG_GL_LIBRARY_STATIC:BOOL=OFF \ -D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \ -D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \ -D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \ -D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \ -D DYNAMIC_OPENTHREADS:BOOL=OFF . check all mentioned cmake-variables and try again. Good luck. Hope that helps, Stephan 02.04.11 04:04, schrieb Hoang My Duc: > Hi, > > I have the same problem. > I did like the instruction in readme.txt for both 2.9.11 and trunk but cannot > build because the omission of OpenGL headers. > > The think is that when I press configure button of CMake first time, the > following variable is shown in red: > "OPENGLES_LIBRARY=OPENGLES LIBRARY - NOT FOUND" > > I have also installed XCode 3.2.6 with IPhone SDK. > My MacBookWhite has an OSX 10.6 > > I don't know how to fix it, please help me. > > Thank you! > > Cheers, > Hoang > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=38172#38172 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Node
On 4/3/2011 8:36 AM, Martin Haffner wrote: > The values 0.0f, 5.0f and FLT_MAX are all camera distances, but I wonder from > which reference point? Are these values the distance from the camera to the > bounding sphere center of the individual geodes? Or are these the distances > from the camera to the LOD node itself? > If the second is true: Do I have to set the position of the LOD node or is > the position just the center of a sphere that encases all child nodes? I believe the second case is correct. And the LOD node's position, by default, is the center of the auto-generated bounding sphere as you theorized. I think you can manually set the position and bounding sphere of the LOD Node. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] LOD Node
Hello, I have a question about the LOD node: Lets say I have 2 Geods and add them to a LOD node: Code: osg :: ref_ptr < osg :: LOD > lod = new osg :: LOD ; lod->addChild(geode1, 0.0f, 5.0 f); lod->addChild(geode2, 5.0f, FLT_MAX ); The values 0.0f, 5.0f and FLT_MAX are all camera distances, but I wonder from which reference point? Are these values the distance from the camera to the bounding sphere center of the individual geodes? Or are these the distances from the camera to the LOD node itself? If the second is true: Do I have to set the position of the LOD node or is the position just the center of a sphere that encases all child nodes? Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38178#38178 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Can't build version osg 2.9.11 for IOS using CMake
Hi, I have the same problem. I did like the instruction in readme.txt for both 2.9.11 and trunk but cannot build because the omission of OpenGL headers. The think is that when I press configure button of CMake first time, the following variable is shown in red: "OPENGLES_LIBRARY=OPENGLES LIBRARY - NOT FOUND" I have also installed XCode 3.2.6 with IPhone SDK. My MacBookWhite has an OSX 10.6 I don't know how to fix it, please help me. Thank you! Cheers, Hoang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38172#38172 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org