Webgl / remove handling of element_index_uint extension

From now on we will assume this extension is always enabled.

An error message have been added in the unlikely scenario of a lack
of support.
This commit is contained in:
Olivier Guyot
2019-06-05 14:36:02 +02:00
parent 87d5f4c8bc
commit 2412fe0211
9 changed files with 20 additions and 65 deletions
+1 -2
View File
@@ -16,12 +16,11 @@ onmessage = event => {
const renderInstructions = new Float32Array(received.renderInstructions);
const customAttributesCount = received.customAttributesCount || 0;
const instructionsCount = POINT_INSTRUCTIONS_COUNT + customAttributesCount;
const useShort = received.useShortIndices;
const elementsCount = renderInstructions.length / instructionsCount;
const indicesCount = elementsCount * 6;
const verticesCount = elementsCount * 4 * (POINT_VERTEX_STRIDE + customAttributesCount);
const indexBuffer = useShort ? new Uint16Array(indicesCount) : new Uint32Array(indicesCount);
const indexBuffer = new Uint32Array(indicesCount);
const vertexBuffer = new Float32Array(verticesCount);
let bufferPositions = null;