Hi Thomas,

I've merged and checked in the fix to GrpahicsWindowIOS but am not
happy with the changes to ViewDependentShadowMap as they make the code
rather less readable and maintainable.   Is it possible to reproduce
the build error on non IOS build?  I'm just building the OSG with
float Matrix to see what happens.

Robert.

On 28 February 2012 06:35, Thomas Hogarth <[email protected]> wrote:
> Hi Robert
>
> Attached are a few compile fixes made against latest trunk 13006. Change to
> GraphicsWindowIOS is simple # gard to stop call
> using GL_DEPTH_COMPONENT32_OES. As far as I know this mode doesn't exist on
> IOS, I think it may have been added in a general GLES2 update but am not
> sure. My fix will cover us anyhow for GLES 1 and 2 builds. I'll ask on users
> list about it and if no one owns up we can ditch it.
>
> There is also a slightly dodgy fix for ViewDependantShadowMap.cpp around
> line 232 (and another around line 541), basically I do my IOS builds with
> everything set to float and was getting compile errors with the following
>
>     zNear = osg::maximum(zNear, cv->getCalculatedNearPlane());
>     zFar = osg::minimum(zFar, cv->getCalculatedFarPlane());
>
>     cv->setCalculatedNearPlane(zNear);
>     cv->setCalculatedFarPlane(zFar);
>
>     cv->clampProjectionMatrix(projection, zNear, zFar);
>
> The problem is that both versions of cv->clampProjectionMatrix expect xNear
> and zFar to be value_type, for now I have made a bit of a dodgy fix as
> bellow
>
>     zNear = osg::maximum<double>(zNear, cv->getCalculatedNearPlane());
>     zFar = osg::minimum<double>(zFar, cv->getCalculatedFarPlane());
>
>     cv->setCalculatedNearPlane(zNear);
>     cv->setCalculatedFarPlane(zFar);
>
>     //temps to get around float builds error, think clampProjectionMatrix
> needs float and double versions rather then value_type but not sure of side
> effects
>     osgUtil::CullVisitor::value_type zn = zNear;
>     osgUtil::CullVisitor::value_type zf = zFar;
>     cv->clampProjectionMatrix(projection, zn, zf);
>     zNear = zn;
>     zFar = zf;
>
> This compiles but was wondering was the real fix to make
> the clampProjectionMatrix overloads accepts floats with Matrixf and doubles
> with Matrixd. I wasn't sure what the side effects may be, so thought I
> should ask first.
>
> Cheers
> Tom
>
>
>
> _______________________________________________
> 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

Reply via email to