| 60 | //------------------------------------------------------------------------------ |
| 61 | |
| 62 | void GFXGeneralFence::issue() |
| 63 | { |
| 64 | PROFILE_SCOPE(GFXGeneralFence_Issue); |
| 65 | |
| 66 | // Resource creation will be done on first call to issue() |
| 67 | if( !mInitialized ) |
| 68 | _init(); |
| 69 | |
| 70 | // If we can't init, return. |
| 71 | if(!mInitialized) |
| 72 | return; |
| 73 | |
| 74 | AssertFatal( mInitialized, "Error occured during GFXGeneralFence::_init, sorry I can't be more specific, break and debug." ); |
| 75 | |
| 76 | RectI viewport = GFX->getViewport(); |
| 77 | |
| 78 | GFX->pushActiveRenderTarget(); |
| 79 | mRenderTarget->attachTexture( GFXTextureTarget::Color0, mRTTexHandle ); |
| 80 | GFX->setActiveRenderTarget( mRenderTarget ); |
| 81 | |
| 82 | // Set-up states |
| 83 | GFX->setStateBlock(mRenderSB); |
| 84 | GFX->pushWorldMatrix(); |
| 85 | GFX->setWorldMatrix( MatrixF::Identity ); |
| 86 | |
| 87 | // CodeReview: We can re-do this with a static vertex buffer at some point. [5/9/2007 Pat] |
| 88 | PrimBuild::begin( GFXTriangleList, 3 ); |
| 89 | PrimBuild::vertex2f( 0.f, 0.f ); |
| 90 | PrimBuild::vertex2f( 0.f, 1.f ); |
| 91 | PrimBuild::vertex2f( 1.f, 0.f ); |
| 92 | PrimBuild::end(); |
| 93 | |
| 94 | GFX->popWorldMatrix(); |
| 95 | GFX->popActiveRenderTarget(); |
| 96 | |
| 97 | GFX->setViewport(viewport); |
| 98 | } |
| 99 | |
| 100 | //------------------------------------------------------------------------------ |
| 101 |
no test coverage detected