提交 01ccd8df 编写于 作者: B Ben Adams

Batch buffer update

Improve pipelining: submit buffer updates in order that they will be
rendered before they are rendered to allow for them to complete before
the data is required.
上级 0f7ba90a
......@@ -1668,6 +1668,8 @@ THREE.WebGLRenderer = function ( parameters ) {
}
objects.update( opaqueObjects );
objects.update( transparentObjects );
//
shadowMap.render( scene, camera );
......
......@@ -111,7 +111,7 @@ THREE.WebGLObjects = function ( gl, info ) {
};
this.update = function ( object ) {
var update = function ( object ) {
var geometry = geometries.get( object );
......@@ -188,4 +188,18 @@ THREE.WebGLObjects = function ( gl, info ) {
};
this.update = function ( renderList ) {
for ( var i = 0, ul = renderList.length; i < ul; i++ ) {
var object = renderList[i].object;
if ( object.material.visible !== false ) {
update( object );
}
}
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册