]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/glcanvas.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGLCanvas, for using OpenGL with wxWindows 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 /////////////////////////////////////////////////////////////////////////////
14 #pragma interface "glcanvas.h"
17 #ifndef _WX_GLCANVAS_H_
18 #define _WX_GLCANVAS_H_
24 #include <wx/gdicmn.h>
25 #include <wx/palette.h>
26 #include <wx/scrolwin.h>
32 WX_GL_RGBA
=1, /* use true color palette */
33 WX_GL_BUFFER_SIZE
, /* bits for buffer if not WX_GL_RGBA */
34 WX_GL_LEVEL
, /* 0 for main buffer, >0 for overlay, <0 for underlay */
35 WX_GL_DOUBLEBUFFER
, /* use doublebuffer */
36 WX_GL_STEREO
, /* use stereoscopic display */
37 WX_GL_AUX_BUFFERS
, /* number of auxiliary buffers */
38 WX_GL_MIN_RED
, /* use red buffer with most bits (> MIN_RED bits) */
39 WX_GL_MIN_GREEN
, /* use green buffer with most bits (> MIN_GREEN bits) */
40 WX_GL_MIN_BLUE
, /* use blue buffer with most bits (> MIN_BLUE bits) */
41 WX_GL_MIN_ALPHA
, /* use blue buffer with most bits (> MIN_ALPHA bits) */
42 WX_GL_DEPTH_SIZE
, /* bits for Z-buffer (0,16,32) */
43 WX_GL_STENCIL_SIZE
, /* bits for stencil buffer */
44 WX_GL_MIN_ACCUM_RED
, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
45 WX_GL_MIN_ACCUM_GREEN
, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
46 WX_GL_MIN_ACCUM_BLUE
, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
47 WX_GL_MIN_ACCUM_ALPHA
/* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
50 //---------------------------------------------------------------------------
52 //---------------------------------------------------------------------------
54 class WXDLLEXPORT wxGLCanvas
: public wxScrolledWindow
56 DECLARE_CLASS(wxGLCanvas
)
60 inline wxGLCanvas() { glx_cx
= 0; }
62 wxGLCanvas(wxWindow
*parent
, wxWindowID id
= -1, const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
, long style
= 0,
64 const wxString
& name
= "GLCanvas", int *attribList
= 0, const wxPalette
& palette
= wxNullPalette
);
69 void SetColour(const char *col
);