* * @desc replace sub-output textures where arguments my be the same values
()
| 745 | * @desc replace sub-output textures where arguments my be the same values |
| 746 | */ |
| 747 | _replaceSubOutputTextures() { |
| 748 | const gl = this.context; |
| 749 | for (let i = 0; i < this.mappedTextures.length; i++) { |
| 750 | const mappedTexture = this.mappedTextures[i]; |
| 751 | if (mappedTexture.beforeMutate() || this._mappedTextureSwitched[i]) { |
| 752 | gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + i + 1, gl.TEXTURE_2D, mappedTexture.texture, 0); |
| 753 | this._mappedTextureSwitched[i] = false; |
| 754 | } |
| 755 | } |
| 756 | } |
| 757 | |
| 758 | /** |
| 759 | * @desc Setup on inherit sub-output textures |