Fix missing gl functions in WXQT
This commit is contained in:
@@ -17,7 +17,9 @@ class QGLFormat;
|
|||||||
class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase
|
class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL);
|
wxGLContext(wxGLCanvas *win,
|
||||||
|
const wxGLContext *other = NULL,
|
||||||
|
const wxGLContextAttrs *ctxAttrs = NULL);
|
||||||
/// virtual ~wxGLContext();
|
/// virtual ~wxGLContext();
|
||||||
|
|
||||||
virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE;
|
virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE;
|
||||||
@@ -36,6 +38,16 @@ class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit // avoid implicitly converting a wxWindow* to wxGLCanvas
|
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,
|
wxGLCanvas(wxWindow *parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const int *attribList = NULL,
|
const int *attribList = NULL,
|
||||||
@@ -45,6 +57,15 @@ public:
|
|||||||
const wxString& name = wxGLCanvasName,
|
const wxString& name = wxGLCanvasName,
|
||||||
const wxPalette& palette = wxNullPalette);
|
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,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
@@ -329,7 +329,7 @@ void wxGLAttributes::AddDefaultsForWXBefore31()
|
|||||||
|
|
||||||
wxIMPLEMENT_CLASS(wxGLContext, wxWindow);
|
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();
|
// m_glContext = win->GetHandle()->context();
|
||||||
}
|
}
|
||||||
@@ -347,6 +347,18 @@ bool wxGLContext::SetCurrent(const wxGLCanvas&) const
|
|||||||
|
|
||||||
wxIMPLEMENT_CLASS(wxGLCanvas, wxWindow);
|
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,
|
wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const int *attribList,
|
const int *attribList,
|
||||||
@@ -359,6 +371,19 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
|||||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
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,
|
bool wxGLCanvas::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
@@ -509,4 +534,22 @@ wxGLCanvasBase::IsDisplaySupported(const int *attribList)
|
|||||||
return QGLWidget(format).isValid();
|
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
|
#endif // wxUSE_GLCANVAS
|
||||||
|
Reference in New Issue
Block a user