X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a83f42b3a0378cbb71d87c200bbd9295b0aaa82..8907a7e2c0fb61ecca0b6434dd69ee42b7ee1db6:/include/wx/unix/glx11.h diff --git a/include/wx/unix/glx11.h b/include/wx/unix/glx11.h index b29462b7c6..9f8d6353e2 100644 --- a/include/wx/unix/glx11.h +++ b/include/wx/unix/glx11.h @@ -23,11 +23,11 @@ public: wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL); virtual ~wxGLContext(); - virtual void SetCurrent(const wxGLCanvas& win) const; + virtual bool SetCurrent(const wxGLCanvas& win) const; private: // attach context to the drawable or unset it (if NULL) - static void MakeCurrent(GLXDrawable drawable, GLXContext context); + static bool MakeCurrent(GLXDrawable drawable, GLXContext context); GLXContext m_glContext; @@ -57,7 +57,7 @@ public: // implement wxGLCanvasBase methods // -------------------------------- - virtual void SwapBuffers(); + virtual bool SwapBuffers(); // X11-specific methods @@ -95,6 +95,13 @@ public: // free the global GL visual, called by wxGLApp static void FreeDefaultVisualInfo(); + // initializes XVisualInfo (in any case) and, if supported, GLXFBConfig + // + // returns false if XVisualInfo couldn't be initialized, otherwise caller + // is responsible for freeing the pointers + static bool InitXVisualInfo(const int *attribList, + GLXFBConfig **pFBC, XVisualInfo **pXVisual); + private: // fills in glattrs with attributes defined by wxattrs which must be // 0-terminated if it is non-NULL @@ -103,13 +110,6 @@ private: // should be at least 16 to accommodate the default attributes static bool ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n); - // initializes XVisualInfo (in any case) and, if supported, GLXFBConfig - // - // returns false if XVisualInfo couldn't be initialized, otherwise caller - // is responsible for freeing the pointers - static bool InitXVisualInfo(const int *attribList, - GLXFBConfig **pFBC, XVisualInfo **pXVisual); - // this is only used if it's supported i.e. if GL >= 1.3 GLXFBConfig *m_fbc; @@ -132,7 +132,7 @@ private: class WXDLLIMPEXP_GL wxGLApp : public wxGLAppBase { public: - wxGLApp(); + wxGLApp() : wxGLAppBase() { } // implement wxGLAppBase method virtual bool InitGLVisual(const int *attribList)