| 92 | } |
| 93 | |
| 94 | void FrameBuffer::recoverView() { |
| 95 | GlobalBatchRenderer::instance()->draw(); |
| 96 | |
| 97 | auto found = std::find( sFBOActiveViews.begin(), sFBOActiveViews.end(), &mView ); |
| 98 | if ( found != sFBOActiveViews.end() ) |
| 99 | sFBOActiveViews.erase( found ); |
| 100 | |
| 101 | if ( sFBOActiveViews.empty() ) { |
| 102 | mWindow->setView( mWindow->getView(), true ); |
| 103 | } else { |
| 104 | const View* view = sFBOActiveViews.back(); |
| 105 | GLi->viewport( 0, 0, view->getSize().getWidth(), view->getSize().getHeight() ); |
| 106 | } |
| 107 | |
| 108 | // Recover the user projection and modelview matrix |
| 109 | GLi->loadIdentity(); |
| 110 | GLi->matrixMode( GL_PROJECTION ); |
| 111 | GLi->loadMatrixf( mProjMat ); |
| 112 | GLi->matrixMode( GL_MODELVIEW ); |
| 113 | GLi->loadIdentity(); |
| 114 | GLi->loadMatrixf( mModelViewMat ); |
| 115 | |
| 116 | if ( mNeedsToRestoreScissorsClipping ) { |
| 117 | GLi->getClippingMask()->setScissorsClipped( mOldScissorsRect ); |
| 118 | mNeedsToRestoreScissorsClipping = false; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | const Int32& FrameBuffer::getWidth() const { |
| 123 | return mSize.x; |
nothing calls this directly
no test coverage detected