wxMenu interferes with wxGLCanvas

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
beth
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Aug 14, 2006 8:10 pm
Contact:

wxMenu interferes with wxGLCanvas

Post by beth »

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.
beth
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Aug 14, 2006 8:10 pm
Contact:

Post by beth »

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
beth
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Aug 14, 2006 8:10 pm
Contact:

Post by beth »

The OpenGL sample program "cube" that comes with wxWidgets-2.6.3 also suffers from the same menu over wxGLCanvas problem on Windows XP SP2.
theigor
Experienced Solver
Experienced Solver
Posts: 78
Joined: Thu Jan 12, 2006 6:51 pm

Post by theigor »

I'm sorry but I couldn't reproduce your problem. I'm using winxp SP2 and everything's perfectly normal
beth
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Aug 14, 2006 8:10 pm
Contact:

Post by beth »

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.

Image

[/img]
Post Reply