From a little internal project...
class GLCanvas(glcanvas.wxGLCanvas):
def __init__(self, parent):
glcanvas.wxGLCanvas.__init__(self, parent, -1)
self.init = false
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_CHAR(self, self.OnChar)
EVT_LEFT_DOWN( self, self.OnMouseClickLeft )
EVT_MOTION( self, self.OnMouseMove )
EVT_LEFT_UP( self, self.OnMouseReleaseLeft )
self.platform = viewplatform.ViewPlatform(
fieldOfView=self.fieldOfView )
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing.
HTH,
Mike
···
-----Original Message-----
From: Ryan Martin [mailto:ryanm@wag.caltech.edu]
Sent: Wednesday, July 05, 2000 6:47 PM
To: wxpython-users@wxwindows.org
Subject: [wxPython] glcanvas flickers on linux
I have a program that loads and saves molecular description files and
gives the option to display them using opengl. When the user double
clicks on a molecule, I render that molecule in a second frame
containing a glcanvas object. It works fine but the moment I start
to rotate, translate or zoom on the molecule(meaning OnPaint is
being called a lot) the canvas flickers. I'm using the standard
SwapBuffers command that comes with glcanvas. Has anyone else run into
this problem using wxGTK on linux? Hopefully I can find a fix for this
so I don't have to go back to tkinter and try to get togl to work.
I'm using wxPython 2.1.16, wxWindows 2.1.16, GTK+ 1.2.8, and Mesa 3.2.
I'm not subscribe to the list, so can you please cc me on any replies.
Thanks.
-Ryan
_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
Sorry, forgot to mention I already have an empty OnEraseBackground
handler. The problem is something else.
-Ryan
···
Mike Fletcher (mfletch@tpresence.com) [000705 16:54]
>From a little internal project...
class GLCanvas(glcanvas.wxGLCanvas):
def __init__(self, parent):
glcanvas.wxGLCanvas.__init__(self, parent, -1)
self.init = false
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_CHAR(self, self.OnChar)
EVT_LEFT_DOWN( self, self.OnMouseClickLeft )
EVT_MOTION( self, self.OnMouseMove )
EVT_LEFT_UP( self, self.OnMouseReleaseLeft )
self.platform = viewplatform.ViewPlatform(
fieldOfView=self.fieldOfView )
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing.
HTH,
Mike
-----Original Message-----
From: Ryan Martin [mailto:ryanm@wag.caltech.edu]
Sent: Wednesday, July 05, 2000 6:47 PM
To: wxpython-users@wxwindows.org
Subject: [wxPython] glcanvas flickers on linux
I have a program that loads and saves molecular description files and
gives the option to display them using opengl. When the user double
clicks on a molecule, I render that molecule in a second frame
containing a glcanvas object. It works fine but the moment I start
to rotate, translate or zoom on the molecule(meaning OnPaint is
being called a lot) the canvas flickers. I'm using the standard
SwapBuffers command that comes with glcanvas. Has anyone else run into
this problem using wxGTK on linux? Hopefully I can find a fix for this
so I don't have to go back to tkinter and try to get togl to work.
I'm using wxPython 2.1.16, wxWindows 2.1.16, GTK+ 1.2.8, and Mesa 3.2.
I'm not subscribe to the list, so can you please cc me on any replies.
Thanks.
-Ryan
_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
I also experience flickering on linux when I dislplay on wxPanel so I tried
your suggestion to use EVT_ERASE_BACKGROUND but it didn't do anything for
me. It still flickers.
Bob
···
At 07:53 PM 7/5/00 -0400, you wrote:
From a little internal project...
class GLCanvas(glcanvas.wxGLCanvas):
def __init__(self, parent):
glcanvas.wxGLCanvas.__init__(self, parent, -1)
self.init = false
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_CHAR(self, self.OnChar)
EVT_LEFT_DOWN( self, self.OnMouseClickLeft )
EVT_MOTION( self, self.OnMouseMove )
EVT_LEFT_UP( self, self.OnMouseReleaseLeft )
self.platform = viewplatform.ViewPlatform(
fieldOfView=self.fieldOfView )
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing.
HTH,
Mike
-----Original Message-----
From: Ryan Martin [mailto:ryanm@wag.caltech.edu]
Sent: Wednesday, July 05, 2000 6:47 PM
To: wxpython-users@wxwindows.org
Subject: [wxPython] glcanvas flickers on linux
I have a program that loads and saves molecular description files and
gives the option to display them using opengl. When the user double
clicks on a molecule, I render that molecule in a second frame
containing a glcanvas object. It works fine but the moment I start
to rotate, translate or zoom on the molecule(meaning OnPaint is
being called a lot) the canvas flickers. I'm using the standard
SwapBuffers command that comes with glcanvas. Has anyone else run into
this problem using wxGTK on linux? Hopefully I can find a fix for this
so I don't have to go back to tkinter and try to get togl to work.
I'm using wxPython 2.1.16, wxWindows 2.1.16, GTK+ 1.2.8, and Mesa 3.2.
I'm not subscribe to the list, so can you please cc me on any replies.
Thanks.
-Ryan
_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
-------------------------------------------------
Robert B. Klimek
NASA Glenn Research Center
robert.klimek@grc.nasa.gov
(216) 433-2837
--------------------------------------------------