X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/498ace9e1f08b1e177b1a883ac69d12385e805b0..d897635497a2f396d1972d7584e83bf3e64b0b95:/include/wx/glcanvas.h diff --git a/include/wx/glcanvas.h b/include/wx/glcanvas.h index adbbb033a1..e02657cc96 100644 --- a/include/wx/glcanvas.h +++ b/include/wx/glcanvas.h @@ -20,8 +20,8 @@ #include "wx/palette.h" #include "wx/window.h" -class WXDLLIMPEXP_GL wxGLCanvas; -class WXDLLIMPEXP_GL wxGLContext; +class WXDLLIMPEXP_FWD_GL wxGLCanvas; +class WXDLLIMPEXP_FWD_GL wxGLContext; // ---------------------------------------------------------------------------- // Constants for attributes list @@ -66,7 +66,7 @@ public: */ // set this context as the current one - virtual void SetCurrent(const wxGLCanvas& win) const = 0; + virtual bool SetCurrent(const wxGLCanvas& win) const = 0; }; // ---------------------------------------------------------------------------- @@ -77,12 +77,7 @@ class WXDLLIMPEXP_GL wxGLCanvasBase : public wxWindow { public: // default ctor doesn't initialize the window, use Create() later - wxGLCanvasBase() - { -#if WXWIN_COMPATIBILITY_2_8 - m_glContext = NULL; -#endif - } + wxGLCanvasBase(); virtual ~wxGLCanvasBase(); @@ -104,15 +99,18 @@ public: // ---------- // set the given context associated with this window as the current one - void SetCurrent(const wxGLContext& context) const; + bool SetCurrent(const wxGLContext& context) const; // flush the back buffer (if we have it) - virtual void SwapBuffers() = 0; + 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 @@ -120,7 +118,7 @@ public: // call glcolor() for the colour with the given name, return false if // colour not found - bool SetColour(const wxChar *colour); + bool SetColour(const wxString& colour);