|
@@ -2849,11 +2849,11 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
// Textures
|
|
|
|
|
|
- function setTextureParameters ( textureType, texture, isImagePowerOfTwo ) {
|
|
|
+ function setTextureParameters ( textureType, texture, isPowerOfTwoImage ) {
|
|
|
|
|
|
var extension;
|
|
|
|
|
|
- if ( isImagePowerOfTwo ) {
|
|
|
+ if ( isPowerOfTwoImage ) {
|
|
|
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, paramThreeToGL( texture.wrapS ) );
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, paramThreeToGL( texture.wrapT ) );
|
|
@@ -2930,11 +2930,11 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- var isImagePowerOfTwo = isPowerOfTwo( image ),
|
|
|
+ var isPowerOfTwoImage = isPowerOfTwo( image ),
|
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
|
- setTextureParameters( _gl.TEXTURE_2D, texture, isImagePowerOfTwo );
|
|
|
+ setTextureParameters( _gl.TEXTURE_2D, texture, isPowerOfTwoImage );
|
|
|
|
|
|
var mipmap, mipmaps = texture.mipmaps;
|
|
|
|
|
@@ -2944,7 +2944,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
// if there are no manual mipmaps
|
|
|
// set 0 level mipmap and then use GL to generate other mipmap levels
|
|
|
|
|
|
- if ( mipmaps.length > 0 && isImagePowerOfTwo ) {
|
|
|
+ if ( mipmaps.length > 0 && isPowerOfTwoImage ) {
|
|
|
|
|
|
for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
|
|
|
@@ -2995,7 +2995,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
// if there are no manual mipmaps
|
|
|
// set 0 level mipmap and then use GL to generate other mipmap levels
|
|
|
|
|
|
- if ( mipmaps.length > 0 && isImagePowerOfTwo ) {
|
|
|
+ if ( mipmaps.length > 0 && isPowerOfTwoImage ) {
|
|
|
|
|
|
for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
|
|
|
@@ -3014,7 +3014,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( texture.generateMipmaps && isImagePowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );
|
|
|
+ if ( texture.generateMipmaps && isPowerOfTwoImage ) _gl.generateMipmap( _gl.TEXTURE_2D );
|
|
|
|
|
|
textureProperties.__version = texture.version;
|
|
|
|
|
@@ -3160,11 +3160,11 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
}
|
|
|
|
|
|
var image = cubeImage[ 0 ],
|
|
|
- isImagePowerOfTwo = isPowerOfTwo( image ),
|
|
|
+ isPowerOfTwoImage = isPowerOfTwo( image ),
|
|
|
glFormat = paramThreeToGL( texture.format ),
|
|
|
glType = paramThreeToGL( texture.type );
|
|
|
|
|
|
- setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, isImagePowerOfTwo );
|
|
|
+ setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, isPowerOfTwoImage );
|
|
|
|
|
|
for ( var i = 0; i < 6; i ++ ) {
|
|
|
|
|
@@ -3212,7 +3212,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( texture.generateMipmaps && isImagePowerOfTwo ) {
|
|
|
+ if ( texture.generateMipmaps && isPowerOfTwoImage ) {
|
|
|
|
|
|
_gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );
|
|
|
|