mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Always flush, because tri-strip
This commit is contained in:
parent
d5473a4840
commit
57a022db53
1 changed files with 3 additions and 5 deletions
|
@ -23,7 +23,7 @@ var Utils = require('../../renderer/webgl/Utils');
|
|||
*/
|
||||
var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
var pipeline = this.pipeline;
|
||||
var pipeline = src.pipeline;
|
||||
|
||||
renderer.setPipeline(pipeline, src);
|
||||
|
||||
|
@ -67,10 +67,8 @@ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera
|
|||
var meshVerticesLength = vertices.length;
|
||||
var vertexCount = Math.floor(meshVerticesLength * 0.5);
|
||||
|
||||
if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)
|
||||
{
|
||||
pipeline.flush();
|
||||
}
|
||||
// Because it's a triangle strip
|
||||
pipeline.flush();
|
||||
|
||||
pipeline.setTexture2D(texture, 0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue