diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index c0a4c94827..f94121b885 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -479,9 +479,9 @@ it if SHARED=1 unless you know what you are doing. - opengl32.lib glu32.lib - opengl32.lib glu32.lib - -lopengl32 -lglu32 + opengl32.lib + opengl32.lib + -lopengl32 diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 5ba4b6165b..e229dcdd1c 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -411,7 +411,7 @@ if(wxUSE_GUI) else() find_package(OpenGL) if(OPENGL_FOUND) - foreach(gltarget OpenGL::GL OpenGL::GLU OpenGL::OpenGL) + foreach(gltarget OpenGL::GL OpenGL::OpenGL) if(TARGET ${gltarget}) set(OPENGL_LIBRARIES ${gltarget} ${OPENGL_LIBRARIES}) endif() diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 1c91477dc5..0e041c137b 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -5956,7 +5956,7 @@ ifeq ($(USE_OPENGL),1) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(GLDLL_OBJECTS) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregexu$(WXDEBUGFLAG).a $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(__wxlexilla) $(OBJS)\gldll_version_rc.o $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) $(foreach f,$(subst \,/,$(GLDLL_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) -lopengl32 -lglu32 + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) -lopengl32 @-del $@.rsp endif endif diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 8bb1f4ebf5..32a5ef9cc4 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -6433,7 +6433,7 @@ wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) !if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregexu$(WXDEBUGFLAG).lib $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(__wxlexilla) $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_619) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< - $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib << !endif diff --git a/build/msw/wx_gl.vcxproj b/build/msw/wx_gl.vcxproj index 004f7fe46b..4a96394fc8 100644 --- a/build/msw/wx_gl.vcxproj +++ b/build/msw/wx_gl.vcxproj @@ -306,7 +306,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);%(AdditionalLibraryDirectories) @@ -347,7 +347,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);%(AdditionalLibraryDirectories) @@ -388,7 +388,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);%(AdditionalLibraryDirectories) @@ -432,7 +432,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregexu$(wxSuffixDebug).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);%(AdditionalLibraryDirectories) @@ -494,4 +494,4 @@ - \ No newline at end of file + diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 8c5de16fc5..3932c09673 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -95,7 +95,7 @@ case $(uname -s) in extra_deps="$extra_deps \ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ - libglu1-mesa-dev" + " esac # Install locales used by our tests to run all the tests instead of @@ -128,7 +128,7 @@ case $(uname -s) in fi if [ -f /etc/redhat-release ]; then - dnf install -y ${WX_EXTRA_PACKAGES} expat-devel findutils g++ git-core gspell-devel gstreamer1-plugins-base-devel gtk3-devel make libcurl-devel libGLU-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel + dnf install -y ${WX_EXTRA_PACKAGES} expat-devel findutils g++ git-core gspell-devel gstreamer1-plugins-base-devel gtk3-devel make libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel fi ;; diff --git a/configure b/configure index 30f90e8582..9fd73062eb 100755 --- a/configure +++ b/configure @@ -958,8 +958,6 @@ WAYLAND_EGL_LIBS WAYLAND_EGL_CFLAGS EGL_LIBS EGL_CFLAGS -GLU_LIBS -GLU_CFLAGS GL_LIBS GL_CFLAGS SM_LIBS @@ -1415,8 +1413,6 @@ SM_CFLAGS SM_LIBS GL_CFLAGS GL_LIBS -GLU_CFLAGS -GLU_LIBS EGL_CFLAGS EGL_LIBS WAYLAND_EGL_CFLAGS @@ -2450,8 +2446,6 @@ Some influential environment variables: SM_LIBS linker flags for SM, overriding pkg-config GL_CFLAGS C compiler flags for GL, overriding pkg-config GL_LIBS linker flags for GL, overriding pkg-config - GLU_CFLAGS C compiler flags for GLU, overriding pkg-config - GLU_LIBS linker flags for GLU, overriding pkg-config EGL_CFLAGS C compiler flags for EGL, overriding pkg-config EGL_LIBS linker flags for EGL, overriding pkg-config WAYLAND_EGL_CFLAGS @@ -30129,7 +30123,7 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then if test "$wxUSE_OSX_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then - OPENGL_LIBS="-lopengl32 -lglu32" + OPENGL_LIBS="-lopengl32" elif test "$wxUSE_X11" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_QT" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL headers" >&5 @@ -30170,10 +30164,6 @@ $as_echo "not found" >&6; } " if test "x$ac_cv_header_GL_gl_h" = xyes; then : - ac_fn_c_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" " -" -if test "x$ac_cv_header_GL_glu_h" = xyes; then : - found_gl=0 @@ -30536,369 +30526,8 @@ fi fi fi - - ac_find_libraries= - - fl_pkgname=`echo "GLU" | tr [:upper:] [:lower:]` - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi 6> /dev/null - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLU" >&5 -$as_echo_n "checking for GLU... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$GLU_CFLAGS"; then - pkg_cv_GLU_CFLAGS="$GLU_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$fl_pkgname\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$fl_pkgname") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLU_CFLAGS=`$PKG_CONFIG --cflags "$fl_pkgname" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GLU_LIBS"; then - pkg_cv_GLU_LIBS="$GLU_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$fl_pkgname\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$fl_pkgname") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLU_LIBS=`$PKG_CONFIG --libs "$fl_pkgname" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GLU_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$fl_pkgname"` - else - GLU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$fl_pkgname"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GLU_PKG_ERRORS" >&5 - - - if test "x$ac_find_libraries" = "x"; then - if test "xgluBeginCurve" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluBeginCurve in -lGLU" >&5 -$as_echo_n "checking for gluBeginCurve in -lGLU... " >&6; } -if ${ac_cv_lib_GLU_gluBeginCurve+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGLU $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gluBeginCurve (); -int -main () -{ -return gluBeginCurve (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_GLU_gluBeginCurve=yes -else - ac_cv_lib_GLU_gluBeginCurve=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluBeginCurve" >&5 -$as_echo "$ac_cv_lib_GLU_gluBeginCurve" >&6; } -if test "x$ac_cv_lib_GLU_gluBeginCurve" = xyes; then : - ac_find_libraries="std" -fi - - fi - fi - - if test "x$ac_find_libraries" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking elsewhere" >&5 -$as_echo_n "checking elsewhere... " >&6; } - - ac_find_libraries= - for ac_dir in /opt/graphics/OpenGL/lib $SEARCH_LIB - do - for ac_extension in a so sl dylib dll.a; do - if test -f "$ac_dir/libGLU.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "x$ac_find_libraries" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - -elif test $pkg_failed = untried; then - - if test "x$ac_find_libraries" = "x"; then - if test "xgluBeginCurve" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluBeginCurve in -lGLU" >&5 -$as_echo_n "checking for gluBeginCurve in -lGLU... " >&6; } -if ${ac_cv_lib_GLU_gluBeginCurve+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGLU $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gluBeginCurve (); -int -main () -{ -return gluBeginCurve (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_GLU_gluBeginCurve=yes -else - ac_cv_lib_GLU_gluBeginCurve=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluBeginCurve" >&5 -$as_echo "$ac_cv_lib_GLU_gluBeginCurve" >&6; } -if test "x$ac_cv_lib_GLU_gluBeginCurve" = xyes; then : - ac_find_libraries="std" -fi - - fi - fi - - if test "x$ac_find_libraries" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking elsewhere" >&5 -$as_echo_n "checking elsewhere... " >&6; } - - ac_find_libraries= - for ac_dir in /opt/graphics/OpenGL/lib $SEARCH_LIB - do - for ac_extension in a so sl dylib dll.a; do - if test -f "$ac_dir/libGLU.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "x$ac_find_libraries" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - -else - GLU_CFLAGS=$pkg_cv_GLU_CFLAGS - GLU_LIBS=$pkg_cv_GLU_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - ac_find_libraries="std" - - eval ac_find_cflags=\$GLU_CFLAGS - eval fl_libs=\$GLU_LIBS - - for fl_path in $fl_libs - do - if test `echo "$fl_path" | cut -c 1-2` = "-L"; then - ac_find_libraries=`echo "$fl_path" | cut -c 3-` - fi - done - -fi - - if test "$ac_find_libraries" != "" ; then - if test "$ac_find_libraries" != "std" ; then - - if test "$ac_find_libraries" = "default location"; then - ac_path_to_link="" - else - echo "$LDFLAGS" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link=" -L$ac_find_libraries" - fi - fi - - if test "$ac_path_to_link" != " -L/usr/lib" -a \ - "$ac_path_to_link" != "$LDFLAGS_GL" ; then - LDFLAGS_GL="$LDFLAGS_GL $ac_path_to_link" - fi - fi - found_gl=1 - OPENGL_LIBS="-lGL -lGLU" + OPENGL_LIBS="-lGL" if test "$WXGTK3" = 1; then if test "$wxUSE_GLCANVAS_EGL" != "no"; then @@ -31065,7 +30694,6 @@ $as_echo "$as_me: wxGLCanvas will not have Wayland support" >&6;} fi fi fi - fi fi if test "$found_gl" != 1; then @@ -31428,7 +31056,7 @@ fi LDFLAGS_GL="$LDFLAGS_GL $ac_path_to_link" fi fi - OPENGL_LIBS="-lMesaGL -lMesaGLU" + OPENGL_LIBS="-lMesaGL" fi fi @@ -31436,10 +31064,6 @@ fi -fi - - - if test "x$OPENGL_LIBS" = "x"; then if test "$wxUSE_OPENGL" = "yes"; then as_fn_error $? "OpenGL libraries not available" "$LINENO" 5 diff --git a/configure.ac b/configure.ac index d8919d3cc9..6063333767 100644 --- a/configure.ac +++ b/configure.ac @@ -3285,7 +3285,7 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then if test "$wxUSE_OSX_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then - OPENGL_LIBS="-lopengl32 -lglu32" + OPENGL_LIBS="-lopengl32" elif test "$wxUSE_X11" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_QT" = 1; then dnl adjust CPPFLAGS to include GL/gl.h location if necessary @@ -3301,7 +3301,6 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then fi AC_CHECK_HEADER(GL/gl.h, [ - AC_CHECK_HEADER(GL/glu.h, [ found_gl=0 WX_FIND_LIB(GL, glBegin, [/opt/graphics/OpenGL/lib]) @@ -3313,21 +3312,8 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then fi fi - dnl don't suppose that libGL and libGLU are always in the - dnl same directory -- this is not true for some common - dnl distributions - WX_FIND_LIB(GLU, gluBeginCurve, [/opt/graphics/OpenGL/lib]) - if test "$ac_find_libraries" != "" ; then - if test "$ac_find_libraries" != "std" ; then - WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) - if test "$ac_path_to_link" != " -L/usr/lib" -a \ - "$ac_path_to_link" != "$LDFLAGS_GL" ; then - LDFLAGS_GL="$LDFLAGS_GL $ac_path_to_link" - fi - fi - found_gl=1 - OPENGL_LIBS="-lGL -lGLU" + OPENGL_LIBS="-lGL" if test "$WXGTK3" = 1; then if test "$wxUSE_GLCANVAS_EGL" != "no"; then @@ -3354,7 +3340,6 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then fi fi fi - fi fi if test "$found_gl" != 1; then @@ -3366,10 +3351,9 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then LDFLAGS_GL="$LDFLAGS_GL $ac_path_to_link" fi fi - OPENGL_LIBS="-lMesaGL -lMesaGLU" + OPENGL_LIBS="-lMesaGL" fi fi - ],, [ ]) ], [], [ ]) diff --git a/docs/gtk/install.md b/docs/gtk/install.md index 4e96a10591..9fd1d73200 100644 --- a/docs/gtk/install.md +++ b/docs/gtk/install.md @@ -47,8 +47,8 @@ Debian and Debian-based distribution these libraries are part of `libgtk-3-dev` package, while in Fedora and other RPM-based distributions the same package is known as `gtk3-devel`. -For OpenGL support, you need `libgl1-mesa-dev` and `libglu1-mesa-dev` packages -under Debian and `mesa-libGL-devel` and `mesa-libGLU-devel` under Fedora. For +For OpenGL support, you need `libgl1-mesa-dev` packages +under Debian and `mesa-libGL-devel` and under Fedora. For EGL support, `libegl1-mesa-dev` or `mesa-libEGL-devel` is needed. wxMediaCtrl implementation requires GStreamer and its plugins development diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 5129e7c41a..2bd971a541 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -1327,7 +1327,7 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// set to 1 and, under Windows, also to add opengl32.lib to the // list of libraries used to link your application when linking to wxWidgets // statically (although this is done implicitly for Microsoft Visual C++ users). // diff --git a/include/wx/gtk/setup.h b/include/wx/gtk/setup.h index 961903ab4f..07fbc7b4e4 100644 --- a/include/wx/gtk/setup.h +++ b/include/wx/gtk/setup.h @@ -1327,7 +1327,7 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// set to 1 and, under Windows, also to add opengl32.lib to the // list of libraries used to link your application when linking to wxWidgets // statically (although this is done implicitly for Microsoft Visual C++ users). // diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 1856d472f1..51679db1ef 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -1327,7 +1327,7 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// set to 1 and, under Windows, also to add opengl32.lib to the // list of libraries used to link your application when linking to wxWidgets // statically (although this is done implicitly for Microsoft Visual C++ users). // diff --git a/include/wx/osx/setup.h b/include/wx/osx/setup.h index 22c23284b2..fe2f2f6ead 100644 --- a/include/wx/osx/setup.h +++ b/include/wx/osx/setup.h @@ -1334,7 +1334,7 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// set to 1 and, under Windows, also to add opengl32.lib to the // list of libraries used to link your application when linking to wxWidgets // statically (although this is done implicitly for Microsoft Visual C++ users). // diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index a75f6b06ae..6d3ffa8723 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -1327,7 +1327,7 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// set to 1 and, under Windows, also to add opengl32.lib to the // list of libraries used to link your application when linking to wxWidgets // statically (although this is done implicitly for Microsoft Visual C++ users). // diff --git a/interface/wx/glcanvas.h b/interface/wx/glcanvas.h index 20e55b3763..a86edb97bf 100644 --- a/interface/wx/glcanvas.h +++ b/interface/wx/glcanvas.h @@ -774,8 +774,8 @@ enum libraries are found. 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. + statically, you need to add @c opengl32.lib to the list of libraries + your program is linked with. @library{wxgl} @category{gl} diff --git a/samples/opengl/cube/makefile.gcc b/samples/opengl/cube/makefile.gcc index fa4d106a46..bd35bec151 100644 --- a/samples/opengl/cube/makefile.gcc +++ b/samples/opengl/cube/makefile.gcc @@ -211,7 +211,7 @@ ifeq ($(USE_OPENGL),1) $(OBJS)\cube.exe: $(CUBE_OBJECTS) $(OBJS)\cube_sample_rc.o $(foreach f,$(subst \,/,$(CUBE_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme + $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme @-del $@.rsp endif diff --git a/samples/opengl/cube/makefile.vc b/samples/opengl/cube/makefile.vc index 98cb4a2ad5..298a88c09a 100644 --- a/samples/opengl/cube/makefile.vc +++ b/samples/opengl/cube/makefile.vc @@ -419,7 +419,7 @@ clean: !if "$(USE_OPENGL)" == "1" $(OBJS)\cube.exe: $(CUBE_OBJECTS) $(OBJS)\cube_sample.res link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\cube.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<< - $(CUBE_OBJECTS) $(CUBE_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib + $(CUBE_OBJECTS) $(CUBE_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib << !endif diff --git a/samples/opengl/isosurf/isosurf.h b/samples/opengl/isosurf/isosurf.h index 659b19c3c1..043741fad5 100644 --- a/samples/opengl/isosurf/isosurf.h +++ b/samples/opengl/isosurf/isosurf.h @@ -15,14 +15,11 @@ #if defined(__WXMAC__) # ifdef __DARWIN__ # include -# include # else # include -# include # endif #else # include -# include #endif // the maximum number of vertex in the loaded .dat file diff --git a/samples/opengl/isosurf/makefile.gcc b/samples/opengl/isosurf/makefile.gcc index 37d7b1d431..d076e18f64 100644 --- a/samples/opengl/isosurf/makefile.gcc +++ b/samples/opengl/isosurf/makefile.gcc @@ -211,7 +211,7 @@ ifeq ($(USE_OPENGL),1) $(OBJS)\isosurf.exe: $(ISOSURF_OBJECTS) $(OBJS)\isosurf_sample_rc.o $(foreach f,$(subst \,/,$(ISOSURF_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme + $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme @-del $@.rsp endif diff --git a/samples/opengl/isosurf/makefile.vc b/samples/opengl/isosurf/makefile.vc index 97a19a2d96..1f5b1b6a2e 100644 --- a/samples/opengl/isosurf/makefile.vc +++ b/samples/opengl/isosurf/makefile.vc @@ -419,7 +419,7 @@ clean: !if "$(USE_OPENGL)" == "1" $(OBJS)\isosurf.exe: $(ISOSURF_OBJECTS) $(OBJS)\isosurf_sample.res link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\isosurf.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<< - $(ISOSURF_OBJECTS) $(ISOSURF_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib + $(ISOSURF_OBJECTS) $(ISOSURF_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib << !endif diff --git a/samples/opengl/penguin/Makefile.in b/samples/opengl/penguin/Makefile.in index 60c3c1c1ad..a4237ee540 100644 --- a/samples/opengl/penguin/Makefile.in +++ b/samples/opengl/penguin/Makefile.in @@ -169,7 +169,7 @@ distclean: clean rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile @COND_USE_OPENGL_1@penguin$(EXEEXT): $(PENGUIN_OBJECTS) $(__penguin___win32rc) -@COND_USE_OPENGL_1@ $(CXX) -o $@ $(PENGUIN_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) -lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX) $(EXTRALIBS_OPENGL) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS) +@COND_USE_OPENGL_1@ $(CXX) -o $@ $(PENGUIN_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) -lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX) $(EXTRALIBS_OPENGL) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS) @COND_USE_OPENGL_1@ $(__penguin___os2_emxbindcmd) @COND_PLATFORM_MACOSX_1_USE_OPENGL_1@penguin.app/Contents/PkgInfo: $(__penguin___depname) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns diff --git a/samples/opengl/penguin/dxfrenderer.cpp b/samples/opengl/penguin/dxfrenderer.cpp index 8b29f6f0ff..a81f7f4d5b 100644 --- a/samples/opengl/penguin/dxfrenderer.cpp +++ b/samples/opengl/penguin/dxfrenderer.cpp @@ -17,17 +17,12 @@ #include "wx/wfstream.h" #include "wx/txtstrm.h" +#include "wx/glcanvas.h" #if !wxUSE_GLCANVAS #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library" #endif -#ifdef __DARWIN__ - #include -#else - #include -#endif - #include #include "dxfrenderer.h" diff --git a/samples/opengl/penguin/makefile.gcc b/samples/opengl/penguin/makefile.gcc index c482329c10..9911c206fa 100644 --- a/samples/opengl/penguin/makefile.gcc +++ b/samples/opengl/penguin/makefile.gcc @@ -218,7 +218,7 @@ ifeq ($(USE_OPENGL),1) $(OBJS)\penguin.exe: $(PENGUIN_OBJECTS) $(OBJS)\penguin_sample_rc.o $(foreach f,$(subst \,/,$(PENGUIN_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme + $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme @-del $@.rsp endif diff --git a/samples/opengl/penguin/makefile.unx b/samples/opengl/penguin/makefile.unx index 5244e9960a..7f36d867f4 100644 --- a/samples/opengl/penguin/makefile.unx +++ b/samples/opengl/penguin/makefile.unx @@ -98,7 +98,7 @@ test_for_selected_wxbuild: @$(WX_CONFIG) $(WX_CONFIG_FLAGS) penguin: $(PENGUIN_OBJECTS) - $(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs gl,core,base` -lGL -lGLU + $(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs gl,core,base` -lGL penguin_penguin.o: ./penguin.cpp $(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $< diff --git a/samples/opengl/penguin/makefile.vc b/samples/opengl/penguin/makefile.vc index 215c70b202..e003c3c841 100644 --- a/samples/opengl/penguin/makefile.vc +++ b/samples/opengl/penguin/makefile.vc @@ -431,7 +431,7 @@ clean: !if "$(USE_OPENGL)" == "1" $(OBJS)\penguin.exe: $(PENGUIN_OBJECTS) $(OBJS)\penguin_sample.res link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\penguin.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<< - $(PENGUIN_OBJECTS) $(PENGUIN_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib + $(PENGUIN_OBJECTS) $(PENGUIN_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib << !endif diff --git a/samples/opengl/penguin/penguin.bkl b/samples/opengl/penguin/penguin.bkl index a7283caa6a..e11dc2e545 100644 --- a/samples/opengl/penguin/penguin.bkl +++ b/samples/opengl/penguin/penguin.bkl @@ -8,13 +8,10 @@ 1 - + GL - - GLU - @@ -31,7 +28,6 @@ core base $(SYS_GL_LIB) - $(SYS_GLU_LIB) diff --git a/samples/opengl/penguin/penguin.cpp b/samples/opengl/penguin/penguin.cpp index a2b5da28e4..898e377c4e 100644 --- a/samples/opengl/penguin/penguin.cpp +++ b/samples/opengl/penguin/penguin.cpp @@ -21,11 +21,6 @@ #endif #include "penguin.h" -#ifdef __DARWIN__ - #include -#else - #include -#endif #include "../../sample.xpm" @@ -312,7 +307,9 @@ void TestGLCanvas::ResetProjectionMode() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(45, double(ClientSize.x) / ClientSize.y, 1, 100); + double fH = tan(M_PI / 8); + double fW = fH * ClientSize.x / ClientSize.y; + glFrustum(-fW, fW, -fH, fH, 1.0, 100.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } diff --git a/samples/opengl/pyramid/makefile.gcc b/samples/opengl/pyramid/makefile.gcc index fb68628929..9348bf3847 100644 --- a/samples/opengl/pyramid/makefile.gcc +++ b/samples/opengl/pyramid/makefile.gcc @@ -214,7 +214,7 @@ ifeq ($(USE_OPENGL),1) $(OBJS)\pyramid.exe: $(PYRAMID_OBJECTS) $(OBJS)\pyramid_sample_rc.o $(foreach f,$(subst \,/,$(PYRAMID_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme + $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme @-del $@.rsp endif diff --git a/samples/opengl/pyramid/makefile.vc b/samples/opengl/pyramid/makefile.vc index fed9a54f8b..58613988f6 100644 --- a/samples/opengl/pyramid/makefile.vc +++ b/samples/opengl/pyramid/makefile.vc @@ -422,7 +422,7 @@ clean: !if "$(USE_OPENGL)" == "1" $(OBJS)\pyramid.exe: $(PYRAMID_OBJECTS) $(OBJS)\pyramid_sample.res link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\pyramid.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<< - $(PYRAMID_OBJECTS) $(PYRAMID_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib + $(PYRAMID_OBJECTS) $(PYRAMID_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib << !endif diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index 21e0b5ea45..96d49c8228 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -170,7 +170,6 @@ inline T wxWGLProcCast(PROC proc) // compilers (e.g. MinGW) this needs to be done at makefiles level. #ifdef _MSC_VER # pragma comment( lib, "opengl32" ) -# pragma comment( lib, "glu32" ) #endif //-----------------------------------------------------------------------------