X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dc3065a56f1febf3de3b3bbf0904cf8fdc7f7c50..e2badebb8fad5ee453fada24f336c275df9f216b:/src/common/glcmn.cpp?ds=inline diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index ffcb45a603..0d85eab14c 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -41,6 +41,17 @@ IMPLEMENT_CLASS(wxGLApp, wxApp) // implementation // ============================================================================ +wxGLCanvasBase::wxGLCanvasBase() +{ +#if WXWIN_COMPATIBILITY_2_8 + m_glContext = NULL; +#endif + + // we always paint background entirely ourselves so prevent wx from erasing + // it to avoid flicker + SetBackgroundStyle(wxBG_STYLE_CUSTOM); +} + void wxGLCanvasBase::SetCurrent(const wxGLContext& context) const { // although on MSW it works even if the window is still hidden, it doesn't @@ -51,7 +62,7 @@ void wxGLCanvasBase::SetCurrent(const wxGLContext& context) const context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this)); } -bool wxGLCanvasBase::SetColour(const wxChar *colour) +bool wxGLCanvasBase::SetColour(const wxString& colour) { wxColour col = wxTheColourDatabase->Find(colour); if ( !col.Ok() )