Ensure the texture is loaded into the correct index.
The previous code would try to load subsequent textures into the 0th slot.
This commit is contained in:
@@ -426,7 +426,10 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
||||
const uniformName = Uniforms.TILE_TEXTURE_PREFIX + textureIndex;
|
||||
gl.activeTexture(gl[textureProperty]);
|
||||
gl.bindTexture(gl.TEXTURE_2D, tileTexture.textures[textureIndex]);
|
||||
gl.uniform1i(this.helper.getUniformLocation(uniformName), 0);
|
||||
gl.uniform1i(
|
||||
this.helper.getUniformLocation(uniformName),
|
||||
textureIndex
|
||||
);
|
||||
}
|
||||
|
||||
const alpha =
|
||||
|
||||
@@ -284,7 +284,7 @@ class WebGLHelper extends Disposable {
|
||||
|
||||
gl.getExtension('OES_element_index_uint');
|
||||
gl.getExtension('OES_texture_float');
|
||||
gl.getExtension("OES_texture_float_linear");
|
||||
gl.getExtension('OES_texture_float_linear');
|
||||
|
||||
this.canvas_.addEventListener(
|
||||
ContextEventType.LOST,
|
||||
|
||||
Reference in New Issue
Block a user