You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: webxrlayers-1.bs
+8-1
Original file line number
Diff line number
Diff line change
@@ -867,7 +867,8 @@ An [=opaque texture=] functions identically to a standard {{WebGLTexture}} with
867
867
- An [=opaque texture=] MUST behave as though it was allocated with [=texStorage2D=] or [=texStorage3D=], as appropriate, even when using a WebGL 1.0 context.
868
868
- A call to {{deleteTexture}} with an [=opaque texture=] MUST generate an {{INVALID_OPERATION}} error.
869
869
870
-
The buffers attached to an [=opaque texture=] MUST be cleared to the values in the table below during the processing of the first call to {{XRWebGLBinding/getViewSubImage()}} or {{XRWebGLBinding/getSubImage()}} in each [=XR animation frame=].
870
+
The buffers attached to an [=opaque texture=] MUST be cleared to the values in the table below during the processing of the first call to {{XRWebGLBinding/getViewSubImage()}} or {{XRWebGLBinding/getSubImage()}} in each [=XR animation frame=] when {{XRProjectionLayerInit/clearOnAccess}} is <code>true</code>.
871
+
If {{XRProjectionLayerInit/clearOnAccess}} is <code>false</code>, the buffers attached to an [=opaque texture=] MUST be cleared the first time that they are accessed. Subsequent accesses in later frames MAY NOT clear the buffers.
@@ -962,6 +964,8 @@ For {{WebGL2RenderingContext}} contexts these additional formats are supported:
962
964
The <dfn dict-member for="XRProjectionLayerInit">scaleFactor</dfn> attribute defines the value that the |session|'s
963
965
[=recommended WebGL framebuffer resolution=] MUST be multiplied by determining the resolution of the layer's attachments.
964
966
967
+
The <dfn dict-member for="XRProjectionLayerInit">clearOnAccess</dfn> attribute defines if the texture associated with this layer should be cleared in the initial frame or on every frame.
968
+
965
969
NOTE: the {{XRProjectionLayerInit}} dictionary does not have support to configure {{XRLayerInit/mipLevels}} like
966
970
{{XRLayerInit}}. If a user agent wants to support mipmapping on projection layers, it is free to allocate the texture with mips.
967
971
In that case the user agent (and not the author) is responsible for generating all the mip levels.
@@ -981,6 +985,7 @@ dictionary XRLayerInit {
981
985
required unsigned long viewPixelHeight;
982
986
XRLayerLayout layout = "mono";
983
987
boolean isStatic = false;
988
+
boolean clearOnAccess = true;
984
989
};
985
990
</pre>
986
991
@@ -1034,6 +1039,8 @@ the rectangular dimensions of the {{XRCompositionLayer}}.
1034
1039
1035
1040
The <dfn dict-member for="XRLayerInit">layout</dfn> attribute defines the layout of the layer.
1036
1041
1042
+
The <dfn dict-member for="XRLayerInit">clearOnAccess</dfn> attribute defines if the texture associated with this layer should be cleared in the initial frame or on every frame.
0 commit comments