]> git.saurik.com Git - wxWidgets.git/blame - include/wx/glcanvas.h
added a menu command to switch between clipboard and primary selection
[wxWidgets.git] / include / wx / glcanvas.h
CommitLineData
99d80019
JS
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
8b089c5e
JS
12#ifndef _WX_GLCANVAS_H_BASE_
13#define _WX_GLCANVAS_H_BASE_
14
a3081354
VZ
15#include "wx/defs.h"
16
17#if wxUSE_GLCANVAS
18
0643d43c
VZ
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
27enum
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) */
f5318dd5 38 WX_GL_MIN_ALPHA, /* use alpha buffer with most bits (> MIN_ALPHA bits) */
0643d43c
VZ
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) */
f5318dd5 44 WX_GL_MIN_ACCUM_ALPHA /* use alpha buffer with most bits (> MIN_ACCUM_ALPHA bits) */
0643d43c
VZ
45};
46
2b5f62a0
VZ
47#define wxGLCanvasName _T("GLCanvas")
48
8b089c5e
JS
49#if defined(__WXMSW__)
50#include "wx/msw/glcanvas.h"
51#elif defined(__WXMOTIF__)
05e770c4 52#include "wx/x11/glcanvas.h"
1be7a35c 53#elif defined(__WXGTK20__)
8b089c5e 54#include "wx/gtk/glcanvas.h"
1be7a35c
MR
55#elif defined(__WXGTK__)
56#include "wx/gtk1/glcanvas.h"
83df96d6
JS
57#elif defined(__WXX11__)
58#include "wx/x11/glcanvas.h"
8b089c5e
JS
59#elif defined(__WXMAC__)
60#include "wx/mac/glcanvas.h"
bd2af428
DE
61#elif defined(__WXCOCOA__)
62#include "wx/cocoa/glcanvas.h"
2e35565a
VZ
63#else
64#error "wxGLCanvas not supported in this wxWidgets port"
8b089c5e
JS
65#endif
66
d7b766f5 67#include "wx/app.h"
d8290dd0 68class WXDLLIMPEXP_GL wxGLApp : public wxApp
a3081354
VZ
69{
70public:
71 wxGLApp() : wxApp() { }
72 virtual ~wxGLApp();
73
74 // use this in the constructor of the user-derived wxGLApp class to
75 // determine if an OpenGL rendering context with these attributes
5d3e7b52 76 // is available - returns true if so, false if not.
a3081354
VZ
77 bool InitGLVisual(int *attribList);
78
79private:
80 DECLARE_DYNAMIC_CLASS(wxGLApp)
81};
82
83#endif
84 // wxUSE_GLCANVAS
8b089c5e
JS
85#endif
86 // _WX_GLCANVAS_H_BASE_