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:
@@ -89,7 +89,7 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
vertexBuffer = new Float32Array(100);
|
||||
indexBuffer = new Uint16Array(100);
|
||||
indexBuffer = new Uint32Array(100);
|
||||
instructions = new Float32Array(100);
|
||||
elementIndex = 3;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import WebGLArrayBuffer, {getArrayClassForType} from '../../../../src/ol/webgl/B
|
||||
import {
|
||||
ARRAY_BUFFER,
|
||||
ELEMENT_ARRAY_BUFFER,
|
||||
EXTENSIONS as WEBGL_EXTENSIONS,
|
||||
STATIC_DRAW,
|
||||
STREAM_DRAW
|
||||
} from '../../../../src/ol/webgl.js';
|
||||
@@ -37,11 +36,6 @@ describe('ol.webgl.Buffer', function() {
|
||||
expect(getArrayClassForType(ARRAY_BUFFER)).to.be(Float32Array);
|
||||
expect(getArrayClassForType(ELEMENT_ARRAY_BUFFER)).to.be(Uint32Array);
|
||||
});
|
||||
|
||||
it('returns the correct typed array constructor (without OES uint extension)', function() {
|
||||
WEBGL_EXTENSIONS.length = 0;
|
||||
expect(getArrayClassForType(ELEMENT_ARRAY_BUFFER)).to.be(Uint16Array);
|
||||
});
|
||||
});
|
||||
|
||||
describe('populate methods', function() {
|
||||
|
||||
@@ -45,25 +45,6 @@ describe('ol/worker/webgl', function() {
|
||||
|
||||
worker.postMessage(message);
|
||||
});
|
||||
|
||||
it('responds with buffer data (fallback to Uint16Array)', function(done) {
|
||||
worker.addEventListener('error', done);
|
||||
|
||||
worker.addEventListener('message', function(event) {
|
||||
expect(event.data.indexBuffer).to.eql(Uint16Array.BYTES_PER_ELEMENT * 6);
|
||||
done();
|
||||
});
|
||||
|
||||
const instructions = new Float32Array(POINT_INSTRUCTIONS_COUNT);
|
||||
|
||||
const message = {
|
||||
type: WebGLWorkerMessageType.GENERATE_BUFFERS,
|
||||
renderInstructions: instructions,
|
||||
useShortIndices: true
|
||||
};
|
||||
|
||||
worker.postMessage(message);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user