diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-06-05 16:11:21 -0400 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-06-05 16:11:21 -0400 |
commit | f98715b851b39c0e3f11c0a5e853eec1ac7dbff6 (patch) | |
tree | 66d650bad1fe6c5244c2fd692df5c8b93698330d /gr-wxgui/src/python/plotter/plotter_base.py | |
parent | 36f8fe8f83bc867d7f1e00725a9f13415b863540 (diff) |
Revert "wxgui: Fixes to solve issues using GL sinks on OS X"
This reverts commit 5f0aaf3d5397675d6f87acd7ab20526ac1fb0d4e.
Issues reported with blank displays on some non-OSX systems.
Diffstat (limited to 'gr-wxgui/src/python/plotter/plotter_base.py')
-rw-r--r-- | gr-wxgui/src/python/plotter/plotter_base.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py index 6d9463458d..b8a2ce709e 100644 --- a/gr-wxgui/src/python/plotter/plotter_base.py +++ b/gr-wxgui/src/python/plotter/plotter_base.py @@ -87,8 +87,7 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): @param parent the parent widgit """ attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA) - wx.glcanvas.GLCanvas.__init__(self, parent, wx.ID_ANY, attribList); # Specifically use the CTOR which does NOT create an implicit GL context - self._gl_ctx = wx.glcanvas.GLContext(self) # Create the explicit GL context + wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList); self.use_persistence=False self.persist_alpha=2.0/15 self.clear_accum=True @@ -152,14 +151,10 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): Resize the view port if the width or height changed. Redraw the screen, calling the draw functions. """ - if not self.IsShownOnScreen(): # Cannot realise a GL context on OS X if window is not yet shown - return # create device context (needed on Windows, noop on X) - dc = None - if event.GetEventObject(): # Only create DC if paint triggered by WM message (for OS X) - dc = wx.PaintDC(self) + dc = wx.PaintDC(self) self.lock() - self.SetCurrent(self._gl_ctx) # Real the explicit GL context + self.SetCurrent() # check if gl was initialized if not self._gl_init_flag: |