Browse Source

Rename .version2 to .versionVAO

Takahiro 6 years ago
parent
commit
f33c85eef0

+ 4 - 4
src/core/BufferAttribute.js

@@ -26,7 +26,7 @@ function BufferAttribute( array, itemSize, normalized ) {
 	this.updateRange = { offset: 0, count: - 1 };
 
 	this.version = 0;
-	this.version2 = 0;
+	this.versionVAO = 0;
 
 }
 
@@ -53,7 +53,7 @@ Object.defineProperties( BufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._array = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -70,7 +70,7 @@ Object.defineProperties( BufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._itemSize = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -87,7 +87,7 @@ Object.defineProperties( BufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._normalized = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 

+ 2 - 2
src/core/InstancedBufferAttribute.js

@@ -20,7 +20,7 @@ function InstancedBufferAttribute( array, itemSize, normalized, meshPerAttribute
 
 	this._meshPerAttribute = meshPerAttribute || 1;
 
-	this.version2 = 0;
+	this.versionVAO = 0;
 
 }
 
@@ -55,7 +55,7 @@ Object.defineProperties( InstancedBufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._meshPerAttribute = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 

+ 2 - 2
src/core/InstancedInterleavedBuffer.js

@@ -10,7 +10,7 @@ function InstancedInterleavedBuffer( array, stride, meshPerAttribute ) {
 
 	this._meshPerAttribute = meshPerAttribute || 1;
 
-	this.version2 = 0;
+	this.versionVAO = 0;
 
 }
 
@@ -45,7 +45,7 @@ Object.defineProperties( InstancedInterleavedBuffer.prototype, {
 		set: function ( value ) {
 
 			this._meshPerAttribute = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 

+ 3 - 3
src/core/InterleavedBuffer.js

@@ -13,7 +13,7 @@ function InterleavedBuffer( array, stride ) {
 	this.updateRange = { offset: 0, count: - 1 };
 
 	this.version = 0;
-	this.version2 = 0;
+	this.versionVAO = 0;
 
 }
 
@@ -40,7 +40,7 @@ Object.defineProperties( InterleavedBuffer.prototype, {
 		set: function ( value ) {
 
 			this._array = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -57,7 +57,7 @@ Object.defineProperties( InterleavedBuffer.prototype, {
 		set: function ( value ) {
 
 			this._stride = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 

+ 5 - 5
src/core/InterleavedBufferAttribute.js

@@ -11,7 +11,7 @@ function InterleavedBufferAttribute( interleavedBuffer, itemSize, offset, normal
 
 	this._normalized = normalized === true;
 
-	this.version2 = 0;
+	this.versionVAO = 0;
 
 }
 
@@ -48,7 +48,7 @@ Object.defineProperties( InterleavedBufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._data = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -65,7 +65,7 @@ Object.defineProperties( InterleavedBufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._itemSize = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -82,7 +82,7 @@ Object.defineProperties( InterleavedBufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._offset = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 
@@ -99,7 +99,7 @@ Object.defineProperties( InterleavedBufferAttribute.prototype, {
 		set: function ( value ) {
 
 			this._normalized = value;
-			this.version2 ++;
+			this.versionVAO ++;
 
 		}
 

+ 4 - 4
src/renderers/webgl/WebGLBindingStates.js

@@ -176,12 +176,12 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 
 			if ( cachedAttribute.attribute !== geometryAttribute ) return true;
 
-			if ( cachedAttribute.version !== geometryAttribute.version2 ) return true;
+			if ( cachedAttribute.version !== geometryAttribute.versionVAO ) return true;
 
 			if ( cachedAttribute.data.buffer !== geometryAttribute.data ) return true;
 
 			if ( geometryAttribute.data &&
-				cachedAttribute.data.version !== geometryAttribute.data.version2 ) return true;
+				cachedAttribute.data.version !== geometryAttribute.data.versionVAO ) return true;
 
 		}
 
@@ -200,14 +200,14 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 
 			var data = {};
 			data.attribute = attribute;
-			data.version = attribute.version2;
+			data.version = attribute.versionVAO;
 
 			data.data = {};
 
 			if ( attribute.data ) {
 
 				data.data.buffer = attribute.data;
-				data.data.version = attribute.data.version2;
+				data.data.version = attribute.data.versionVAO;
 
 			}