diff options
Diffstat (limited to 'servers/rendering')
7 files changed, 18 insertions, 18 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp index 43a4058ab6..be1642998c 100644 --- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp @@ -1862,7 +1862,7 @@ void RendererSceneGIRD::SDFGI::render_region(RID p_render_buffers, int p_region, #if 0 Vector<uint8_t> data = RD::get_singleton()->texture_get_data(cascades[cascade].sdf, 0); Ref<Image> img; - img.instance(); + img.instantiate(); for (uint32_t i = 0; i < cascade_size; i++) { Vector<uint8_t> subarr = data.subarray(128 * 128 * i, 128 * 128 * (i + 1) - 1); img->create(cascade_size, cascade_size, false, Image::FORMAT_L8, subarr); @@ -1875,7 +1875,7 @@ void RendererSceneGIRD::SDFGI::render_region(RID p_render_buffers, int p_region, #if 0 Vector<uint8_t> data = RD::get_singleton()->texture_get_data(render_albedo, 0); Ref<Image> img; - img.instance(); + img.instantiate(); for (uint32_t i = 0; i < cascade_size; i++) { Vector<uint8_t> subarr = data.subarray(128 * 128 * i * 2, 128 * 128 * (i + 1) * 2 - 1); img->createcascade_size, cascade_size, false, Image::FORMAT_RGB565, subarr); diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index be98fb42c0..089651cbfb 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -486,7 +486,7 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba color.b *= env->bg_energy; Ref<Image> ret; - ret.instance(); + ret.instantiate(); ret->create(p_size.width, p_size.height, false, Image::FORMAT_RGBAF); for (int i = 0; i < p_size.width; i++) { for (int j = 0; j < p_size.height; j++) { @@ -4174,7 +4174,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto { PackedByteArray data = RD::get_singleton()->texture_get_data(albedo_alpha_tex, 0); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(p_image_size.width, p_image_size.height, false, Image::FORMAT_RGBA8, data); RD::get_singleton()->free(albedo_alpha_tex); ret.push_back(img); @@ -4183,7 +4183,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto { PackedByteArray data = RD::get_singleton()->texture_get_data(normal_tex, 0); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(p_image_size.width, p_image_size.height, false, Image::FORMAT_RGBA8, data); RD::get_singleton()->free(normal_tex); ret.push_back(img); @@ -4192,7 +4192,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto { PackedByteArray data = RD::get_singleton()->texture_get_data(orm_tex, 0); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(p_image_size.width, p_image_size.height, false, Image::FORMAT_RGBA8, data); RD::get_singleton()->free(orm_tex); ret.push_back(img); @@ -4201,7 +4201,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto { PackedByteArray data = RD::get_singleton()->texture_get_data(emission_tex, 0); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(p_image_size.width, p_image_size.height, false, Image::FORMAT_RGBAH, data); RD::get_singleton()->free(emission_tex); ret.push_back(img); diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp index 1aa01dd16e..2082ac9150 100644 --- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp @@ -628,7 +628,7 @@ Ref<Image> RendererSceneSkyRD::Sky::bake_panorama(RendererStorageRD *p_storage, RD::get_singleton()->free(rad_tex); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(p_size.width, p_size.height, false, Image::FORMAT_RGBAF, data); for (int i = 0; i < p_size.width; i++) { for (int j = 0; j < p_size.height; j++) { diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 246b5f0e4c..b95647b8b7 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -972,7 +972,7 @@ void RendererStorageRD::texture_2d_placeholder_initialize(RID p_texture) { //this could be better optimized to reuse an existing image , done this way //for now to get it working Ref<Image> image; - image.instance(); + image.instantiate(); image->create(4, 4, false, Image::FORMAT_RGBA8); for (int i = 0; i < 4; i++) { @@ -988,7 +988,7 @@ void RendererStorageRD::texture_2d_layered_placeholder_initialize(RID p_texture, //this could be better optimized to reuse an existing image , done this way //for now to get it working Ref<Image> image; - image.instance(); + image.instantiate(); image->create(4, 4, false, Image::FORMAT_RGBA8); for (int i = 0; i < 4; i++) { @@ -1014,7 +1014,7 @@ void RendererStorageRD::texture_3d_placeholder_initialize(RID p_texture) { //this could be better optimized to reuse an existing image , done this way //for now to get it working Ref<Image> image; - image.instance(); + image.instantiate(); image->create(4, 4, false, Image::FORMAT_RGBA8); for (int i = 0; i < 4; i++) { @@ -1044,7 +1044,7 @@ Ref<Image> RendererStorageRD::texture_2d_get(RID p_texture) const { Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); ERR_FAIL_COND_V(data.size() == 0, Ref<Image>()); Ref<Image> image; - image.instance(); + image.instantiate(); image->create(tex->width, tex->height, tex->mipmaps > 1, tex->validated_format, data); ERR_FAIL_COND_V(image->is_empty(), Ref<Image>()); if (tex->format != tex->validated_format) { @@ -1067,7 +1067,7 @@ Ref<Image> RendererStorageRD::texture_2d_layer_get(RID p_texture, int p_layer) c Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, p_layer); ERR_FAIL_COND_V(data.size() == 0, Ref<Image>()); Ref<Image> image; - image.instance(); + image.instantiate(); image->create(tex->width, tex->height, tex->mipmaps > 1, tex->validated_format, data); ERR_FAIL_COND_V(image->is_empty(), Ref<Image>()); if (tex->format != tex->validated_format) { @@ -1095,7 +1095,7 @@ Vector<Ref<Image>> RendererStorageRD::texture_3d_get(RID p_texture) const { Vector<uint8_t> sub_region = all_data.subarray(bs.offset, bs.offset + bs.buffer_size - 1); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(bs.size.width, bs.size.height, false, tex->validated_format, sub_region); ERR_FAIL_COND_V(img->is_empty(), Vector<Ref<Image>>()); if (tex->format != tex->validated_format) { diff --git a/servers/rendering/renderer_scene_occlusion_cull.cpp b/servers/rendering/renderer_scene_occlusion_cull.cpp index c491ccbe7a..54795f32a7 100644 --- a/servers/rendering/renderer_scene_occlusion_cull.cpp +++ b/servers/rendering/renderer_scene_occlusion_cull.cpp @@ -172,7 +172,7 @@ RID RendererSceneOcclusionCull::HZBuffer::get_debug_texture() { } if (debug_image.is_null()) { - debug_image.instance(); + debug_image.instantiate(); } unsigned char *ptrw = debug_data.ptrw(); diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 056cec4c1f..ddf2ee9fe3 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -143,7 +143,7 @@ Ref<RDShaderBytecode> RenderingDevice::_shader_compile_from_source(const Ref<RDS ERR_FAIL_COND_V(p_source.is_null(), Ref<RDShaderBytecode>()); Ref<RDShaderBytecode> bytecode; - bytecode.instance(); + bytecode.instantiate(); for (int i = 0; i < RD::SHADER_STAGE_MAX; i++) { String error; diff --git a/servers/rendering/rendering_device_binds.cpp b/servers/rendering/rendering_device_binds.cpp index 2f11360364..2652edb1bc 100644 --- a/servers/rendering/rendering_device_binds.cpp +++ b/servers/rendering/rendering_device_binds.cpp @@ -156,7 +156,7 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String } Ref<RDShaderFile> shader_file; - shader_file.instance(); + shader_file.instantiate(); if (base_error == "") { if (stage_found[RD::SHADER_STAGE_COMPUTE] && stages_found > 1) { @@ -173,7 +173,7 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String for (Map<StringName, String>::Element *E = version_texts.front(); E; E = E->next()) { Ref<RDShaderBytecode> bytecode; - bytecode.instance(); + bytecode.instantiate(); for (int i = 0; i < RD::SHADER_STAGE_MAX; i++) { String code = stage_code[i]; |