From d3d32986fb07b398e9e78a2af83bfef8a7919447 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 03:26:54 +0000 Subject: [PATCH 01/20] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 466ecf8..1705dc6 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -6,7 +6,7 @@ Name: freewrl Version: %{majorrel} -Release: 9.%{commitdate}git%{shortcommit}%{?dist} +Release: 10.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -209,6 +209,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 4.3.0-10.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 30 2021 Tom Callaway - 4.3.0-9.20200221gite99ab4a - drop obsolete BR: texlive-updmap-map - update to latest git code From 176f3ae2c90bfb69a453718563c332f77cf21d02 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 5 Feb 2022 20:42:37 +0100 Subject: [PATCH 02/20] Rebuilt for java-17-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java17 --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 1705dc6..976fd41 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -6,7 +6,7 @@ Name: freewrl Version: %{majorrel} -Release: 10.%{commitdate}git%{shortcommit}%{?dist} +Release: 11.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -209,6 +209,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Sat Feb 05 2022 Jiri Vanek - 4.3.0-11.20200221gite99ab4a +- Rebuilt for java-17-openjdk as system jdk + * Thu Jan 20 2022 Fedora Release Engineering - 4.3.0-10.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 86d65fd8a6a40b7528264b858f5bf17bde90f96f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 03:39:03 +0000 Subject: [PATCH 03/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 976fd41..65cafe7 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -6,7 +6,7 @@ Name: freewrl Version: %{majorrel} -Release: 11.%{commitdate}git%{shortcommit}%{?dist} +Release: 12.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -209,6 +209,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 4.3.0-12.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Feb 05 2022 Jiri Vanek - 4.3.0-11.20200221gite99ab4a - Rebuilt for java-17-openjdk as system jdk From 09f6792d0a0327f1644e1cff770510db6d3e5896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sun, 24 Jul 2022 22:51:49 +0200 Subject: [PATCH 04/20] Rebuilt for Ode soname bump --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 65cafe7..f811eed 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -6,7 +6,7 @@ Name: freewrl Version: %{majorrel} -Release: 12.%{commitdate}git%{shortcommit}%{?dist} +Release: 13.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -209,6 +209,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Sun Jul 24 2022 Robert-André Mauchin - 4.3.0-13.20200221gite99ab4a +- Rebuilt for Ode soname bump + * Thu Jul 21 2022 Fedora Release Engineering - 4.3.0-12.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From cc473f7a157d6add575f1c03e9e5a81bc9d52553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Mon, 25 Jul 2022 01:57:50 +0200 Subject: [PATCH 05/20] Remove java-devel dependency on i686 - Close: rhbz#2104039 Use html documentation instead of PDF as latex generation is broken due to UTF-8 problems --- freewrl.spec | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/freewrl.spec b/freewrl.spec index f811eed..015ed20 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -3,6 +3,9 @@ %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20200221 +%ifarch %{java_arches} +%bcond_without java +%endif Name: freewrl Version: %{majorrel} @@ -36,31 +39,20 @@ BuildRequires: zlib-devel, freetype-devel, fontconfig-devel BuildRequires: imlib2-devel, nspr-devel BuildRequires: expat-devel, libXxf86vm-devel, libX11-devel, libXext-devel BuildRequires: mesa-libGL-devel, mesa-libGLU-devel, glew-devel, libxml2-devel -BuildRequires: libjpeg-devel, libpng-devel, java-devel, unzip, wget +BuildRequires: libjpeg-devel, libpng-devel, unzip, wget BuildRequires: ImageMagick, desktop-file-utils, chrpath BuildRequires: libXaw-devel, libXmu-devel, freealut-devel BuildRequires: liblo-devel, libcurl-devel, openal-soft-devel +%if %{with java} +BuildRequires: java-devel +%endif %ifnarch armv7hl s390x BuildRequires: firefox %endif -BuildRequires: sox, doxygen, /usr/bin/latex, /usr/bin/mf -BuildRequires: tex(fmtutil.cnf), tex(multirow.sty) -BuildRequires: tex(xtab.sty), tex(tocloft.sty), tex(cmr10.tfm) -BuildRequires: tex(ecrm1000.tfm), tex(sectsty.sty), tex(fancyhdr.sty) -BuildRequires: tex(natbib.sty), tex(phvr8t.tfm), tex(wasysym.sty) -BuildRequires: tex(zptmcm7t.tfm), tex(pcrr8t.tfm) -BuildRequires: tex(adjustbox.sty), tex(language.dat), tex(hanging.sty) -BuildRequires: texlive-makeindex-bin, texlive-dvips-bin -BuildRequires: texlive-courier, texlive-helvetic, texlive-gsftopk -BuildRequires: tex(stackengine.sty), tex(listofitems.sty), tex(ulem.sty) -BuildRequires: tex(newunicodechar.sty), tex(etoc.sty) -BuildRequires: texlive-wasy +BuildRequires: sox, doxygen BuildRequires: ode-devel BuildRequires: autoconf, automake, libtool -# FIXME: Presumably a packaging bug. Indirectly required by -# some TeX stuff, but not automatically pulled-in. -BuildRequires: tex(tabu.sty) -BuildRequires: make +BuildRequires: make Requires: sox, unzip, wget, ImageMagick @@ -76,6 +68,7 @@ Requires: pkgconfig %description devel Development libraries and headers for FreeWRL. +%if %{with java} %package java Summary: Java support for FreeWRL Requires: java-headless @@ -83,6 +76,7 @@ Requires: freewrl%{?_isa} = %{version}-%{release} %description java Java support for FreeWRL. +%endif %package -n libEAI Summary: FreeWRL EAI C support library @@ -110,7 +104,9 @@ browser plugin for Firefox (and other xulrunner compatible browsers). %prep %setup -q -n %{name}-%{majorrel}-%{commitdate}git%{shortcommit} +%if %{with java} cp %{SOURCE1} . +%endif # Don't need it. rm -rf appleOSX/ %patch3 -p1 -b .cparsestlfix @@ -128,26 +124,28 @@ sed -i 's|libpath = "/usr/local/lib"|libpath = "%{_libdir}"|g' src/bin/main.c export LDFLAGS="-Wl,--as-needed" %configure --with-target=x11 \ --enable-fontconfig \ - --enable-java \ + %{?with_java:--enable-java} \ --enable-libeai \ --disable-osc \ --enable-libcurl \ - --enable-rbp \ - --enable-twodee \ - --enable-STL \ + --enable-rbp \ + --enable-twodee \ + --enable-STL \ --disable-static \ --with-javadir=/usr/lib/jvm/java-openjdk/jre/lib/ext \ --with-javascript=duk \ --with-statusbar=hud make %{?_smp_mflags} pushd doc -make latex/refman.pdf +make html/index.html popd %install make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_datadir}/%{name}/ +%if %{with java} install -p src/java/java.policy %{buildroot}%{_datadir}/%{name}/ +%endif # no firefox on armv7hl | s390x %ifarch armv7hl s390x @@ -159,7 +157,9 @@ rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/mozilla/plugins/*.la desktop-file-validate %{buildroot}%{_datadir}/applications/freewrl.desktop chmod -x %{buildroot}%{_datadir}/applications/freewrl.desktop +%if %{with java} chmod -x %{buildroot}%{_datadir}/%{name}/java.policy +%endif chrpath --delete %{buildroot}%{_bindir}/freewrl # chrpath --delete %%{buildroot}%%{_bindir}/freewrl_snd @@ -181,15 +181,17 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %{_mandir}/man1/%{name}* %files devel -%doc doc/latex/refman.pdf +%doc doc/html %{_includedir}/libFreeWRL.h %{_libdir}/libFreeWRL.so %{_libdir}/pkgconfig/libFreeWRL.pc +%if %{with java} %files java %doc README.FreeWRL.java %{_datadir}/%{name}/ /usr/lib/jvm/java-openjdk/jre/lib/ext/vrml.jar +%endif %files -n libEAI %license COPYING COPYING.LESSER From 8ccb280e6ea4d0fb0fce2f3bf2a9725b6065e05d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 29 Dec 2022 11:36:26 -0500 Subject: [PATCH 06/20] disable plugin more completely with a conditional --- freewrl.spec | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/freewrl.spec b/freewrl.spec index 015ed20..f3c31d0 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -7,9 +7,12 @@ %bcond_without java %endif +# probably never coming back. sorry. +%bcond_with plugin + Name: freewrl Version: %{majorrel} -Release: 13.%{commitdate}git%{shortcommit}%{?dist} +Release: 14.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -46,9 +49,11 @@ BuildRequires: liblo-devel, libcurl-devel, openal-soft-devel %if %{with java} BuildRequires: java-devel %endif -%ifnarch armv7hl s390x +%if %{with plugin} +%ifnarch armv7hl s390x i686 BuildRequires: firefox %endif +%endif BuildRequires: sox, doxygen BuildRequires: ode-devel BuildRequires: autoconf, automake, libtool @@ -91,6 +96,7 @@ Requires: libEAI%{?_isa} = %{version}-%{release} %description -n libEAI-devel Development libraries and headers for libEAI. +%if %{with plugin} %ifnarch armv7hl s390x %package plugin Summary: Browser plugin for FreeWRL @@ -101,6 +107,7 @@ Requires: firefox FreeWRL is an X3D / VRML visualization program. This package contains the browser plugin for Firefox (and other xulrunner compatible browsers). %endif +%endif %prep %setup -q -n %{name}-%{majorrel}-%{commitdate}git%{shortcommit} @@ -147,10 +154,12 @@ mkdir -p %{buildroot}%{_datadir}/%{name}/ install -p src/java/java.policy %{buildroot}%{_datadir}/%{name}/ %endif -# no firefox on armv7hl | s390x -%ifarch armv7hl s390x +%if %{with plugin} +# no firefox on armv7hl | s390x | i686 +%ifarch armv7hl s390x i686 rm -rf %{buildroot}%{_libdir}/mozilla/plugins/libFreeWRLplugin.so %endif +%endif rm -rf %{buildroot}%{_libdir}/*.a rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/mozilla/plugins/*.la @@ -203,14 +212,17 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %{_libdir}/pkgconfig/libFreeWRLEAI.pc # Plugin is dead and gone, thanks to Mozilla. -%if 0 -%ifnarch armv7hl s390x +%if %{with plugin} +%ifnarch armv7hl s390x i686 %files plugin %{_libdir}/mozilla/plugins/libFreeWRLplugin.so %endif %endif %changelog +* Thu Dec 29 2022 Tom Callaway - 4.3.0-14.20200221gite99ab4a +- disable plugin more completely with a conditional + * Sun Jul 24 2022 Robert-André Mauchin - 4.3.0-13.20200221gite99ab4a - Rebuilt for Ode soname bump From cf3a22965522b52e3d719c0171de256ad6c0a693 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 03:55:12 +0000 Subject: [PATCH 07/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index f3c31d0..1b3bdde 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 14.%{commitdate}git%{shortcommit}%{?dist} +Release: 15.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -220,6 +220,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 4.3.0-15.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Dec 29 2022 Tom Callaway - 4.3.0-14.20200221gite99ab4a - disable plugin more completely with a conditional From 776a354a30ae9631b9b9ac86a19f7a9c29db4b8c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 21 Feb 2023 16:00:51 +0100 Subject: [PATCH 08/20] Port to C99 Related to: --- freewrl-c99.patch | 118 ++++++++++++++++++++++++++++++++++++++++++++++ freewrl.spec | 7 ++- 2 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 freewrl-c99.patch diff --git a/freewrl-c99.patch b/freewrl-c99.patch new file mode 100644 index 0000000..9be6c08 --- /dev/null +++ b/freewrl-c99.patch @@ -0,0 +1,118 @@ +Add additional #include directives in prototypes to avoid implicit +function declarations and build failures with future compilers. + +Add a missing mode argument for the mkdir function call in +fwl_set_testPath, a bug revealed by the newly included header files. + +Submitted upstream: + + + +diff --git a/src/bin/options.c b/src/bin/options.c +index c952367284581679..e29915f33c3a0cec 100644 +--- a/src/bin/options.c ++++ b/src/bin/options.c +@@ -34,6 +34,7 @@ + + #include "main.h" + #include "options.h" ++#include "../sound/internal.h" + + #if HAVE_GETOPT_H + #include +diff --git a/src/lib/main.c b/src/lib/main.c +index 1a684cbcccd9e720..c2e9a48c3989596e 100644 +--- a/src/lib/main.c ++++ b/src/lib/main.c +@@ -43,6 +43,7 @@ + #include "input/InputFunctions.h" + + #include "ui/common.h" ++#include "main.h" + + char consoleBuffer[200]; + +diff --git a/src/lib/main.h b/src/lib/main.h +index cbcdf19526726053..acd6ad854cca8da2 100644 +--- a/src/lib/main.h ++++ b/src/lib/main.h +@@ -28,4 +28,6 @@ + #ifndef __LIBFREEWRL_SRC_MAIN_H__ + #define __LIBFREEWRL_SRC_MAIN_H__ + ++void splitpath_local_suffix(const char *url, char **local_name, char **suff); ++ + #endif /* __LIBFREEWRL_SRC_MAIN_H__ */ +diff --git a/src/lib/main/MainLoop.h b/src/lib/main/MainLoop.h +index 083118f3a54221d3..8b2edecb483643ac 100644 +--- a/src/lib/main/MainLoop.h ++++ b/src/lib/main/MainLoop.h +@@ -38,4 +38,6 @@ void fwl_replaceWorldNeededRes(resource_item_t *multiResWithParent); + + void fwl_gotoCurrentViewPoint(); + ++char *nameLogFileFolderNORMAL(char *logfilename, int size); ++ + #endif /* __FREEWRL_MAINLOOP_MAIN_H__ */ +diff --git a/src/lib/main/SnapshotTesting.c b/src/lib/main/SnapshotTesting.c +index 4fefd9f018ed2449..76c82a5b33da15d4 100644 +--- a/src/lib/main/SnapshotTesting.c ++++ b/src/lib/main/SnapshotTesting.c +@@ -17,6 +17,11 @@ + along with FreeWRL/FreeX3D. If not, see . + ****************************************************************************/ + ++#include ++#include "MainLoop.h" ++#include "../main.h" ++#include "../scenegraph/Viewer.h" ++ + //#define USE_SNAPSHOT_TESTING 1 + #ifndef USE_SNAPSHOT_TESTING + //stubs for options +@@ -383,7 +388,7 @@ void fwl_set_testPath(char *testPath) + ierr = chdir(p->testPath); + if (ierr == -1) { + //folder may not exist yet. Try and create it. +- mkdir(p->testPath); ++ mkdir(p->testPath, 0755); + ierr = chdir(p->testPath); + } + if (1) { +diff --git a/src/lib/scenegraph/Component_Shape.h b/src/lib/scenegraph/Component_Shape.h +index 83c64bd504a4d04c..fcd231e9eac7ad46 100644 +--- a/src/lib/scenegraph/Component_Shape.h ++++ b/src/lib/scenegraph/Component_Shape.h +@@ -67,6 +67,8 @@ int volume; + } shaderflagsstruct; + + shaderflagsstruct getShaderFlags(); ++void popShaderFlags(void); ++void pushShaderFlags(shaderflagsstruct); + s_shader_capabilities_t *getMyShaders(shaderflagsstruct); + + +diff --git a/src/lib/scenegraph/Viewer.h b/src/lib/scenegraph/Viewer.h +index d504fce1565283a4..af087262a95df23c 100644 +--- a/src/lib/scenegraph/Viewer.h ++++ b/src/lib/scenegraph/Viewer.h +@@ -312,4 +312,6 @@ void setAnaglyphPrimarySide(int primary, int iside); + int viewer_getKeyChord(); + void viewer_setKeyChord(int chord); + ++void handle0(const int mev, const unsigned int button, const float x, const float yup); ++ + #endif /* __FREEWRL_VIEWER_H__ */ +diff --git a/src/sound/internal.h b/src/sound/internal.h +index f27591fc1880ca81..e8ab5ceea733ce82 100644 +--- a/src/sound/internal.h ++++ b/src/sound/internal.h +@@ -113,4 +113,8 @@ void *freewrlStrdup(int line, char *file, char *str); + } + + ++void fwl_set_modeRecord(void); ++void fwl_set_modeFixture(void); ++void fwl_set_modePlayback(void); ++ + #endif /* __FREEWRL_SND_INTERNAL_H__ */ diff --git a/freewrl.spec b/freewrl.spec index 1b3bdde..a8e89d3 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 15.%{commitdate}git%{shortcommit}%{?dist} +Release: 16.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -37,6 +37,7 @@ Patch6: freewrl-4.3.0-fix-indent-issues.patch # lots of signedness fixes like # io_files.c:627:17: warning: pointer targets in passing argument 1 of 'stlDTFT' differ in signedness [-Wpointer-sign] Patch7: freewrl-4.3.0-sign-fixes.patch +Patch8: freewrl-c99.patch BuildRequires: gcc-c++ BuildRequires: zlib-devel, freetype-devel, fontconfig-devel BuildRequires: imlib2-devel, nspr-devel @@ -121,6 +122,7 @@ rm -rf appleOSX/ %patch5 -p1 -b .missing-functions %patch6 -p1 -b .fixindent %patch7 -p1 -b .signfix +%patch8 -p1 autoreconf --force --install # hardcoding /usr/local/lib is a no-no @@ -220,6 +222,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Tue Feb 21 2023 Florian Weimer - 4.3.0-16.20200221gite99ab4a +- Port to C99 + * Thu Jan 19 2023 Fedora Release Engineering - 4.3.0-15.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From e6f210ea8e8d42f6171e02232f992bd236e744e4 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Tue, 13 Jun 2023 16:56:18 +0100 Subject: [PATCH 09/20] Rebuild fo new imlib2 --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index a8e89d3..825fcbc 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 16.%{commitdate}git%{shortcommit}%{?dist} +Release: 17.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -222,6 +222,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Tue Jun 13 2023 Leigh Scott - 4.3.0-17.20200221gite99ab4a +- Rebuild fo new imlib2 + * Tue Feb 21 2023 Florian Weimer - 4.3.0-16.20200221gite99ab4a - Port to C99 From 394b560aa314acdb7f9be045c5cb724a8a62bec9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 20:16:32 +0000 Subject: [PATCH 10/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 825fcbc..271a084 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 17.%{commitdate}git%{shortcommit}%{?dist} +Release: 18.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -222,6 +222,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 4.3.0-18.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Leigh Scott - 4.3.0-17.20200221gite99ab4a - Rebuild fo new imlib2 From 11a370b22c59ebf98bb18bde600c299c7a762a5c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 19:48:45 +0000 Subject: [PATCH 11/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 271a084..4725dec 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 18.%{commitdate}git%{shortcommit}%{?dist} +Release: 19.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -222,6 +222,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 4.3.0-19.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 4.3.0-18.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 52bb8e82c748d681ebcbe9ac6e8c06c6b58f1c51 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 12:03:45 +0000 Subject: [PATCH 12/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 4725dec..f38a63e 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 19.%{commitdate}git%{shortcommit}%{?dist} +Release: 20.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPLv3+ URL: http://freewrl.sourceforge.net @@ -222,6 +222,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 4.3.0-20.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 4.3.0-19.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 4927c7ca39c8d732a063d843fda337c8f1a9eeb9 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 30 Jan 2024 10:00:37 -0500 Subject: [PATCH 13/20] fix FTBFS --- freewrl-4.3.0-fix-cast.patch | 16 ++++++++++++++++ freewrl.spec | 22 ++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 freewrl-4.3.0-fix-cast.patch diff --git a/freewrl-4.3.0-fix-cast.patch b/freewrl-4.3.0-fix-cast.patch new file mode 100644 index 0000000..44d9627 --- /dev/null +++ b/freewrl-4.3.0-fix-cast.patch @@ -0,0 +1,16 @@ +diff -up freewrl-4.3.0-20200221gite99ab4a/src/lib/scenegraph/Component_RigidBodyPhysics.c.fix-cast freewrl-4.3.0-20200221gite99ab4a/src/lib/scenegraph/Component_RigidBodyPhysics.c +--- freewrl-4.3.0-20200221gite99ab4a/src/lib/scenegraph/Component_RigidBodyPhysics.c.fix-cast 2024-01-30 09:55:59.084267574 -0500 ++++ freewrl-4.3.0-20200221gite99ab4a/src/lib/scenegraph/Component_RigidBodyPhysics.c 2024-01-30 09:56:33.469720346 -0500 +@@ -1058,9 +1058,9 @@ void rbp_run_physics(){ + contact.surface.soft_erp = ct->softnessErrorCorrection; + contact.surface.motion1 = ct->surfaceSpeed.c[0]; + contact.surface.motion2 = ct->surfaceSpeed.c[1]; +- float2double(contact.geom.pos,ct->position.c,3); +- float2double(contact.fdir1,ct->frictionDirection.c,2); +- float2double(contact.geom.normal,ct->contactNormal.c,3); ++ float2double((double *)contact.geom.pos,ct->position.c,3); ++ float2double((double *)contact.fdir1,ct->frictionDirection.c,2); ++ float2double((double *)contact.geom.normal,ct->contactNormal.c,3); + + body1 = (struct X3D_RigidBody*)ct->body1; + body2 = (struct X3D_RigidBody*)ct->body2; diff --git a/freewrl.spec b/freewrl.spec index f38a63e..e5a8c39 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,9 +12,9 @@ Name: freewrl Version: %{majorrel} -Release: 20.%{commitdate}git%{shortcommit}%{?dist} +Release: 21.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program -License: LGPLv3+ +License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net # Source0: http://sourceforge.net/projects/freewrl/files/freewrl-linux/3.0/%%{name}-%%{version}.tar.bz2 # git clone https://git.code.sf.net/p/freewrl/git freewrl-git @@ -38,6 +38,8 @@ Patch6: freewrl-4.3.0-fix-indent-issues.patch # io_files.c:627:17: warning: pointer targets in passing argument 1 of 'stlDTFT' differ in signedness [-Wpointer-sign] Patch7: freewrl-4.3.0-sign-fixes.patch Patch8: freewrl-c99.patch +# Fix issue with incompatible pointer type +Patch9: freewrl-4.3.0-fix-cast.patch BuildRequires: gcc-c++ BuildRequires: zlib-devel, freetype-devel, fontconfig-devel BuildRequires: imlib2-devel, nspr-devel @@ -117,12 +119,13 @@ cp %{SOURCE1} . %endif # Don't need it. rm -rf appleOSX/ -%patch3 -p1 -b .cparsestlfix -%patch4 -p1 -b .memcpy -%patch5 -p1 -b .missing-functions -%patch6 -p1 -b .fixindent -%patch7 -p1 -b .signfix -%patch8 -p1 +%patch -P3 -p1 -b .cparsestlfix +%patch -P4 -p1 -b .memcpy +%patch -P5 -p1 -b .missing-functions +%patch -P6 -p1 -b .fixindent +%patch -P7 -p1 -b .signfix +%patch -P8 -p1 +%patch -P9 -p1 -b .fix-cast autoreconf --force --install # hardcoding /usr/local/lib is a no-no @@ -222,6 +225,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Tue Jan 30 2024 Tom Callaway - 4.3.0-21.20200221gite99ab4a +- fix FTBFS + * Wed Jan 24 2024 Fedora Release Engineering - 4.3.0-20.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From def7502e109363b03df1ea21f12bc7ebfc26a7e2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 23:39:55 +0000 Subject: [PATCH 14/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index e5a8c39..526d623 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 21.%{commitdate}git%{shortcommit}%{?dist} +Release: 22.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net @@ -225,6 +225,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 4.3.0-22.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jan 30 2024 Tom Callaway - 4.3.0-21.20200221gite99ab4a - fix FTBFS From 70c9271bc7b3a9192ec7235d7ea50a2c5068039f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 18:51:33 +0000 Subject: [PATCH 15/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 526d623..e7e8047 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 22.%{commitdate}git%{shortcommit}%{?dist} +Release: 23.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net @@ -225,6 +225,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 4.3.0-23.20200221gite99ab4a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 4.3.0-22.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ae8bf84f9b4093c3e43ca08787e87764be660d46 Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 27 Mar 2025 17:41:23 -0400 Subject: [PATCH 16/20] update to 6.7 ... with a lot of glue. This code is very fragile. It built and kinda runs, but not well. --- freewrl-6.7-c23.patch | 49 ++ freewrl-6.7-c99.patch | 100 ++++ freewrl-6.7-fix-cast.patch | 37 ++ freewrl-6.7-fix-function-references.patch | 472 ++++++++++++++++++ freewrl-6.7-fix-headers.patch | 22 + freewrl-6.7-fix-indent-issues.patch | 295 +++++++++++ freewrl-6.7-fix-lookup_brotoDefname.patch | 54 ++ freewrl-6.7-fix-makefile.patch | 454 +++++++++++++++++ freewrl-6.7-fix-midi-symbols.patch | 35 ++ freewrl-6.7-fix-missing-types.patch | 14 + freewrl-6.7-fix-peek_audio_context.patch | 25 + freewrl-6.7-fix-sound-stubs.patch | 12 + freewrl-6.7-fix-stubs.patch | 57 +++ freewrl-6.7-fix-win32-only.patch | 33 ++ ...l-6.7-no-pointproperties_pointmethod.patch | 22 + freewrl-6.7-sign-fixes.patch | 190 +++++++ freewrl.spec | 67 ++- 17 files changed, 1927 insertions(+), 11 deletions(-) create mode 100644 freewrl-6.7-c23.patch create mode 100644 freewrl-6.7-c99.patch create mode 100644 freewrl-6.7-fix-cast.patch create mode 100644 freewrl-6.7-fix-function-references.patch create mode 100644 freewrl-6.7-fix-headers.patch create mode 100644 freewrl-6.7-fix-indent-issues.patch create mode 100644 freewrl-6.7-fix-lookup_brotoDefname.patch create mode 100644 freewrl-6.7-fix-makefile.patch create mode 100644 freewrl-6.7-fix-midi-symbols.patch create mode 100644 freewrl-6.7-fix-missing-types.patch create mode 100644 freewrl-6.7-fix-peek_audio_context.patch create mode 100644 freewrl-6.7-fix-sound-stubs.patch create mode 100644 freewrl-6.7-fix-stubs.patch create mode 100644 freewrl-6.7-fix-win32-only.patch create mode 100644 freewrl-6.7-no-pointproperties_pointmethod.patch create mode 100644 freewrl-6.7-sign-fixes.patch diff --git a/freewrl-6.7-c23.patch b/freewrl-6.7-c23.patch new file mode 100644 index 0000000..081b43b --- /dev/null +++ b/freewrl-6.7-c23.patch @@ -0,0 +1,49 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c.c23 freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c.c23 2025-03-26 11:59:30.451134136 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c 2025-03-26 11:59:30.454747178 -0400 +@@ -507,7 +507,7 @@ void __iglobal_destructor(ttglobal tg) + free(tg); + #endif + //remove_iglobal_from_table(tg); +- fwl_clearCurrentHandle(__FILE__,__LINE__); ++ fwl_clearCurrentHandle(); + + } + +@@ -515,7 +515,6 @@ void __iglobal_destructor(ttglobal tg) + + void *fwl_getCurrentHandle(char *fi, int li){ + ttglobal currentHandle = (ttglobal)pthread_getspecific(threadSpecificKey); +- //printf ("fwl_getCurrentHandle returning %p at %s:%d\n",currentHandle,fi,li); + return (void*)currentHandle; + } + int fwl_setCurrentHandle(void *handle, char *fi, int li) +@@ -525,14 +524,13 @@ int fwl_setCurrentHandle(void *handle, c + pthread_setspecific(threadSpecificKey,handle); + return 1; /* let caller know its not in the table yet */ + } +-void fwl_clearCurrentHandle(char *fi, int li) ++void fwl_clearCurrentHandle() + { + void *currentHandle = NULL; +- //printf ("fwl_clearCurrentHandle at %s:%d\n",fi,li); + pthread_setspecific(threadSpecificKey,currentHandle); + + } +-ttglobal gglobal(char *fi, int *li){ ++ttglobal gglobal(){ + ttglobal tg = NULL; + #ifdef DISABLER + if (done_main_UI_thread_once) +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.h.c23 freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.h.c23 2025-03-26 12:00:45.466120633 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.h 2025-03-26 12:00:59.931728291 -0400 +@@ -39,7 +39,7 @@ void setMessageBar(); + int getJsEngine(); + int getJsEngineVariant(); + void loadCursors(); +-void setCursor(); ++void setCursor(int); + void setArrowCursor(); + void setSensorCursor(); + void setLookatCursor(); diff --git a/freewrl-6.7-c99.patch b/freewrl-6.7-c99.patch new file mode 100644 index 0000000..a7183e2 --- /dev/null +++ b/freewrl-6.7-c99.patch @@ -0,0 +1,100 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/bin/options.c.c99 freewrl-6.7-20240420gitb3254b1/src/bin/options.c +--- freewrl-6.7-20240420gitb3254b1/src/bin/options.c.c99 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/bin/options.c 2025-03-26 11:07:55.285994513 -0400 +@@ -34,6 +34,7 @@ + + #include "main.h" + #include "options.h" ++#include "../sound/internal.h" + + #if HAVE_GETOPT_H + #include +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main.c.c99 freewrl-6.7-20240420gitb3254b1/src/lib/main.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main.c.c99 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main.c 2025-03-26 11:07:55.286110065 -0400 +@@ -43,6 +43,7 @@ + #include "input/InputFunctions.h" + + #include "ui/common.h" ++#include "main.h" + + char consoleBuffer[200]; + +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main.h.c99 freewrl-6.7-20240420gitb3254b1/src/lib/main.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/main.h.c99 2025-03-26 10:45:27.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main.h 2025-03-26 11:07:55.286173200 -0400 +@@ -28,4 +28,6 @@ + #ifndef __LIBFREEWRL_SRC_MAIN_H__ + #define __LIBFREEWRL_SRC_MAIN_H__ + ++void splitpath_local_suffix(const char *url, char **local_name, char **suff); ++ + #endif /* __LIBFREEWRL_SRC_MAIN_H__ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h.c99 freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h.c99 2025-03-26 10:45:27.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h 2025-03-26 11:07:55.286252123 -0400 +@@ -38,4 +38,6 @@ void fwl_replaceWorldNeededRes(resource_ + + void fwl_gotoCurrentViewPoint(); + ++char *nameLogFileFolderNORMAL(char *logfilename, int size); ++ + #endif /* __FREEWRL_MAINLOOP_MAIN_H__ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c.c99 freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c.c99 2025-03-26 10:45:27.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c 2025-03-26 11:07:55.286334924 -0400 +@@ -17,6 +17,11 @@ + along with FreeWRL/FreeX3D. If not, see . + ****************************************************************************/ + ++#include ++#include "MainLoop.h" ++#include "../main.h" ++#include "../scenegraph/Viewer.h" ++ + //#define USE_SNAPSHOT_TESTING 1 + #ifndef USE_SNAPSHOT_TESTING + //stubs for options +@@ -383,7 +388,7 @@ void fwl_set_testPath(char *testPath) + ierr = chdir(p->testPath); + if (ierr == -1) { + //folder may not exist yet. Try and create it. +- mkdir(p->testPath); ++ mkdir(p->testPath, 0755); + ierr = chdir(p->testPath); + } + if (1) { +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.c99 freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.c99 2025-03-26 11:07:55.286447956 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h 2025-03-26 11:08:21.940513539 -0400 +@@ -69,6 +69,8 @@ int debug; + } shaderflagsstruct; + + shaderflagsstruct getShaderFlags(); ++void popShaderFlags(void); ++void pushShaderFlags(shaderflagsstruct); + s_shader_capabilities_t *getMyShaders(shaderflagsstruct); + enum { + MAT_NONE = 0, +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h.c99 freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h.c99 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h 2025-03-26 11:07:55.286568964 -0400 +@@ -319,4 +319,6 @@ void setAnaglyphPrimarySide(int primary, + int viewer_getKeyChord(); + void viewer_setKeyChord(int chord); + ++void handle0(const int mev, const unsigned int button, const float x, const float yup); ++ + #endif /* __FREEWRL_VIEWER_H__ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/sound/internal.h.c99 freewrl-6.7-20240420gitb3254b1/src/sound/internal.h +--- freewrl-6.7-20240420gitb3254b1/src/sound/internal.h.c99 2025-03-26 10:45:28.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/sound/internal.h 2025-03-26 11:07:55.286652951 -0400 +@@ -113,4 +113,8 @@ void *freewrlStrdup(int line, char *file + } + + ++void fwl_set_modeRecord(void); ++void fwl_set_modeFixture(void); ++void fwl_set_modePlayback(void); ++ + #endif /* __FREEWRL_SND_INTERNAL_H__ */ diff --git a/freewrl-6.7-fix-cast.patch b/freewrl-6.7-fix-cast.patch new file mode 100644 index 0000000..327e4df --- /dev/null +++ b/freewrl-6.7-fix-cast.patch @@ -0,0 +1,37 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_RigidBodyPhysics.c.fix-cast freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_RigidBodyPhysics.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_RigidBodyPhysics.c.fix-cast 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_RigidBodyPhysics.c 2025-03-26 12:42:58.300018978 -0400 +@@ -1058,9 +1058,9 @@ void rbp_run_physics(){ + contact.surface.soft_erp = ct->softnessErrorCorrection; + contact.surface.motion1 = ct->surfaceSpeed.c[0]; + contact.surface.motion2 = ct->surfaceSpeed.c[1]; +- float2double(contact.geom.pos,ct->position.c,3); +- float2double(contact.fdir1,ct->frictionDirection.c,2); +- float2double(contact.geom.normal,ct->contactNormal.c,3); ++ float2double((double *)contact.geom.pos,ct->position.c,3); ++ float2double((double *)contact.fdir1,ct->frictionDirection.c,2); ++ float2double((double *)contact.geom.normal,ct->contactNormal.c,3); + + body1 = (struct X3D_RigidBody*)ct->body1; + body2 = (struct X3D_RigidBody*)ct->body2; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/X3DParser.c.fix-cast freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/X3DParser.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/X3DParser.c.fix-cast 2025-03-26 12:48:19.013808664 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/X3DParser.c 2025-03-26 12:51:45.069434824 -0400 +@@ -1509,7 +1509,7 @@ void startProto_B(void* ud, const char* + value = NULL; + builtIn = FALSE; + if (fname) { +- ok = getFieldFromNodeAndNameC(node, fname, &type, &kind, &iifield, &builtIn, &value, &cname); ++ ok = getFieldFromNodeAndNameC(node, fname, &type, &kind, &iifield, &builtIn, &value, (const char **)&cname); + } + if (cname && value && svalue) { + deleteMallocedFieldValue(type, value); +@@ -2299,7 +2299,7 @@ static void XMLCALL X3DstartElement(void + */ + struct X3D_Proto* isProto = availableBroto(ud, name); + if(isProto){ +- startProto_B(ud, name, isProto, myAtts); ++ startProto_B(ud, name, isProto, (const xmlChar **)myAtts); + return; + } + diff --git a/freewrl-6.7-fix-function-references.patch b/freewrl-6.7-fix-function-references.patch new file mode 100644 index 0000000..9ede911 --- /dev/null +++ b/freewrl-6.7-fix-function-references.patch @@ -0,0 +1,472 @@ +diff -up freewrl-6.7-20240420gitb3254b1/codegen/VRMLC.pm.fix-function-references freewrl-6.7-20240420gitb3254b1/codegen/VRMLC.pm +--- freewrl-6.7-20240420gitb3254b1/codegen/VRMLC.pm.fix-function-references 2025-03-27 10:34:29.925182100 -0400 ++++ freewrl-6.7-20240420gitb3254b1/codegen/VRMLC.pm 2025-03-27 10:35:07.990437868 -0400 +@@ -287,6 +287,7 @@ sub gen { + "#include \"Component_Picking.h\" \n". + "#include \"../list.h\" \n". + "#include \"../io_http.h\" \n". ++ "#include \"../system_threads.h\" \n". + " \n". + " \n". + "/**********************************************************************************************/ \n". +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c.fix-function-references 2025-03-26 11:14:59.020985012 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/iglobal.c 2025-03-26 11:16:46.539704672 -0400 +@@ -81,6 +81,8 @@ void Component_MIDI_init(struct tCompone + void Component_MIDI_clear(struct tComponent_MIDI* t); + + void Component_KeyDevice_init(struct tComponent_KeyDevice *t); ++void Component_TextureProjector_clear(struct tComponent_TextureProjector *t); ++void Component_TextureProjector_init(struct tComponent_TextureProjector *t); + + #ifdef OLDCODE + OLDCODEvoid Component_Networking_init(struct tComponent_Networking *t); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/libFreeWRL.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/libFreeWRL.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/libFreeWRL.h.fix-function-references 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/libFreeWRL.h 2025-03-27 10:00:44.396587885 -0400 +@@ -258,6 +258,7 @@ void fwl_updateScreenDim(int wi, int he) + void fwl_doQuitAndWait(); + void fwl_set_viewer_type(const int type); + ++int fwl_get_modeRecord(); + void fwl_set_modeRecord(); + void fwl_set_modePlayback(); + void set_MIDITransport(int method); +@@ -301,6 +302,7 @@ void fwl_init_quadrant(void); + void fwl_setOrientation2(int degrees); + void fwl_set_AnaglyphParameter(const char *optArg); + void fwl_set_StereoParameter(const char *optArg); ++int fwl_getDrawBoundingBoxes(); + void fwl_setDrawBoundingBoxes(int drawbb); + void fwl_setJsEngine(char *optarg); + // JAS obsolete void fwl_askForRefreshOK(); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h.fix-function-references 2025-03-26 12:04:52.657850504 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.h 2025-03-26 12:08:17.764320573 -0400 +@@ -40,4 +40,8 @@ void fwl_gotoCurrentViewPoint(); + + char *nameLogFileFolderNORMAL(char *logfilename, int size); + ++extern void record_mouse(int mev, int butnum, int mouseX, int mouseY, int windex); ++extern void record_rawkeypress(int key, int type); ++extern void record_touch(int mev, unsigned int ID, int mouseX, int mouseY, int windex); ++ + #endif /* __FREEWRL_MAINLOOP_MAIN_H__ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.h.fix-function-references 2025-03-26 10:45:27.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.h 2025-03-26 11:59:30.451310905 -0400 +@@ -36,6 +36,8 @@ int frontendGetsFiles(); + void resitem_queue_flush(); + void resitem_queue_exit(); + void resitem_enqueue_tg(s_list_t *item, void* tg); ++extern int parser_do_parse_gltf(const char *input, const int len, struct X3D_Node *ectx, struct X3D_Node *myParent); + bool parser_process_res_VRML_X3D(resource_item_t *res); ++extern void process_mocap(resource_item_t *res); + + #endif /* __FREEWRL_PRODCON_MAIN_H__ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/opengl/RenderTextures.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/opengl/RenderTextures.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/opengl/RenderTextures.c.fix-function-references 2025-03-27 15:57:21.433546532 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/opengl/RenderTextures.c 2025-03-27 15:57:27.964366219 -0400 +@@ -41,7 +41,7 @@ texture enabling - works for single text + #include "../scenegraph/Component_Shape.h" + #include "../scenegraph/RenderFuncs.h" + #include "../scenegraph/LinearAlgebra.h" +-#include "../scenegraph/PolyRep.h" ++#include "../scenegraph/Polyrep.h" + #include "Textures.h" + #include "Material.h" + +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLClasses_duk.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLClasses_duk.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLClasses_duk.c.fix-function-references 2025-03-26 12:20:11.178418653 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLClasses_duk.c 2025-03-26 12:21:10.840143244 -0400 +@@ -1275,6 +1275,9 @@ int sizeofSForMFduk(int itype) { + } + return iz; + } ++ ++void deleteMallocedFieldValue(int type,union anyVrml *fieldPtr); ++ + void shallow_copy_field_precision(int sourcetypeIndex, int desttypeIndex, union anyVrml* source, union anyVrml* dest) + { + int i, src_isize, dst_isize; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_CubeMapTexturing.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_CubeMapTexturing.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_CubeMapTexturing.c.fix-function-references 2025-03-27 10:53:40.508947305 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_CubeMapTexturing.c 2025-03-27 10:54:59.006770114 -0400 +@@ -1316,6 +1316,7 @@ void compile_ImageCubeMapTexture(struct + MARK_NODE_COMPILED + } + ++void set_debug_quad(int which_debug_shader, int textureID); + + void render_ImageCubeMapTexture(struct X3D_ImageCubeMapTexture* node) { + COMPILE_IF_REQUIRED +@@ -1627,6 +1628,7 @@ void fw_gluPerspective_2(GLDOUBLE xcente + void pushnset_viewport(float *vpFraction); + void popnset_viewport(); + void render_bound_background(); ++void lightTable_clear(); + + // called from MainLoop.c + #include "../x3d_parser/Bindable.h" +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.fix-function-references 2025-03-27 10:10:08.031097330 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c 2025-03-27 10:16:35.362186272 -0400 +@@ -257,7 +257,9 @@ static int dis_verbose = FALSE; // TRUE; + void fwl_set_DISverbose(int verbose) { + dis_verbose = verbose; + } +- ++int disverbose() { ++ return dis_verbose; ++} + int fwl_get_allow_DIS(){ + return allow_DIS; + } +@@ -2456,9 +2458,6 @@ struct dis_sensor { + }; + static struct Vector* sensor_send_queue = NULL; //reset .n to 0 after pdu2buf + +-int disverbose() { +- return dis_verbose; +-} + struct Vector* dis_sensors2pdus() { + // 2023 multiplayer experiment: sensor event sharing + //converts queued sensor events into a CommentPdu for sending +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c.fix-function-references 2025-03-27 10:55:45.389905445 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c 2025-03-27 10:56:23.359209883 -0400 +@@ -477,6 +477,8 @@ void compile_geoSystem (struct X3D_Node + static void gccToGdc (Geosys *geoSystem, struct SFVec3d *gcc, struct SFVec3d *gdc); + void calculateViewingSpeed(void); + ++void pop_group_visible(); ++ + struct Planet { + int ID; + Stack *gegs; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_HAnim.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_HAnim.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_HAnim.c.fix-function-references 2025-03-27 10:49:33.221003538 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_HAnim.c 2025-03-27 10:51:11.383580806 -0400 +@@ -45,6 +45,7 @@ X3D H-Anim Component + #include "Component_Shape.h" + #include "../opengl/Frustum.h" + #include "LinearAlgebra.h" ++#include "../ui/common.h" + + /* #include "OpenFW_GL_Utils.h" */ + +@@ -1160,6 +1161,7 @@ void compile_HAnimHumanoid(struct X3D_HA + + } + ++void rwhat_printf(int rwhat); + + void child_HAnimHumanoid(struct X3D_HAnimHumanoid *node) { + int nc; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Layering.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Layering.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Layering.c.fix-function-references 2025-03-27 14:55:21.396583999 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Layering.c 2025-03-27 14:55:34.741186085 -0400 +@@ -35,6 +35,7 @@ X3D Layering Component + + #include "../x3d_parser/Bindable.h" + #include "Children.h" ++#include "LinearAlgebra.h" + #include "../opengl/OpenGL_Utils.h" + #include "../scenegraph/RenderFuncs.h" + #include "Viewer.h" +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Lighting.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Lighting.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Lighting.c.fix-function-references 2025-03-27 10:58:30.781718278 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Lighting.c 2025-03-27 10:58:50.220361862 -0400 +@@ -86,6 +86,8 @@ void lightTable_pop(); + int lightTable_count(); + usehit* lightTable_item(int i); + void generate_shadowmap_2D(usehit uhit, int index); ++int make_or_get_depth_buffer(int index, struct X3D_Node* node); ++ + + //LIGHT TABLE + void lightTable_clear() { +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Navigation.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Navigation.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Navigation.c.fix-function-references 2025-03-27 11:59:29.232094744 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Navigation.c 2025-03-27 12:51:58.494142080 -0400 +@@ -47,6 +47,7 @@ X3D Navigation Component + #include "../opengl/OpenGL_Utils.h" + #include "../opengl/Frustum.h" + #include "../scenegraph/RenderFuncs.h" ++#include "../ui/common.h" + + + struct X3D_Node *getActiveLayerBoundViewpoint(); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ParticleSystems.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ParticleSystems.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ParticleSystems.c.fix-function-references 2025-03-27 14:49:31.794860268 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ParticleSystems.c 2025-03-27 14:53:07.002383503 -0400 +@@ -42,6 +42,7 @@ X3D Particle Systems Component + #include "quaternion.h" + #include "Viewer.h" + #include "../opengl/Frustum.h" ++#include "../opengl/LoadTextures.h" + #include "../opengl/Material.h" + #include "../opengl/OpenGL_Utils.h" + #include "../input/EAIHelpers.h" /* for newASCIIString() */ +@@ -2361,6 +2362,9 @@ void render_geom_particle(struct X3D_Par + //<<<<< BORROWED FROM CHILD_SHAPE + + } ++ ++void child_HAnimHumanoid(struct X3D_HAnimHumanoid *); ++ + void render_hanim_particle(struct X3D_ParticleSystem* node, Stack* _particles) { + double mat[16], xyz[3]; + for (int i = 0; i < vectorSize(_particles); i++) { +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ProgrammableShaders.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ProgrammableShaders.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ProgrammableShaders.c.fix-function-references 2025-03-26 13:05:30.834426402 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_ProgrammableShaders.c 2025-03-26 13:06:15.134487463 -0400 +@@ -101,7 +101,7 @@ FIELDTYPE_MFVec4d + #include "../opengl/Textures.h" + #include "Component_ProgrammableShaders.h" + #include "../scenegraph/RenderFuncs.h" +- ++#include "system_threads.h" + + + #define MAX_EFFECTS 32 +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Rendering.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Rendering.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Rendering.c.fix-function-references 2025-03-27 10:37:29.311153494 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Rendering.c 2025-03-27 10:40:26.419584786 -0400 +@@ -932,6 +932,9 @@ static GLfloat quadtris [18] = {-.5f,-.5 + static GLfloat twotrisnorms [18] = {0.f,0.f,1.f, 0.f,0.f,1.f, 0.f,0.f,1.f, 0.f,0.f,1.f, 0.f,0.f,1.f, 0.f,0.f,1.f,}; + static GLfloat twotristex [12] = {0.f,0.f, 1.f,0.f, 1.f,1.f, 1.f,1.f, 0.f,1.f, 0.f,0.f}; + ++void clearDraw(); ++void reallyDrawOnce(); ++ + void render_PointRep(void* _pointrep) { + struct X3D_PointRep* pointrep = (struct X3D_PointRep*)_pointrep; + if (getAppearanceProperties()->pointMethod == PM_NONE) { +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.c.fix-function-references 2025-03-27 10:38:07.275462159 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.c 2025-03-27 10:41:45.209145589 -0400 +@@ -1406,6 +1406,7 @@ void update_effect_uniforms(); + int setupShaderB(); + void textureTransform_start(); + void reallyDraw(); ++void reallyDrawOnce(); + void sendProjectorInfo(); + static struct X3D_Shape* wrap_shape = NULL; + void push_shape(struct X3D_Shape* node) { +@@ -1422,6 +1423,8 @@ struct X3D_HAnimHumanoid* peek_humanoid( + void sendSkinningInfo(); + void clearSkinningInfo(); + void PRINT_GL_ERROR(GLenum _global_gl_err); ++void clearDraw(); ++int peek_group_visible(); + void child_Shape (struct X3D_Shape *node) { + struct X3D_Node *tmpNG; + //int channels; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.fix-function-references 2025-03-26 12:24:52.941099825 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h 2025-03-26 12:25:18.170789540 -0400 +@@ -194,6 +194,8 @@ struct fw_MaterialParameters { + + // helpers for sharing sampler2D (and texture units) + void clear_material_samplers(); ++void clear_materialparameters_per_draw_counts(); ++void initialize_front_and_back_material_params(); + int share_or_next_material_sampler_index_2D(GLint texture); + GLint tunit2D(int index); + int share_or_next_material_sampler_index_Cube(GLint texture); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_TextureProjector.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_TextureProjector.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_TextureProjector.c.fix-function-references 2025-03-27 14:56:59.680622396 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_TextureProjector.c 2025-03-27 14:59:12.557842237 -0400 +@@ -43,7 +43,7 @@ along with FreeWRL/FreeX3D. If not, see + #include "../opengl/Textures.h" + #include "../opengl/Frustum.h" + #include "../opengl/Material.h" +-#include "Renderfuncs.h" ++#include "RenderFuncs.h" + #include "Component_Shape.h" + #include "LinearAlgebra.h" + #include "Vector.h" +@@ -531,6 +531,8 @@ void projLookAt(GLDOUBLE eyex, GLDOUBLE + void projPerspective(GLDOUBLE fovy, GLDOUBLE aspect, GLDOUBLE zNear, GLDOUBLE zFar, GLDOUBLE *matrix); + void printmatrix2(GLDOUBLE* mat,char* description ); + ++void set_debug_quad_near_farplane(float nearplane, float farplane); ++ + void compile_TextureProjector(struct X3D_TextureProjector* node) { + + node->_intern = set_ProjectorRep(node->_intern); +@@ -888,6 +890,8 @@ void compile_TextureProjectorPoint(struc + MARK_NODE_COMPILED; + } + ++double* matrix_lookAtfd(float* eye3, float* center3, float* up3, double* matrix); ++ + void render_TextureProjectorPoint0(struct X3D_Node* parent, struct X3D_TextureProjectorPoint* node) { + int i, j = 0; + int flag = 0; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Texturing.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Texturing.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Texturing.c.fix-function-references 2025-03-27 10:23:16.770081772 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Texturing.c 2025-03-27 10:30:41.882595234 -0400 +@@ -43,6 +43,14 @@ X3D Texturing Component + #include "../scenegraph/Polyrep.h" + #include "LinearAlgebra.h" + ++void pushnset_framebuffer(int ibuffer); ++void popnset_framebuffer(); ++void fw_gluPerspective_2(double xcenter, double fovy, double aspect, double zNear, double zFar); ++void push_globalRenderFlags(); ++void pop_globalRenderFlags(); ++void printFramebufferStatusIfNotComplete(int status); ++void set_debug_quad(int which_debug_shader, int textureID); ++ + void render_GeneratedTexture(struct X3D_GeneratedTexture* node) { + // GeneratedTexture doesn't work (not finished) as of Sep 2023 + // not sure its needed. You could render your sub-scene as a separate scene, +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_VolumeRendering.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_VolumeRendering.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_VolumeRendering.c.fix-function-references 2025-03-27 10:42:00.484808443 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_VolumeRendering.c 2025-03-27 10:43:48.944656186 -0400 +@@ -36,6 +36,7 @@ X3D Volume Rendering Component + + #include "../vrml_parser/Structs.h" + #include "../main/headers.h" ++#include "../opengl/Frustum.h" + #include "../opengl/OpenGL_Utils.h" + #include "../opengl/Textures.h" + #include "../scenegraph/Component_Shape.h" +@@ -1304,6 +1305,7 @@ float *getTransformedClipPlanes(); + int getClipPlaneCount(); + void sendFogToShader(s_shader_capabilities_t *me); + void sendLightInfo2(s_shader_capabilities_t* me); ++int peek_group_visible(); + void render_GENERIC_volume_data(s_shader_capabilities_t *caps, struct X3D_Node **renderStyle, int nstyle, struct X3D_Node *voxels, struct X3D_VolumeData *node ) { + static int once = 0; + int myProg; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/gltf_loader.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/gltf_loader.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/gltf_loader.c.fix-function-references 2025-03-27 15:14:36.320392771 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/gltf_loader.c 2025-03-27 15:54:48.189831259 -0400 +@@ -142,6 +142,8 @@ void* set_MeshRep(void* _meshrep) { + return meshrep; + } + #include "Component_Shape.h" ++void saveArraysForGPU(int mode, int first, int count); ++void reallyDrawOnce(); + void render_MeshRep(void* _meshrep) { + //like render_PointRep + s_shader_capabilities_t* me = NULL; +@@ -996,7 +998,7 @@ int parse_gltf_node(struct X3D_Node *ect + } + //printf("adding shape to mesh group\n"); + //vector_pushBack(void *, &gr->children, sn); +- AddRemoveChildren(X3D_NODE(gr), offsetPointer_deref(void*, gr, offsetof(struct X3D_Group, children)), &X3D_NODE(sn), 1, 1, __FILE__, __LINE__); ++ AddRemoveChildren(X3D_NODE(gr), offsetPointer_deref(void*, gr, offsetof(struct X3D_Group, children)), (struct X3D_Node * *)(X3D_NODE(sn)), 1, 1, __FILE__, __LINE__); + } + } + //printf("adding mesh\n"); +@@ -1262,6 +1264,8 @@ int gltf_load_bin(resource_item_t *res){ + return TRUE; + } + ++bool parser_process_res_VRML_X3D(resource_item_t *res); ++ + int parser_process_res_gltf(resource_item_t *res){ + //these media types (require us to) generate x3d scene nodes and can be a scene unto themselves, + // or inline body +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/LinearAlgebra.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/LinearAlgebra.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/LinearAlgebra.h.fix-function-references 2025-03-27 10:06:14.908468954 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/LinearAlgebra.h 2025-03-27 10:06:40.925887809 -0400 +@@ -281,6 +281,7 @@ struct point_XYZ* double2pointxyz(struct + double *transformAFFINEd(double *r, double *a, const double* mat); /* same as transformAFFINE which is the same as transform() - just different parameter types */ + double * matrixAFFINE2RotationMatrix(double* rotmat, double *fullmat); + void AFFINEmatrix2axisangle(double* axisangle, double* matrix4); ++void AFFINEmatrix2axisangled(double* axisangle, double* matrix4); + double *transformUPPER3X3d(double *r, double *a, const double* mat); + double *transformFULL4d(double *r4, double *a4, double *mat); + +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/RenderFuncs.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/RenderFuncs.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/RenderFuncs.h.fix-function-references 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/RenderFuncs.h 2025-03-27 10:57:22.875687110 -0400 +@@ -57,9 +57,11 @@ void projectorTable_clear(); + void sendAttribToGPU(int myType, int mySize, int xtype, int normalized, int stride, void *pointer, int, char*, int); + void sendArraysToGPU (int mode, int first, int count); + void sendBindBufferToGPU (GLenum target, GLuint buffer,char *, int); ++void sendElementsToGPU (int mode, int count, int *indices); + void sendElementsToGPU0 (int mode, int count, int type, void *indices); + void saveElementsForGPU0(int mode, int count, int type, void* indices); + void render_hier(struct X3D_Node *p, int rwhat); ++void render_hier2(struct X3D_Node* g, int rwhat); + void restoreGlobalShader(); + + +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.c.fix-function-references 2025-03-26 13:12:12.421044133 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.c 2025-03-26 13:12:25.285151918 -0400 +@@ -310,6 +310,7 @@ void printStats() + printStatsBindingStacks(); + } + //char* fwl_requestedVPname(int *is_bound, int *is_reachable, int *count, int *index); ++char* fwl_currentBoundVPname(); + void + print_viewer() + { +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h.fix-function-references 2025-03-27 10:11:20.046582893 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Viewer.h 2025-03-27 10:11:55.679160918 -0400 +@@ -271,6 +271,8 @@ void viewer_postGLinit_init(void); + + void viewer_init(X3D_Viewer *viewer, int type); + ++void viewer_getview(double *viewMatrix); ++ + void print_viewer(); + int fwl_get_headlight(); + void fwl_toggle_headlight(); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c.fix-function-references 2025-03-27 15:59:16.576840371 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c 2025-03-27 16:01:48.592518083 -0400 +@@ -210,6 +210,12 @@ void fwl_set_modeRecord() { + p->record_inputs = TRUE; + last_time = Time1970sec(); + } ++ ++void fwl_do_keyPress0(int key, int type); ++int fwl_handle_mouse0(const int mev, const unsigned int button, int x, int y, int windex); ++int fwl_handle_touch0(int mev, unsigned int ID, int mouseX, int mouseY, int windex); ++void updateCursorStyle0(int cstyle); ++ + static pthread_t playback_thread; + void _playbackthread(ttglobal tglobal) { + ttglobal tg = tglobal; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/ui/CursorDraw.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/ui/CursorDraw.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/ui/CursorDraw.c.fix-function-references 2025-03-27 16:02:41.687901567 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/ui/CursorDraw.c 2025-03-27 16:03:10.978702613 -0400 +@@ -31,6 +31,7 @@ + #include "vrml_parser/Structs.h" + #include "scenegraph/Viewer.h" + #include "scenegraph/Component_Shape.h" ++#include "opengl/Frustum.h" + #include "opengl/OpenGL_Utils.h" + #include "opengl/Textures.h" + #include "opengl/LoadTextures.h" +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.h.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.h.fix-function-references 2025-03-26 12:54:57.441762861 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.h 2025-03-26 12:55:09.036054191 -0400 +@@ -231,6 +231,7 @@ int type_precision(int itype); + BOOL usingBrotos(); + int X3DMODE(int val); + void load_externProtoInstance (struct X3D_Proto *node); ++void load_externProtoDeclare (struct X3D_Proto *node); + int getFieldFromNodeAndName(struct X3D_Node* node,const char *fieldname, int *type, int *kind, int *iifield, union anyVrml **value); + int getFieldFromNodeAndIndexSource(struct X3D_Node* node, int ifield, int builtIn, const char **fieldname, int *type, int *kind, union anyVrml **value); + int getFieldFromNodeAndIndex(struct X3D_Node* node, int ifield, const char **fieldname, int *type, int *kind, union anyVrml **value); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/Bindable.c.fix-function-references freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/Bindable.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/Bindable.c.fix-function-references 2025-03-26 12:57:34.534621240 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/x3d_parser/Bindable.c 2025-03-26 12:57:53.027486827 -0400 +@@ -42,6 +42,7 @@ Bindable nodes - Background, TextureBack + #include "../vrml_parser/CParseLexer.h" + #include "../vrml_parser/CRoutes.h" + #include "../opengl/OpenGL_Utils.h" ++#include "../opengl/Textures.h" + #include "Bindable.h" + #include "../scenegraph/quaternion.h" + #include "../scenegraph/Viewer.h" diff --git a/freewrl-6.7-fix-headers.patch b/freewrl-6.7-fix-headers.patch new file mode 100644 index 0000000..650830b --- /dev/null +++ b/freewrl-6.7-fix-headers.patch @@ -0,0 +1,22 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c.fix-headers freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c.fix-headers 2025-03-26 11:21:22.640111110 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c 2025-03-26 11:21:49.414646808 -0400 +@@ -64,6 +64,7 @@ + #include + #if defined (INCLUDE_STL_FILES) + #include "input/convertSTL.h" ++#include + #endif //INCLUDE_STL_FILES + + #define UNUSED(v) ((void) v) +diff -up freewrl-6.7-20240420gitb3254b1/src/bin/options.c.fix-defines freewrl-6.7-20240420gitb3254b1/src/bin/options.c +--- freewrl-6.7-20240420gitb3254b1/src/bin/options.c.fix-defines 2025-03-27 16:25:31.680185468 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/bin/options.c 2025-03-27 16:30:43.749013633 -0400 +@@ -35,6 +35,7 @@ + #include "main.h" + #include "options.h" + #include "../sound/internal.h" ++#include "../lib/ui/common.h" + + #if HAVE_GETOPT_H + #include diff --git a/freewrl-6.7-fix-indent-issues.patch b/freewrl-6.7-fix-indent-issues.patch new file mode 100644 index 0000000..7f0157e --- /dev/null +++ b/freewrl-6.7-fix-indent-issues.patch @@ -0,0 +1,295 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/libeai/EAI_C_Advise.c.fixindent freewrl-6.7-20240420gitb3254b1/src/libeai/EAI_C_Advise.c +--- freewrl-6.7-20240420gitb3254b1/src/libeai/EAI_C_Advise.c.fixindent 2025-03-26 10:45:28.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/libeai/EAI_C_Advise.c 2025-03-26 10:51:22.568109351 -0400 +@@ -95,11 +95,13 @@ void _handleFreeWRLcallback (char *line) + sscanf (line, "%lf",&evTime); + + /* get the event number */ +- while (!iscntrl(*line)) line++; while (iscntrl(*line)) line++; ++ while (!iscntrl(*line)) line++; ++ while (iscntrl(*line)) line++; + sscanf (line,"%d",&evIndex); + + /* get to the data */ +- while (!iscntrl(*line)) line++; while (iscntrl(*line)) line++; ++ while (!iscntrl(*line)) line++; ++ while (iscntrl(*line)) line++; + + #ifdef VERBOSE + printf ("event time %lf index %d data :%s:\n",evTime, evIndex, line); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/input/EAIEventsIn.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/input/EAIEventsIn.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/input/EAIEventsIn.c.fixindent 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/input/EAIEventsIn.c 2025-03-26 10:51:22.568331854 -0400 +@@ -1248,7 +1248,8 @@ static void handleRoute (char command, c + x = fieldTemp; ftlen = 0; + + /* skip to the beginning of the field name */ +- while (*bufptr != ' ') bufptr++; while (*bufptr == ' ') bufptr++; ++ while (*bufptr != ' ') bufptr++; ++ while (*bufptr == ' ') bufptr++; + + /* copy the field over */ + while ((*bufptr > ' ') && (ftlen <1000)) { *x = *bufptr; x++; bufptr++; ftlen++;} +@@ -1259,7 +1260,8 @@ static void handleRoute (char command, c + + + /* skip past the first field, to get ready for the next one */ +- while (*bufptr != ' ') bufptr++; while (*bufptr == ' ') bufptr++; ++ while (*bufptr != ' ') bufptr++; ++ while (*bufptr == ' ') bufptr++; + + /* ------- now, the route to section -------- */ + /* get the to Node */ +@@ -1270,7 +1272,8 @@ static void handleRoute (char command, c + x = fieldTemp; ftlen = 0; + + /* skip to the beginning of the field name */ +- while (*bufptr != ' ') bufptr++; while (*bufptr == ' ') bufptr++; ++ while (*bufptr != ' ') bufptr++; ++ while (*bufptr == ' ') bufptr++; + + /* copy the field over */ + while ((*bufptr > ' ') && (ftlen <1000)) { *x = *bufptr; x++; bufptr++; ftlen++;} +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.fixindent 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c 2025-03-26 10:51:22.568881892 -0400 +@@ -2270,26 +2270,26 @@ contenttype *new_contenttype_stagefbo(in + if ( !haveFrameBufferObject() ) // GLEW_ARB_framebuffer_object + return _self; + +- glGenTextures(1, &self->itexturebuffer); +- //bind to set some parameters +- glBindTexture(GL_TEXTURE_2D, self->itexturebuffer); +- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); +- useMip = 0; +- if(useMip){ +- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); +- glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); // automatic mipmap generation included in OpenGL v1.4 +- }else{ +- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); +- } +- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); +- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); +- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, self->ivport.W, self->ivport.H, 0, GL_RGBA , GL_UNSIGNED_BYTE, 0); +- //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, TEXTURE_WIDTH, TEXTURE_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +- //unbind - will rebind during render to reset width, height as needed +- glBindTexture(GL_TEXTURE_2D, 0); ++ glGenTextures(1, &self->itexturebuffer); ++ //bind to set some parameters ++ glBindTexture(GL_TEXTURE_2D, self->itexturebuffer); ++ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); ++ useMip = 0; ++ if(useMip){ ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); ++ glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); // automatic mipmap generation included in OpenGL v1.4 ++ }else{ ++ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); ++ } ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); ++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, self->ivport.W, self->ivport.H, 0, GL_RGBA , GL_UNSIGNED_BYTE, 0); ++ //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, TEXTURE_WIDTH, TEXTURE_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); ++ //unbind - will rebind during render to reset width, height as needed ++ glBindTexture(GL_TEXTURE_2D, 0); + + glGenFramebuffers(1, &self->ibuffer); +- glBindFramebuffer(GL_FRAMEBUFFER, self->ibuffer); ++ glBindFramebuffer(GL_FRAMEBUFFER, self->ibuffer); + + // create a renderbuffer object to store depth info + // NOTE: A depth renderable image should be attached the FBO for depth test. +@@ -2298,11 +2298,11 @@ contenttype *new_contenttype_stagefbo(in + // If you also need stencil test for your rendering, then you must + // attach additional image to the stencil attachement point, too. + glGenRenderbuffers(1, &self->idepthbuffer); +- //bind to set some parameters +- glBindRenderbuffer(GL_RENDERBUFFER, self->idepthbuffer); +- glRenderbufferStorage(GL_RENDERBUFFER, FW_GL_DEPTH_COMPONENT, self->ivport.W, self->ivport.H); +- //unbind +- glBindRenderbuffer(GL_RENDERBUFFER, 0); ++ //bind to set some parameters ++ glBindRenderbuffer(GL_RENDERBUFFER, self->idepthbuffer); ++ glRenderbufferStorage(GL_RENDERBUFFER, FW_GL_DEPTH_COMPONENT, self->ivport.W, self->ivport.H); ++ //unbind ++ glBindRenderbuffer(GL_RENDERBUFFER, 0); + + // attach a texture to FBO color attachement point + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, self->itexturebuffer, 0); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c.fixindent 2025-03-26 10:51:22.561793593 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c 2025-03-26 10:51:22.569434347 -0400 +@@ -682,8 +682,8 @@ bool parser_process_res_VRML_X3D(resourc + int offsetInNode; + int shouldBind; + //int shouldUnBind; +- int parsedOk = FALSE; // results from parser +- bool fromEAI_SAI = FALSE; ++ int parsedOk = FALSE; // results from parser ++ bool fromEAI_SAI = FALSE; + /* we only bind to new nodes, if we are adding via Inlines, etc */ + //int origFogNodes, origBackgroundNodes, origNavigationNodes, origViewpointNodes; + struct X3D_Node *oldFogBindInRender, *oldBackgroundBindInRender, *oldNavigationBindInRender, *oldViewpointBindInRender; +@@ -696,7 +696,7 @@ bool parser_process_res_VRML_X3D(resourc + + UNUSED(parsedOk); // compiler warning mitigation + +- //printf ("entering parser_process_res_VRML_X3D\n"); ++ //printf ("entering parser_process_res_VRML_X3D\n"); + //fwl_lockTestMutex(); + + /* printf("processing VRML/X3D resource: %s\n", res->URLrequest); */ +@@ -720,11 +720,11 @@ bool parser_process_res_VRML_X3D(resourc + + //ConsoleMessage ("parser_process_res_VRML_X3D, url %s",res->parsed_request); + /* save the current URL so that any local-url gets are relative to this */ +- if (res->parsed_request != NULL) +- if (strncmp(res->parsed_request,EAI_Flag,strlen(EAI_Flag)) == 0) { +- //ConsoleMessage("parser_process_res_VRML_X3D, from EAI, ignoring"); +- fromEAI_SAI = TRUE; +- } ++ if (res->parsed_request != NULL) ++ if (strncmp(res->parsed_request,EAI_Flag,strlen(EAI_Flag)) == 0) { ++ //ConsoleMessage("parser_process_res_VRML_X3D, from EAI, ignoring"); ++ fromEAI_SAI = TRUE; ++ } + + if (!fromEAI_SAI){ + pushInputResource(res); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c.fixindent 2025-03-26 10:51:22.569745288 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c 2025-03-26 10:53:58.790103644 -0400 +@@ -1728,7 +1728,8 @@ void move_texture_to_opengl(textureTable + } + + borderWidth = tpNode->borderWidth; +- if (borderWidth < 0) borderWidth = 0; if (borderWidth > 1) borderWidth = 1; ++ if (borderWidth < 0) borderWidth = 0; ++ if (borderWidth > 1) borderWidth = 1; + + // http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#t-TextureMagnificationModes + +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.fixindent 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c 2025-03-26 10:51:22.570292979 -0400 +@@ -4337,24 +4337,48 @@ void compile_EspduTransform0(struct X3D_ + n = node->articulationParameterArray.n; + for(i=0;i<8;i++){ + switch(i){ +- case 0: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue0) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue0; n=max(n,i); break; +- case 1: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue1) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue1; n=max(n,i); break; +- case 2: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue2) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue2; n=max(n,i); break; +- case 3: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue3) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue3; n=max(n,i); break; +- case 4: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue4) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue4; n=max(n,i); break; +- case 5: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue5) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue5; n=max(n,i); break; +- case 6: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue6) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue6; n=max(n,i); break; +- case 7: if(node->set_articulationParameterValue0 != old->set_articulationParameterValue7) +- node->articulationParameterArray.p[i] = node->set_articulationParameterValue7; n=max(n,i); break; ++ case 0: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue0) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue0; ++ n=max(n,i); ++ break; ++ case 1: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue1) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue1; ++ n=max(n,i); ++ break; ++ case 2: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue2) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue2; ++ n=max(n,i); ++ break; ++ case 3: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue3) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue3; ++ n=max(n,i); ++ break; ++ case 4: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue4) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue4; ++ n=max(n,i); ++ break; ++ case 5: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue5) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue5; ++ n=max(n,i); ++ break; ++ case 6: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue6) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue6; ++ n=max(n,i); ++ break; ++ case 7: ++ if(node->set_articulationParameterValue0 != old->set_articulationParameterValue7) ++ node->articulationParameterArray.p[i] = node->set_articulationParameterValue7; ++ n=max(n,i); ++ break; + default: +- break; ++ break; + } + } + node->articulationParameterCount = node->articulationParameterArray.n; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c.fixindent 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Geospatial.c 2025-03-26 10:51:22.570909437 -0400 +@@ -1690,8 +1690,8 @@ static void gccToGdc_fw (Geosys *geoSyst + gdc->c[elevation] = q-rnn; + else + gdc->c[elevation] = GCC_Z / s1 + (g->Eps21 * rnn); +- gdc->c[latitude] = atan(top / w); +- gdc->c[longitude] = atan2(GCC_Y,GCC_X); ++ gdc->c[latitude] = atan(top / w); ++ gdc->c[longitude] = atan2(GCC_Y,GCC_X); + } + /* POINT ABOVE 50 KILOMETERS OR BELOW -10 KILOMETERS */ + else /* Do Exact Solution ************ */ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.c.fixindent freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.c.fixindent 2025-03-26 10:51:22.565393311 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/vrml_parser/CParseParser.c 2025-03-26 10:56:57.815340361 -0400 +@@ -1132,11 +1132,11 @@ static BOOL parser_componentStatement(st + clevel = &cfullname[i+1]; + break; + } +- char *cname1 = cname; +- if(!strcmp(cname,"H-Anim")) cname1 = "HAnim"; +- myComponent = findFieldInCOMPONENTS(cname1); +- myLevel = 0; +- if(clevel) myLevel = atoi(clevel); ++ char *cname1 = cname; ++ if(!strcmp(cname,"H-Anim")) cname1 = "HAnim"; ++ myComponent = findFieldInCOMPONENTS(cname1); ++ myLevel = 0; ++ if(clevel) myLevel = atoi(clevel); + } + handleComponent(myComponent,myLevel); + +@@ -3502,14 +3502,14 @@ static BOOL parser_interfaceDeclarationB + } + + /* Script can not take inputOutputs */ +- if(0) // change in post-DUK era - we allow inputoutputs now +- if (script != NULL) { +- if(script->ShaderScriptNode->_nodeType==NODE_Script && mode==PKW_inputOutput) +- { +- PARSE_ERROR("Scripts must not have inputOutputs!") +- //printf("dug9: maybe scripts can have inputOutputs\n"); ++ if(0) // change in post-DUK era - we allow inputoutputs now ++ if (script != NULL) { ++ if(script->ShaderScriptNode->_nodeType==NODE_Script && mode==PKW_inputOutput) ++ { ++ PARSE_ERROR("Scripts must not have inputOutputs!") ++ //printf("dug9: maybe scripts can have inputOutputs\n"); ++ } + } +- } + + /* lexer_fieldType is #defined as lexer_specialID(me, r, NULL, FIELDTYPES, FIELDTYPES_COUNT, NULL) */ + /* Looks for the next token in the array FIELDTYPES and returns the index in type */ diff --git a/freewrl-6.7-fix-lookup_brotoDefname.patch b/freewrl-6.7-fix-lookup_brotoDefname.patch new file mode 100644 index 0000000..0fc6950 --- /dev/null +++ b/freewrl-6.7-fix-lookup_brotoDefname.patch @@ -0,0 +1,54 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.fix-lookup_brotoDefname freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.fix-lookup_brotoDefname 2025-03-27 17:22:19.982882453 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c 2025-03-27 17:23:42.822431295 -0400 +@@ -6856,7 +6856,22 @@ void setSensitive(struct X3D_Node *paren + se->interpptr = (void *)myp; + vector_pushBack(struct SensStruct *,p->SensorEvents,se); + } +-char* lookup_brotoDefname(struct X3D_Proto* ec, struct X3D_Node* node); ++ ++char* lookup_brotoDefname(struct X3D_Proto* ec, struct X3D_Node* node) { ++ int n = vectorSize(ec->__DEFnames); ++ char* name = NULL; ++ struct brotoDefpair def; ++ for (int i = 0; i < n; i++) { ++ def = vector_get(struct brotoDefpair, ec->__DEFnames, i); ++ //printf("%x %x %s\n",node,def.node,def.name); ++ if (def.node == node) { ++ name = def.name; ++ break; ++ } ++ } ++ return name; ++} ++ + char* getNodeDescription(struct X3D_Node* node) { + //not all nodetypes have description field, and those that do not all set, so expect some will return null. + int type, kind, iifield; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLBrowser_sm.cpp.fix-lookup_brotoDefname freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLBrowser_sm.cpp +--- freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLBrowser_sm.cpp.fix-lookup_brotoDefname 2025-03-27 17:21:39.053753198 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/world_script/jsVRMLBrowser_sm.cpp 2025-03-27 17:24:13.067102231 -0400 +@@ -1264,23 +1264,6 @@ static JSClass ProfileInfoArrayClass = { + JS_FinalizeStub + }; + +-extern "C" { +- char* lookup_brotoDefname(struct X3D_Proto* ec, struct X3D_Node* node) { +- int n = vectorSize(ec->__DEFnames); +- char* name = NULL; +- struct brotoDefpair def; +- for (int i = 0; i < n; i++) { +- def = vector_get(struct brotoDefpair, ec->__DEFnames, i); +- //printf("%x %x %s\n",node,def.node,def.name); +- if (def.node == node) { +- name = def.name; +- break; +- } +- } +- return name; +- } +-} //extern C +- + char* lookup_brotoDefname(struct X3D_Proto* ec, struct X3D_Node* node); + JSBool + X3DRouteToString(JSContext* cx, uintN argc, jsval* vp) { diff --git a/freewrl-6.7-fix-makefile.patch b/freewrl-6.7-fix-makefile.patch new file mode 100644 index 0000000..8b58675 --- /dev/null +++ b/freewrl-6.7-fix-makefile.patch @@ -0,0 +1,454 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/Makefile.sources.fix-makefile freewrl-6.7-20240420gitb3254b1/src/lib/Makefile.sources +--- freewrl-6.7-20240420gitb3254b1/src/lib/Makefile.sources.fix-makefile 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/Makefile.sources 2025-03-27 16:35:14.284124402 -0400 +@@ -29,234 +29,222 @@ libFreeWRL_la_SOURCES = \ + iglobal.h \ + iglobal.c \ + desktop.c \ +- \ +-main/headers.h \ +-main/MainLoop.c \ +-main/MainLoop.h \ +-main/ProdCon.c \ +-main/ProdCon.h \ +-main/ConsoleMessage.c \ +-main/installdir.h \ +-main/utils.c \ +-main/Snapshot.c \ +-main/SnapshotTesting.c \ +- \ +-vrml_parser/CParse.c \ +-vrml_parser/CParseLexer.c \ +-vrml_parser/CRoutes.c \ +-vrml_parser/CRoutes.h \ +-vrml_parser/CParseParser.h \ +-vrml_parser/CFieldDecls.c \ +-vrml_parser/CParseLexer.h \ +-vrml_parser/CParseParser.c \ +-vrml_parser/CParse.h \ +-vrml_parser/Structs.h \ +-vrml_parser/VrmlTypeList.h \ +-vrml_parser/NodeFields.h \ +-vrml_parser/CFieldDecls.h \ +-vrml_parser/CParseGeneral.h \ +- \ +-x3d_parser/Bindable.c \ +-x3d_parser/X3DParser.c \ +-x3d_parser/Bindable.h \ +-x3d_parser/X3DParser.h \ +-x3d_parser/capabilitiesHandler.c \ +- \ +-non_web3d_formats/ColladaParser.h \ +-non_web3d_formats/ColladaParser.c \ +- \ +-world_script/CScripts.h \ +-world_script/CScripts.c \ +-world_script/fieldGet.h \ +-world_script/fieldGet.c \ +-world_script/fieldSet.h \ +-world_script/fieldSet.c \ +-world_script/JScript.h \ +-world_script/JScript.c \ +-world_script/JScript_stub.c \ +-world_script/JScript_duk.c \ +-world_script/include_duktape.c \ +-world_script/jsVRMLBrowser_duk.c \ +-world_script/jsVRMLClasses_duk.c \ +-world_script/jsNative.h \ +-world_script/jsUtils.h \ +-world_script/jsUtils.c \ +-world_script/jsVRMLBrowser.h \ +-world_script/jsVRMLBrowser.c \ +-world_script/jsVRMLClasses.h \ +-world_script/jsVRMLClasses.c \ +-world_script/jsVRML_MFClasses.c \ +-world_script/jsVRML_SFClasses.c \ +-world_script/world_script.h \ +-world_script/jsUtils_sm.h \ +-world_script/jsVRMLClasses_sm.h \ +-world_script/JScript_sm.cpp \ +-world_script/jsVRMLBrowser_sm.cpp \ +-world_script/jsUtils_sm.cpp \ +-world_script/jsVRML_SFClasses_sm.cpp \ +-world_script/jsVRML_MFClasses_sm.cpp \ +-world_script/jsVRMLClasses_sm.cpp \ +- \ +-scenegraph/RenderFuncs.c \ +-scenegraph/RenderFuncs.h \ +-scenegraph/Component_EnvironSensor.c \ +-scenegraph/quaternion.c \ +-scenegraph/Viewer.c \ +-scenegraph/Component_Time.c \ +-scenegraph/readpng.c \ +-scenegraph/Component_NURBS.c \ +-scenegraph/quaternion.h \ +-scenegraph/Component_EventUtils.c \ +-scenegraph/Component_ProgrammableShaders.h \ +-scenegraph/Component_ProgrammableShaders.c \ +-scenegraph/Component_CAD.c \ +-scenegraph/NormalCalcs.c \ +-scenegraph/Component_Geospatial.h \ +-scenegraph/MPEG_Utils.c \ +-scenegraph/MPEG_Utils_ffmpeg.c \ +-scenegraph/sounds.h \ +-scenegraph/Tess.h \ +-scenegraph/Tess.c \ +-scenegraph/Component_DIS.c \ +-scenegraph/Component_Rendering.c \ +-scenegraph/Component_Interpolation.c \ +-scenegraph/Component_Core.h \ +-scenegraph/Component_Core.c \ +-scenegraph/Component_EnvironEffects.c \ +-scenegraph/Component_Grouping.c \ +-scenegraph/Collision.c \ +-scenegraph/CollisionGPU.c \ +-scenegraph/Component_Text.c \ +-scenegraph/Component_Text.h \ +-scenegraph/LinearAlgebra.c \ +-scenegraph/Component_Geometry2D.c \ +-scenegraph/Vector.h \ +-scenegraph/mpeg.h \ +-scenegraph/Component_Texturing.c \ +-scenegraph/Component_Texturing3D.c \ +-scenegraph/GeneratedCode.c \ +-scenegraph/Polyrep.c \ +-scenegraph/Component_Lighting.c \ +-scenegraph/LinearAlgebra.h \ +-scenegraph/Component_Geospatial.c \ +-scenegraph/Component_Scripting.c \ +-scenegraph/Component_KeyDevice.h \ +-scenegraph/Component_KeyDevice.c \ +-scenegraph/StreamPoly.c \ +-scenegraph/Viewer.h \ +-scenegraph/Collision.h \ +-scenegraph/Component_CubeMapTexturing.c \ +-scenegraph/Component_CubeMapTexturing.h \ +-scenegraph/Component_HAnim.c \ +-scenegraph/Vector.c \ +-scenegraph/Component_Shape.h \ +-scenegraph/Component_Shape.c \ +-scenegraph/Component_Navigation.c \ +-scenegraph/readpng.h \ +-scenegraph/Children.c \ +-scenegraph/Children.h \ +-scenegraph/Component_Sound.c \ +-scenegraph/Component_Geometry3D.c \ +-scenegraph/Component_Geometry3D.h \ +-scenegraph/Polyrep.h \ +-scenegraph/ringbuf.c \ +-scenegraph/ringbuf.h \ +-scenegraph/Component_Networking.c \ +-scenegraph/Component_Networking.h \ +-scenegraph/Component_PointingDevice.c \ +-scenegraph/Component_ParticleSystems.c \ +-scenegraph/Component_RigidBodyPhysics.c \ +-scenegraph/Component_Followers.c \ +-scenegraph/Component_Picking.c \ +-scenegraph/Component_Picking.h \ +-scenegraph/Component_Layering.c \ +-scenegraph/Component_Layout.c \ +-scenegraph/statics.c \ +-scenegraph/GenPolyRep.c \ +-scenegraph/Component_VRML1.c \ +-scenegraph/Component_VolumeRendering.c \ +-scenegraph/Component_PTM.c \ +-scenegraph/VeraMono_ttf.c \ +-scenegraph/gltf_loader.c \ +-scenegraph/cgltf.h \ +- \ +-input/EAI_C_CommonFunctions.c \ +-input/EAIEventsIn.c \ +-input/EAIEventsOut.c \ +-input/EAIHeaders.h \ +-input/EAIHelpers.c \ +-input/EAIHelpers.h \ +-input/EAIServ.c \ +-input/InputFunctions.c \ +-input/InputFunctions.h \ +-input/SensInterps.c \ +-input/SensInterps.h \ +-input/convert1To2.c \ +-input/convertSTL.c \ +-input/convertSTL.h \ +-input/SCKHeaders.h \ +-input/Decompose.c \ +-input/Decompose.h \ +- \ +-opengl/RenderTextures.c \ +-opengl/Textures.h \ +-opengl/Textures.c \ +-opengl/Frustum.h \ +-opengl/Frustum.c \ +-opengl/OpenGL_Utils.h \ +-opengl/OpenGL_Utils.c \ +-opengl/Compositing_Shaders.c \ +-opengl/Material.h \ +-opengl/Material.c \ +-opengl/LoadTextures.h \ +-opengl/LoadTextures.c \ +-opengl/RasterFont.h \ +- \ +-opencl/OpenCL_Utils.c \ +-opencl/OpenCL_Utils.h \ +- \ +-ui/common.h \ +-ui/common.c \ +-ui/aquaInt.h \ +-ui/statusbar.h \ +-ui/statusbarHud.c \ +-ui/CursorDraw.c \ +-ui/CursorDraw.h \ +-ui/hudIcons_octalpha.h \ +-ui/freewrl_wingding_ttf.c \ +- \ +-plugin/pluginUtils.c \ +-plugin/pluginUtils.h \ +-plugin/PluginSocket.c \ +-plugin/PluginSocket.h \ +- \ +-../libtess/dict.c \ +-../libtess/dict.h \ +-../libtess/dict-list.h \ +-../libtess/geom.c \ +-../libtess/geom.h \ +-../libtess/gluos.h \ +-../libtess/memalloc.c \ +-../libtess/mesh.c \ +-../libtess/mesh.h \ +-../libtess/memalloc.h \ +-../libtess/normal.c \ +-../libtess/normal.h \ +-../libtess/priorityq.c \ +-../libtess/priorityq.h \ +-../libtess/priorityq-heap.c \ +-../libtess/priorityq-heap.h \ +-../libtess/priorityq-sort.h \ +-../libtess/render.c \ +-../libtess/render.h \ +-../libtess/sweep.c \ +-../libtess/sweep.h \ +-../libtess/tess.c \ +-../libtess/tess.h \ +-../libtess/tessmono.c \ +-../libtess/tessmono.h \ +-../libtess/libtess2.h +- ++ main/headers.h \ ++ main/MainLoop.c \ ++ main/MainLoop.h \ ++ main/ProdCon.c \ ++ main/ProdCon.h \ ++ main/ConsoleMessage.c \ ++ main/installdir.h \ ++ main/utils.c \ ++ main/Snapshot.c \ ++ main/SnapshotTesting.c \ ++ vrml_parser/CParse.c \ ++ vrml_parser/CParseLexer.c \ ++ vrml_parser/CRoutes.c \ ++ vrml_parser/CRoutes.h \ ++ vrml_parser/CParseParser.h \ ++ vrml_parser/CFieldDecls.c \ ++ vrml_parser/CParseLexer.h \ ++ vrml_parser/CParseParser.c \ ++ vrml_parser/CParse.h \ ++ vrml_parser/Structs.h \ ++ vrml_parser/VrmlTypeList.h \ ++ vrml_parser/NodeFields.h \ ++ vrml_parser/CFieldDecls.h \ ++ vrml_parser/CParseGeneral.h \ ++ x3d_parser/Bindable.c \ ++ x3d_parser/X3DParser.c \ ++ x3d_parser/Bindable.h \ ++ x3d_parser/X3DParser.h \ ++ x3d_parser/capabilitiesHandler.c \ ++ non_web3d_formats/ColladaParser.h \ ++ non_web3d_formats/ColladaParser.c \ ++ world_script/CScripts.h \ ++ world_script/CScripts.c \ ++ world_script/fieldGet.h \ ++ world_script/fieldGet.c \ ++ world_script/fieldSet.h \ ++ world_script/fieldSet.c \ ++ world_script/JScript.h \ ++ world_script/JScript.c \ ++ world_script/JScript_stub.c \ ++ world_script/JScript_duk.c \ ++ world_script/include_duktape.c \ ++ world_script/jsVRMLBrowser_duk.c \ ++ world_script/jsVRMLClasses_duk.c \ ++ world_script/jsNative.h \ ++ world_script/jsUtils.h \ ++ world_script/jsUtils.c \ ++ world_script/jsVRMLBrowser.h \ ++ world_script/jsVRMLBrowser.c \ ++ world_script/jsVRMLClasses.h \ ++ world_script/jsVRMLClasses.c \ ++ world_script/jsVRML_MFClasses.c \ ++ world_script/jsVRML_SFClasses.c \ ++ world_script/world_script.h \ ++ world_script/jsUtils_sm.h \ ++ world_script/jsVRMLClasses_sm.h \ ++ world_script/JScript_sm.cpp \ ++ world_script/jsVRMLBrowser_sm.cpp \ ++ world_script/jsUtils_sm.cpp \ ++ world_script/jsVRML_SFClasses_sm.cpp \ ++ world_script/jsVRML_MFClasses_sm.cpp \ ++ world_script/jsVRMLClasses_sm.cpp \ ++ scenegraph/RenderFuncs.c \ ++ scenegraph/RenderFuncs.h \ ++ scenegraph/Component_EnvironSensor.c \ ++ scenegraph/quaternion.c \ ++ scenegraph/Viewer.c \ ++ scenegraph/Component_Time.c \ ++ scenegraph/readpng.c \ ++ scenegraph/Component_NURBS.c \ ++ scenegraph/quaternion.h \ ++ scenegraph/Component_EventUtils.c \ ++ scenegraph/Component_ProgrammableShaders.h \ ++ scenegraph/Component_ProgrammableShaders.c \ ++ scenegraph/Component_CAD.c \ ++ scenegraph/NormalCalcs.c \ ++ scenegraph/Component_Geospatial.h \ ++ scenegraph/MPEG_Utils.c \ ++ scenegraph/MPEG_Utils_ffmpeg.c \ ++ scenegraph/sounds.h \ ++ scenegraph/Tess.h \ ++ scenegraph/Tess.c \ ++ scenegraph/Component_DIS.c \ ++ scenegraph/Component_Rendering.c \ ++ scenegraph/Component_Interpolation.c \ ++ scenegraph/Component_Core.h \ ++ scenegraph/Component_Core.c \ ++ scenegraph/Component_EnvironEffects.c \ ++ scenegraph/Component_Grouping.c \ ++ scenegraph/Collision.c \ ++ scenegraph/CollisionGPU.c \ ++ scenegraph/Component_Text.c \ ++ scenegraph/Component_Text.h \ ++ scenegraph/LinearAlgebra.c \ ++ scenegraph/Component_Geometry2D.c \ ++ scenegraph/Vector.h \ ++ scenegraph/mpeg.h \ ++ scenegraph/Component_Texturing.c \ ++ scenegraph/Component_Texturing3D.c \ ++ scenegraph/GeneratedCode.c \ ++ scenegraph/Polyrep.c \ ++ scenegraph/Component_Lighting.c \ ++ scenegraph/LinearAlgebra.h \ ++ scenegraph/Component_Geospatial.c \ ++ scenegraph/Component_Scripting.c \ ++ scenegraph/Component_KeyDevice.h \ ++ scenegraph/Component_KeyDevice.c \ ++ scenegraph/StreamPoly.c \ ++ scenegraph/Viewer.h \ ++ scenegraph/Collision.h \ ++ scenegraph/Component_CubeMapTexturing.c \ ++ scenegraph/Component_CubeMapTexturing.h \ ++ scenegraph/Component_HAnim.c \ ++ scenegraph/Vector.c \ ++ scenegraph/Component_Shape.h \ ++ scenegraph/Component_Shape.c \ ++ scenegraph/Component_Navigation.c \ ++ scenegraph/readpng.h \ ++ scenegraph/Children.c \ ++ scenegraph/Children.h \ ++ scenegraph/Component_Sound.c \ ++ scenegraph/Component_Geometry3D.c \ ++ scenegraph/Component_Geometry3D.h \ ++ scenegraph/Polyrep.h \ ++ scenegraph/ringbuf.c \ ++ scenegraph/ringbuf.h \ ++ scenegraph/Component_Networking.c \ ++ scenegraph/Component_Networking.h \ ++ scenegraph/Component_PointingDevice.c \ ++ scenegraph/Component_ParticleSystems.c \ ++ scenegraph/Component_RigidBodyPhysics.c \ ++ scenegraph/Component_Followers.c \ ++ scenegraph/Component_Picking.c \ ++ scenegraph/Component_Picking.h \ ++ scenegraph/Component_Layering.c \ ++ scenegraph/Component_Layout.c \ ++ scenegraph/statics.c \ ++ scenegraph/GenPolyRep.c \ ++ scenegraph/Component_VRML1.c \ ++ scenegraph/Component_VolumeRendering.c \ ++ scenegraph/Component_TextureProjector.c \ ++ scenegraph/VeraMono_ttf.c \ ++ scenegraph/gltf_loader.c \ ++ scenegraph/cgltf.h \ ++ scenegraph/Component_MIDI.c \ ++ input/EAI_C_CommonFunctions.c \ ++ input/EAIEventsIn.c \ ++ input/EAIEventsOut.c \ ++ input/EAIHeaders.h \ ++ input/EAIHelpers.c \ ++ input/EAIHelpers.h \ ++ input/EAIServ.c \ ++ input/InputFunctions.c \ ++ input/InputFunctions.h \ ++ input/SensInterps.c \ ++ input/SensInterps.h \ ++ input/convert1To2.c \ ++ input/convertSTL.c \ ++ input/convertSTL.h \ ++ input/SCKHeaders.h \ ++ input/Decompose.c \ ++ input/Decompose.h \ ++ opengl/RenderTextures.c \ ++ opengl/Textures.h \ ++ opengl/Textures.c \ ++ opengl/Frustum.h \ ++ opengl/Frustum.c \ ++ opengl/OpenGL_Utils.h \ ++ opengl/OpenGL_Utils.c \ ++ opengl/Compositing_Shaders.c \ ++ opengl/Material.h \ ++ opengl/Material.c \ ++ opengl/LoadTextures.h \ ++ opengl/LoadTextures.c \ ++ opengl/RasterFont.h \ ++ opencl/OpenCL_Utils.c \ ++ opencl/OpenCL_Utils.h \ ++ ui/common.h \ ++ ui/common.c \ ++ ui/aquaInt.h \ ++ ui/statusbar.h \ ++ ui/statusbarHud.c \ ++ ui/CursorDraw.c \ ++ ui/CursorDraw.h \ ++ ui/hudIcons_octalpha.h \ ++ ui/freewrl_wingding_ttf.c \ ++ plugin/pluginUtils.c \ ++ plugin/pluginUtils.h \ ++ plugin/PluginSocket.c \ ++ plugin/PluginSocket.h \ ++ ../libtess/dict.c \ ++ ../libtess/dict.h \ ++ ../libtess/dict-list.h \ ++ ../libtess/geom.c \ ++ ../libtess/geom.h \ ++ ../libtess/gluos.h \ ++ ../libtess/memalloc.c \ ++ ../libtess/mesh.c \ ++ ../libtess/mesh.h \ ++ ../libtess/memalloc.h \ ++ ../libtess/normal.c \ ++ ../libtess/normal.h \ ++ ../libtess/priorityq.c \ ++ ../libtess/priorityq.h \ ++ ../libtess/priorityq-heap.c \ ++ ../libtess/priorityq-heap.h \ ++ ../libtess/priorityq-sort.h \ ++ ../libtess/render.c \ ++ ../libtess/render.h \ ++ ../libtess/sweep.c \ ++ ../libtess/sweep.h \ ++ ../libtess/tess.c \ ++ ../libtess/tess.h \ ++ ../libtess/tessmono.c \ ++ ../libtess/tessmono.h \ ++ ../libtess/libtess2.h + + EXTRA_DIST = \ + scenegraph/OSCcallbacks.c diff --git a/freewrl-6.7-fix-midi-symbols.patch b/freewrl-6.7-fix-midi-symbols.patch new file mode 100644 index 0000000..6ab6af2 --- /dev/null +++ b/freewrl-6.7-fix-midi-symbols.patch @@ -0,0 +1,35 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/bin/options.c.fix-midi freewrl-6.7-20240420gitb3254b1/src/bin/options.c +--- freewrl-6.7-20240420gitb3254b1/src/bin/options.c.fix-midi 2025-03-27 17:01:46.954545180 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/bin/options.c 2025-03-27 17:02:13.177820345 -0400 +@@ -559,6 +559,7 @@ int fv_parseCommandLine (int argc, char + case 'P': /* --playback, no arg */ + fwl_set_modePlayback(); + break; ++#ifdef HAVE_LIBREMIDI + case 'M': /* --midi, int 1 or 2 for midi transport */ + { + int ival = 2; +@@ -566,7 +567,7 @@ int fv_parseCommandLine (int argc, char + set_MIDITransport(ival); + } + break; +- ++#endif + + + #ifdef HAVE_LIBCURL +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_MIDI.c.fix-midi freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_MIDI.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_MIDI.c.fix-midi 2025-03-27 17:06:05.980944869 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_MIDI.c 2025-03-27 17:07:05.027429620 -0400 +@@ -776,9 +776,11 @@ int MIDITransport() { + } + #else //HAVE_LIBREMIDI + //stubs ++void compile_MIDIFileSource(struct X3D_MIDIFileSource* node) {} + void render_MIDIPortSource(struct X3D_MIDIPortSource* node) {} + void render_MIDIFileSource(struct X3D_MIDIFileSource* node) {} + void render_MIDIPortDestination(struct X3D_MIDIPortDestination* node) {} ++void render_MIDIPrintDestination(struct X3D_MIDIPrintDestination* node) {} + void render_MIDIFileDestination(struct X3D_MIDIFileDestination* node) {} + void render_MIDIOut(struct X3D_MIDIOut* node) {} + void render_MIDIIn(struct X3D_MIDIIn* node) {} diff --git a/freewrl-6.7-fix-missing-types.patch b/freewrl-6.7-fix-missing-types.patch new file mode 100644 index 0000000..98ee201 --- /dev/null +++ b/freewrl-6.7-fix-missing-types.patch @@ -0,0 +1,14 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-missing-types freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-missing-types 2025-03-27 16:52:08.173790790 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c 2025-03-27 16:53:26.351727362 -0400 +@@ -52,6 +52,10 @@ X3D Sound Component + #ifdef HAVE_ALUT + #include + #endif //HAVE_ALUT ++ ++typedef struct ivec2 {int X; int Y;} ivec2; ++typedef struct icset { int p; int d; int ld; int n; int s; int ls; } icset; ++ + /* InitAL opens the default device and sets up a context using default + * attributes, making the program ready to call OpenAL functions. */ + void* fwInitAL(void) diff --git a/freewrl-6.7-fix-peek_audio_context.patch b/freewrl-6.7-fix-peek_audio_context.patch new file mode 100644 index 0000000..2bbee2b --- /dev/null +++ b/freewrl-6.7-fix-peek_audio_context.patch @@ -0,0 +1,25 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-peek_audio_context freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-peek_audio_context 2025-03-27 16:42:24.634876169 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c 2025-03-27 16:43:04.681891336 -0400 +@@ -640,6 +640,10 @@ void push_audio_context(int audio_contex + ppComponent_Sound p = (ppComponent_Sound)gglobal()->Component_Sound.prv; + stack_push(int, p->audio_context_stack, audio_context); + } ++int peek_audio_context() { ++ ppComponent_Sound p = (ppComponent_Sound)gglobal()->Component_Sound.prv; ++ return stack_top(int, p->audio_context_stack); ++} + void create_and_push_audio_context(struct X3D_Node* node) { + //Hypothesis: Destination / output audio nodes create a context, and child source and processing audio nodes use the context + struct X3D_SoundRep* srep = getSoundRep(node); +@@ -657,10 +661,6 @@ void pop_audio_context() { + ppComponent_Sound p = (ppComponent_Sound)gglobal()->Component_Sound.prv; + stack_pop(int, p->audio_context_stack); + } +-int peek_audio_context() { +- ppComponent_Sound p = (ppComponent_Sound)gglobal()->Component_Sound.prv; +- return stack_top(int, p->audio_context_stack); +-} + void push_audio_parent(int inode) { + ppComponent_Sound p = (ppComponent_Sound)gglobal()->Component_Sound.prv; + icset aps = { 0, 0, 0, 0, 0, 0 }; diff --git a/freewrl-6.7-fix-sound-stubs.patch b/freewrl-6.7-fix-sound-stubs.patch new file mode 100644 index 0000000..502eddf --- /dev/null +++ b/freewrl-6.7-fix-sound-stubs.patch @@ -0,0 +1,12 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-sound-stubs freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.fix-sound-stubs 2025-03-27 17:10:38.068137837 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c 2025-03-27 17:11:14.447775469 -0400 +@@ -1605,6 +1605,8 @@ void render_ListenerPointSource(struct X + + #else //HAVE_LIBSOUND + //HAVE_OPENAL ++void render_AudioBuffer(struct X3D_AudioBuffer* node) {} ++void render_ListenerPoint(struct X3D_ListenerPoint* node) {} + void render_OscillatorSource(struct X3D_OscillatorSource* node) {} + void render_BufferAudioSource(struct X3D_BufferAudioSource* node) {} + void render_StreamAudioSource(struct X3D_StreamAudioSource* node) {} diff --git a/freewrl-6.7-fix-stubs.patch b/freewrl-6.7-fix-stubs.patch new file mode 100644 index 0000000..3c66469 --- /dev/null +++ b/freewrl-6.7-fix-stubs.patch @@ -0,0 +1,57 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c.fix-stubs freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c.fix-stubs 2025-03-27 16:17:07.267905631 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/SnapshotTesting.c 2025-03-27 16:22:19.156863098 -0400 +@@ -25,15 +25,15 @@ + //#define USE_SNAPSHOT_TESTING 1 + #ifndef USE_SNAPSHOT_TESTING + //stubs for options +-void fwl_set_modeRecord() +-{ +-} ++//void fwl_set_modeRecord() ++//{ ++//} + void fwl_set_modeFixture() + { + } +-void fwl_set_modePlayback() +-{ +-} ++//void fwl_set_modePlayback() ++//{ ++//} + void fwl_set_nameTest(char *nameTest) + { + } +@@ -345,6 +345,7 @@ int fwl_handle_aqua_TESTING(const int me + return fwl_handle_mouse0(mev, button, x, y, windex); + } + ++/* + void fwl_set_modeRecord() + { + ppSnapshotTesting p; +@@ -353,6 +354,7 @@ void fwl_set_modeRecord() + p = get_ppSnapshotTesting(); + p->modeRecord = TRUE; + } ++*/ + void fwl_set_modeFixture() + { + ppSnapshotTesting p; +@@ -361,6 +363,7 @@ void fwl_set_modeFixture() + p = get_ppSnapshotTesting(); + p->modeFixture = TRUE; + } ++/* + void fwl_set_modePlayback() + { + ppSnapshotTesting p; +@@ -369,6 +372,7 @@ void fwl_set_modePlayback() + p = get_ppSnapshotTesting(); + p->modePlayback = TRUE; + } ++*/ + void fwl_set_nameTest(char *nameTest) + { + ppSnapshotTesting p; diff --git a/freewrl-6.7-fix-win32-only.patch b/freewrl-6.7-fix-win32-only.patch new file mode 100644 index 0000000..5188bdb --- /dev/null +++ b/freewrl-6.7-fix-win32-only.patch @@ -0,0 +1,33 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c.fix-win32-only freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c.fix-win32-only 2025-03-27 17:17:09.074132680 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/ui/common.c 2025-03-27 17:17:59.166516524 -0400 +@@ -214,7 +214,9 @@ void fwl_set_modeRecord() { + void fwl_do_keyPress0(int key, int type); + int fwl_handle_mouse0(const int mev, const unsigned int button, int x, int y, int windex); + int fwl_handle_touch0(int mev, unsigned int ID, int mouseX, int mouseY, int windex); ++#if defined(_MSC_VER) + void updateCursorStyle0(int cstyle); ++#endif + + static pthread_t playback_thread; + void _playbackthread(ttglobal tglobal) { +@@ -248,7 +250,9 @@ void _playbackthread(ttglobal tglobal) { + mouseY = (int)((fmouseY + 1.0)/scale + .5f); + mouseX = (int)((fmouseX + 1.0)/scale + .5f); + cstyle = fwl_handle_mouse0(mev, butnum, mouseX, mouseY, windex); ++#if defined(_MSC_VER) + updateCursorStyle0(cstyle); ++#endif + break; + case 'T': + sscanf(line, "%c,%d,%u,%f,%f,%d,%lf\n", &cc, &mev, &ID, &fmouseX, &fmouseY, &windex, &dtime); +@@ -261,7 +265,9 @@ void _playbackthread(ttglobal tglobal) { + mouseY = (int)(fmouseY + 1.0) / scale; + mouseX = (int)(fmouseX + 1.0) / scale; + cstyle = fwl_handle_touch0(mev, ID, mouseX, mouseY, windex); ++#if defined(_MSC_VER) + updateCursorStyle0(cstyle); ++#endif + break; + case 'K': + sscanf(line, "%c,%d,%d,%lf\n", &cc, &key, &type, &dtime); diff --git a/freewrl-6.7-no-pointproperties_pointmethod.patch b/freewrl-6.7-no-pointproperties_pointmethod.patch new file mode 100644 index 0000000..007bf2a --- /dev/null +++ b/freewrl-6.7-no-pointproperties_pointmethod.patch @@ -0,0 +1,22 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.no-pointproperties_pointmethod freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h.no-pointproperties_pointmethod 2025-03-27 16:06:47.263927454 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Shape.h 2025-03-27 16:13:19.927783567 -0400 +@@ -298,11 +298,18 @@ void setUserShaderNode(struct X3D_Node * + } \ + } + ++/* + enum { + PM_NONE = 0, //reserve 0 for render_PointSet to thunk to opengl GL_POINTS when no PointProperties node + PM_SCREEN = 1, + PM_OBJECT = 2, + PM_FANCY = 3, + } pointproperties_pointmethod; ++*/ ++ ++#define PM_NONE 0 ++#define PM_SCREEN 1 ++#define PM_OBJECT 2 ++#define PM_FANCY 3 + + #endif /* __FREEWRL_SCENEGRAPH_SHAPE_H__ */ diff --git a/freewrl-6.7-sign-fixes.patch b/freewrl-6.7-sign-fixes.patch new file mode 100644 index 0000000..804e02e --- /dev/null +++ b/freewrl-6.7-sign-fixes.patch @@ -0,0 +1,190 @@ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/DIS/DIS.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/DIS/DIS.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/DIS/DIS.c.signfix 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/DIS/DIS.c 2025-03-26 10:57:47.471678842 -0400 +@@ -1651,14 +1651,14 @@ void initializeclass(unsigned char *t, i + field = DIS_CLASS[distype].fields; + do{ + //initialize field +- initialize_field(t+field->offset,field); ++ initialize_field((char *)t+field->offset,field); + field++; + } while(field->kind > -1); + } + void initialize_field(char *t,struct disfieldattr* field){ + switch(field->kind){ + case CLASSREF: +- initializeclass(t,field->type); ++ initializeclass((unsigned char *)t,field->type); + break; + case PRIMITIVE: + switch(field->type){ +@@ -1807,7 +1807,7 @@ unsigned char *dis_marshal_list_item(uns + if(unde) printf("/classref\n"); + break; + case PRIMITIVE: +- endianswap(carat,item, size); ++ endianswap((char *)carat,(char *)item, size); + if(unde) printf("doing primitive size %d\n",size*8); + carat += size; //size in bytes + break; +@@ -1834,7 +1834,7 @@ unsigned char * dis_marshal(unsigned cha + carat = dis_marshal(carat,item + field->offset, field->type); + break; + case PRIMITIVE: +- endianswap(carat,item + field->offset,field->size); ++ endianswap((char *)carat, (char *)item + field->offset,field->size); + carat += field->size; //size in bytes + break; + case FIXED_LIST: +@@ -1878,7 +1878,7 @@ unsigned char *dis_unmarshal_list_item(u + if(unde) printf("/classref\n"); + break; + case PRIMITIVE: +- endianswap(item,carat, size); ++ endianswap((char *)item, (char *)carat, size); + if(unde) printf("doing primitive size %d\n",size*8); + carat += size; //size in bytes + break; +@@ -1906,7 +1906,7 @@ unsigned char *dis_unmarshal(unsigned ch + if(unde) printf("/classref\n"); + break; + case PRIMITIVE: +- endianswap(item + field->offset,carat, field->size); ++ endianswap((char *)item + field->offset,(char *)carat, field->size); + if(unde) printf("doing %s primitive size %d\n",field->name,field->size*8); + carat += field->size; //size in bytes + break; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c.signfix 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/io_files.c 2025-03-26 10:57:47.472236319 -0400 +@@ -631,7 +631,7 @@ int determineFileType(const char *buffer + } + + #if defined (INCLUDE_STL_FILES) +- return stlDTFT(buffer,len); ++ return stlDTFT((const unsigned char*)buffer,len); + #endif //INCLUDE_STL_FILES + + return IS_TYPE_UNKNOWN; +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c.signfix 2025-03-26 10:57:47.465982460 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/MainLoop.c 2025-03-26 10:59:40.930635158 -0400 +@@ -807,7 +807,7 @@ void captiontext_setString(void *_self, + } + strcpy(self->caption,utf8string); + self->len = lenstr; +- self->utf32 = utf8_to_utf32(self->caption,self->utf32,&self->len32); ++ self->utf32 = (int *)utf8_to_utf32((unsigned char *)self->caption,(unsigned int *)self->utf32,(unsigned int *)&self->len32); + } + + +@@ -1161,11 +1161,11 @@ void textpanel_render_blobmethod(content + jrow++; + if(jrow > panelsizechars.Y) //would be rendered off-panel + break; +- row = &P[-nchars + i0]; ++ row = (char *)&P[-nchars + i0]; + if(hasTU && Trow == i){ + l0 = T - &A[i0]; + l1 = lenrow - l0; +- row = self->row; ++ row = (char *)self->row; + memcpy(&row[l0],U,l1); + memcpy(row,&A[i0],l0); + P = &self->E[bchars]; +@@ -1395,7 +1395,7 @@ int multitouch_pick(void *_self, int mev + //record for rendering + ihandle = 0; + if(fwl_get_touchtype() == TOUCHTYPE_EMULATE_MULTITOUCH){ +- ihandle = emulate_multitouch2(self->touchlist,self->ntouch,&self->IDD,&self->lastbut,&mev,&butnum,mouseX,mouseY,&ID,windex); ++ ihandle = emulate_multitouch2(self->touchlist,self->ntouch,&self->IDD,&self->lastbut,&mev,(unsigned int *)&butnum,mouseX,mouseY,(int *)&ID,windex); + iret = ihandle < 0 ? 0 : 1; + } + if(iret == 0){ +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c.signfix 2025-03-26 10:57:47.466679440 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/main/ProdCon.c 2025-03-26 10:57:47.473703591 -0400 +@@ -421,7 +421,7 @@ static bool parser_do_parse_string(const + break; + } + case IS_TYPE_BINARY_STL: { +- char *newData = convertBinarySTL(input); ++ char *newData = convertBinarySTL((const unsigned char *)input); + p->lastSTLScaling = getLastSTLScale(); + + ret = cParse (ectx,nRn,(int) offsetof (struct X3D_Group, children), newData); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c.signfix 2025-03-26 10:57:47.467075702 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/opengl/Textures.c 2025-03-26 10:57:47.473950774 -0400 +@@ -387,7 +387,7 @@ void compute_3D_alpha_gradient_store_rgb + tti2->x = x; + tti2->y = y; + tti2->z = z; +- tti2->texdata = dest; ++ tti2->texdata = (unsigned char *)dest; + tti2->channels = 3; + saveImage_web3dit(tti2,"gradientRGB.web3dit"); + tti2->channels = 4; +@@ -2134,7 +2134,7 @@ void move_texture_to_opengl(textureTable + //and hope that the one info channel is alpha because we overwrite rgb + if(me->channels == 1){ + //alpha only scalar image, RGB are free to hold gradient +- compute_3D_alpha_gradient_store_rgb(dest,x,y,z); ++ compute_3D_alpha_gradient_store_rgb((char *)dest,x,y,z); + } + + ny = (int) sqrt(z+1); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c.signfix 2025-03-26 10:57:47.467757459 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_DIS.c 2025-03-26 11:05:25.206303312 -0400 +@@ -2755,7 +2755,7 @@ void dis_sendloop(){ + pdus = dis_avatar2pdus(); + nb = dis_write_stream(&buf2[nbytes], pdus); + nbytes += nb; +- if (nbytes) socksendto(dsock, buf2, nbytes); ++ if (nbytes) socksendto(dsock, (const char *)buf2, nbytes); + // Q. where is the garbage collection for pdua vector? + // I think the ctor/dtor for pdus works on the pdus themselves. + // But not the pdu vector list I pass around +@@ -3186,7 +3186,7 @@ int dis_write_stream(unsigned char * dat + carat = dis_marshal(carat,(unsigned char*)pdu,distype); + //printf("pdu %d wrote %d bytes\n",i,nbytes); + } +- //*streamsize = nbytes; ++ // *streamsize = nbytes; + nbytes = (int)(carat - datastream); + } + return nbytes; +@@ -3496,7 +3496,7 @@ void dis_recvloop(){ + dis_dtor((unsigned char *)pdu,pduToDis(pdu->pduType)); + } + pdus->n = 0; +- dis_read_stream(buf,nbytes,pdus,&heard); ++ dis_read_stream((unsigned char *)buf,nbytes,pdus,&heard); + for (int j = 0; j < pdus->n; j++) { + struct Pdu* pdu = vector_get(struct Pdu*, pdus, j); + pdu->padding = TAG_UNCLAIMED; //0 +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c.signfix 2025-03-26 10:45:38.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/Component_Sound.c 2025-03-26 10:57:47.474842301 -0400 +@@ -527,7 +527,7 @@ void render_Sound (struct X3D_Sound *nod + //convert buffer to openAL sound source + ALint source; + source = 0; +- alGenSources(1, &source); ++ alGenSources(1, (ALuint *)&source); + alSourcei(source, AL_BUFFER, acp->__sourceNumber); + alSourcef (source, AL_PITCH, acp->pitch); + alSourcef (source, AL_GAIN, node->intensity ); +diff -up freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/socketutils.c.signfix freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/socketutils.c +--- freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/socketutils.c.signfix 2025-03-26 10:45:28.000000000 -0400 ++++ freewrl-6.7-20240420gitb3254b1/src/lib/scenegraph/socketutils.c 2025-03-26 10:57:47.475014978 -0400 +@@ -164,7 +164,7 @@ int sockrecvfrom(struct dis_socket *dsoc + int status, fromlen; + fromlen = sizeof(struct sockaddr); + status = recvfrom(dsock->socket, buf, len, 0, +- (struct sockaddr *)&dsock->saddr, &fromlen ); ++ (struct sockaddr *)&dsock->saddr, (socklen_t *)&fromlen ); + // I think -1 is normal for non-blocking when no data + // if(status < 0) print_socket_error("recvfrom ",status); + return status; diff --git a/freewrl.spec b/freewrl.spec index e7e8047..1c3cf18 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -1,7 +1,7 @@ -%global majorrel 4.3.0 -%global commit e99ab4a000411dace7d3423ec37bdb7772998b1c +%global majorrel 6.7 +%global commit b3254b11e9e340b08eb5b38ccc1a34785693261e %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20200221 +%global commitdate 20240420 %ifarch %{java_arches} %bcond_without java @@ -12,13 +12,14 @@ Name: freewrl Version: %{majorrel} -Release: 23.%{commitdate}git%{shortcommit}%{?dist} +Release: 1.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net # Source0: http://sourceforge.net/projects/freewrl/files/freewrl-linux/3.0/%%{name}-%%{version}.tar.bz2 # git clone https://git.code.sf.net/p/freewrl/git freewrl-git # cd freewrl-git +# git checkout develop # cp -a freex3d/ ../freewrl-%%{version}-%%{commitdate}git%%{shortcommit} # cd .. # tar --exclude-vcs -cjf %%{name}-%%{version}-%%{commitdate}git%%{shortcommit}.tar.bz2 freewrl-%%{version}-%%{commitdate}git%%{shortcommit} @@ -33,13 +34,38 @@ Patch4: freewrl-4.3.0-use-memcpy-instead-of-strncpy.patch # main/ProdCon.c:424:29: warning: implicit declaration of function 'convertBinarySTL' [-Wimplicit-function-declaration] Patch5: freewrl-4.3.0-missing-functions.patch # lots of indent issues caught by -Wmisleading-indentation -Patch6: freewrl-4.3.0-fix-indent-issues.patch +Patch6: freewrl-6.7-fix-indent-issues.patch # lots of signedness fixes like # io_files.c:627:17: warning: pointer targets in passing argument 1 of 'stlDTFT' differ in signedness [-Wpointer-sign] -Patch7: freewrl-4.3.0-sign-fixes.patch -Patch8: freewrl-c99.patch +Patch7: freewrl-6.7-sign-fixes.patch +Patch8: freewrl-6.7-c99.patch # Fix issue with incompatible pointer type -Patch9: freewrl-4.3.0-fix-cast.patch +Patch9: freewrl-6.7-fix-cast.patch +# C requires the existence of functions before they are called. +Patch10: freewrl-6.7-fix-function-references.patch +# Add missing includes for std headers +Patch11: freewrl-6.7-fix-headers.patch +# Fix makefile +Patch12: freewrl-6.7-fix-makefile.patch +# Fixes for C23 +Patch13: freewrl-6.7-c23.patch +# Do not use pointproperties_pointmethod (we don't actually use the enum, just the defines and it gets its symbol EVERYWHERE) +Patch14: freewrl-6.7-no-pointproperties_pointmethod.patch +# Fix stubs to not duplicate function symbols +Patch15: freewrl-6.7-fix-stubs.patch +# Gotta define before you use +Patch16: freewrl-6.7-fix-peek_audio_context.patch +# Fix missing types +Patch17: freewrl-6.7-fix-missing-types.patch +# Fix MIDI symbols +Patch18: freewrl-6.7-fix-midi-symbols.patch +# Fix Sound stubs (symbols in lib) +Patch19: freewrl-6.7-fix-sound-stubs.patch +# updateCursorStyle0 is win32 only +Patch20: freewrl-6.7-fix-win32-only.patch +# move C function into C code, extern is causing naming mismatch +Patch21: freewrl-6.7-fix-lookup_brotoDefname.patch + BuildRequires: gcc-c++ BuildRequires: zlib-devel, freetype-devel, fontconfig-devel BuildRequires: imlib2-devel, nspr-devel @@ -124,15 +150,31 @@ rm -rf appleOSX/ %patch -P5 -p1 -b .missing-functions %patch -P6 -p1 -b .fixindent %patch -P7 -p1 -b .signfix -%patch -P8 -p1 +%patch -P8 -p1 -b .c99 %patch -P9 -p1 -b .fix-cast +%patch -P10 -p1 -b .fix-function-references +%patch -P11 -p1 -b .fix-headers +%patch -P12 -p1 -b .fix-makefile +%patch -P13 -p1 -b .c23 +%patch -P14 -p1 -b .no-pointproperties_pointmethod +%patch -P15 -p1 -b .fix-stubs +%patch -P16 -p1 -b .fix-peek_audio_context +%patch -P17 -p1 -b .fix-missing-types +%patch -P18 -p1 -b .fix-midi +%patch -P19 -p1 -b .fix-sound-stubs +%patch -P20 -p1 -b .fix-win32-only +%patch -P21 -p1 -b .fix-lookup_brotoDefname + +# no snapshot testing +sed -i 's|AC_DEFINE(USE_SNAPSHOT_TESTING|#AC_DEFINE(USE_SNAPSHOT_TESTING|g' configure.ac + autoreconf --force --install # hardcoding /usr/local/lib is a no-no sed -i 's|libpath = "/usr/local/lib"|libpath = "%{_libdir}"|g' src/bin/main.c %build -%global optflags %{optflags} -Wno-comment -Wno-unused-variable +%global optflags %{optflags} -Wno-comment -Wno-unused-variable -std=gnu17 -Wno-error=incompatible-pointer-types export LDFLAGS="-Wl,--as-needed" %configure --with-target=x11 \ --enable-fontconfig \ @@ -147,7 +189,7 @@ export LDFLAGS="-Wl,--as-needed" --with-javadir=/usr/lib/jvm/java-openjdk/jre/lib/ext \ --with-javascript=duk \ --with-statusbar=hud -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 pushd doc make html/index.html popd @@ -225,6 +267,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Thu Mar 27 2025 Tom Callaway - 6.7-1.20240420gitb3254b1 +- update to 6.7 ... with a lot of glue. This code is very fragile. It built and kinda runs, but not well. + * Thu Jan 16 2025 Fedora Release Engineering - 4.3.0-23.20200221gite99ab4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From cfa9ed3bda2d7fea63597122a8f8c68b61d73aad Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 27 Mar 2025 17:42:08 -0400 Subject: [PATCH 17/20] sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a15057e..3d8886a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /freewrl-3.0.0-20170729git4f920cb.tar.bz2 /freewrl-4.3.0-20190827git36b721c.tar.bz2 /freewrl-4.3.0-20200221gite99ab4a.tar.bz2 +/freewrl-6.7-20240420gitb3254b1.tar.bz2 diff --git a/sources b/sources index b30df00..43551c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (freewrl-4.3.0-20200221gite99ab4a.tar.bz2) = f2c0e80fe14a45c30016ce95a3a1b0792dc5257b0437dedb4172d405af2d3300a9c07d0cae75f3638a184a482c2a084775e55041c43036970936e4088f4bb2ee +SHA512 (freewrl-6.7-20240420gitb3254b1.tar.bz2) = ee52ff5427d9893379486b43ff01e1b373a0d3df779eaf5cb7650d17dfd909848ff2ddd9a9cc2dac96e4fa97f2ad49a6d4638ea5c6bd4f2fd11c3b36f6b5a4cb From 9383962b4575fdc76e9dd719f551ca9fb3a1b925 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:48:45 +0000 Subject: [PATCH 18/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 1c3cf18..59cb27d 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 1.%{commitdate}git%{shortcommit}%{?dist} +Release: 2.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net @@ -267,6 +267,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 6.7-2.20240420gitb3254b1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Mar 27 2025 Tom Callaway - 6.7-1.20240420gitb3254b1 - update to 6.7 ... with a lot of glue. This code is very fragile. It built and kinda runs, but not well. From 56838d2e45277a886fbe7ea9638c45bc5228571d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 11:35:58 +0000 Subject: [PATCH 19/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index 59cb27d..e58e5f0 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 2.%{commitdate}git%{shortcommit}%{?dist} +Release: 3.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net @@ -267,6 +267,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 6.7-3.20240420gitb3254b1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Wed Jul 23 2025 Fedora Release Engineering - 6.7-2.20240420gitb3254b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 55ca4a3ada3b3b659d7cb13cd032db050d81d7bc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 15 Jul 2026 23:28:26 +0000 Subject: [PATCH 20/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- freewrl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freewrl.spec b/freewrl.spec index e58e5f0..37c18af 100644 --- a/freewrl.spec +++ b/freewrl.spec @@ -12,7 +12,7 @@ Name: freewrl Version: %{majorrel} -Release: 3.%{commitdate}git%{shortcommit}%{?dist} +Release: 4.%{commitdate}git%{shortcommit}%{?dist} Summary: X3D / VRML visualization program License: LGPL-3.0-or-later URL: http://freewrl.sourceforge.net @@ -267,6 +267,9 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.* %endif %changelog +* Wed Jul 15 2026 Fedora Release Engineering - 6.7-4.20240420gitb3254b1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Fri Jan 16 2026 Fedora Release Engineering - 6.7-3.20240420gitb3254b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild