From 4d55a541256b86a68daad9f2d18b900eaf57924b Mon Sep 17 00:00:00 2001 From: Martin Valigursky Date: Fri, 6 Dec 2024 12:43:54 +0000 Subject: [PATCH] [Fix] Exposed PIXELFORMAT_R8 format for locking --- src/platform/graphics/constants.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/graphics/constants.js b/src/platform/graphics/constants.js index 7a52d8a1627..373df391c57 100644 --- a/src/platform/graphics/constants.js +++ b/src/platform/graphics/constants.js @@ -932,7 +932,7 @@ export const PIXELFORMAT_R16F = 50; export const PIXELFORMAT_RG16F = 51; /** - * 8-bit per-channel unsigned integer (R) format. + * 8-bit per-channel (R) format. * * @type {number} * @category Graphics @@ -940,7 +940,7 @@ export const PIXELFORMAT_RG16F = 51; export const PIXELFORMAT_R8 = 52; /** - * 8-bit per-channel unsigned integer (RG) format. + * 8-bit per-channel (RG) format. * * @type {number} * @category Graphics @@ -1238,6 +1238,7 @@ export const getPixelFormatArrayType = (format) => { case PIXELFORMAT_RGB16F: case PIXELFORMAT_RGBA16F: return Uint16Array; + case PIXELFORMAT_R8: case PIXELFORMAT_R8I: case PIXELFORMAT_RG8I: case PIXELFORMAT_RGBA8I: