From f3f5f7a8243ad1faf981650e48e3ab5395daa244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Bruy=C3=A8re?= Date: Wed, 19 Jun 2024 14:15:56 +0200 Subject: [PATCH] fix(CABO): Fix cell id in cell cell array buffer object Take cell offset into account to compute the cell ID --- Sources/Rendering/OpenGL/CellArrayBufferObject/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Rendering/OpenGL/CellArrayBufferObject/index.js b/Sources/Rendering/OpenGL/CellArrayBufferObject/index.js index 85d8c9dae52..4319e71891d 100644 --- a/Sources/Rendering/OpenGL/CellArrayBufferObject/index.js +++ b/Sources/Rendering/OpenGL/CellArrayBufferObject/index.js @@ -375,7 +375,7 @@ function vtkOpenGLCellArrayBufferObject(publicAPI, model) { // Browse the cell array: the index is at the beginning of a cell // The value of 'array' at the position 'index' is the number of points in the cell for (let index = 0; index < size; index += array[index] + 1, cellCount++) { - func(array[index], array, index + 1, cellCount); + func(array[index], array, index + 1, cellCount + options.cellOffset); } model.elementCount = caboCount; publicAPI.upload(packedVBO, ObjectType.ARRAY_BUFFER);