]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/glcanvas.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGLCanvas base header
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GLCANVAS_H_BASE_
13 #define _WX_GLCANVAS_H_BASE_
19 //---------------------------------------------------------------------------
20 // Constants for attriblist
21 //---------------------------------------------------------------------------
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.
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 alpha 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 alpha buffer with most bits (> MIN_ACCUM_ALPHA bits) */
47 #define wxGLCanvasName _T("GLCanvas")
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"
64 #error "wxGLCanvas not supported in this wxWidgets port"
68 class WXDLLIMPEXP_GL wxGLApp
: public wxApp
71 wxGLApp() : wxApp() { }
74 // use this in the constructor of the user-derived wxGLApp class to
75 // determine if an OpenGL rendering context with these attributes
76 // is available - returns true if so, false if not.
77 bool InitGLVisual(int *attribList
);
80 DECLARE_DYNAMIC_CLASS(wxGLApp
)
86 // _WX_GLCANVAS_H_BASE_