MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onPFXProcessed

Method onPFXProcessed

Engine/source/postFx/postEffectVis.cpp:202–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void PostEffectVis::onPFXProcessed( PostEffect *pfx )
203{
204 // If we have no windows we can early out before even testing
205 // isAwake so we avoid creating the content control unnecessarily.
206 if ( mWindows.empty() )
207 return;
208
209 if ( !_getContentControl()->isAwake() )
210 return;
211
212 VisVector::iterator itr = mWindows.begin();
213 for ( ; itr != mWindows.end(); itr++ )
214 {
215 if ( itr->pfx == pfx )
216 {
217 GuiBitmapCtrl *pBmpCtrl = NULL;
218 GuiWindowCtrl *pWinCtrl = NULL;
219
220 if ( itr->bmp[Target] != NULL )
221 {
222 pBmpCtrl = itr->bmp[Target];
223 pWinCtrl = itr->window[Target];
224
225 GFXTextureObject *tex;
226
227 if ( pfx->mTargetTex )
228 tex = pfx->mTargetTex;
229 else
230 tex = PFXMGR->getBackBufferTex();
231
232 pBmpCtrl->setBitmapHandle( tex );
233
234 char caption[256];
235 char name[256];
236
237 if ( pfx->getName() == NULL || dStrlen( pfx->getName() ) == 0 )
238 dSprintf( name, 256, "(none)" );
239 else
240 dSprintf( name, 256, "%s", pfx->getName() );
241
242
243 if ( tex )
244 dSprintf( caption, 256, "%s[%i] target - %s [ %ix%i ]", name, pfx->getId(), pfx->mTargetName.c_str(), tex->getWidth(), tex->getHeight() );
245 else
246 dSprintf( caption, 256, "%s[%i] target", name, pfx->getId() );
247
248
249 pWinCtrl->setDataField( StringTable->insert("text"), NULL, caption );
250 }
251
252 for ( U32 i = Input1; i < TexCount; i++ )
253 {
254 if ( itr->bmp[i] == NULL )
255 continue;
256
257 pBmpCtrl = itr->bmp[i];
258 pWinCtrl = itr->window[i];
259

Callers 1

processMethod · 0.80

Calls 14

dSprintfFunction · 0.85
getBackBufferTexMethod · 0.80
dStrlenFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setBitmapHandleMethod · 0.45
getNameMethod · 0.45
getIdMethod · 0.45
c_strMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected