Fix rebuildGroundMosaic .then(): WebGL constants via groundGl

Inside the Promise.all().then() callback, the WebGL constants
(gl.TEXTURE_2D, gl.RGBA, gl.UNSIGNED_BYTE) were still bare 'gl.',
not groundGl.*. Fixed.
This commit is contained in:
Richard Zink committed 2026-10-07 20:51:31 +02:00
1 parent 447ff824af
commit de471dcb8c
1 file changed
+2 -2
+2 -2
View File
@@ -331,8 +331,8 @@ function rebuildGroundMosaic(centerTileX, centerTileY) {
} }
return Promise.all(promises).then(function() { return Promise.all(promises).then(function() {
if (groundTexture && groundGl) { if (groundTexture && groundGl) {
groundGl.bindTexture(gl.TEXTURE_2D, groundTexture); groundGl.bindTexture(groundGl.TEXTURE_2D, groundTexture);
groundGl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, groundCanvas); groundGl.texImage2D(groundGl.TEXTURE_2D, 0, groundGl.RGBA, groundGl.RGBA, groundGl.UNSIGNED_BYTE, groundCanvas);
} }
}); });
} }