Skip to content

Commit

Permalink
WebGLRenderer: Added .setDrawingBufferSize(). Related to #11374.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 20, 2017
1 parent d394e74 commit e68f69f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,20 @@ function WebGLRenderer( parameters ) {

};

this.setDrawingBufferSize = function ( width, height, pixelRatio ) {

_width = width;
_height = height;

_pixelRatio = pixelRatio;

_canvas.width = width * pixelRatio;
_canvas.height = height * pixelRatio;

this.setViewport( 0, 0, width, height );

};

this.setViewport = function ( x, y, width, height ) {

_viewport.set( x, _height - y - height, width, height )
Expand Down

0 comments on commit e68f69f

Please sign in to comment.