[LayaAirIDE 1.0]batch draw 减少draw call
如下会产生三个draw call。 有么有办法把这些draw batch 一个draw call里面呢?
sp = new Sprite();
Laya.stage.addChild(sp);
//画线
sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3);
//画连续直线
sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5);
//画曲线
sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78, 0, 97, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5);
//画矩形
sp = new Sprite();
Laya.stage.addChild(sp);
//画线
sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3);
//画连续直线
sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5);
//画曲线
sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78, 0, 97, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5);
//画矩形
没有找到相关结果
已邀请:
要回复问题请先登录
0 个回复