浏览代码

WebGLObjects: Storing wireframe index in WebGLProperties instead (multi renderers support).

Mr.doob 10 年之前
父节点
当前提交
41b155542b
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/renderers/webgl/WebGLObjects.js

+ 5 - 3
src/renderers/webgl/WebGLObjects.js

@@ -198,9 +198,11 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
 
 	function getWireframeAttribute( geometry ) {
 
-		if ( geometry._wireframe !== undefined ) {
+		var property = properties.get( geometry );
 
-			return geometry._wireframe;
+		if ( property.wireframe !== undefined ) {
+
+			return property.wireframe;
 
 		}
 
@@ -253,7 +255,7 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
 
 		updateAttribute( attribute, 'index' );
 
-		geometry._wireframe = attribute;
+		property.wireframe = attribute;
 
 		return attribute;