Texture Optimize

1. remove unused codes;
2. use the internal image format instead of the global format when loading an image into texture;