X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23d291c2d2e8d6bfd9e4a569d735dd8ff61a10f7..058f225a44d83d42ba9d773efc705badbf0e5e3c:/interface/wx/glcanvas.h diff --git a/interface/wx/glcanvas.h b/interface/wx/glcanvas.h index 887e55d76d..d92570869c 100644 --- a/interface/wx/glcanvas.h +++ b/interface/wx/glcanvas.h @@ -82,7 +82,8 @@ public: */ enum { - /// Use true color palette (on if no attributes at all specified). + /// Use true color (the default if no attributes at all are specified); + /// do not use a palette. WX_GL_RGBA = 1, /// Specifies the number of bits for buffer if not WX_GL_RGBA. @@ -154,7 +155,7 @@ enum 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 previous versions of wxWidgets used to implicitly create a + 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. @@ -164,11 +165,14 @@ enum the correct values of the @e attribList parameter. The values that should be set up and their meanings will be described below. - @note 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. + @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. @library{wxgl} @category{gl} @@ -239,7 +243,17 @@ public: @return @true if attributes are supported. */ - static bool IsDisplaySupported(const int* attribList = NULL); + static bool IsDisplaySupported(const int* attribList); + + /** + Returns true if the extension with given name is supported + + Notice that while this function is implemented for all of GLX, WGL and + AGL the extensions names are usually not the same for different + platforms and so the code using it still usually uses conditional + compilation. + */ + static bool IsExtensionSupported(const char *extension); /** Sets the current colour for this window (using @c glcolor3f()), using @@ -261,7 +275,7 @@ public: @return @false if an error occurred. */ - bool SetCurrent(const wxGLContext context); + bool SetCurrent(const wxGLContext& context) const; /** Swaps the double-buffer of this window, making the back-buffer the