Fix 3D canvas blank area during window resize after wxWidgets 3.3.2 upgrade

This commit is contained in:
SoftFever
2026-03-28 15:46:34 +08:00
parent 779a36bf8b
commit c06a0223a7
2 changed files with 14 additions and 3 deletions

View File

@@ -428,7 +428,10 @@ wxGLCanvas* OpenGLManager::create_wxglcanvas(wxWindow& parent)
if (! can_multisample())
attribList[12] = 0;
return new wxGLCanvas(&parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS);
wxGLCanvas* canvas = new wxGLCanvas(&parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS);
// The GL canvas paints its entire surface, so background erasing is unnecessary.
canvas->SetBackgroundStyle(wxBG_STYLE_PAINT);
return canvas;
}
void OpenGLManager::detect_multisample(int* attribList)