Skip to content

Commit 57a022d

Browse files
committed
Always flush, because tri-strip
1 parent d5473a4 commit 57a022d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/gameobjects/rope/RopeWebGLRenderer.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var Utils = require('../../renderer/webgl/Utils');
2323
*/
2424
var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
2525
{
26-
var pipeline = this.pipeline;
26+
var pipeline = src.pipeline;
2727

2828
renderer.setPipeline(pipeline, src);
2929

@@ -67,10 +67,8 @@ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera
6767
var meshVerticesLength = vertices.length;
6868
var vertexCount = Math.floor(meshVerticesLength * 0.5);
6969

70-
if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)
71-
{
72-
pipeline.flush();
73-
}
70+
// Because it's a triangle strip
71+
pipeline.flush();
7472

7573
pipeline.setTexture2D(texture, 0);
7674

0 commit comments

Comments
 (0)