mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
webxr: Use the same texture format as the original GL context's framebuffer when creating an XR GL layer.
This commit is contained in:
parent
778b48fa47
commit
5bd1e86d42
6 changed files with 43 additions and 17 deletions
|
@ -110,16 +110,18 @@ impl XRWebGLLayer {
|
|||
let mut pixels = CustomAutoRooter::new(None);
|
||||
let mut clear_bits = constants::COLOR_BUFFER_BIT;
|
||||
|
||||
let formats = context.formats();
|
||||
|
||||
context.BindTexture(constants::TEXTURE_2D, Some(&texture));
|
||||
let sc = context.TexImage2D(
|
||||
constants::TEXTURE_2D,
|
||||
0,
|
||||
constants::RGBA,
|
||||
formats.texture_format,
|
||||
resolution.width,
|
||||
resolution.height,
|
||||
0,
|
||||
constants::RGBA,
|
||||
constants::UNSIGNED_BYTE,
|
||||
formats.texture_format,
|
||||
formats.texture_type,
|
||||
pixels.root(*cx),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue