]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/glcanvas.tex
Ops, typo
[wxWidgets.git] / docs / latex / wx / glcanvas.tex
1 \section{\class{wxGLCanvas}}\label{wxglcanvas}
2
3 wxGLCanvas is a class for displaying OpenGL graphics. There are
4 wrappers for OpenGL on Windows, and GTK+ and Motif.
5
6 To use this class, create a wxGLCanvas window, call \helpref{wxGLCanvas::SetCurrent}{wxglcanvassetcurrent}
7 to direct normal OpenGL commands to the window, and then call \helpref{wxGLCanvas::SwapBuffers}{wxglcanvasswapbuffers}
8 to show the OpenGL buffer on the window.
9
10 Please note that despite deriving from wxScrolledWindow, scrolling is not enabled for this class under
11 Windows.
12
13 To switch wxGLCanvas support on under Windows, edit setup.h and set wxUSE\_GLCANVAS to 1.
14
15 \wxheading{Derived from}
16
17 \helpref{wxScrolledWindow}{wxscrolledwindow}\\
18 \helpref{wxWindow}{wxwindow}\\
19 \helpref{wxEvtHandler}{wxevthandler}\\
20 \helpref{wxObject}{wxobject}
21
22 \wxheading{Include files}
23
24 <wx/glcanvas.h>
25
26 \wxheading{Window styles}
27
28 There are no specific window styles for this class.
29
30 See also \helpref{window styles overview}{windowstyles}.
31
32 \latexignore{\rtfignore{\wxheading{Members}}}
33
34 \membersection{wxGLCanvas::wxGLCanvas}\label{wxglcanvasconstr}
35
36 \func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
37 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
38 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
39
40 \func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLCanvas* }{ sharedCanvas = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
41 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
42 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
43
44 \func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLContext* }{ sharedContext = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
45 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
46 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
47
48 Constructor.
49
50 \membersection{wxGLCanvas::SetCurrent}\label{wxglcanvassetcurrent}
51
52 \func{void}{SetCurrent}{\void}
53
54 Sets this canvas as the current recipient of OpenGL calls.
55
56 \membersection{wxGLCanvas::SetColour}\label{wxglcanvassetcolour}
57
58 \func{void}{SetColour}{\param{const char*}{ colour}}
59
60 Sets the current colour for this window, using the wxWindows colour database to find a named colour.
61
62 \membersection{wxGLCanvas::SwapBuffers}\label{wxglcanvasswapbuffers}
63
64 \func{void}{SwapBuffers}{\void}
65
66 Displays the previous OpenGL commands on the window.
67