Expose a function to create textures from a native handle in the compatibility renderer
This commit is contained in:
parent
83d54ab2ad
commit
7d56b09f23
12 changed files with 255 additions and 15 deletions
|
|
@ -240,8 +240,8 @@ bool OpenXROpenGLExtension::get_swapchain_image_data(XrSwapchain p_swapchain, in
|
|||
Vector<RID> texture_rids;
|
||||
|
||||
for (uint64_t i = 0; i < swapchain_length; i++) {
|
||||
RID texture_rid = texture_storage->texture_create_external(
|
||||
p_array_size == 1 ? GLES3::Texture::TYPE_2D : GLES3::Texture::TYPE_LAYERED,
|
||||
RID texture_rid = texture_storage->texture_create_from_native_handle(
|
||||
p_array_size == 1 ? RS::TEXTURE_TYPE_2D : RS::TEXTURE_TYPE_LAYERED,
|
||||
format,
|
||||
images[i].image,
|
||||
p_width,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue