8b089c5e8c
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
68 lines
2.6 KiB
TeX
68 lines
2.6 KiB
TeX
\section{\class{wxGLCanvas}}\label{wxglcanvas}
|
|
|
|
wxGLCanvas is a class for displaying OpenGL graphics. There are
|
|
wrappers for OpenGL on Windows, and GTK+ and Motif.
|
|
|
|
To use this class, create a wxGLCanvas window, call \helpref{wxGLCanvas::SetCurrent}{wxglcanvassetcurrent}
|
|
to direct normal OpenGL commands to the window, and then call \helpref{wxGLCanvas::SwapBuffers}{wxglcanvasswapbuffers}
|
|
to show the OpenGL buffer on the window.
|
|
|
|
Please note that despite deriving from wxScrolledWindow, scrolling is not enabled for this class under
|
|
Windows.
|
|
|
|
To switch wxGLCanvas support on under Windows, edit setup.h and set wxUSE\_GLCANVAS to 1.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxScrolledWindow}{wxscrolledwindow}\\
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{Include files}
|
|
|
|
<wx/glcanvas.h>
|
|
|
|
\wxheading{Window styles}
|
|
|
|
There are no specific window styles for this class.
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxGLCanvas::wxGLCanvas}\label{wxglcanvasconstr}
|
|
|
|
\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
|
|
\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
|
|
\param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
|
|
|
|
\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLCanvas* }{ sharedCanvas = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
|
|
\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
|
|
\param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
|
|
|
|
\func{void}{wxGLCanvas}{\param{wxWindow* }{parent}, \param{wxGLContext* }{ sharedContext = NULL}, \param{wxWindowID}{ id = -1}, \param{const wxPoint\&}{ pos},
|
|
\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="GLCanvas"},
|
|
\param{int*}{ attribList = 0}, \param{const wxPalette\&}{ palette = wxNullPalette}}
|
|
|
|
Constructor.
|
|
|
|
\membersection{wxGLCanvas::SetCurrent}\label{wxglcanvassetcurrent}
|
|
|
|
\func{void}{SetCurrent}{\void}
|
|
|
|
Sets this canvas as the current recipient of OpenGL calls.
|
|
|
|
\membersection{wxGLCanvas::SetColour}\label{wxglcanvassetcolour}
|
|
|
|
\func{void}{SetColour}{\param{const char*}{ colour}}
|
|
|
|
Sets the current colour for this window, using the wxWindows colour database to find a named colour.
|
|
|
|
\membersection{wxGLCanvas::SwapBuffers}\label{wxglcanvasswapbuffers}
|
|
|
|
\func{void}{SwapBuffers}{\void}
|
|
|
|
Displays the previous OpenGL commands on the window.
|
|
|