WebGL Render Bug Fix
This commit is contained in:
parent
953a19ff5c
commit
c6e6f7458e
36 changed files with 729 additions and 340 deletions
|
@ -660,6 +660,7 @@ PIXI.WebGLBatch.prototype.update = function()
|
|||
*/
|
||||
PIXI.WebGLBatch.prototype.render = function(start, end)
|
||||
{
|
||||
|
||||
// console.log(start + " :: " + end + " : " + this.size);
|
||||
start = start || 0;
|
||||
//end = end || this.size;
|
||||
|
@ -672,6 +673,7 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
|
|||
|
||||
}
|
||||
|
||||
|
||||
if (this.size == 0)return;
|
||||
|
||||
this.update();
|
||||
|
@ -688,7 +690,6 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
|
|||
// ok..
|
||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.verticies)
|
||||
gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
// update the uvs
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer);
|
||||
|
||||
|
@ -722,7 +723,7 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
|
|||
var len = end - start;
|
||||
// console.log(this.size)
|
||||
// DRAW THAT this!
|
||||
gl.drawElements(gl.TRIANGLES, len * 6, gl.UNSIGNED_SHORT, start * 2 * 6 );
|
||||
// gl.drawElements(gl.TRIANGLES, len * 6, gl.UNSIGNED_SHORT, start * 2 * 6 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue