Fix editor and g3dviewer for wx 3.1.x

glCanvas args struct needs to be null terminated.
https://trac.wxwidgets.org/ticket/19193#ticket
fixes iss #207.
This commit is contained in:
Jammyjamjamman 2021-06-04 22:08:18 +01:00
parent fbd0cfb17e
commit 789e1cdf37
2 changed files with 2 additions and 2 deletions

View File

@ -591,7 +591,7 @@ MainWindow::~MainWindow(){
void MainWindow::initGlCanvas(){
if(glCanvas == NULL) {
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; // to prevent flicker
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8, 0 }; // to prevent flicker
glCanvas = new GlCanvas(this, args);
}
}

View File

@ -493,7 +493,7 @@ void MainWindow::onClose(wxCloseEvent &event) {
void MainWindow::initGlCanvas(){
if(glCanvas == NULL) {
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 };
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8, 0 };
glCanvas = new GlCanvas(this, this->panel, args);
boxsizer->Add(glCanvas, 1, wxEXPAND);