Commit Graph

816 Commits (f61758b47602fcbe3b4f0556e415dd891274e7ce)

Author SHA1 Message Date
Marc f61758b476
Merge branch 'master' into master 2021-01-21 23:50:59 +00:00
Marc Gilleron 15e61086bb Attempt to workaround folding problem 2021-01-21 22:41:57 +00:00
Marc Gilleron fb6e76a038 Rename "docs" folder "source" 2021-01-21 22:40:53 +00:00
Marc Gilleron 354f0fdb0d Ignore Godot log files that sometimes get saved in doc/tools when running scripts from here 2021-01-21 20:05:53 +00:00
Marc Gilleron ce198c2670 Some doc 2021-01-21 20:04:53 +00:00
Marc Gilleron 4ef4da180c Saving generator output is no longer enabled by default. Now only changes may be saved. 2021-01-21 19:40:26 +00:00
Marc Gilleron 0713016d9c Fix missing result in emerge_block() 2021-01-21 19:39:57 +00:00
Marc Gilleron 8a0d2983c4 Update readme with new docs 2021-01-21 19:04:28 +00:00
Marc Gilleron dc7550114f Fix typo in .md link 2021-01-21 01:23:50 +00:00
Marc Gilleron aff0844812 Add readthedocs file 2021-01-21 00:44:02 +00:00
Marc Gilleron 1bb6eb79fa New documentation (some things left to do but most of it is updated) 2021-01-21 00:37:01 +00:00
Marc Gilleron 8bdd862262 Fix ambiguous type deduction 2021-01-18 22:45:41 +00:00
Marc Gilleron fc51984f7f Use unsigned integer to fix signed/unsigned comparison warnings 2021-01-18 22:21:44 +00:00
Marc Gilleron 41600e4226 Fix shadowed variable 2021-01-18 22:20:57 +00:00
Marc Gilleron 89d1979a73 Remove forgotten locks 2021-01-18 22:20:19 +00:00
Marc Gilleron 493dbf26dd Fix use of enum returns instead of boolean 2021-01-18 19:42:28 +00:00
Marc Gilleron 68a8acac73 Updated code guidelines 2021-01-18 18:58:41 +00:00
Marc Gilleron 23765f7c20 Merge branch 'master' into multithreaded_generators 2021-01-18 18:55:18 +00:00
Marc Gilleron e6e7fb8b70 Update changelog 2021-01-18 18:55:12 +00:00
Marc Gilleron 699aeeac90 Added RonanZe 2021-01-18 18:53:55 +00:00
Marc Gilleron 24c2d88e8e Comments 2021-01-18 18:47:37 +00:00
Marc Gilleron 46d1b78724 Added region file debug checks 2021-01-17 22:22:42 +00:00
Marc Gilleron 3a0ebc73a7 Request saving of generated blocks if the option is enabled in VoxelStream 2021-01-17 22:22:10 +00:00
Marc Gilleron a3bad1af64 Register `VoxelToolBuffer` because otherwise it gets initialized lazily, causing crashes in threads 2021-01-17 22:18:41 +00:00
Marc Gilleron fcd9284edf Fix SphereHeightmap node 2021-01-17 20:02:40 +00:00
Marc Gilleron f54b152e2d Reduce locking of VoxelGeneratorGraph.
Generation hold its own shared pointer. If the user recompiles the graph,
the runtime is replaced with a new one, while the generator can finish
its current block with the old runtime without locking.
2021-01-17 20:02:06 +00:00
Marc Gilleron 67b1a2b86f Fixed image locking 2021-01-17 19:59:20 +00:00
Marc Gilleron 6075476fd8 Fix wrong variable, caused null access 2021-01-17 18:27:38 +00:00
Marc Gilleron a90e520416 Formatting 2021-01-17 17:23:49 +00:00
Marc Gilleron 4ec60074bb Refactor generators and streams
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron fb1442e444 Fix constants not reset between two prepares, caused broken terrain after changing the generator 2021-01-17 16:58:56 +00:00
Marc Gilleron aca2c2cb94 Fix missing RWLock creation in VoxelGeneratorWaves 2021-01-16 23:19:54 +00:00
Marc Gilleron 7940b3b761 Made VoxelGeneratorGraph thread-safe 2021-01-16 13:51:01 +00:00
Marc Gilleron a0941cea83 Made all simple generators thread-safe 2021-01-16 13:41:46 +00:00
Marc Gilleron 082cdf3e16 Allow ArraySlices to be empty 2021-01-16 13:37:41 +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
Marc Gilleron 94810f4d04 Rename statistic property back to its old name, I think it didnt need to change 2021-01-16 13:05:50 +00:00
Marc Gilleron 029e364007 Update changelog 2021-01-16 13:00:55 +00:00
Marc Gilleron 66141be0b3 Fix one more GCC warning 2021-01-09 20:33:39 +00:00
Marc Gilleron a96a377953 Fix reference to temporary I guess, detected by GCC only 2021-01-09 20:23:51 +00:00
Marc Gilleron 22bd0d5091 Fix shadowing issue, also inlined function used in only one place 2021-01-09 20:22:37 +00:00
Marc Gilleron 93b4e6803a Remove unused variables 2021-01-09 20:21:51 +00:00
Marc Gilleron 3a7f99643d Fix more signed/unsigned warnings 2021-01-09 20:21:09 +00:00
Marc Gilleron 4686735f00 Fix pseudo-shadowing detected by GCC 2021-01-09 19:51:58 +00:00
Marc Gilleron cf83aca282 Fix signed/unsigned comparisons 2021-01-09 19:49:11 +00:00
Marc Gilleron 494512a424 Fix initialization order 2021-01-09 19:34:03 +00:00
Marc Gilleron 348618d605 Fix wrong variable name 2021-01-09 19:33:48 +00:00
Marc Gilleron 1bb3d19e03 Use buffers to generate previews 2021-01-09 18:35:53 +00:00
Marc Gilleron b2ca66e714 Fix Smoothstep node, params were not initialized 2021-01-09 16:36:09 +00:00
Marc Gilleron 973cf729cd Added FastNoise2 for SIMD noise, but it won't be integrated yet.
It requires C++17, while Godot uses C++14. I was unable to override it,
and I'm not sure how compatible this will be with the runtime.
At least this would be doable in Godot 4.
2021-01-09 16:35:40 +00:00