var RenderTextureWebGL = { fill: function (rgb){ var ur = ((rgb >> 16) | 0) & 255; var ug = ((rgb >> 8) | 0) & 255; var ub = (rgb | 0) & 255; this.renderer.setFramebuffer(this.framebuffer); var gl = this.gl; gl.clearColor(ur / 255, ug / 255, ub / 255, 1); _AN_Call_clear('clear', gl, gl.COLOR_BUFFER_BIT); this.renderer.setFramebuffer(null ); return this; } , clear: function (){ this.renderer.setFramebuffer(this.framebuffer); var gl = this.gl; gl.clearColor(0, 0, 0, 0); _AN_Call_clear('clear', gl, gl.COLOR_BUFFER_BIT); this.renderer.setFramebuffer(null ); return this; } , draw: function (texture, frame, x, y){ var glTexture = texture.source[frame.sourceIndex].glTexture; var tint = (this.globalTint >> 16) + (this.globalTint & 65280) + ((this.globalTint & 255) << 16); this.renderer.setFramebuffer(this.framebuffer); this.renderer.pipelines.TextureTintPipeline.drawTexture(glTexture, x, y, tint, this.globalAlpha, frame.cutX, frame.cutY, frame.cutWidth, frame.cutHeight, this.currentMatrix); this.renderer.setFramebuffer(null ); return this; } } ; module.exports = RenderTextureWebGL;