Skip to content

Commit d55b0c9

Browse files
committed
Tilemap update.
1 parent b10c885 commit d55b0c9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/pixi/extras/Tilemap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PIXI.Tilemap = function(texture)
3939

4040
this.colors = new PIXI.Float32Array([1, 1, 1, 1]);
4141

42-
this.indices = new PIXI.Uint16Array([0, 1, 2, 3]);
42+
this.indices = new PIXI.Uint16Array([0, 1, 2, 0, 2, 3]);
4343

4444
};
4545

@@ -126,6 +126,6 @@ PIXI.Tilemap.prototype._renderTilemap = function(renderSession)
126126

127127
// dont need to upload!
128128
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
129-
gl.drawElements(PIXI.Strip.DrawModes.TRIANGLE_STRIP, this.indices.length, gl.UNSIGNED_SHORT, 0);
129+
gl.drawElements(gl.TRIANGLES, this.indices.length, gl.UNSIGNED_SHORT, 0);
130130

131131
};

src/pixi/renderers/webgl/shaders/TilemapShader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ PIXI.TilemapShader.prototype.init = function()
9393
this.projectionVector = gl.getUniformLocation(program, 'projectionVector');
9494
this.offsetVector = gl.getUniformLocation(program, 'offsetVector');
9595
this.dimensions = gl.getUniformLocation(program, 'dimensions');
96-
// this.uMatrix = gl.getUniformLocation(program, 'uMatrix');
96+
this.uMatrix = gl.getUniformLocation(program, 'uMatrix');
9797

9898
// get and store the attributes
9999
this.aVertexPosition = gl.getAttribLocation(program, 'aVertexPosition');

0 commit comments

Comments
 (0)