More precisely, you first need to create a wxGLCanvas window and then create an
instance of a \helpref{wxGLContext}{wxglcontext} that is initialized with this
-wxGLCanvas and then later use either \helpref{wxGLCanvas::SetCurrent}{wxglcanvassetcurrentrc}
+wxGLCanvas and then later use either \helpref{wxGLCanvas::SetCurrent}{wxglcanvassetcurrent}
with the instance of the \helpref{wxGLContext}{wxglcontext} or
\helpref{wxGLContext::SetCurrent}{wxglcontextsetcurrent} with the instance of
the \helpref{wxGLCanvas}{wxglcanvas} (which might be not the same as was used
Notice that OpenGL is not enabled by default. To switch it on, you need to edit
setup.h under Windows and set {\tt wxUSE\_GLCANVAS} to $1$ (you may also need
to have to add {\tt opengl32.lib} and {\tt glu32.lib} to the list of libraries
-your program is linked with). On Unix, pass \verb=--with-opengl= to configure.
+your program is linked with). On Unix, pass {\tt --with-opengl} to configure.
\wxheading{Derived from}
<wx/glcanvas.h>
+\wxheading{Library}
+
+\helpref{wxGl}{librarieslist}
+
\wxheading{Window styles}
There are no specific window styles for this class.
\twocolitem{\windowstyle{WX\_GL\_LEVEL}}{0 for main buffer, >0 for overlay, <0 for underlay}
\twocolitem{\windowstyle{WX\_GL\_DOUBLEBUFFER}}{Use doublebuffer}
\twocolitem{\windowstyle{WX\_GL\_STEREO}}{Use stereoscopic display}
-\twocolitem{\windowstyle{WX\_GL\_AUX\_BUFFERS}}{Number of auxiliary buffers (not all implementation support this option)}
+\twocolitem{\windowstyle{WX\_GL\_AUX\_BUFFERS}}{Number of auxiliary buffers (not all implementations support this option)}
\twocolitem{\windowstyle{WX\_GL\_MIN\_RED}}{Use red buffer with most bits (> MIN\_RED bits)}
\twocolitem{\windowstyle{WX\_GL\_MIN\_GREEN}}{Use green buffer with most bits (> MIN\_GREEN bits) }
\twocolitem{\windowstyle{WX\_GL\_MIN\_BLUE}}{Use blue buffer with most bits (> MIN\_BLUE bits) }
\membersection{wxGLCanvas::SetCurrent}\label{wxglcanvassetcurrent}
-\func{void}{SetCurrent}{ \param{const wxGLContext&}{ context} }
+\func{bool}{SetCurrent}{ \param{const wxGLContext&}{ context} }
Makes the OpenGL state that is represented by the OpenGL rendering context
\arg{context} current, i.e. it will be used by all subsequent OpenGL calls.
in particular it can't usually be called from the constructor as the window
isn't yet shown at this moment.
+Returns \false if an error occurred.
+
\membersection{wxGLCanvas::SetColour}\label{wxglcanvassetcolour}
-\func{void}{SetColour}{\param{const char*}{ colour}}
+\func{void}{SetColour}{\param{const wxString\&}{ colour}}
Sets the current colour for this window (using \texttt{glcolor3f()}), using the
wxWidgets colour database to find a named colour.
\membersection{wxGLCanvas::SwapBuffers}\label{wxglcanvasswapbuffers}
-\func{void}{SwapBuffers}{\void}
+\func{bool}{SwapBuffers}{\void}
Swaps the double-buffer of this window, making the back-buffer the front-buffer and vice versa,
so that the output of the previous OpenGL commands is displayed on the window.
+Returns \false if an error occurred.
+