Fix compilation
This commit is contained in:
parent
04d15fe843
commit
5e066fa7cd
@ -106,9 +106,9 @@ void VoxelMesherBlocky::build(VoxelMesher::Output &output, const VoxelMesher::In
|
||||
// That means we can use raw pointers to voxel data inside instead of using the higher-level getters,
|
||||
// and then save a lot of time.
|
||||
|
||||
ERR_FAIL_COND(buffer.get_channel_depth(channel) != VoxelBuffer::DEPTH_8_BIT);
|
||||
ERR_FAIL_COND(buffer.get_channel_compression(channel) != VoxelBuffer::COMPRESSION_NONE);
|
||||
const uint8_t *type_buffer = buffer.get_channel_raw(channel);
|
||||
ERR_FAIL_COND(voxels.get_channel_depth(channel) != VoxelBuffer::DEPTH_8_BIT);
|
||||
ERR_FAIL_COND(voxels.get_channel_compression(channel) != VoxelBuffer::COMPRESSION_NONE);
|
||||
const uint8_t *type_buffer = voxels.get_channel_raw(channel);
|
||||
/* _
|
||||
// | \
|
||||
// /\ \\
|
||||
|
@ -64,7 +64,7 @@ const std::vector<uint8_t> &VoxelBlockSerializer::serialize(VoxelBuffer &voxel_b
|
||||
int v = voxel_buffer.get_voxel(Vector3i(), channel_index);
|
||||
f->store_8((uint8_t)v);
|
||||
// TODO Support for larger depths
|
||||
if (VoxelBuffer::get_depth_bit_count(voxel_buffer.get_channel_depth(channel_index) > 8)) {
|
||||
if (VoxelBuffer::get_depth_bit_count(voxel_buffer.get_channel_depth(channel_index)) > 8) {
|
||||
ERR_PRINT("Uniform compression serialization doesn't support more than 8 bit depth");
|
||||
}
|
||||
} break;
|
||||
|
@ -785,7 +785,7 @@ VoxelBuffer::Depth VoxelBuffer::get_channel_depth(unsigned int channel_index) co
|
||||
return _channels[channel_index].depth;
|
||||
}
|
||||
|
||||
uint32_t VoxelBuffer::get_depth_bit_count(Depth d) const {
|
||||
uint32_t VoxelBuffer::get_depth_bit_count(Depth d) {
|
||||
return ::get_depth_bit_count(d);
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,7 @@ public:
|
||||
return _size.x * _size.y * _size.z;
|
||||
}
|
||||
|
||||
// TODO Return an ArraySlice
|
||||
uint8_t *get_channel_raw(unsigned int channel_index, uint32_t *out_size_in_bytes = nullptr) const;
|
||||
|
||||
void downscale_to(VoxelBuffer &dst, Vector3i src_min, Vector3i src_max, Vector3i dst_min) const;
|
||||
@ -115,7 +116,7 @@ public:
|
||||
|
||||
void set_channel_depth(unsigned int channel_index, Depth new_depth);
|
||||
Depth get_channel_depth(unsigned int channel_index) const;
|
||||
static uint32_t get_depth_bit_count(Depth d) const;
|
||||
static uint32_t get_depth_bit_count(Depth d);
|
||||
|
||||
// TODO Make this work, would be awesome for perf
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user