MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _init

Method _init

Engine/source/gfx/gfxFence.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40//------------------------------------------------------------------------------
41
42void GFXGeneralFence::_init()
43{
44 // Register texture callback to re-create resources
45 if ( !mInitialized )
46 GFXTextureManager::addEventDelegate( this, &GFXGeneralFence::_onTextureEvent );
47
48 // Set this to true for error checking
49 mInitialized = true;
50
51 // Allocate resources
52 mInitialized &= mRTTexHandle.set( 2, 2, GFXFormatR8G8B8X8, &GFXRenderTargetProfile, avar("%s() - mInitialized (line %d)", __FUNCTION__, __LINE__) );
53 mRenderTarget = GFX->allocRenderToTextureTarget();
54 mInitialized &= ( mRenderTarget != NULL );
55
56 GFXStateBlockDesc d;
57 mRenderSB = GFX->createStateBlock(d);
58}
59
60//------------------------------------------------------------------------------
61

Callers 1

jquery.jsFile · 0.45

Calls 4

avarFunction · 0.85
createStateBlockMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected