In order to make shared wxGLContext work,\nadd new wxGLCanvas ctor passing a wxGLCanvas\n instead of a wxGLContext, to share context with.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Sylvain Bougnoux
2000-01-19 18:41:38 +00:00
parent 954e4e9883
commit b8167e73f6
2 changed files with 38 additions and 15 deletions

View File

@@ -94,6 +94,13 @@ private:
class wxGLCanvas: public wxScrolledWindow
{
public:
inline wxGLCanvas() {
m_glContext = (wxGLContext*) NULL;
m_sharedContext = (wxGLContext*) NULL;
m_glWidget = (GtkWidget*) NULL;
m_vi = (void*) NULL;
m_exposed = FALSE;
}
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@@ -107,16 +114,17 @@ public:
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
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,
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@@ -140,6 +148,7 @@ public:
wxGLContext *m_glContext,
*m_sharedContext;
wxGLCanvas *m_sharedContextOf;
void *m_vi;
GtkWidget *m_glWidget;
bool m_exposed;