-
Notifications
You must be signed in to change notification settings - Fork 375
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
Clarify semantics of preserveDrawingBuffer #891
Comments
We already defined that |
Er, doing a search for |
I thought we discussed it as part of #775 which that PR solved. |
I think the more general discussion around that was that the normal webgl context options are to be ignored, the only way to set them is through XRWebGLLayer, and if an option (like premultipliedAlpha) is not in XRWebGLLayerInit then there is no way to set it for XR. We could call this out more explicitly. |
Since WebXR inherits its WebGLContext from canvas, there will be a value for |
I think a core part of the confusion is that the canvas WebGL options are a mix of general context properties together with configuration for the default framebuffer used for canvas drawing. Even apart from WebXR, an offscreen framebuffer would have independent properties such as depth/alpha that don't inherit from the canvas creation attributes, and using premultiplied alpha would be an application choice for purely-internal buffers, it only needs to be specified as metadata for external interfaces. There was more discussion in webxr-ar-module issue 14 about this. Would it be feasible to update the canvas / WebGL spec to differentiate between general properties and configuration of the canvas-backing default framebuffer? This wouldn't require any API changes, the goal would just be a documentation update to avoid people expecting them to apply to non-default render buffers. |
We should just be explicit that we ignore preserveDrawingBuffer here (and perhaps others?) |
I agree. The spec should say that if a canvas is provided, all unsupported properties should revert to their default state. We called this out for |
This issue is fixed by PR #975 |
https://immersive-web.github.io/webxr/#opaque-framebuffer says
Implicitly, this means ignoring
preserveDrawingBuffer
, but perhaps this should be made explicit? Especially because this is not identical to WebGL!The text was updated successfully, but these errors were encountered: