]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/glcanvas.tex
wxFont can now raelly use the native fonts
[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
66f55ec6
JS
13To switch wxGLCanvas support on under Windows, edit setup.h and set wxUSE\_GLCANVAS to 1. On Unix,
14pass --with-opengl to configure to compile using OpenGL or Mesa.
8b089c5e
JS
15
16\wxheading{Derived from}
17
18\helpref{wxScrolledWindow}{wxscrolledwindow}\\
19\helpref{wxWindow}{wxwindow}\\
20\helpref{wxEvtHandler}{wxevthandler}\\
21\helpref{wxObject}{wxobject}
22
23\wxheading{Include files}
24
25<wx/glcanvas.h>
26
27\wxheading{Window styles}
28
29There are no specific window styles for this class.
30
31See also \helpref{window styles overview}{windowstyles}.
32
33\latexignore{\rtfignore{\wxheading{Members}}}
34
35\membersection{wxGLCanvas::wxGLCanvas}\label{wxglcanvasconstr}
36
37\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
38 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
39 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
40
41\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLCanvas* }{ sharedCanvas = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
42 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
43 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
44
45\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLContext* }{ sharedContext = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
46 \param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
47 \param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
48
49Constructor.
50
51\membersection{wxGLCanvas::SetCurrent}\label{wxglcanvassetcurrent}
52
53\func{void}{SetCurrent}{\void}
54
55Sets this canvas as the current recipient of OpenGL calls.
56
57\membersection{wxGLCanvas::SetColour}\label{wxglcanvassetcolour}
58
59\func{void}{SetColour}{\param{const char*}{ colour}}
60
61Sets the current colour for this window, using the wxWindows colour database to find a named colour.
62
63\membersection{wxGLCanvas::SwapBuffers}\label{wxglcanvasswapbuffers}
64
65\func{void}{SwapBuffers}{\void}
66
67Displays the previous OpenGL commands on the window.
68