Changed order of operations in AllocateTextures