diff --git a/include/wx/qt/glcanvas.h b/include/wx/qt/glcanvas.h index a67efa09b0..0e872e343f 100644 --- a/include/wx/qt/glcanvas.h +++ b/include/wx/qt/glcanvas.h @@ -17,7 +17,9 @@ class QGLFormat; class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase { public: - wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL); + wxGLContext(wxGLCanvas *win, + const wxGLContext *other = NULL, + const wxGLContextAttrs *ctxAttrs = NULL); /// virtual ~wxGLContext(); virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE; @@ -36,6 +38,16 @@ class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase { public: explicit // avoid implicitly converting a wxWindow* to wxGLCanvas + wxGLCanvas(wxWindow *parent, + const wxGLAttributes& dispAttrs, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + explicit wxGLCanvas(wxWindow *parent, wxWindowID id = wxID_ANY, const int *attribList = NULL, @@ -45,6 +57,15 @@ public: const wxString& name = wxGLCanvasName, const wxPalette& palette = wxNullPalette); + bool Create(wxWindow *parent, + const wxGLAttributes& dispAttrs, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, diff --git a/src/qt/glcanvas.cpp b/src/qt/glcanvas.cpp index ba8b49678b..2430d84384 100644 --- a/src/qt/glcanvas.cpp +++ b/src/qt/glcanvas.cpp @@ -329,7 +329,7 @@ void wxGLAttributes::AddDefaultsForWXBefore31() wxIMPLEMENT_CLASS(wxGLContext, wxWindow); -wxGLContext::wxGLContext(wxGLCanvas *WXUNUSED(win), const wxGLContext* WXUNUSED(other)) +wxGLContext::wxGLContext(wxGLCanvas *WXUNUSED(win), const wxGLContext* WXUNUSED(other), const wxGLContextAttrs *WXUNUSED(ctxAttrs)) { // m_glContext = win->GetHandle()->context(); } @@ -347,6 +347,18 @@ bool wxGLContext::SetCurrent(const wxGLCanvas&) const wxIMPLEMENT_CLASS(wxGLCanvas, wxWindow); +wxGLCanvas::wxGLCanvas(wxWindow *parent, + const wxGLAttributes& dispAttrs, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name, + const wxPalette& palette) +{ + Create(parent, dispAttrs, id, pos, size, style, name, palette); +} + wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id, const int *attribList, @@ -359,6 +371,19 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, Create(parent, id, pos, size, style, name, attribList, palette); } +bool wxGLCanvas::Create(wxWindow *parent, + const wxGLAttributes& dispAttrs, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name, + const wxPalette& palette) +{ + wxLogError("Missing implementation of " + wxString(__FUNCTION__)); + return false; +} + bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -509,4 +534,22 @@ wxGLCanvasBase::IsDisplaySupported(const int *attribList) return QGLWidget(format).isValid(); } +/* static */ +bool +wxGLCanvasBase::IsDisplaySupported(const wxGLAttributes& dispAttrs) +{ + wxLogError("Missing implementation of " + wxString(__FUNCTION__)); + return false; +} + +// ---------------------------------------------------------------------------- +// wxGLApp +// ---------------------------------------------------------------------------- + +bool wxGLApp::InitGLVisual(const int *attribList) +{ + wxLogError("Missing implementation of " + wxString(__FUNCTION__)); + return false; +} + #endif // wxUSE_GLCANVAS