8 Commits

Author SHA1 Message Date
Marc Gilleron
5965bcf98f FileLocker doesn't depend on Godot 2022-04-19 00:58:29 +01:00
Marc Gilleron
4e3d4d4ed8 Threading classes wrappers 2022-04-19 00:32:37 +01:00
Marc Gilleron
87d98e9162 Engine-agnostic error macros 2022-04-11 02:10:44 +01:00
Marc Gilleron
66fb239d80 Renamed VoxelFileLocker => FileLocker and namespaced 2021-12-29 19:22:59 +00:00
Marc Gilleron
922f361cb0 Made it compile in Godot 4
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
lhinuz
3430c3cf9f
Update file_locker.h
Missing file pointer convert.
2021-03-12 08:34:57 +08:00
Marc Gilleron
f1e2ea9ad4 Update to latest Godot's threading primitives 2021-02-19 01:30:22 +00:00
Marc Gilleron
89750a20f8 Made file streams thread-safe (but still won't be used in more than one thread)
- Added a global file locker so threads can synchronize when accessing files
- Added mutexes to serialize access to file streams (i.e to call in series)
- VoxelStream API now expects implementations to be thread-safe
- Did some logic/data separation in RegionFile in case we need an
  in-memory implementation, however I might just use SQLite in the
  future instead
2021-01-16 13:34:45 +00:00