Hey im getting a strange VS2005 error at the following line (in the shadow setup portion)...
Code: Select all
const unsigned numShadowRTTs = mgr.sceneMgr->getShadowTextureCount();
for (unsigned i = 0; i < numShadowRTTs; ++i) {
Ogre::TexturePtr tex = mgr.sceneMgr->getShadowTexture(i);
Ogre::Viewport *vp = tex->getBuffer()->getRenderTarget()->getViewport(0);
vp->setBackgroundColour(Ogre::ColourValue(1, 1, 1, 1));
vp->setClearEveryFrame(true);
//Ogre::CompositorManager::getSingleton().addCompositor(vp, "blur");
//Ogre::CompositorManager::getSingleton().setCompositorEnabled(vp, "blur", true);
}
..this one line in particular...
Code: Select all
Ogre::Viewport *vp = tex->getBuffer()->getRenderTarget()->getViewport(0);
...is causing the following error...
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
No errors in the ogre log, and things work fine if I comment out that one line. Im using Eihort 1.4.9. Any ideas?
*heres the last bit of the ogre log, note it seems like it creates the cameras/viewports fine, then it just ends...
23:45:01: WARNING: Texture instance 'Ogre/ShadowTexture0' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
23:45:01: WARNING: Texture instance 'Ogre/ShadowTexture1' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
23:45:01: WARNING: Texture instance 'Ogre/ShadowTexture2' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
23:45:01: WARNING: Texture instance 'Ogre/ShadowTexture3' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
23:45:01: Creating viewport on target 'rtt/1898720', rendering from camera 'Ogre/ShadowTexture0Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
23:45:01: Creating viewport on target 'rtt/1899296', rendering from camera 'Ogre/ShadowTexture1Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
23:45:01: Creating viewport on target 'rtt/1899840', rendering from camera 'Ogre/ShadowTexture2Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
23:45:01: Creating viewport on target 'rtt/1900384', rendering from camera 'Ogre/ShadowTexture3Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
*I wonder, do you really NEED to set the background color to white? And do you really need to set clear every frame to true?
I have just never seen visual studio spit up this error before so im kind of curious....