]> git.saurik.com Git - wxWidgets.git/blob - include/wx/glcanvas.h
add a header placeholder
[wxWidgets.git] / include / wx / glcanvas.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/glcanvas.h
3 // Purpose: wxGLCanvas base header
4 // Author: Julian Smart
5 // Modified by:
6 // Created:
7 // Copyright: (c) Julian Smart
8 // RCS-ID: $Id$
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GLCANVAS_H_BASE_
13 #define _WX_GLCANVAS_H_BASE_
14
15 #include "wx/defs.h"
16
17 #if wxUSE_GLCANVAS
18
19 //---------------------------------------------------------------------------
20 // Constants for attriblist
21 //---------------------------------------------------------------------------
22
23 // The generic GL implementation doesn't support most of these options,
24 // such as stereo, auxiliary buffers, alpha channel, and accum buffer.
25 // Other implementations may actually support them.
26
27 enum
28 {
29 WX_GL_RGBA=1, /* use true color palette */
30 WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
31 WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
32 WX_GL_DOUBLEBUFFER, /* use doublebuffer */
33 WX_GL_STEREO, /* use stereoscopic display */
34 WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
35 WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
36 WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
37 WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
38 WX_GL_MIN_ALPHA, /* use blue buffer with most bits (> MIN_ALPHA bits) */
39 WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
40 WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
41 WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
42 WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
43 WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
44 WX_GL_MIN_ACCUM_ALPHA /* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
45 };
46
47 #define wxGLCanvasName _T("GLCanvas")
48
49 #if defined(__WXMSW__)
50 #include "wx/msw/glcanvas.h"
51 #elif defined(__WXMOTIF__)
52 #include "wx/x11/glcanvas.h"
53 #elif defined(__WXGTK20__)
54 #include "wx/gtk/glcanvas.h"
55 #elif defined(__WXGTK__)
56 #include "wx/gtk1/glcanvas.h"
57 #elif defined(__WXX11__)
58 #include "wx/x11/glcanvas.h"
59 #elif defined(__WXMAC__)
60 #include "wx/mac/glcanvas.h"
61 #elif defined(__WXCOCOA__)
62 #include "wx/cocoa/glcanvas.h"
63 #endif
64
65 #include "wx/app.h"
66 class WXDLLIMPEXP_GL wxGLApp : public wxApp
67 {
68 public:
69 wxGLApp() : wxApp() { }
70 virtual ~wxGLApp();
71
72 // use this in the constructor of the user-derived wxGLApp class to
73 // determine if an OpenGL rendering context with these attributes
74 // is available - returns true if so, false if not.
75 bool InitGLVisual(int *attribList);
76
77 private:
78 DECLARE_DYNAMIC_CLASS(wxGLApp)
79 };
80
81 #endif
82 // wxUSE_GLCANVAS
83 #endif
84 // _WX_GLCANVAS_H_BASE_