How to use a wxGLCanvas in a double
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.
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).
链接地址: http://www.djcxy.com/p/50314.html上一篇: 在C ++中集成GUI和OpenGL