fvpolpeta / devide

Automatically exported from code.google.com/p/devide
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

terrible flickering with wxPython 2.8.8.1 on Linux x86_64 #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Start up the wxVTKRenderWindowInteractor built-in example with wxPython
2.8.8.1: note the flickering.  It's especially bad with the '3' stereo mode.

Put 2.8.7.1 back, and all of these problems disappear.

Original issue reported on code.google.com by cpbotha on 25 Jul 2008 at 10:47

GoogleCodeExporter commented 9 years ago

Original comment by cpbotha on 25 Jul 2008 at 10:47

GoogleCodeExporter commented 9 years ago
Might be because wxVTK is using a wxGLCanvas, while in wx2.8 one need to use a
wxWindow as parent class.

ref:
http://wxvtk.sf.net

Original comment by mathieu.malaterre on 30 Jul 2008 at 11:22

GoogleCodeExporter commented 9 years ago
Hi there Mathieu!

Thanks for the information.  When I was diagnosing the problem, I tried simply
replacing the wxGLCanvas with a wxWindow and was rewarded with a grey Window, 
iow no
3D display.

I'll try it again and also look at your wxvtk source.

Thanks again,
Charl

Original comment by cpbotha on 30 Jul 2008 at 11:27

GoogleCodeExporter commented 9 years ago
I've tried again with using the wxWindow as base: the window starts without 
contents
(grey).  As soon as I click in it, it does render, and it doesn't flicker. 
Thanks for
the tip Mathieu! :)

I'm going to stick with wxPython 2.8.7.1 for now, until I have time to diagnose 
and
fix the no-display-on-window-creation issues.

Original comment by cpbotha on 31 Jul 2008 at 8:41

GoogleCodeExporter commented 9 years ago
I've debugged some more (hard to stop): it turns out it does draw the scene 
exactly
once, and that's then overpainted by the grey (probably the wxWindow client 
area?)

Resizing to fullscreen also has issues.

Original comment by cpbotha on 31 Jul 2008 at 8:49

GoogleCodeExporter commented 9 years ago
Mind dump: I've been going through the wxVTK code.  In wxVTKRWI.py, you're 
doing an
extra render in OnSize, which has been disabled in wxVTK.  See if this makes a
difference.

Original comment by cpbotha on 31 Jul 2008 at 9:04

GoogleCodeExporter commented 9 years ago
To get rid of flickering, you may want to read this:

http://dev.vladiuz.com/index.php/2008/06/flicker-free-wxdc-in-wxpython/

Original comment by Vlad.Kho...@gmail.com on 5 May 2009 at 8:25

GoogleCodeExporter commented 9 years ago
@Vlad.Khokholkov: Thanks for the tip, but that was not the problem in this case
(although it is related). :)

In this case, it had to do with changes in the WX allocation of the GL context 
to
which VTK is rendering.  It was fixed between VTK 5.2 and 5.4 (by Chris 
Kruszynski)
by allocating the GL context with the WX_GL_DOUBLEBUFFER flag.

Thanks also for reminding me to close this bug!

Original comment by cpbotha on 5 May 2009 at 9:03