From 2051ae3eabb71277b813cc5a36e2eff5e237129c Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Wed, 16 Dec 2020 13:04:40 -0800 Subject: [PATCH] State that opaque textures are always initialized at the start of the frame --- webxrlayers-1.bs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/webxrlayers-1.bs b/webxrlayers-1.bs index 1a247f5..3a3050d 100644 --- a/webxrlayers-1.bs +++ b/webxrlayers-1.bs @@ -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=]. + + + + + + + + + + + + + + + + + + + + + + +
BufferClear Value
Color(0, 0, 0, 0)
Depth1.0
Stencil0
+ 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.