提交 f5bf5906 编写于 作者: T Takahiro

Clean up WebGLTexture

上级 ac3b5bec
......@@ -85,9 +85,10 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
_gl.generateMipmap( target );
// We assume images for cube map have the same size.
var image = Array.isArray( texture.image ) ? texture.image[ 0 ] : texture.image;
var textureProperties = properties.get( texture );
textureProperties.__maxMipLevel = Math.max( Math.log2( Math.max( image.width, image.height ) ), textureProperties.__maxMipLevel );
textureProperties.__maxMipLevel = Math.log2( Math.max( image.width, image.height ) );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册