From 6716fcd097dd61696d046806cede61a703c1c78b Mon Sep 17 00:00:00 2001 From: PB Date: Wed, 5 May 2021 20:56:05 +0200 Subject: [PATCH 1/2] Update note about enabling OpenGL support on Windows --- interface/wx/glcanvas.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/interface/wx/glcanvas.h b/interface/wx/glcanvas.h index 7885e34ca2..e4fa1204da 100644 --- a/interface/wx/glcanvas.h +++ b/interface/wx/glcanvas.h @@ -772,11 +772,10 @@ enum On those platforms which use a configure script (e.g. Linux and macOS) 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 for old OpenGL versions) to the list of the libraries - your program is linked with. + On Windows, OpenGL support is enabled by default (@c wxUSE_GLCANVAS set + to @c 1 in the @c setup.h file). If your program links with wxWidgets + statically, you need to add @c opengl32.lib (and @c glu32.lib for old + OpenGL versions) to the list of the libraries your program is linked with. @library{wxgl} @category{gl} From 9610160c3146526838244b3142e07474a0b2bccd Mon Sep 17 00:00:00 2001 From: PB Date: Wed, 5 May 2021 21:00:22 +0200 Subject: [PATCH 2/2] Remove outdated and unnecessary comment about MSVC linking pragma --- src/msw/glcanvas.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index e30430fdf5..fccd31ad4f 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -167,23 +167,8 @@ inline T wxWGLProcCast(PROC proc) // libraries // ---------------------------------------------------------------------------- -/* - The following two compiler directives are specific to the Microsoft Visual - C++ family of compilers - - Fundementally what they do is instruct the linker to use these two libraries - for the resolution of symbols. In essence, this is the equivalent of adding - these two libraries to either the Makefile or project file. - - This is NOT a recommended technique, and certainly is unlikely to be used - anywhere else in wxWidgets given it is so specific to not only wxMSW, but - also the VC compiler. However, in the case of opengl support, it's an - applicable technique as opengl is optional in setup.h This code (wrapped by - wxUSE_GLCANVAS), now allows opengl support to be added purely by modifying - setup.h rather than by having to modify either the project or DSP fle. - - See MSDN for further information on the exact usage of these commands. -*/ +// For MSVC we can link in the required library explicitly, for the other +// compilers (e.g. MinGW) this needs to be done at makefiles level. #ifdef _MSC_VER # pragma comment( lib, "opengl32" ) # pragma comment( lib, "glu32" )