mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Don't delete GL textures created by WebXR
This commit is contained in:
parent
0d77e0f6cf
commit
dfc641d648
2 changed files with 38 additions and 4 deletions
|
@ -229,7 +229,7 @@ impl XRWebGLLayer {
|
|||
// TODO: Cache this texture
|
||||
let color_texture_id =
|
||||
WebGLTextureId::maybe_new(sub_images.sub_image.as_ref()?.color_texture)?;
|
||||
let color_texture = WebGLTexture::new(context, color_texture_id);
|
||||
let color_texture = WebGLTexture::new_webxr(context, color_texture_id);
|
||||
let target = self.texture_target();
|
||||
|
||||
// Save the current bindings
|
||||
|
@ -263,7 +263,7 @@ impl XRWebGLLayer {
|
|||
if let Some(id) = sub_images.sub_image.as_ref()?.depth_stencil_texture {
|
||||
// TODO: Cache this texture
|
||||
let depth_stencil_texture_id = WebGLTextureId::maybe_new(id)?;
|
||||
let depth_stencil_texture = WebGLTexture::new(context, depth_stencil_texture_id);
|
||||
let depth_stencil_texture = WebGLTexture::new_webxr(context, depth_stencil_texture_id);
|
||||
framebuffer
|
||||
.texture2d_even_if_opaque(
|
||||
constants::DEPTH_STENCIL_ATTACHMENT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue