U32 GFXTextureObject::dumpActiveTOs() { if(!smActiveTOCount) { Con::printf( "GFXTextureObject::dumpActiveTOs - no active TOs to dump." ); return 0; } Con::printf("GFXTextureObject Usage Report - %d active TOs", smActiveTOCount); Con::printf("---------------------------------------------------------------"); Con::printf(" Addr Dim. GFXTextureProfile ProfilerPath DebugDescription"); for(GFXTextureObject *walk = smHead; walk; walk=walk->mDebugNext) Con::printf(" %x (%4d, %4d) %s %s %s", walk, walk->getWidth(), walk->getHeight(), walk->mProfile->getName().c_str(), walk->mDebugCreationPath.c_str(), walk->mDebugDescription.c_str()); Con::printf("----- dump complete -------------------------------------------"); return smActiveTOCount; }
void PostEffectVis::onPFXProcessed( PostEffect *pfx ) { // If we have no windows we can early out before even testing // isAwake so we avoid creating the content control unnecessarily. if ( mWindows.empty() ) return; if ( !_getContentControl()->isAwake() ) return; VisVector::iterator itr = mWindows.begin(); for ( ; itr != mWindows.end(); itr++ ) { if ( itr->pfx == pfx ) { GuiBitmapCtrl *pBmpCtrl = NULL; GuiWindowCtrl *pWinCtrl = NULL; if ( itr->bmp[Target] != NULL ) { pBmpCtrl = itr->bmp[Target]; pWinCtrl = itr->window[Target]; GFXTextureObject *tex; if ( pfx->mTargetTex ) tex = pfx->mTargetTex; else tex = PFXMGR->getBackBufferTex(); pBmpCtrl->setBitmapHandle( tex ); char caption[256]; char name[256]; if ( pfx->getName() == NULL || dStrlen( pfx->getName() ) == 0 ) dSprintf( name, 256, "(none)" ); else dSprintf( name, 256, "%s", pfx->getName() ); if ( tex ) dSprintf( caption, 256, "%s[%i] target - %s [ %ix%i ]", name, pfx->getId(), pfx->mTargetName.c_str(), tex->getWidth(), tex->getHeight() ); else dSprintf( caption, 256, "%s[%i] target", name, pfx->getId() ); pWinCtrl->setDataField( StringTable->insert("text"), NULL, caption ); } for ( U32 i = Input1; i < TexCount; i++ ) { if ( itr->bmp[i] == NULL ) continue; pBmpCtrl = itr->bmp[i]; pWinCtrl = itr->window[i]; GFXTextureObject *tex = pfx->mActiveTextures[i-1]; pBmpCtrl->setBitmapHandle( tex ); char caption[256]; char name[256]; if ( pfx->getName() == NULL || dStrlen( pfx->getName() ) == 0 ) dSprintf( name, 256, "(none)" ); else dSprintf( name, 256, "%s", pfx->getName() ); if ( tex ) dSprintf( caption, 256, "%s[%i] input%i - %s [ %ix%i ]", name, pfx->getId(), i-1, pfx->mTexFilename[i-1].c_str(), tex->getWidth(), tex->getHeight() ); else dSprintf( caption, 256, "%s[%i] input%i - %s", name, pfx->getId(), i-1, pfx->mTexFilename[i-1].c_str() ); pWinCtrl->setDataField( StringTable->insert("text"), NULL, caption ); } } } }