mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user