350 Commits

Author SHA1 Message Date
Graham Pentheny
f4a65fd317 Enable UBSan and ASan when building tests with clang 2023-04-14 17:38:30 -04:00
Alexey Sokolov
a015950eaa
Use external Catch2 if available in cmake build (#600) 2023-03-25 13:29:08 -04:00
Graham Pentheny
b43c82c808
Removed _USE_MATH_DEFINES directive (#596)
Since none of the `M_` prefixed constants are used anywhere in the code, this is unnecessary.  It's also Windows-specific, so these non-standard defines shouldn't be used anyway.

Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170
2022-12-29 15:09:01 -05:00
Graham Pentheny
67ba9a2a15
Fix macOS CMake SDL linking (#584)
* Ignore cmake intermediate build dir

* Fix C++ language version in cmake build scripts

* Set a default SDL2_ROOT_DIR value for macOS in cmake scripts

* Fixed macOS SDL framework linking in cmake scripts

* Added macos-cmake target for CI builds in github workflows

* Use C++17 for building Tests instead of 20, since we build them with VS2019 in some jobs
2022-11-25 20:29:11 -05:00
Graham Pentheny
2b0c244d12
Updated doxygen output (#581)
- Upgraded doxyfile to latest format
- Fixed a bunch of warnings and errors in docstrings that doxygen was complaining about
- Added the doxygen-awesome theme to modernize the output
- Removed a duplicate screenshot we'd had in the docs folder
- Moved the RecastDemo screenshot into the Docs/images folder
- Changed the doxygen main page to be the README.md since the dedicated main page file we had was nearly identical but out of date
- Added CONTRIBUTING.md so it's part of the generated doxygen output
- Removed duplicate license file to avoid confusion
- Combined the FAQ with the Recast_api.txt, since the FAQ was essentially just better docs for the members of `rcConfig`
2022-11-23 00:13:38 -05:00
Graham Pentheny
17a19d0e82
Simplified macOS Build Process (#579)
This makes the default xcode project generated by premake work out of the box, and is generally easier for mac users.  Especially those who don't have permissions to modify /Library/Frameworks/

- Look for SDL in RecastDemo/Bin by default rather than /Library/Frameworks/
- Updated README build instructions
- Ignore SDL2.framework in RecastDemo/Bin
2022-11-11 21:04:29 -05:00
Graham Pentheny
5111139558
Fixes for many low-severity compiler warnings (#576)
* Fixes for many low-severity compiler warnings

Mostly a lot of pedantic things like end-of-file newlines and commas on the last enum value.  However some fixes like the weak v-tables warnings fixes might help with code gen.  It's unclear if the linker is able to elide multiple copies of the same type's v-table in different translation units, (sometimes it can) but these fixes ensure we don't have to rely on it.
2022-11-11 21:03:03 -05:00
Graham Pentheny
ea7bfbee70
Fix clang linux builds (#578)
Also remove hard-coded filter on gmake premake target since it's deprecated in favor of gmake2. It also doesn't matter; what matters is that we filter on gcc, since the warnings we've disabled don't exist in clang and will throw errors.
2022-11-11 20:11:14 -05:00
Siddharth J Singh
e6b675bb9a
Fastlz fix for -Wno-class-memaccess' is valid for C++/ObjC++ but not for C (#479)
* Added a selective filter for *.c files compiled on linux using make

Co-authored-by: Graham Pentheny <graham.pentheny@gmail.com>
2022-11-09 11:54:56 -05:00
Graham Pentheny
9098a81682 Change to C++14 instead of C++20
Updated appveyor version matrix.  Removed vs2013
2022-11-07 23:34:36 -05:00
Graham Pentheny
7dfa9849ca Updated Catch2 testing library to v3.1.1
https://github.com/catchorg/Catch2

Updated tests with new API changes as well.
2022-11-07 23:34:36 -05:00
Graham Pentheny
d576e71b25 Disable class-memaccess error to fix builds on Ubuntu with newer versions of GCC
Based on SgtVincent's suggestion here: https://github.com/recastnavigation/recastnavigation/issues/497#issuecomment-1293318731

Fixes #497
2022-10-29 14:37:10 -04:00
Graham Pentheny
0d1cbd3d67 Don't explicitly create a GL context since SDL_CreateWindowAndRenderer does it internally.
Having two GL contexts causes rendering problems on Ubuntu.  Fixes #521
2022-10-25 23:18:11 -04:00
Graham Pentheny
96dc90b6ff Fix deprecation warnings when using premake5
The premake script generates some deprecation warnings when generating with premake5:
- "configuration" has been deprecated in favor of "filter"
- "solution" was renamed to "workspace"
2022-10-25 23:17:58 -04:00
Prin_E
5a870d427e Fixed RecastDemo crash in macOS 10.11+
* Set hints to always use OpenGL render driver (instead of Metal driver)
* Compile error fix in Xcode 13
2022-03-20 15:33:19 -04:00
Rubaka
c32297c2f9 Fixed run RecastDemo on MVS 2020-11-19 17:36:54 +01:00
Kyeongho Park
24230e8e8d
Bugfix/chunkytrimesh subdivide maxnodes (#451)
* minor redundant: dir

* bugfix: ChunkyTriMesh nodes array: out of bounds
2020-11-17 11:46:52 +01:00
Jakob Botsch Nielsen
8db2f62d7a Fix compiler error due to memset on type with non-trivial constructors
Fix #446
2020-10-30 11:31:53 +01:00
Jakob Botsch Nielsen
df27e4eb1a Fix build
-Wno-error does not ignore unknown warnings on old GCC versions causing
problems when using it for new warnings. On the other hand, -Wno-X will
ignore unknown warnings, so we can use this instead.

Fix #403
Fix #413
2020-05-11 18:26:17 +02:00
cypheron
c40188c796 Permit false positive compile errors (gcc8) 2019-05-11 13:19:37 +02:00
Jakob Botsch Nielsen
21f48fae37 Add a mesh for testing crowds at a large distance of origin 2019-03-16 16:18:23 +01:00
Bret Curtis
14b2631527 Use Travis-CI Matrix to add more type of builds (#366) 2018-11-21 12:34:13 +01:00
Jakob Botsch Nielsen
3087e805b0 Add a matching placement delete for placement new
Even though it is a no-op this is good style and avoids a warning with
MSVC.

Fix #359
2018-11-05 14:26:08 +01:00
Jakob Botsch Nielsen
fe4d4392a6 Use SDL2.dll path relative to script file
Previously this was relative to the output file. This works around a
premake5 bug and as a bonus makes it easier if we in the future decide
to support out-of-source builds.
2018-11-05 13:34:08 +01:00
Jarrett
56dbf4c482 Allow 64 bit windows builds (#301) 2018-10-16 00:02:51 +02:00
Zeno Ahn
9f9efe943e Removed unnecessary comment 2018-09-02 15:03:41 +02:00
Roman Siromakha
05b2b8da80 CMake for Windows (#339)
* Build with cmake in appveyor

* Install content files and tests binary to bin

* Install SDL2.dll on windows

* Build RecastDemo as GUI application on Windows and Mac OS

* Copy SDL2.dll to current binary dir
2018-06-18 23:11:36 +02:00
Jakob Botsch Nielsen
6e36a351c2 Remove unused code causing warning 2018-06-16 17:04:54 +02:00
Jakob Botsch Nielsen
c2d7463a38 Add Clang to Travis and treat warnings as errors
The GCC version used by Travis is old and appears not to support all the
warnings we would like to get, so reenable Clang. Additionally make lots
of cleanups to Travis config and make the build a lot faster too.

Also change both Travis and AppVeyor builds to treat warnings as errors,
and include VS2017 in the matrix for AppVeyor. I have also removed
VS2010 because it is ancient at this point.

Updated Premake to alpha12 and fixed the premake build file
appropriately.
2018-06-16 17:04:54 +02:00
Roman Siromakha
4566d01c8f Support build by CMake (#310) 2018-04-21 00:16:52 +02:00
Jakob Botsch Nielsen
5d4186046c Mark a fall-through with a comment
Fix #283
2018-01-05 13:06:06 +01:00
Aurelien Rainone
4988ecbaf0 RecastDemo: add Load & Save buttons for SoloMesh Sample, and fix warnings (#258)
* Implement saveAll loadAll for Sample_SoloMesh

 - Solo mesh sample is loaded and saved as a tiled mesh containing
   an unique tile, so as to remain compatible with tiled mesh
 - navmesh is saved to/loaded from `solo_navmesh.bin` binary file
 - add and connect the corresponding 'Save/Load' GUI elements

* Fix `implit-fallthrough` gcc warnings

On linux with gcc 7.2.0+ and all warnings treated as errors,
implicit fallthroughs in case statements are considered as errors.
If the comment just below the next `case` or `default` matches
various strings, one of which is `falls through` the fallthrough
is then considered explicit.
2018-01-05 12:38:53 +01:00
chenshungen
bda59b7c62 Fixed load .gset file error (#293) 2018-01-05 12:33:33 +01:00
Liam Mitchell
0004bf4a23 No cast in SampleInterfaces BuildContext::doStopTimer (#299)
Removed int cast because it led to loss of time data.

Fixes #289
2018-01-05 12:20:58 +01:00
Jonathan Adamczewski
2c85309280 Suppress warning 2017-10-14 20:24:18 +02:00
Jonathan Adamczewski
7b7c941181 Disable exception handling in MS std headers 2017-10-14 20:24:18 +02:00
aymarfisherman
7cca61dc41 Renamed all instances of 'extents' to 'halfExtents' (#279) 2017-08-20 17:05:51 +02:00
Geoyeob Kim
46654531e4 Fix 'dtRandomPointInConvexPoly()' returning a garbage value if s == 1.0f. (#271) 2017-05-15 16:26:35 +02:00
Domenico Albani
ef3ea40f7a Add more camera movement key bindings (#259)
Q/E and Page up/page down to move vertically.
Arrow keys in addition to WASD to move normally.
2017-02-06 02:09:49 +01:00
Jakob Botsch Nielsen
fb49ccf83a Change ground and road colors slightly (#256)
Ground color is changed back to the previous default color, and the road
color is changed to a dark shade of brown that is a bit easier to
differentiate with normal input geometry.
2017-02-04 15:19:06 +01:00
Domenico Albani
03eb2f92f3 Make RecastDemo colors more meaningful (#254)
Implement a SampleDebugDraw which will color area types meaningfully, for example
color water as blue, grass as green and so on.
2017-02-02 20:27:43 +01:00
Jonathan Adamczewski
2bc06ef314 Change initializer list to match declaration order 2017-01-12 16:58:26 +00:00
Jonathan Adamczewski
34ab687e21 Add support for heightfield filter toggles in Sample_TempObstacles 2017-01-12 16:58:26 +00:00
Jonathan Adamczewski
12e8950bac Add toggles for heightfield filtering 2017-01-12 16:58:26 +00:00
Ben Hymers
a2e16b8e6c Set warnings as errors on Linux 2017-01-12 12:07:49 +00:00
Ben Hymers
f8c8beb3cb Fix some warnings by adding error checking to Sample_TempObstacles::loadAll (#245) 2017-01-12 12:53:39 +01:00
Jakob Botsch Nielsen
1445d05838 Use std::vector in NavMeshPruneTool 2016-07-13 05:37:37 +02:00
Jakob Botsch Nielsen
5d6312ab1e Mark start poly in NavMeshPruneTool
The start poly would not be pruned if it was the only poly on the
island.

Fix #216
2016-07-13 05:37:15 +02:00
Sander van Noort
b05e45492e Fix memory leak in LinearAllocator used by Sample_TempObstacles 2016-04-03 22:39:33 +02:00
Ben Hymers
3eb9c808c1 Fix many cases of return values from ftell and fseek being ignored
These could lead to undefined behaviour if e.g. a negative value from ftell
was used to allocate memory.

Also store result of ftell in a long;
The result may previously have been truncated on some platforms
2016-03-15 08:02:06 +00:00