]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/glcanvas.h
Some corrections
[wxWidgets.git] / include / wx / motif / glcanvas.h
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
22 #if wxUSE_GLCANVAS
23
24 #include <wx/gdicmn.h>
25 #include <wx/palette.h>
26 #include <wx/scrolwin.h>
27
28 #include <GL/glx.h>
29
30 class WXDLLEXPORT wxGLCanvas: public wxScrolledWindow
31 {
32 DECLARE_CLASS(wxGLCanvas)
33 public:
34 GLXContext glx_cx;
35
36 inline wxGLCanvas() { glx_cx = 0; }
37
38 wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize, long style = 0,
40 const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette);
41 ~wxGLCanvas(void);
42
43 void SetCurrent();
44 void SwapBuffers();
45 void SetColour(const char *col);
46 };
47
48 #endif
49 // wxUSE_GLCANVAS
50
51 #endif
52 // _WX_GLCANVAS_H_