- conjunction with wxGLContext as the context can only be
- be made current (i.e. active for the OpenGL commands) when it is associated to
- a wxGLCanvas.
-
- More precisely, you first need to create a wxGLCanvas window and then create an
- instance of a wxGLContext that is initialized with this
- wxGLCanvas and then later use either wxGLCanvas::SetCurrent
- with the instance of the wxGLContext or
- wxGLContext::SetCurrent with the instance of
- the wxGLCanvas (which might be not the same as was used
- for the creation of the context) to bind the OpenGL state that is represented
- by the rendering context to the canvas, and then finally call
- wxGLCanvas::SwapBuffers to swap the buffers of
- the OpenGL canvas and thus show your current output.
-
- Notice that previous versions of wxWidgets used to implicitly create a
- wxGLContext inside wxGLCanvas itself. This is still supported in the current
- version but is deprecated now and will be removed in the future, please update
- your code to create the rendering contexts explicitly.
-
- To set up the attributes for the canvas (number of bits for the depth buffer,
- number of bits for the stencil buffer and so on) you should set up the correct
- values of
- the @e attribList parameter. The values that should be set up and their
- meanings will be described below.
-
- Notice that OpenGL is not enabled by default. To switch it on, you need to edit
- setup.h under Windows and set @c wxUSE_GLCANVAS to 1 (you may also need
- to have to add @c opengl32.lib and @c glu32.lib to the list of libraries
- your program is linked with). On Unix, pass @c --with-opengl to configure.
+ conjunction with wxGLContext as the context can only be made current (i.e.
+ active for the OpenGL commands) when it is associated to a wxGLCanvas.
+
+ More precisely, you first need to create a wxGLCanvas window and then
+ create an instance of a wxGLContext that is initialized with this
+ wxGLCanvas and then later use either SetCurrent() with the instance of the
+ wxGLContext or wxGLContext::SetCurrent() with the instance of the
+ wxGLCanvas (which might be not the same as was used for the creation of the
+ context) to bind the OpenGL state that is represented by the rendering
+ context to the canvas, and then finally call SwapBuffers() to swap the
+ buffers of the OpenGL canvas and thus show your current output.
+
+ Notice that versions of wxWidgets previous to 2.9 used to implicitly create a
+ wxGLContext inside wxGLCanvas itself. This is still supported in the
+ current version but is deprecated now and will be removed in the future,
+ please update your code to create the rendering contexts explicitly.
+
+ To set up the attributes for the canvas (number of bits for the depth
+ buffer, number of bits for the stencil buffer and so on) you should set up
+ the correct values of the @e attribList parameter. The values that should
+ be set up and their meanings will be described below.
+
+ @note
+ On those platforms which use a configure script (e.g. Linux and Mac OS)
+ OpenGL support is automatically enabled if the relative headers and
+ libraries are found.
+ To switch it on under the other platforms (e.g. Windows), you need to edit
+ the @c setup.h file and set @c wxUSE_GLCANVAS to @c 1 and then also pass
+ @c USE_OPENGL=1 to the make utility. You may also need to add @c opengl32.lib
+ and @c glu32.lib to the list of the libraries your program is linked with.