From 6039ba34aee72974b0eacc9408627a0fa038dc81 Mon Sep 17 00:00:00 2001 From: jblum Date: Tue, 19 Aug 2008 20:53:18 +0000 Subject: [PATCH] plotter: require double buffering git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9333 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-wxgui/src/python/plotter/plotter_base.py | 8 +++++--- 1 file 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 96a1869d..a695fce0 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) -- 2.39.5