render target dimensions don't affect viewport

This commit is contained in:
Felipe Alfonso 2017-04-07 01:34:35 -03:00
parent e83db4445f
commit b1b184aed4

View file

@ -200,7 +200,6 @@ WebGLRenderer.prototype = {
if (renderTarget !== null) if (renderTarget !== null)
{ {
gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.framebufferObject); gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.framebufferObject);
gl.viewport(0, 0, renderTarget.width, renderTarget.height);
if (renderTarget.shouldClear) if (renderTarget.shouldClear)
{ {
gl.clearColor(0, 0, 0, 0); gl.clearColor(0, 0, 0, 0);