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