]>
Commit | Line | Data |
---|---|---|
06ad8636 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: glcanvas.h | |
3 | // Purpose: wxGLCanvas, for using OpenGL with wxWindows 2.0 for Motif. | |
4 | // Uses the GLX extension. | |
5 | // Author: Julian Smart and Wolfram Gloger | |
6 | // Modified by: | |
7 | // Created: 1995, 1999 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) Julian Smart, Wolfram Gloger | |
10 | // Licence: wxWindows licence | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | #ifdef __GNUG__ | |
14 | #pragma interface "glcanvas.h" | |
15 | #endif | |
16 | ||
17 | #ifndef _WX_GLCANVAS_H_ | |
18 | #define _WX_GLCANVAS_H_ | |
19 | ||
20 | #include "wx/setup.h" | |
21 | #include "wx/gdicmn.h" | |
22 | #include "wx/palette.h" | |
23 | #include "wx/scrolwin.h" | |
24 | ||
25 | #include <GL/glx.h> | |
26 | ||
27 | class wxGLCanvas: public wxScrolledWindow | |
28 | { | |
29 | DECLARE_CLASS(wxGLCanvas) | |
30 | public: | |
31 | GLXContext glx_cx; | |
32 | ||
33 | wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, | |
34 | const wxSize& size = wxDefaultSize, long style = 0, | |
35 | const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); | |
36 | ~wxGLCanvas(void); | |
37 | ||
38 | void SetCurrent(); | |
39 | void SwapBuffers(); | |
40 | void SetColour(const char *col); | |
41 | }; | |
42 | ||
43 | #endif | |
44 | // _WX_GLCANVAS_H_ |