Convert m_pOffscreenSurface from pointer to object

This commit is contained in:
Vasily
2019-11-30 18:14:49 +01:00
committed by username223
parent 8136569455
commit 96e80ec3ce
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -118,10 +118,9 @@ OverlayController::OverlayController( bool desktopMode,
}
// create an offscreen surface to attach the context and FBO to
m_pOffscreenSurface.reset( new QOffscreenSurface() );
m_pOffscreenSurface->setFormat( m_openGLContext.format() );
m_pOffscreenSurface->create();
m_openGLContext.makeCurrent( m_pOffscreenSurface.get() );
m_offscreenSurface.setFormat( m_openGLContext.format() );
m_offscreenSurface.create();
m_openGLContext.makeCurrent( &m_offscreenSurface );
if ( !vr::VROverlay() )
{
@@ -417,7 +416,6 @@ void OverlayController::Shutdown()
m_pRenderTimer.reset();
}
m_pFbo.reset();
m_pOffscreenSurface.reset();
// save to settings that shutdown was safe
setPreviousShutdownSafe( true );