| 40 | //------------------------------------------------------------------------------ |
| 41 | |
| 42 | void 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 |
no test coverage detected