You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Add resize_initialized and resize_uninitialized to Vector. These functions serve as replacements for resize, to make sure the caller understands whether elements need to be initialized 'by hand' after the call.
This commit is contained in:
@@ -437,7 +437,7 @@ void Fog::VolumetricFog::init(const Vector3i &fog_size, RID p_sky_shader) {
|
||||
|
||||
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
|
||||
Vector<uint8_t> dm;
|
||||
dm.resize_zeroed(fog_size.x * fog_size.y * fog_size.z * 4);
|
||||
dm.resize_initialized(fog_size.x * fog_size.y * fog_size.z * 4);
|
||||
|
||||
density_map = RD::get_singleton()->storage_buffer_create(dm.size(), dm);
|
||||
RD::get_singleton()->set_resource_name(density_map, "Fog density map");
|
||||
|
||||
Reference in New Issue
Block a user