Procházet zdrojové kódy

WebGLAttributes: support GLBufferAttributes with InterleavedBufferAttributes (#28956)

Nick Kallen před 1 rokem
rodič
revize
573ddd736e
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/renderers/webgl/WebGLAttributes.js

+ 2 - 2
src/renderers/webgl/WebGLAttributes.js

@@ -145,6 +145,8 @@ function WebGLAttributes( gl ) {
 
 	function update( attribute, bufferType ) {
 
+		if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;
+
 		if ( attribute.isGLBufferAttribute ) {
 
 			const cached = buffers.get( attribute );
@@ -164,8 +166,6 @@ function WebGLAttributes( gl ) {
 
 		}
 
-		if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;
-
 		const data = buffers.get( attribute );
 
 		if ( data === undefined ) {

粤ICP备19079148号