Texture Size
Texture-mapping performance is heavily dependent on the speed of memory. There are a number of ways to maximize the cache performance of your application's textures.
-
Keep the textures small; the smaller the textures are, the better chance they have of being maintained in the main CPU's secondary cache.
-
Do not change the textures on a per-primitive basis. Try to keep polygons grouped in order of the textures they use.
-
Use square textures whenever possible. Textures whose dimensions are 256×256 are the fastest. If your application uses four 128×128 textures, for example, try to ensure that they use the same palette and place them all into one 256×256 texture. This technique also reduces the amount of texture swapping. Of course, you should not use 256×256 textures unless your application requires that much texturing because, as already mentioned, textures should be kept as small as possible.