-#if defined(__WXMSW__)
-#include "wx/msw/glcanvas.h"
-#elif defined(__WXMOTIF__)
-#include "wx/x11/glcanvas.h"
-#elif defined(__WXGTK__)
-#include "wx/gtk/glcanvas.h"
-#elif defined(__WXX11__)
-#include "wx/x11/glcanvas.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/glcanvas.h"
-#elif defined(__WXPM__)
-#include "wx/os2/glcanvas.h"
+// ----------------------------------------------------------------------------
+// wxGLContextBase: OpenGL rendering context
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_GL wxGLContextBase : public wxObject
+{
+public:
+ /*
+ The derived class should provide a ctor with this signature:
+
+ wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL);
+ */
+
+ // set this context as the current one
+ virtual bool SetCurrent(const wxGLCanvas& win) const = 0;
+};
+
+// ----------------------------------------------------------------------------
+// wxGLCanvasBase: window which can be used for OpenGL rendering
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_GL wxGLCanvasBase : public wxWindow
+{
+public:
+ // default ctor doesn't initialize the window, use Create() later
+ wxGLCanvasBase();
+
+ virtual ~wxGLCanvasBase();
+
+
+ /*
+ The derived class should provide a ctor with this signature:
+
+ wxGLCanvas(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ int* attribList = 0,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxGLCanvasName,
+ const wxPalette& palette = wxNullPalette);
+ */
+
+ // operations
+ // ----------
+
+ // set the given context associated with this window as the current one
+ bool SetCurrent(const wxGLContext& context) const;
+
+ // flush the back buffer (if we have it)
+ virtual bool SwapBuffers() = 0;
+
+
+ // accessors
+ // ---------
+
+ // check if the given attributes are supported without creating a canvas
+ static bool IsDisplaySupported(const int *attribList);
+
+ const wxPalette *GetPalette() const { return &m_palette; }
+
+ // miscellaneous helper functions
+ // ------------------------------
+
+ // call glcolor() for the colour with the given name, return false if
+ // colour not found
+ bool SetColour(const wxString& colour);
+
+
+
+ // deprecated methods using the implicit wxGLContext
+#if WXWIN_COMPATIBILITY_2_8
+ wxDEPRECATED( wxGLContext* GetContext() const );
+
+ wxDEPRECATED( void SetCurrent() );
+
+ wxDEPRECATED( void OnSize(wxSizeEvent& event) );
+#endif // WXWIN_COMPATIBILITY_2_8
+
+#ifdef __WXUNIVERSAL__
+ // resolve the conflict with wxWindowUniv::SetCurrent()
+ virtual bool SetCurrent(bool doit) { return wxWindow::SetCurrent(doit); };