Improve handling of uniforms in webgl helper

This commit is contained in:
Olivier Guyot
2018-11-16 01:50:44 +01:00
parent 94524fb431
commit 530bcd0c88
3 changed files with 7 additions and 9 deletions

View File

@@ -18,8 +18,6 @@ import {
} from "../transform";
import {create, fromTransform} from "../vec/mat4";
import WebGLBuffer from "./Buffer";
import WebGLVertex from "./Vertex";
import WebGLFragment from "./Fragment";
import WebGLPostProcessingPass from "./PostProcessingPass";
@@ -288,10 +286,10 @@ class WebGLHelper extends Disposable {
/**
* Copy the frame buffer to the canvas
*/
finalizeDraw() {
finalizeDraw(frameState) {
// apply post processes using the next one as target
for (let i = 0; i < this.postProcessPasses.length; i++) {
this.postProcessPasses[i].apply(this.postProcessPasses[i + 1] || null);
this.postProcessPasses[i].apply(frameState, this.postProcessPasses[i + 1] || null);
}
}