Skip to content

Clarify that opaque textures are always initialized at the start of the frame #234

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

Merged
merged 2 commits into from
Dec 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
State that opaque textures are always initialized at the start of the…
… frame
  • Loading branch information
cabanier committed Dec 16, 2020
commit 2051ae3eabb71277b813cc5a36e2eff5e237129c
25 changes: 25 additions & 0 deletions webxrlayers-1.bs
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,31 @@ An [=opaque texture=] functions identically to a standard {{WebGLTexture}} with
- An [=opaque texture=] MUST behave as though it was allocated with [=texStorage2D=] or [=texStorage3D=], as appropriate, even when using a WebGL 1.0 context.
- A call to {{deleteTexture}} with an [=opaque texture=] MUST generate an {{INVALID_OPERATION}} error.

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=].

<table class="tg">
<thead>
<tr>
<th>Buffer</th>
<th>Clear Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Color</td>
<td>(0, 0, 0, 0)</td>
</tr>
<tr>
<td>Depth</td>
<td>1.0</td>
</tr>
<tr>
<td>Stencil</td>
<td>0</td>
</tr>
</tbody>
</table>

NOTE: the [=opaque texture|opaque textures=] are allocated when the layer is contructed using the
[=allocate color textures=] and [=allocate depth textures=] algoritms. The side effect of this pre-allocation is that calling
{{XRWebGLBinding/getSubImage()}} and {{XRWebGLBinding/getViewSubImage()}} with the same parameters will always return the same texture objects.
Expand Down