4ec60074bb
- 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
23 lines
549 B
C++
23 lines
549 B
C++
#ifndef VOXEL_STREAM_FILE_H
|
|
#define VOXEL_STREAM_FILE_H
|
|
|
|
#include "voxel_block_serializer.h"
|
|
#include "voxel_stream.h"
|
|
|
|
class FileAccess;
|
|
|
|
// TODO Might be removed in the future, it doesn't add much.
|
|
|
|
// Helper common base for some file streams.
|
|
class VoxelStreamFile : public VoxelStream {
|
|
GDCLASS(VoxelStreamFile, VoxelStream)
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
FileAccess *open_file(const String &fpath, int mode_flags, Error *err);
|
|
|
|
static thread_local VoxelBlockSerializerInternal _block_serializer;
|
|
};
|
|
|
|
#endif // VOXEL_STREAM_FILE_H
|