2017-03-15 01:07:58 +00:00
|
|
|
var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
|
|
|
{
|
2017-08-15 22:51:37 +00:00
|
|
|
if (src.renderMask !== src.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)))
|
2017-03-15 01:07:58 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-03-21 21:06:36 +00:00
|
|
|
if (src.dirty)
|
|
|
|
{
|
2017-07-27 19:26:12 +00:00
|
|
|
src.canvasTexture = renderer.uploadCanvasToGPU(src.canvas, src.canvasTexture, true);
|
2017-03-21 21:06:36 +00:00
|
|
|
src.dirty = false;
|
|
|
|
}
|
|
|
|
|
2017-07-27 19:26:12 +00:00
|
|
|
renderer.spriteBatch.addSpriteTexture(src, camera, src.canvasTexture, src.canvas.width, src.canvas.height);
|
2017-03-15 01:07:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = TextWebGLRenderer;
|