X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/498ace9e1f08b1e177b1a883ac69d12385e805b0..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/unix/glx11.h diff --git a/include/wx/unix/glx11.h b/include/wx/unix/glx11.h index d122db0a0c..34ed4dd46d 100644 --- a/include/wx/unix/glx11.h +++ b/include/wx/unix/glx11.h @@ -3,7 +3,6 @@ // Purpose: class common for all X11-based wxGLCanvas implementations // Author: Vadim Zeitlin // Created: 2007-04-15 -// RCS-ID: $Id$ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,17 +16,17 @@ // wxGLContext // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxGLContext : public wxGLContextBase +class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase { 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; @@ -38,7 +37,7 @@ private: // wxGLCanvasX11 // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxGLCanvasX11 : public wxGLCanvasBase +class WXDLLIMPEXP_GL wxGLCanvasX11 : public wxGLCanvasBase { public: // initialization and dtor @@ -57,7 +56,7 @@ public: // implement wxGLCanvasBase methods // -------------------------------- - virtual void SwapBuffers(); + virtual bool SwapBuffers(); // X11-specific methods @@ -66,6 +65,9 @@ public: // return GLX version: 13 means 1.3 &c static int GetGLXVersion(); + // return true if multisample extension is available + static bool IsGLXMultiSampleAvailable(); + // get the X11 handle of this window virtual Window GetXWindow() const = 0; @@ -95,6 +97,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 +112,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; @@ -129,10 +131,10 @@ private: // this is used in wx/glcanvas.h, prevent it from defining a generic wxGLApp #define wxGL_APP_DEFINED -class wxGLApp : public wxGLAppBase +class WXDLLIMPEXP_GL wxGLApp : public wxGLAppBase { public: - wxGLApp(); + wxGLApp() : wxGLAppBase() { } // implement wxGLAppBase method virtual bool InitGLVisual(const int *attribList) @@ -155,7 +157,7 @@ public: } private: - DECLARE_DYNAMIC_CLASS(wxGLApp); + DECLARE_DYNAMIC_CLASS(wxGLApp) }; #endif // _WX_UNIX_GLX11_H_