summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/view')
-rw-r--r--src/view/tile.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/tile.ts b/src/view/tile.ts
index d748ec9..3dd7231 100644
--- a/src/view/tile.ts
+++ b/src/view/tile.ts
@@ -31,7 +31,7 @@ export class TileViewBuilder {
}
export class TileView {
- private readonly primitiveCount: number;
+ private readonly vertexCount: number;
private readonly vertexBuffer: WebGLBuffer;
private readonly textureBuffer: WebGLBuffer;
@@ -51,7 +51,7 @@ export class TileView {
gl.bindBuffer(gl.ARRAY_BUFFER, this.textureBuffer);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureData), gl.STATIC_DRAW);
- this.primitiveCount = vertexData.length / 3;
+ this.vertexCount = vertexData.length / 2;
}
public render(): void {
@@ -69,6 +69,6 @@ export class TileView {
gl.bindBuffer(gl.ARRAY_BUFFER, this.textureBuffer);
gl.vertexAttribPointer(this.r.getTextureCoordLoc(), 2, gl.FLOAT, false, 0, 0);
- gl.drawArrays(gl.TRIANGLES, 0, this.primitiveCount);
+ gl.drawArrays(gl.TRIANGLES, 0, this.vertexCount);
}
}