I've been porting my project to Ogre 2.2 recently and one of the problems I ran into was with Terra. My code was running into an assertion in the HlmsManager:
Code: Select all
if( &mSamplerblocks[samplerblock->mId] != samplerblock )
{
OGRE_EXCEPT( Exception::ERR_ITEM_NOT_FOUND,
"The Samplerblock wasn't created with this manager!",
"HlmsManager::destroySamplerblock" );
}
OgreHlmsTerraDatablock.cpp:85 (in the datablock's destructor)
Code: Select all
HlmsManager *hlmsManager = mCreator->getHlmsManager();
if( hlmsManager )
{
for( size_t i=0; i<NUM_TERRA_TEXTURE_TYPES; ++i )
{
if( mSamplerblocks[i] )
hlmsManager->destroySamplerblock( mSamplerblocks[i] );
}
}
OgreHlmsTextureBaseClass.inl:58
Code: Select all
for( size_t i=0; i<OGRE_HLMS_TEXTURE_BASE_MAX_TEX; ++i )
{
if( mSamplerblocks[i] )
hlmsManager->destroySamplerblock( mSamplerblocks[i] );
}
My fix for this problem was just to remove the loop in the terraDatablock's destructor. I'd be interested to know if anyone else thinks this is an actual bug or not. This is as of commit 1761d69.