Convert m_pOffscreenSurface from pointer to object
This commit is contained in:
@@ -118,10 +118,9 @@ OverlayController::OverlayController( bool desktopMode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create an offscreen surface to attach the context and FBO to
|
// create an offscreen surface to attach the context and FBO to
|
||||||
m_pOffscreenSurface.reset( new QOffscreenSurface() );
|
m_offscreenSurface.setFormat( m_openGLContext.format() );
|
||||||
m_pOffscreenSurface->setFormat( m_openGLContext.format() );
|
m_offscreenSurface.create();
|
||||||
m_pOffscreenSurface->create();
|
m_openGLContext.makeCurrent( &m_offscreenSurface );
|
||||||
m_openGLContext.makeCurrent( m_pOffscreenSurface.get() );
|
|
||||||
|
|
||||||
if ( !vr::VROverlay() )
|
if ( !vr::VROverlay() )
|
||||||
{
|
{
|
||||||
@@ -417,7 +416,6 @@ void OverlayController::Shutdown()
|
|||||||
m_pRenderTimer.reset();
|
m_pRenderTimer.reset();
|
||||||
}
|
}
|
||||||
m_pFbo.reset();
|
m_pFbo.reset();
|
||||||
m_pOffscreenSurface.reset();
|
|
||||||
|
|
||||||
// save to settings that shutdown was safe
|
// save to settings that shutdown was safe
|
||||||
setPreviousShutdownSafe( true );
|
setPreviousShutdownSafe( true );
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ private:
|
|||||||
QQuickWindow m_window{ &m_renderControl };
|
QQuickWindow m_window{ &m_renderControl };
|
||||||
std::unique_ptr<QOpenGLFramebufferObject> m_pFbo;
|
std::unique_ptr<QOpenGLFramebufferObject> m_pFbo;
|
||||||
QOpenGLContext m_openGLContext;
|
QOpenGLContext m_openGLContext;
|
||||||
std::unique_ptr<QOffscreenSurface> m_pOffscreenSurface;
|
QOffscreenSurface m_offscreenSurface;
|
||||||
|
|
||||||
std::unique_ptr<QTimer> m_pPumpEventsTimer;
|
std::unique_ptr<QTimer> m_pPumpEventsTimer;
|
||||||
std::unique_ptr<QTimer> m_pRenderTimer;
|
std::unique_ptr<QTimer> m_pRenderTimer;
|
||||||
|
|||||||
Reference in New Issue
Block a user