We've been using a wxGLCanvas successfully in our app for years but in the past couple days it occasionally disappears for one of our QC guys, leaving the grey panel background. I'm having trouble reproducing the bug.
Any guesses as to why a wxGLCanvas would disappear?
Windows 10, WX 3.0.5 (EDIT: WX 3.1.5)
wxGLCanvas disappearing? Topic is solved
-
- Experienced Solver
- Posts: 58
- Joined: Mon Jul 03, 2017 12:03 am
wxGLCanvas disappearing?
Last edited by buttonsrtoys on Fri Jun 25, 2021 2:26 pm, edited 3 times in total.
Re: wxGLCanvas disappearing?
Very hard to remotely diagnose this.
Things you should check:
- size of the wxGLCanvas
- is the paint event executed
- is the OpenGL code executed
- where does the grey color that is displayed come from? E.g. set different background colors for the parent, the wxGLCanvas itself and the clear color in your GL code
And i would upgrade to a recent wx version. 3.0.5 is ancient by now.
Things you should check:
- size of the wxGLCanvas
- is the paint event executed
- is the OpenGL code executed
- where does the grey color that is displayed come from? E.g. set different background colors for the parent, the wxGLCanvas itself and the clear color in your GL code
And i would upgrade to a recent wx version. 3.0.5 is ancient by now.
Use the source, Luke!
-
- Experienced Solver
- Posts: 58
- Joined: Mon Jul 03, 2017 12:03 am
Re: wxGLCanvas disappearing?
Thanks for the thoughts, doublemax. I'll investigate. I misspoke. We're on 3.1.3
The grey color is the underlying panel. The canvas completely disappears
The grey color is the underlying panel. The canvas completely disappears
Re: wxGLCanvas disappearing?
In that case i see only two possible reaons. The GLPanel has a size of 0, or it doesn't render anything. You should also check for OpenGL errors.buttonsrtoys wrote: ↑Fri Jun 25, 2021 2:26 pm The grey color is the underlying panel. The canvas completely disappears
Use the source, Luke!