Commit e0c9b724 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: More platform/widgets/gl refactors

parent 75106a5c
......@@ -11,7 +11,7 @@ import sys
from jupyter_client.kernelspec import KernelSpecManager
from fsl.utils.platform import platform as fslplatform
from fsleyes_widgets as fwidgets
class FSLeyesKernelSpecManager(KernelSpecManager):
......@@ -28,7 +28,7 @@ class FSLeyesKernelSpecManager(KernelSpecManager):
spec = super(FSLeyesKernelSpecManager, self).get_kernel_spec(
kernel_name)
if not fslplatform.frozen:
if not fwidgets.frozen():
return spec
exe = op.join(op.dirname(sys.executable), 'fsleyes')
......
......@@ -57,8 +57,8 @@ def getShaderDir():
on which OpenGL version is in use.
"""
if fslgl.GL_VERSION == '2.1': subdir = 'gl21'
elif fslgl.GL_VERSION == '1.4': subdir = 'gl14'
if fslgl.GL_COMPATIBILITY == '2.1': subdir = 'gl21'
elif fslgl.GL_COMPATIBILITY == '1.4': subdir = 'gl14'
return op.join(fsleyes.assetDir, 'assets', 'gl', subdir)
......@@ -68,8 +68,8 @@ def getShaderSuffix():
returned depending on which OpenGL version is in use.
"""
if fslgl.GL_VERSION == '2.1': return 'glsl'
elif fslgl.GL_VERSION == '1.4': return 'prog'
if fslgl.GL_COMPATIBILITY == '2.1': return 'glsl'
elif fslgl.GL_COMPATIBILITY == '1.4': return 'prog'
def getVertexShader(prefix):
......
......@@ -41,6 +41,7 @@ import wx.adv
from fsl.utils.platform import platform as fslplatform
import fsl.utils.idle as idle
import fsleyes_widgets as fwidgets
import fsleyes_widgets.utils.status as status
import fsleyes
......@@ -52,7 +53,7 @@ import fsleyes.colourmaps as colourmaps
# wx.ModalDialogHook does not exist in wxPython < 4
if fslplatform.wxFlavour in (fslplatform.WX_PYTHON, fslplatform.WX_UNKNOWN):
if fwidgets.wxFlavour() in (fwidgets.WX_PYTHON, fwidgets.WX_UNKNOWN):
class ModalDialogHook(object):
def Register(self):
pass
......@@ -539,7 +540,7 @@ def initialise(splash, namespace, callback):
#
# If so, we set the save/load directory
# to the user's home directory instead.
if fslplatform.frozen:
if fwidgets.frozen():
fsleyesDir = op.dirname(__file__)
......
......@@ -49,15 +49,15 @@ import six
import wx
from fsl.utils.platform import platform as fslplatform
import fsl.utils.deprecated as deprecated
import fsleyes_props as props
import fsleyes_widgets.floatspin as floatspin
import fsleyes_widgets.floatslider as floatslider
import fsleyes_widgets.rangeslider as rangeslider
import fsl.utils.deprecated as deprecated
import fsleyes_widgets as fwidgets
import fsleyes_props as props
import fsleyes_widgets.floatspin as floatspin
import fsleyes_widgets.floatslider as floatslider
import fsleyes_widgets.rangeslider as rangeslider
from . import actions
from . import displaycontext
from . import actions
from . import displaycontext
log = logging.getLogger(__name__)
......@@ -352,7 +352,7 @@ FSLeyesPanelMeta = None
"""
# wxPython/Phoenix
if fslplatform.wxFlavour == fslplatform.WX_PHOENIX:
if fwidgets.wxFlavour() == fwidgets.WX_PHOENIX:
import wx.siplib as sip
......
Supports Markdown
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