Re: [wxVTK] Double buffering
Brought to you by:
malat
From: Joshua P. <jos...@gm...> - 2009-04-22 19:07:32
|
I updated to the latest wxVTK via CVS, which includes the wxvtk_attributes array in wxGLCanvas's constructor. If I call wxGLCanvas::SwapBuffers() after the line in wxVTKRenderWindowInteractor::OnPaint() which calls Render(), my screen starts out as black, which I believe is the undrawn buffer. So I think wxGLCanvas is being correctly initialized, but that the buffer swapping isn't working correctly inside Render(). I'm not sure, this is my best guess at the moment. Anyway, this still isn't working for me. I'm using NVIDIA's glx and get the following version info from glxinfo: server glx vendor string: NVIDIA Corporation server glx version string: 1.4 On Thu, Feb 26, 2009 at 10:10 AM, Pierre Fillard <pie...@gm...> wrote: > Not that I know. I ran into this bug a few months ago by testing softwares > on recent nvidia graphic cards, where I experienced lots of flickering. It > turns out that by explicitly setting double buffering to On solved the > problem. As I am not an openGL expert, I was pretty OK with this workaround. > > There are some discussions about this issue that you may find useful: > > http://www.nabble.com/OpenGL,-wxWidgets-and-Ubuntu-7.10-td16047290.html > > The trick of activating the double buffering works well on any system I > tried (windows, linux - various distributions - and macosx). Sorry for not > reporting it to the list but things went a bit crazy around here these days > (and months). > > Hope this helps, > Pierre. > > > On Thu, Feb 26, 2009 at 2:05 PM, Mathieu Malaterre > <mat...@gm...> wrote: >> >> Is it something that was reported before (possibly the bug tracker) >> that I forgot to merge ? >> >> thx >> >> On Wed, Feb 18, 2009 at 8:28 PM, Pierre FILLARD >> <Pie...@so...> wrote: >> > I had a similar issue that I solved by changing the default constructor >> > of >> > the class wxVTKRenderWindowInteractor to: >> > wxGLCanvas((wxWindow*)(NULL), wxID_ANY, wxDefaultPosition, >> > wxDefaultSize, 0, >> > wxT("glcanvas"), attributes) >> > where attributes is defined as: >> > int attributes[5] = { >> > WX_GL_DOUBLEBUFFER, >> > WX_GL_RGBA, >> > WX_GL_DEPTH_SIZE, >> > 16, >> > 0 >> > }; >> > which enables double buffering for wxGLCanvas. >> > My two cents. >> > Pierre. >> > On Feb 18, 2009, at 7:08 PM, Joshua Pedrick wrote: >> > >> > I've successfully compiled wxVTK and have integrated it into my >> > application. The trouble I am having is that if I use wxGLCanvas as >> > the sub-class I can't get double buffering to work. If I use wxWindow >> > double buffering works, but the window only refreshes in response to >> > VTK events and not wx events. Any hints? >> > >> > >> > ------------------------------------------------------------------------------ >> > Open Source Business Conference (OSBC), March 24-25, 2009, San >> > Francisco, CA >> > -OSBC tackles the biggest issue in open source: Open Sourcing the >> > Enterprise >> > -Strategies to boost innovation and cut costs with open source >> > participation >> > -Receive a $600 discount off the registration fee with the source code: >> > SFAD >> > http://p.sf.net/sfu/XcvMzF8H >> > _______________________________________________ >> > Wxvtk-users mailing list >> > Wxv...@li... >> > https://lists.sourceforge.net/lists/listinfo/wxvtk-users >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Open Source Business Conference (OSBC), March 24-25, 2009, San >> > Francisco, CA >> > -OSBC tackles the biggest issue in open source: Open Sourcing the >> > Enterprise >> > -Strategies to boost innovation and cut costs with open source >> > participation >> > -Receive a $600 discount off the registration fee with the source code: >> > SFAD >> > http://p.sf.net/sfu/XcvMzF8H >> > _______________________________________________ >> > Wxvtk-users mailing list >> > Wxv...@li... >> > https://lists.sourceforge.net/lists/listinfo/wxvtk-users >> > >> > >> >> >> >> -- >> Mathieu > > -- -- יהושע |