From 9434fb903dbde9a523385272e604bd8b2fa601f9 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 24 Dec 1999 12:28:20 +0000 Subject: [PATCH] Added default constructor to wxGLCanvas. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/glcanvas/gtk/glcanvas.h | 8 ++++++++ utils/glcanvas/motif/glcanvas.h | 2 ++ utils/glcanvas/win/glcanvas.h | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/utils/glcanvas/gtk/glcanvas.h b/utils/glcanvas/gtk/glcanvas.h index f426e65dda..3b7cb08cbd 100644 --- a/utils/glcanvas/gtk/glcanvas.h +++ b/utils/glcanvas/gtk/glcanvas.h @@ -108,6 +108,14 @@ public: int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette ); + inline wxGLCanvas() { + m_glContext = (wxGLContext*) NULL; + m_sharedContext = (wxGLContext*) NULL; + m_glWidget = (GtkWidget*) NULL; + m_vi = (void*) NULL; + m_exposed = FALSE; + } + bool Create( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/utils/glcanvas/motif/glcanvas.h b/utils/glcanvas/motif/glcanvas.h index ee4afde5fc..96ae147094 100644 --- a/utils/glcanvas/motif/glcanvas.h +++ b/utils/glcanvas/motif/glcanvas.h @@ -30,6 +30,8 @@ DECLARE_CLASS(wxGLCanvas) public: GLXContext glx_cx; + inline wxGLCanvas() { glx_cx = 0; } + wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); diff --git a/utils/glcanvas/win/glcanvas.h b/utils/glcanvas/win/glcanvas.h index 6dd7e60c6c..9c6dbc746d 100644 --- a/utils/glcanvas/win/glcanvas.h +++ b/utils/glcanvas/win/glcanvas.h @@ -69,6 +69,12 @@ class wxGLCanvas: public wxScrolledWindow { DECLARE_CLASS(wxGLCanvas) public: + wxGLCanvas() + { + m_glContext = (wxGLContext*) NULL; + m_hDC = 0; + } + wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); -- 2.45.2