1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Expose a function to create textures from a native handle in the compatibility renderer

This commit is contained in:
David Snopek
2024-09-12 12:54:57 -05:00
parent 83d54ab2ad
commit 7d56b09f23
12 changed files with 255 additions and 15 deletions

View File

@@ -561,8 +561,8 @@ RID WebXRInterfaceJS::_get_texture(unsigned int p_texture_id) {
uint32_t view_count = godot_webxr_get_view_count();
Size2 texture_size = get_render_target_size();
RID texture = texture_storage->texture_create_external(
view_count == 1 ? GLES3::Texture::TYPE_2D : GLES3::Texture::TYPE_LAYERED,
RID texture = texture_storage->texture_create_from_native_handle(
view_count == 1 ? RS::TEXTURE_TYPE_2D : RS::TEXTURE_TYPE_LAYERED,
Image::FORMAT_RGBA8,
p_texture_id,
(int)texture_size.width,