From ecda6a5274a6b8670526469ab047c57db9275e33 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Sat, 6 Sep 2014 12:26:38 +0200 Subject: [PATCH] Support passing a material name to QuadC. --- src/yuu/rdr.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yuu/rdr.js b/src/yuu/rdr.js index a03cbec..99b8c3f 100644 --- a/src/yuu/rdr.js +++ b/src/yuu/rdr.js @@ -272,6 +272,9 @@ constructor: function (material) { var buffer = new yuu.VertexBuffer(yuu.V3T2C4_F, 4); this._quad = new yuu.Quad(buffer); + material = yf.isString(material) + ? new yuu.Material(material) + : material; this._rdro = new yuu.Renderable( buffer, yuu.gl.TRIANGLE_STRIP, material, { model: mat4.create() }, 0.0); -- 2.30.2