I believe I found a bug when using RenderTarget::writeContentsToFile(...) with a RenderTexture obtained from a Compositor's intermediate textures.
I use this function after drawing the scene, and before OGRE draws the next frame, with a keyboard key press handler. I obtain the intermediate texture with:
Code: Select all
TexturePtr texture = TextureManager::getByName("c1/result/Example_RTT_window");
Code: Select all
RenderTexture renderTex = texture->getBuffer()->getRenderTarget();
The next frame, the CompositorChain is screwed up. Inside CompositorChain::preRenderTargetUpdate(...) the chain of TargetOperations are iterated. The TargetOperation using the RenderTexture I was interested in causes a crash AS it is passed into CompositorChain::preTargetOperation(). Maybe it is NULL, but the debugger does not show it.
[edit]I'm pretty sure the crash occurs because the iterator is dereferenced. It seems as though the chain was modified. How did this happen? [/edit]
Does anyone know why the compositor chain was modified? Thanks for any help.
I'm using the Sinbad Hg trunk, 1.8.not_released.