My app uses a wxGLCanvas with double buffering on Win32. Every time a wxMenu item gets selected on top of the wxGLCanvas, the highlighted menu item screws up the 3D rendering. What I suspect is happening is that the area under the highlighted menu item is being saved (the old 3D image), my wxGLCanvas::onPaint is called to render the new 3D image, and then the area previously under the menu highlight is "restored" with the old image.
I am using 2.6.3.
Has anyone else had problems with wxMenu highlights screwing up the underlaying wxGLCanvas?
I tried refreshing my wxGLCanvas with idle events but that pegs the CPU utilization and produces flashing artifacts.
Thank you in advance for your help.
wxMenu interferes with wxGLCanvas
I tried the Cn3D application which is a wxWidgets app that also uses wxGLCanvas and it has the same problems with wxMenus popping up over wxGLCanvas on my WindowsXP SP2 system. Basically, menus that popup over a wxGLCanvas sometimes leave garbage on the canvas. It seems that the wxGLCanvas's EVT_PAINT event is being called BEFORE the wxMenus are done removing the menu.
This is looking like a bug in wxWidgets version 2.6.3 for Win32.
The Cn3D program can be downloaded from:
http://www.ncbi.nlm.nih.gov/Structure/C ... tall.shtml
This is looking like a bug in wxWidgets version 2.6.3 for Win32.
The Cn3D program can be downloaded from:
http://www.ncbi.nlm.nih.gov/Structure/C ... tall.shtml
My program uses popup and pull down menus over a double buffered wxGLCanvas. The version is 2.6.3 msw release (not Universal) and the program ran on WinXP SP2.
This picture is an image of my app immediately after using a popup menu. There is a horizontal yellow stripe over the pink ball. This stripe corresponds to what was the highlighted wxMenuItem. wxWidgets is giving my wxGLCanvas a EVT_PAINT before the popup menu is done cleaning up after itself.
[/img]
This picture is an image of my app immediately after using a popup menu. There is a horizontal yellow stripe over the pink ball. This stripe corresponds to what was the highlighted wxMenuItem. wxWidgets is giving my wxGLCanvas a EVT_PAINT before the popup menu is done cleaning up after itself.
[/img]