]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/glcanvas.h
Fix bug with using invalid date in wxMSW wxCalendarCtrl.
[wxWidgets.git] / include / wx / gtk / glcanvas.h
index 35ef0d4322bf3b790a98e7860d6c74ee903ae6d1..06396dc5df863d4e77cff0d947bb43cce6d5b280 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        glcanvas.h
+// Name:        wx/gtk/glcanvas.h
 // Purpose:     wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
 // Author:      Robert Roebling
 // Modified by:
 // Purpose:     wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
 // Author:      Robert Roebling
 // Modified by:
 #ifndef _WX_GLCANVAS_H_
 #define _WX_GLCANVAS_H_
 
 #ifndef _WX_GLCANVAS_H_
 #define _WX_GLCANVAS_H_
 
-extern "C"
-{
-    #include <GL/gl.h>
-    #include <GL/glx.h>
-    #include <GL/glu.h>
-}
-
-//---------------------------------------------------------------------------
-// wxGLContext
-//---------------------------------------------------------------------------
-
-
-class WXDLLEXPORT wxGLContext : public wxGLContextBase
-{
-public:
-    wxGLContext(wxWindow* win, const wxGLContext* other = NULL);
-    virtual ~wxGLContext();
-
-    virtual void SetCurrent(const wxGLCanvas& win) const;
-
-private:
-    GLXContext m_glContext;
-
-    DECLARE_CLASS(wxGLContext)
-};
+#include "wx/unix/glx11.h"
 
 //---------------------------------------------------------------------------
 // wxGLCanvas
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 // wxGLCanvas
 //---------------------------------------------------------------------------
 
-class WXDLLEXPORT wxGLCanvas : public wxGLCanvasBase
+class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
 {
 public:
     wxGLCanvas(wxWindow *parent,
 {
 public:
     wxGLCanvas(wxWindow *parent,
@@ -63,20 +39,12 @@ public:
                 const int *attribList = NULL,
                 const wxPalette& palette = wxNullPalette);
 
                 const int *attribList = NULL,
                 const wxPalette& palette = wxNullPalette);
 
-    virtual ~wxGLCanvas();
-
+    virtual bool SetBackgroundStyle(wxBackgroundStyle style);
 
 
-    // implement wxGLCanvasBase methods
+    // implement wxGLCanvasX11 methods
     // --------------------------------
 
     // --------------------------------
 
-    virtual void SwapBuffers();
-
-
-    // GTK-specific helpers
-    // --------------------
-
-    // return GLX version: 13 means 1.3
-    static int GetGLXVersion();
+    virtual Window GetXWindow() const;
 
 
     // deprecated methods
 
 
     // deprecated methods
@@ -125,12 +93,10 @@ public:
     // implementation from now on
     void OnInternalIdle();
 
     // implementation from now on
     void OnInternalIdle();
 
-    void             *m_vi; // actually an XVisualInfo*
-    GLXFBConfig      *m_fbc;
-    bool              m_canFreeVi;
-    bool              m_canFreeFBC;
-    GtkWidget        *m_glWidget;
     bool              m_exposed;
     bool              m_exposed;
+#ifdef __WXGTK3__
+    cairo_t* m_cairoPaintContext;
+#endif
 
 #if WXWIN_COMPATIBILITY_2_8
     wxGLContext      *m_sharedContext;
 
 #if WXWIN_COMPATIBILITY_2_8
     wxGLContext      *m_sharedContext;
@@ -138,14 +104,6 @@ public:
     const bool        m_createImplicitContext;
 #endif // WXWIN_COMPATIBILITY_2_8
 
     const bool        m_createImplicitContext;
 #endif // WXWIN_COMPATIBILITY_2_8
 
-    // returns an XVisualInfo* based on desired GL attributes;
-    // returns NULL if an appropriate visual is not found. The
-    // caller is reponsible for using XFree() to deallocate
-    // the returned structure.
-    static void* ChooseGLVisual(const int *attribList);
-    static void* ChooseGLFBC(const int *attribList);
-    static void GetGLAttribListFromWX(const int *wx_attribList, int *gl_attribList );
-
 private:
     DECLARE_CLASS(wxGLCanvas)
 };
 private:
     DECLARE_CLASS(wxGLCanvas)
 };