MCPcopy Index your code
hub / github.com/gpujs/gpu.js / _replaceSubOutputTextures

Method _replaceSubOutputTextures

src/backend/web-gl/kernel.js:747–756  ·  view source on GitHub ↗

* * @desc replace sub-output textures where arguments my be the same values

()

Source from the content-addressed store, hash-verified

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

Callers 1

runMethod · 0.95

Calls 1

beforeMutateMethod · 0.80

Tested by

no test coverage detected