]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/glcanvas.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/glcanvas.h
3 // Purpose: wxGLCanvas, for using OpenGL with wxWidgets 2.0 for Motif.
4 // Uses the GLX extension.
5 // Author: Julian Smart and Wolfram Gloger
9 // Copyright: (c) Julian Smart, Wolfram Gloger
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_GLCANVAS_H_
14 #define _WX_GLCANVAS_H_
16 #include "wx/gdicmn.h"
20 //---------------------------------------------------------------------------
22 //---------------------------------------------------------------------------
24 class WXDLLEXPORT wxGLContext
: public wxGLContextBase
27 wxGLContext(wxGLCanvas
*win
, const wxGLContext
*other
= NULL
);
28 virtual ~wxGLContext();
30 virtual void SetCurrent(const wxGLCanvas
& win
) const;
33 GLXContext m_glContext
;
35 DECLARE_CLASS(wxGLContext
)
39 class WXDLLEXPORT wxGLCanvas
: public wxGLCanvasBase
42 wxGLCanvas(wxWindow
*parent
,
43 wxWindowID id
= wxID_ANY
,
44 const int *attribList
= NULL
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
,
48 const wxString
& name
= wxGLCanvasName
,
49 const wxPalette
& palette
= wxNullPalette
);
51 bool Create(wxWindow
*parent
,
52 wxWindowID id
= wxID_ANY
,
53 const wxPoint
& pos
= wxDefaultPosition
,
54 const wxSize
& size
= wxDefaultSize
,
56 const wxString
& name
= wxGLCanvasName
,
57 const int *attribList
= NULL
,
58 const wxPalette
& palette
= wxNullPalette
);
60 virtual ~wxGLCanvas();
62 virtual void SwapBuffers();
69 virtual int GetColourIndex(const wxColour
& col
);
71 DECLARE_CLASS(wxGLCanvas
)
74 #endif // _WX_GLCANVAS_H_