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 by 256 are the fastest. If your application uses four 128-by-128 textures, for example, try to ensure that they use the same palette and place them all into one 256-by-256 texture. This technique also reduces the amount of texture swapping. Of course, you should not use 256-by-256 textures unless your application requires that much texturing because, as already mentioned, textures should be kept as small as possible.