]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/glcanvas.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk1 / glcanvas.h
index c93bbc5706a9c0018b441f5588f01885c74325c3..222225e0d949a13990137723113f53adb82a2c30 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        glcanvas.h
+// Name:        wx/gtk1/glcanvas.h
 // Purpose:     wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
 // Author:      Robert Roebling
 // Modified by:
 // Created:     17/8/98
 // Purpose:     wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
 // Author:      Robert Roebling
 // Modified by:
 // Created:     17/8/98
-// RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #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,27 +38,18 @@ public:
                 const int *attribList = NULL,
                 const wxPalette& palette = wxNullPalette);
 
                 const int *attribList = NULL,
                 const wxPalette& palette = wxNullPalette);
 
-    virtual ~wxGLCanvas();
-
 
 
-    // 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
     // ------------------
 
 #if WXWIN_COMPATIBILITY_2_8
 
 
     // deprecated methods
     // ------------------
 
 #if WXWIN_COMPATIBILITY_2_8
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                wxWindowID id = wxID_ANY,
                const wxPoint& pos = wxDefaultPosition,
     wxGLCanvas(wxWindow *parent,
                wxWindowID id = wxID_ANY,
                const wxPoint& pos = wxDefaultPosition,
@@ -94,7 +60,7 @@ public:
                const wxPalette& palette = wxNullPalette)
     );
 
                const wxPalette& palette = wxNullPalette)
     );
 
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                const wxGLContext *shared,
                wxWindowID id = wxID_ANY,
     wxGLCanvas(wxWindow *parent,
                const wxGLContext *shared,
                wxWindowID id = wxID_ANY,
@@ -106,7 +72,7 @@ public:
                const wxPalette& palette = wxNullPalette)
     );
 
                const wxPalette& palette = wxNullPalette)
     );
 
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                const wxGLCanvas *shared,
                wxWindowID id = wxID_ANY,
     wxGLCanvas(wxWindow *parent,
                const wxGLCanvas *shared,
                wxWindowID id = wxID_ANY,
@@ -126,10 +92,6 @@ public:
     virtual void OnInternalIdle();
 
 
     virtual void OnInternalIdle();
 
 
-    void             *m_vi; // actually an XVisualInfo*
-    GLXFBConfig      *m_fbc;
-    bool              m_canFreeVi;
-    bool              m_canFreeFBC;
     GtkWidget        *m_glWidget;
 
 #if WXWIN_COMPATIBILITY_2_8
     GtkWidget        *m_glWidget;
 
 #if WXWIN_COMPATIBILITY_2_8
@@ -138,14 +100,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)
 };