Marc Gilleron
4353939eb4
Move region stuff to a folder
2021-01-31 16:51:42 +00:00
Marc Gilleron
7d0a4f3e78
Fix signedness warnings
2021-01-31 16:42:06 +00:00
Marc Gilleron
3c092771e9
Missing include
2021-01-31 16:32:03 +00:00
Marc Gilleron
fe49e70243
Fix property hint
2021-01-31 16:23:59 +00:00
Marc Gilleron
a0e7a3229c
Added compression header to make it reusable for other formats and more future proof
2021-01-31 15:47:36 +00:00
Marc Gilleron
0526c4e860
Fix cache not getting flushed correctly, causing saves to take too long
2021-01-31 15:26:15 +00:00
Marc Gilleron
db7fc640c1
Increased cache size, SQLite saving is slower than loading
2021-01-30 01:39:15 +00:00
Marc Gilleron
c6b169b978
Upgraded block serialized format, added some error handling
2021-01-30 01:36:37 +00:00
Marc Gilleron
158715922d
Fix retrieving from cache
...
It should have made a copy and the input should have been populated
instead of being replaced (because it wouldn't hold the ref)
2021-01-30 01:33:55 +00:00
Marc Gilleron
834f7fe090
Fix serialized blocks unable to save when using channel depth greater than 8 bits
2021-01-28 22:03:58 +00:00
Marc Gilleron
01e5e18922
Implemented VoxelStreamSQLite
2021-01-28 22:02:49 +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
493dbf26dd
Fix use of enum returns instead of boolean
2021-01-18 19:42:28 +00:00
Marc Gilleron
46d1b78724
Added region file debug checks
2021-01-17 22:22:42 +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
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
03f2900f6a
Fix error when a region file gets created, it was wrongly trying to migrate because the version wasn't set
2020-12-18 21:20:00 +00:00
Marc Gilleron
89abb37e0f
consts
2020-12-18 20:52:09 +00:00
Marc Gilleron
10d6e5bd8a
Script-based generators and streams have their own class, should fix C# API
2020-10-31 22:11:25 +00:00
Marc Gilleron
c6572142eb
Typo
2020-10-25 16:56:04 +00:00
Marc Gilleron
e31147b434
Fix one more GCC warning
2020-09-20 17:05:20 +01:00
Marc Gilleron
a462803929
Fix more GCC warnings
2020-09-20 16:33:00 +01:00
Marc Gilleron
39d56b2c17
Fix GCC warnings
2020-09-20 16:13:53 +01:00
Marc Gilleron
b10b647133
Separate region file logic so it can be used independently and add features to it.
...
This increases its version number to 3. Older files using version 2
are migrated to version 3 when a write operation is performed.
2020-09-19 21:50:23 +01:00
Marc Gilleron
6c80da0425
Moved VoxelBuffer and VoxelMemoryPool under storage/ directory
2020-09-14 19:33:02 +01:00
Marc Gilleron
168cd90295
Unused variable
2020-09-13 02:59:12 +01:00
Marc Gilleron
644ec60003
Fix missing return
2020-09-13 02:47:26 +01:00
Marc Gilleron
7064f6e471
Color palette support in .vox loader and Cubes mesher
2020-09-13 02:17:11 +01:00
Marc Gilleron
e1b9a25db7
Added utility class to load MagicaVoxel .vox files
2020-09-12 21:10:05 +01:00
Marc Gilleron
9ccf16419d
Merge branch 'master' into threading_refactor
...
# Conflicts:
# streams/voxel_block_serializer.cpp
# voxel_buffer.h
2020-09-08 21:40:59 +01:00
Marc Gilleron
e8d0800511
Unused code
2020-09-08 00:49:37 +01:00
Marc Gilleron
7405692f68
Unused code
2020-09-07 23:53:38 +01:00
Marc Gilleron
0922b92ace
Fix some GCC warnings and Clang error
2020-09-07 23:26:04 +01:00
Marc Gilleron
d81ffb95f4
Detect usage of Tracy, add some profiler scopes
2020-08-30 04:00:01 +01:00
Marc Gilleron
107f29c5d3
Removed old profiler
2020-08-29 23:20:51 +01:00
Marc Gilleron
56c2a0856a
Initial integration on VoxelTerrain with static camera, fixed a bunch of things
2020-08-25 23:00:38 +01:00
Marc Gilleron
1fe50b01d6
Added VoxelServer. Compiles, but isn't used anywhere yet
2020-08-24 01:49:23 +01:00
Marc Gilleron
23ce65d789
Show terrain in editor, with option to turn it off. A scripted stream will turn it off by default.
2020-08-14 20:33:09 +01:00
Marc Gilleron
845fa465b8
Put model information within a struct
2020-08-11 20:29:27 +01:00
Marc Gilleron
1a551fc77d
Added support for per-voxel and per-block metadata
2020-08-10 19:03:01 +01:00
Marc Gilleron
ac3e303818
Report script errors a bit better, I hope
2020-08-02 18:57:08 +01:00
Marc Gilleron
b95f47b018
Fix missing return value
2020-07-28 20:32:03 +01:00
Marc Gilleron
d96db0d329
Fix node config warning with file streams by using channels from the fallback stream
2020-07-26 18:42:17 +01:00
Marc Gilleron
f9e2d9cc12
Stop using NULL
2020-07-25 23:19:08 +01:00
Marc Gilleron
4991b682d9
Exposed block serializer
2020-07-25 21:56:23 +01:00
Marc Gilleron
071c5ee5c0
Fix channel depth not being applied to VoxelMap::get_buffer_copy()
2020-07-11 18:05:26 +01:00
Marc Gilleron
1a08cd31d6
Use a macro to print debug stuff only in verbose mode
2020-07-08 20:48:52 +01:00
Marc Gilleron
60d32ec006
Make stream and generator script methods optional, fixes errors in editor
2020-05-09 00:46:17 +01:00