Skip to content

Commit b0114f4

Browse files
committed
added main.opengl rcParam
1 parent ff7e575 commit b0114f4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

psyplot_gui/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def start_app(fnames=[], name=[], dims=None, plot_method=None,
7575
exclude_plugins=rcParams['plugins.exclude'], offline=False,
7676
pwd=None, script=None, command=None, exec_=True, use_all=False,
7777
callback=None,
78-
opengl_implementation='software'):
78+
opengl_implementation=None):
7979
"""
8080
Eventually start the QApplication or only make a plot
8181
@@ -418,6 +418,8 @@ def _set_opengl_implementation(option):
418418
except Exception:
419419
QQuickWindow = QSGRendererInterface = None
420420
from PyQt5.QtCore import QCoreApplication, Qt
421+
if option is None:
422+
option = rcParams['main.opengl']
421423
if option == 'software':
422424
QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL)
423425
if QQuickWindow is not None:

psyplot_gui/config/rcsetup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ def format_ep(ep):
212212
True, validate_bool,
213213
"If True and the psyplot gui is already running, new files are opened "
214214
"in that gui"],
215+
'main.opengl': [
216+
'software', validate_str,
217+
"The opengl implementation to use. Should be one of 'software', "
218+
"'desktop', 'gles' or 'automatic'."],
215219
'content.load_tooltips': [
216220
True, validate_bool,
217221
"If True, a lazy load is performed on the arrays and data sets and "

0 commit comments

Comments
 (0)