mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
Fixes by clang-format
This commit is contained in:
1 parent
e184b02bd6
commit
9ca84a7af0
1 file changed
+31
-29
@@ -185,9 +185,9 @@ caf::Viewer::Viewer( QWidget* parent )
|
||||
caf::Viewer::~Viewer()
|
||||
{
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::~Viewer() this=%1 cvfOpenGLContext=%2" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( (cvf::int64)(intptr_t)cvfOpenGLContext() ) );
|
||||
cvf::String( "Viewer::~Viewer() this=%1 cvfOpenGLContext=%2" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( ( cvf::int64 )(intptr_t)cvfOpenGLContext() ) );
|
||||
|
||||
if ( m_layoutWidget ) m_layoutWidget->deleteLater();
|
||||
}
|
||||
@@ -279,9 +279,9 @@ void caf::Viewer::deleteFboOpenGLResources()
|
||||
// The OpenGL resources can be deleted at any time. CeeViz does not delete resources for FBOs, so delete them manually
|
||||
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::deleteFboOpenGLResources() this=%1 cvfOpenGLContext=%2" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( (cvf::int64)(intptr_t)cvfOpenGLContext() ) );
|
||||
cvf::String( "Viewer::deleteFboOpenGLResources() this=%1 cvfOpenGLContext=%2" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( ( cvf::int64 )(intptr_t)cvfOpenGLContext() ) );
|
||||
|
||||
if ( m_offscreenFbo.notNull() )
|
||||
{
|
||||
@@ -794,17 +794,18 @@ void caf::Viewer::resizeGL( int width, int height )
|
||||
height = (int)( ratio * height );
|
||||
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::resizeGL() this=%1 width=%2 height=%3 prevOffscreenW=%4 prevOffscreenH=%5" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( width )
|
||||
.arg( height )
|
||||
.arg( m_offscreenViewportWidth )
|
||||
.arg( m_offscreenViewportHeight ) );
|
||||
cvf::String( "Viewer::resizeGL() this=%1 width=%2 height=%3 prevOffscreenW=%4 prevOffscreenH=%5" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( width )
|
||||
.arg( height )
|
||||
.arg( m_offscreenViewportWidth )
|
||||
.arg( m_offscreenViewportHeight ) );
|
||||
|
||||
if ( width < 1 || height < 1 )
|
||||
{
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::resizeGL() this=%1 SKIPPED due to non-positive size" ).arg( (cvf::int64)(intptr_t)this ) );
|
||||
cvf::String( "Viewer::resizeGL() this=%1 SKIPPED due to non-positive size" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -847,11 +848,11 @@ bool caf::Viewer::isPerfInfoHudEnabled()
|
||||
void caf::Viewer::paintGL()
|
||||
{
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::paintGL() ENTRY this=%1 isVisible=%2 renderingSequenceNull=%3 canRender=%4" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( isVisible() ? "true" : "false" )
|
||||
.arg( m_renderingSequence.isNull() ? "true" : "false" )
|
||||
.arg( canRender() ? "true" : "false" ) );
|
||||
cvf::String( "Viewer::paintGL() ENTRY this=%1 isVisible=%2 renderingSequenceNull=%3 canRender=%4" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( isVisible() ? "true" : "false" )
|
||||
.arg( m_renderingSequence.isNull() ? "true" : "false" )
|
||||
.arg( canRender() ? "true" : "false" ) );
|
||||
|
||||
cvf::ref<cvf::OpenGLContext> myOglContext = cvfOpenGLContext();
|
||||
CVF_CHECK_OGL( myOglContext.p() );
|
||||
@@ -871,15 +872,16 @@ void caf::Viewer::paintGL()
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_offscreenFbo.notNull() && ( m_offscreenViewportWidth != thisSize.width() || m_offscreenViewportHeight != thisSize.height() ) )
|
||||
if ( m_offscreenFbo.notNull() &&
|
||||
( m_offscreenViewportWidth != thisSize.width() || m_offscreenViewportHeight != thisSize.height() ) )
|
||||
{
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::paintGL() this=%1 SIZE MISMATCH widgetSize=%2x%3 offscreenFboSize=%4x%5" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( thisSize.width() )
|
||||
.arg( thisSize.height() )
|
||||
.arg( m_offscreenViewportWidth )
|
||||
.arg( m_offscreenViewportHeight ) );
|
||||
cvf::String( "Viewer::paintGL() this=%1 SIZE MISMATCH widgetSize=%2x%3 offscreenFboSize=%4x%5" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( thisSize.width() )
|
||||
.arg( thisSize.height() )
|
||||
.arg( m_offscreenViewportWidth )
|
||||
.arg( m_offscreenViewportHeight ) );
|
||||
}
|
||||
|
||||
// If Qt overlay painting is enabled, paint to an QImage, and set it to the cvf::OverlayImage
|
||||
@@ -981,10 +983,10 @@ void caf::Viewer::onWidgetOpenGLReady()
|
||||
CVF_ASSERT( myQtOpenGLContext->isValid() );
|
||||
|
||||
CVF_LOG_DEBUG( CVF_GET_LOGGER( "cee.caf.viewer" ),
|
||||
cvf::String( "Viewer::onWidgetOpenGLReady() this=%1 cvfOpenGLContext=%2 qtOpenGLContext=%3" )
|
||||
.arg( (cvf::int64)(intptr_t)this )
|
||||
.arg( (cvf::int64)(intptr_t)cvfOpenGLContext() )
|
||||
.arg( (cvf::int64)(intptr_t)myQtOpenGLContext ) );
|
||||
cvf::String( "Viewer::onWidgetOpenGLReady() this=%1 cvfOpenGLContext=%2 qtOpenGLContext=%3" )
|
||||
.arg( ( cvf::int64 )(intptr_t)this )
|
||||
.arg( ( cvf::int64 )(intptr_t)cvfOpenGLContext() )
|
||||
.arg( ( cvf::int64 )(intptr_t)myQtOpenGLContext ) );
|
||||
|
||||
// Connect to signal so we get notified when Qt's OpenGL context is about to be destroyed
|
||||
connect( myQtOpenGLContext, &QOpenGLContext::aboutToBeDestroyed, this, &Viewer::deleteFboOpenGLResources );
|
||||
|
||||
Reference in new issue
Block a user