#304 Avoid accessing OpenGL if we are using "-platform offscreen"

Add description of how to start ResInsight in headless mode
This commit is contained in:
Jacob Støren
2020-02-07 14:23:20 +01:00
parent 4277438b27
commit 487b55046e
2 changed files with 24 additions and 3 deletions

View File

@@ -394,10 +394,13 @@ bool RiaGuiApplication::useShaders() const
{
if ( !m_preferences->useShaders() ) return false;
bool isShadersSupported = caf::Viewer::isShadersSupported();
if ( !isShadersSupported ) return false;
bool isShadersSupported = true;
if ( platformName() != "offscreen" ) // Avoid opengl access if we are in qt offscreen mode
{
isShadersSupported = caf::Viewer::isShadersSupported();
}
return true;
return isShadersSupported;
}
//--------------------------------------------------------------------------------------------------