Commit f2a2ae33 authored by Thomas Vincent's avatar Thomas Vincent

Add --no-3d and xsocs.config.USE_OPENGL to toggle use of OpenGL

parent 5cf6d933
......@@ -50,6 +50,10 @@ def main(argv):
type=int,
default=cpu_count(),
help='Max number of processes to use (default: %d)' % cpu_count())
parser.add_argument(
'--no-3d',
action='store_true',
help='Do not use OpenGL-based 3D visualization')
options = parser.parse_args(argv[1:])
......@@ -58,6 +62,8 @@ def main(argv):
'Number of processes to use must be strictly positive')
config.DEFAULT_PROCESS_NUMBER = options.numcores
config.USE_OPENGL = not options.no_3d
if options.project_file:
xsocs_main(projectH5File=options.project_file)
else:
......
......@@ -43,3 +43,6 @@ class Config(object):
This value must be strictly positive.
"""
USE_OPENGL = True
"""True to use OpenGL widgets (default), False to disable."""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment