Skip to content

Commit

Permalink
fix(Renderer): Update gl viewport on zbuffer pass
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Jan 22, 2018
1 parent 572e671 commit 873f1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Rendering/OpenGL/Renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ function vtkOpenGLRenderer(publicAPI, model) {
gl.depthMask(true);
}

const ts = publicAPI.getTiledSizeAndOrigin();
gl.enable(gl.SCISSOR_TEST);
gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);

gl.colorMask(true, true, true, true);
gl.clear(clearMask);

Expand Down Expand Up @@ -160,6 +165,7 @@ function vtkOpenGLRenderer(publicAPI, model) {
const ts = publicAPI.getTiledSizeAndOrigin();
gl.enable(gl.SCISSOR_TEST);
gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);

gl.clear(clearMask);

Expand Down

0 comments on commit 873f1e9

Please sign in to comment.