|
@@ -5822,13 +5822,6 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
// Textures
|
|
// Textures
|
|
|
|
|
|
-
|
|
|
|
- function isPowerOfTwo ( value ) {
|
|
|
|
-
|
|
|
|
- return ( value & ( value - 1 ) ) === 0;
|
|
|
|
-
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
function setTextureParameters ( textureType, texture, isImagePowerOfTwo ) {
|
|
function setTextureParameters ( textureType, texture, isImagePowerOfTwo ) {
|
|
|
|
|
|
if ( isImagePowerOfTwo ) {
|
|
if ( isImagePowerOfTwo ) {
|
|
@@ -5886,7 +5879,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
|
|
|
|
var image = texture.image,
|
|
var image = texture.image,
|
|
- isImagePowerOfTwo = isPowerOfTwo( image.width ) && isPowerOfTwo( image.height ),
|
|
|
|
|
|
+ isImagePowerOfTwo = THREE.Math.isPowerOfTwo( image.width ) && THREE.Math.isPowerOfTwo( image.height ),
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
glType = paramThreeToGL( texture.type );
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
|
@@ -6036,7 +6029,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
}
|
|
}
|
|
|
|
|
|
var image = cubeImage[ 0 ],
|
|
var image = cubeImage[ 0 ],
|
|
- isImagePowerOfTwo = isPowerOfTwo( image.width ) && isPowerOfTwo( image.height ),
|
|
|
|
|
|
+ isImagePowerOfTwo = THREE.Math.isPowerOfTwo( image.width ) && THREE.Math.isPowerOfTwo( image.height ),
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
glType = paramThreeToGL( texture.type );
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
|
@@ -6149,7 +6142,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
// Setup texture, create render and frame buffers
|
|
// Setup texture, create render and frame buffers
|
|
|
|
|
|
- var isTargetPowerOfTwo = isPowerOfTwo( renderTarget.width ) && isPowerOfTwo( renderTarget.height ),
|
|
|
|
|
|
+ var isTargetPowerOfTwo = THREE.Math.isPowerOfTwo( renderTarget.width ) && THREE.Math.isPowerOfTwo( renderTarget.height ),
|
|
glFormat = paramThreeToGL( renderTarget.format ),
|
|
glFormat = paramThreeToGL( renderTarget.format ),
|
|
glType = paramThreeToGL( renderTarget.type );
|
|
glType = paramThreeToGL( renderTarget.type );
|
|
|
|
|