Texture Manager code.