Commits

David Rogers  committed 0e5366f

GL: Fix for incorrect mipmap calculation with texture arrays.

  • Participants
  • Parent commits 52046cb
  • Branches v1-8

Comments (0)

Files changed (1)

File RenderSystems/GL/src/OgreGLTexture.cpp

 						}
 						break;
 				};
-				if(width>1)		width = width/2;
-				if(height>1)	height = height/2;
-				if(depth>1)		depth = depth/2;
+				if(width>1)
+                    width = width/2;
+				if(height>1)
+                    height = height/2;
+				if(depth>1 && mTextureType != TEX_TYPE_2D_ARRAY)
+                    depth = depth/2;
 			}
 			delete [] tmpdata;
 		}
 						}
 						break;
 				};
-				if(width>1)		width = width/2;
-				if(height>1)	height = height/2;
-				if(depth>1)		depth = depth/2;
+				if(width>1)
+                    width = width/2;
+				if(height>1)
+                    height = height/2;
+				if(depth>1 && mTextureType != TEX_TYPE_2D_ARRAY)
+                    depth = depth/2;
 			}
 		}
 		_createSurfaceList();