Skip to content

Commit fe516db

Browse files
authored
Merge pull request #234 from cabanier/texture-clear
Clarify that opaque textures are always initialized at the start of the frame
2 parents 5455595 + 2051ae3 commit fe516db

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

webxrlayers-1.bs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,31 @@ An [=opaque texture=] functions identically to a standard {{WebGLTexture}} with
782782
- An [=opaque texture=] MUST behave as though it was allocated with [=texStorage2D=] or [=texStorage3D=], as appropriate, even when using a WebGL 1.0 context.
783783
- A call to {{deleteTexture}} with an [=opaque texture=] MUST generate an {{INVALID_OPERATION}} error.
784784

785+
The buffers attached to an [=opaque texture=] MUST be cleared to the values in the table below prior to the processing of each [=XR animation frame=].
786+
787+
<table class="tg">
788+
<thead>
789+
<tr>
790+
<th>Buffer</th>
791+
<th>Clear Value</th>
792+
</tr>
793+
</thead>
794+
<tbody>
795+
<tr>
796+
<td>Color</td>
797+
<td>(0, 0, 0, 0)</td>
798+
</tr>
799+
<tr>
800+
<td>Depth</td>
801+
<td>1.0</td>
802+
</tr>
803+
<tr>
804+
<td>Stencil</td>
805+
<td>0</td>
806+
</tr>
807+
</tbody>
808+
</table>
809+
785810
NOTE: the [=opaque texture|opaque textures=] are allocated when the layer is contructed using the
786811
[=allocate color textures=] and [=allocate depth textures=] algoritms. The side effect of this pre-allocation is that calling
787812
{{XRWebGLBinding/getSubImage()}} and {{XRWebGLBinding/getViewSubImage()}} with the same parameters will always return the same texture objects.

0 commit comments

Comments
 (0)