MCPcopy Create free account
hub / github.com/SpartanJ/eepp / recoverView

Method recoverView

src/eepp/graphics/framebuffer.cpp:94–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void 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
122const Int32& FrameBuffer::getWidth() const {
123 return mSize.x;

Callers

nothing calls this directly

Calls 15

findFunction · 0.85
setViewMethod · 0.80
viewportMethod · 0.80
setScissorsClippedMethod · 0.80
getClippingMaskMethod · 0.80
drawMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
getWidthMethod · 0.45
getSizeMethod · 0.45

Tested by

no test coverage detected