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

Merge remote branch 'alteredq/master'

此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -94,7 +94,7 @@
mesh.rotation.x = - 90 * Math.PI / 180;
scene.addObject( mesh );
renderer = new THREE.WebGLRenderer( scene );
renderer = new THREE.WebGLRenderer( scene, false );
renderer.setSize( window.innerWidth, window.innerHeight );
container.innerHTML = "";
......
......@@ -4,7 +4,7 @@
* @author alteredq / http://alteredqualia.com/
*/
THREE.WebGLRenderer = function ( scene ) {
THREE.WebGLRenderer = function ( scene, antialias ) {
// Currently you can use just up to 4 directional / point lights total.
// Chrome barfs on shader linking when there are more than 4 lights :(
......@@ -39,10 +39,12 @@ THREE.WebGLRenderer = function ( scene ) {
maxLightCount = allocateLights( scene, 4 );
fog = scene ? scene.fog : null,
aa = antialias != undefined ? antialias : true;
this.domElement = _canvas;
this.autoClear = true;
initGL();
initGL( aa );
_uberProgram = initUbershader( maxLightCount.directional, maxLightCount.point, fog );
_oldProgram = _uberProgram;
......@@ -897,11 +899,11 @@ THREE.WebGLRenderer = function ( scene ) {
};
function initGL() {
function initGL( antialias ) {
try {
_gl = _canvas.getContext( 'experimental-webgl', { antialias: true} );
_gl = _canvas.getContext( 'experimental-webgl', { antialias: antialias } );
} catch(e) { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册