mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Tilemap update.
This commit is contained in:
parent
b10c8858c3
commit
d55b0c9e51
2 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ PIXI.Tilemap = function(texture)
|
|||
|
||||
this.colors = new PIXI.Float32Array([1, 1, 1, 1]);
|
||||
|
||||
this.indices = new PIXI.Uint16Array([0, 1, 2, 3]);
|
||||
this.indices = new PIXI.Uint16Array([0, 1, 2, 0, 2, 3]);
|
||||
|
||||
};
|
||||
|
||||
|
@ -126,6 +126,6 @@ PIXI.Tilemap.prototype._renderTilemap = function(renderSession)
|
|||
|
||||
// dont need to upload!
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
|
||||
gl.drawElements(PIXI.Strip.DrawModes.TRIANGLE_STRIP, this.indices.length, gl.UNSIGNED_SHORT, 0);
|
||||
gl.drawElements(gl.TRIANGLES, this.indices.length, gl.UNSIGNED_SHORT, 0);
|
||||
|
||||
};
|
||||
|
|
|
@ -93,7 +93,7 @@ PIXI.TilemapShader.prototype.init = function()
|
|||
this.projectionVector = gl.getUniformLocation(program, 'projectionVector');
|
||||
this.offsetVector = gl.getUniformLocation(program, 'offsetVector');
|
||||
this.dimensions = gl.getUniformLocation(program, 'dimensions');
|
||||
// this.uMatrix = gl.getUniformLocation(program, 'uMatrix');
|
||||
this.uMatrix = gl.getUniformLocation(program, 'uMatrix');
|
||||
|
||||
// get and store the attributes
|
||||
this.aVertexPosition = gl.getAttribLocation(program, 'aVertexPosition');
|
||||
|
|
Loading…
Add table
Reference in a new issue