Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all XRWebGLLayerInit parameters (alpha, antialias, ignoreDepthValues) #24187

Open
Manishearth opened this issue Sep 11, 2019 · 2 comments
Labels
A-xr-spec-complete Things necessary to support the full WebXR spec A-xr-zomg AR/VR/MR

Comments

@Manishearth
Copy link
Member

Manishearth commented Sep 11, 2019

XRWebGLLayerInit has a bunch of parameters which we don't yet support (we only support depth and stencil).

cc @asajeffrey

@Manishearth Manishearth added A-xr-zomg AR/VR/MR A-xr-spec-complete Things necessary to support the full WebXR spec labels Sep 11, 2019
@asajeffrey
Copy link
Member

Aren't depth and stencil already covered by

if init.depth || init.stencil {
let (internal_format, attachment) = if init.depth && init.stencil {
clear_bits |= constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT;
(
constants::DEPTH_STENCIL,
constants::DEPTH_STENCIL_ATTACHMENT,
)
} else if init.depth {
clear_bits |= constants::DEPTH_BUFFER_BIT;
(constants::DEPTH_COMPONENT16, constants::DEPTH_ATTACHMENT)
} else {
clear_bits |= constants::STENCIL_BUFFER_BIT;
(constants::STENCIL_INDEX8, constants::STENCIL_ATTACHMENT)
};
context.BindRenderbuffer(constants::RENDERBUFFER, Some(&render_buffer));
context.RenderbufferStorage(
constants::RENDERBUFFER,
internal_format,
resolution.width,
resolution.height,
);
context.FramebufferRenderbuffer(
constants::FRAMEBUFFER,
attachment,
constants::RENDERBUFFER,
Some(&render_buffer),
);
}
?

@Manishearth Manishearth changed the title Support all XRWebGLLayerInit parameters (alpha, depth, stencil, etc) Support all XRWebGLLayerInit parameters (alpha, antialias, ignoreDepthValues) Sep 11, 2019
@Manishearth
Copy link
Member Author

ah, fair, updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-xr-spec-complete Things necessary to support the full WebXR spec A-xr-zomg AR/VR/MR
Projects
None yet
Development

No branches or pull requests

2 participants