Merge pull request #118242 from BlueCube3310/draw-tex-set-type

Properly set `drawable_type` property in RenderingServer's `DrawableTexture`
This commit is contained in:
Thaddeus Crews
2026-04-13 15:52:15 -05:00
2 changed files with 2 additions and 0 deletions
@@ -1237,6 +1237,7 @@ void TextureStorage::texture_drawable_initialize(RID p_texture, int p_width, int
texture.alloc_height = texture.height;
texture.mipmaps = image->get_mipmap_count() + 1;
texture.format = image->get_format();
texture.drawable_type = p_format;
texture.type = Texture::TYPE_2D;
texture.target = GL_TEXTURE_2D;
_get_gl_image_and_format(Ref<Image>(), texture.format, texture.real_format, texture.gl_format_cache, texture.gl_internal_format_cache, texture.gl_type_cache, texture.compressed, false);
@@ -1294,6 +1294,7 @@ void TextureStorage::texture_drawable_initialize(RID p_texture, int p_width, int
texture.depth = 1;
texture.format = image->get_format();
texture.validated_format = image->get_format();
texture.drawable_type = p_format;
texture.rd_type = RD::TEXTURE_TYPE_2D;
texture.rd_format = ret_format.format;