瀏覽代碼

WebGLTextures: Ensure texStorage2D() is called when forceUpload is true. (#23808)

Michael Herzog 3 年之前
父節點
當前提交
64d9bf1764
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderers/webgl/WebGLTextures.js

+ 1 - 1
src/renderers/webgl/WebGLTextures.js

@@ -697,7 +697,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 			const mipmaps = texture.mipmaps;
 			const mipmaps = texture.mipmaps;
 
 
 			const useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );
 			const useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );
-			const allocateMemory = ( textureProperties.__version === undefined );
+			const allocateMemory = ( textureProperties.__version === undefined ) || ( forceUpload === true );
 			const levels = getMipLevels( texture, image, supportsMips );
 			const levels = getMipLevels( texture, image, supportsMips );
 
 
 			if ( texture.isDepthTexture ) {
 			if ( texture.isDepthTexture ) {