提交 43ae8e4e 编写于 作者: M Mr.doob

WebGLRenderer: Added y swap to setViewport() and setScissor().

上级 0df6403e
......@@ -436,14 +436,14 @@ function WebGLRenderer( parameters ) {
this.setViewport = function ( x, y, width, height ) {
_viewport.set( x, y, width, height )
_viewport.set( x, _height - y - height, width, height )
state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ) );
};
this.setScissor = function ( x, y, width, height ) {
_scissor.set( x, y, width, height )
_scissor.set( x, _height - y - height, width, height )
state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ) );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册