diff options
author | jblum | 2008-08-19 20:53:18 +0000 |
---|---|---|
committer | jblum | 2008-08-19 20:53:18 +0000 |
commit | 6039ba34aee72974b0eacc9408627a0fa038dc81 (patch) | |
tree | 6b34cc0b12ea10a04c1cc5fc5f4a0ad674284c4c /gr-wxgui/src/python/plotter/plotter_base.py | |
parent | c500829e18e017e53ebcf57d0a9b85b6b1cd6ffa (diff) | |
download | gnuradio-6039ba34aee72974b0eacc9408627a0fa038dc81.tar.gz gnuradio-6039ba34aee72974b0eacc9408627a0fa038dc81.tar.bz2 gnuradio-6039ba34aee72974b0eacc9408627a0fa038dc81.zip |
plotter: require double buffering
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9333 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui/src/python/plotter/plotter_base.py')
-rw-r--r-- | gr-wxgui/src/python/plotter/plotter_base.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py index 96a1869da..a695fce0a 100644 --- a/gr-wxgui/src/python/plotter/plotter_base.py +++ b/gr-wxgui/src/python/plotter/plotter_base.py @@ -49,11 +49,14 @@ class _plotter_base(wx.glcanvas.GLCanvas): def __init__(self, parent): """! Create a new plotter base. - Initialize GL and register events. + Initialize the GLCanvas with double buffering. + Initialize various plotter flags. + Bind the paint and size events. @param parent the parent widgit """ self._semaphore = threading.Semaphore(1) - wx.glcanvas.GLCanvas.__init__(self, parent, -1) + attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA) + wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList) self.changed(False) self._gl_init_flag = False self._resized_flag = True @@ -86,7 +89,6 @@ class _plotter_base(wx.glcanvas.GLCanvas): if self._resized_flag: self.lock() self.width, self.height = self.GetSize() - glViewport(0, 0, self.width, self.height) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, self.width, self.height, 0, 1, 0) |