0

My wxWidgets application has a main wxFrame with a wxAUIManager. In four panes i have a wxTreeCtrl, a wxNotebook (in a wxPanel to manage flickering), a wxListBox and an wxGLCanvas respectively.

To manage a flickering issue I would like to have the wxFrame double-buffered. This, however, disturbs the rendering of the wxGLCanvas (I guess this is due to the double-buffered nature of the wxGLCanvas itself).

Is there a way to use a wxGLCanvas as a child of a double buffered wxFrame without distorting the rendering?

I use wxWidgets 3.1.0 on a windows 10 machine.

Update:
With "distorted rendering" i mean that my geometry is not rendered. When panes of the main wxFrame are resized, they get painted over the GLCanvas and remain painted over the GLCanvas even when the panes retain their original size.

I have also tried to reproduce this issue in the cube example in the wxWidgets samples but there things seems to work.

marcks
  • 400
  • 1
  • 2
  • 11
  • What do you mean by "disturbs/distorts the rendering"? – Ripi2 Feb 05 '17 at 00:09
  • @marcks, what version of wx do you use? What OS/toolkit? Can you create an example of what you are doing? – Igor Feb 05 '17 at 03:07
  • Take a look at `samples/opengl/cube`. – macroland Feb 06 '17 at 05:55
  • I have updated the question to clarify the issue. I don't have the same problem in the cube sample. Unfortunately I cannot provide a simple example that shows the issue. To me it looks like the GLcanvas never repaints when the wxFrame is double-buffered. – marcks Feb 06 '17 at 19:08

1 Answers1

-1

IMO you should do rendering every time the GLCanvas changes its size. Also, proccess this GLCanvas size event after the rest of panes have proccesed it (the last proccessed posts a size-event to GLCanvas).

Ripi2
  • 7,031
  • 1
  • 17
  • 33