Hello,

Back to front sorting in the transparent bin did not work in our application on linux since quite a while. Once we used CMake to build OpenSceneGraph, it worked correctly but our application was three times slower than before. It turned out, that I forgot to add -DCMAKE_BUILD_TYPE=RELEASE to the cmake options and thus got a non optimized osg build. With the optimized build I got decent framerates again but geometry sorting did not work anymore. It turned out to be CullVisitor.cpp in osgUtil which causes the bug to appear if compiled with -O3 and disappear if compiled with -g.

The solution to the problem is not to inline the distance function.
inline CullVisitor::value_type distance(const osg::Vec3& coord,const osg::Matrix& matrix)

we had this issue with
gcc-4.0.2
gcc-4.1.2
gcc-4.1.3
and other versions.

Robert, could you add a #ifndef __GNUC__ to the inline declaration or convert it to a macro?

 Uwe
--

           \\\|/// *HLRS, High Performance Computing Center Stuttgart*
 _I_       ( o o )                *Visualization/VR*             _I_
([EMAIL 
PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL 
PROTECTED])
 | |    Uwe Woessner             [EMAIL PROTECTED]                | |
 | |       .ooo0       http://www.hlrs.de/people/woessner/       | |
 |_|       (   )  Oooo. Phone: +49-711-6856-5790 or ...-5970     |_|
([EMAIL PROTECTED])-------\ (---(   
)-----------------------------------------([EMAIL PROTECTED])
  I          \_)   ) /                                            I
                  (_/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to