With the typecast fix in place, I crash at line 479 with a NULL viewport
pointer. I am running:
export OSG_WINDOW="10,30,800,600"
osgoit dumptruck.osg
I'm using current svn head compiled for GL1/2 compatibility (the default).
Are you seeing the same crash?
-Paul
Paul Martz wrote:
Hi Mathias -- Thanks for posting this. I am also working on a better
depth peeling mechanism for OSG, so I'm taking a look at your code today.
You have a compile issue on Visual Studio. The VS C runtime library
overloads the ldexp and sqrt functions, so passing in an unsigned and
expecting an implicit typecast to double doesn't work on this platform.
If I C-cast the first param to both functions as a double, it compiles
cleanly.
-Paul
1>Compiling...
1>oit.cpp
1>..\..\..\examples\oit\oit.cpp(122) : error C2668: 'ldexp' : ambiguous
call to overloaded function
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(565): could be 'long double ldexp(long double,int)'
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(517): or 'float ldexp(float,int)'
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(143): or 'double ldexp(double,int)'
1> while trying to match the argument list '(unsigned int, int)'
1>..\..\..\examples\oit\oit.cpp(143) : error C2668: 'sqrt' : ambiguous
call to overloaded function
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(581): could be 'long double sqrt(long double)'
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(533): or 'float sqrt(float)'
1> c:\Program Files\Microsoft Visual Studio
9.0\VC\include\math.h(128): or 'double sqrt(double)'
1> while trying to match the argument list '(unsigned int)'
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org