From 6104eb5a9c03f1d61f2974af4254ee6919eb4dc2 Mon Sep 17 00:00:00 2001 From: wangshibo Date: Wed, 12 Jun 2024 15:17:25 +0800 Subject: [PATCH] feat: add STENCIL_INDEX8 --- webgl-memory.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webgl-memory.js b/webgl-memory.js index 5fbd1cc..c7bfbe2 100644 --- a/webgl-memory.js +++ b/webgl-memory.js @@ -80,6 +80,8 @@ const SRGB_ALPHA_EXT = 0x8C42; + const STENCIL_INDEX8 = 0x8D48; + /** * @typedef {Object} TextureFormatDetails * @property {number} textureFormat format to pass texImage2D and similar functions. @@ -162,6 +164,8 @@ t[DEPTH24_STENCIL8] = { bytesPerElement: [4], }; t[DEPTH32F_STENCIL8] = { bytesPerElement: [4], }; + t[STENCIL_INDEX8] = { bytesPerElement: [1], }; + s_textureInternalFormatInfo = t; } return s_textureInternalFormatInfo[internalFormat];