]> git.saurik.com Git - wxWidgets.git/blob - utils/glcanvas/motif/glcanvas.h
C++ comments in C files are fun but break the compilation (for the Nth time)
[wxWidgets.git] / utils / glcanvas / 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 #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 inline wxGLCanvas() { glx_cx = 0; }
34
35 wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = 0,
37 const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette);
38 ~wxGLCanvas(void);
39
40 void SetCurrent();
41 void SwapBuffers();
42 void SetColour(const char *col);
43 };
44
45 #endif
46 // _WX_GLCANVAS_H_