Assertion failure when using plane optimal shadows in linux

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
HiddenBek
Gnoblar
Posts: 9
Joined: Mon Mar 26, 2007 2:36 am

Assertion failure when using plane optimal shadows in linux

Post by HiddenBek »

The Shadows demo crashes for me when I switch to Plane Optimal texture shadows. The following assertion is failing in the setExtents method of OgreAxisAlignedBox.h:

Code: Select all

assert( (min.x <= max.x && min.y <= max.y && min.z <= max.z) &&
                "The minimum corner of the box must be less than or equal to maximum corner" );
A couple of strategically placed printfs show that min.x is larger than max.x, and that the actual value of both depends on the camera position. If I start the demo at 1600x1200 and don't move the camera, min.x is 0.045517 and max.x is -0.060942. I know this isn't a valid fix, but everything seems to render nicely if I add "if (min.x > max.x) min.x = max.x;" before the assertion.

Any thoughts? I'm a C++ and Ogre noob, but can investigate if nobody knows why this is happening.
genva
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1603
Joined: Wed Oct 20, 2004 7:54 am
Location: Beijing, China
x 1

Post by genva »

Yes, it's bug of Frustum bounding box when custom projection matrix in used (Plane Optimal, focused and LiSPSM shadows), and has been fixed recently.
HiddenBek
Gnoblar
Posts: 9
Joined: Mon Mar 26, 2007 2:36 am

Post by HiddenBek »

Thanks a lot genva. I'm looking forward to 1.4.1.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post by haffax »

You can use the CVS version. Branch v1-4 and thus get this fix now. I heartily recommend to use source version of Ogre over the SDK. It really is not complicated.
team-pantheon programmer
creators of Rastullahs Lockenpracht
Post Reply