]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/glcanvas.tex
added compression ratio argument to wxZlibOutputStream ctor
[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
10Please note that despite deriving from wxScrolledWindow, scrolling is not enabled for this class under
11Windows.
12
13To 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
28There are no specific window styles for this class.
29
30See 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
48Constructor.
49
50\membersection{wxGLCanvas::SetCurrent}\label{wxglcanvassetcurrent}
51
52\func{void}{SetCurrent}{\void}
53
54Sets 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
60Sets 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
66Displays the previous OpenGL commands on the window.
67