Extract and reorganize texture resource classes
Split up texture.h/cpp into:
-
texture.h/cpp(now only contains Texture, Texture2D, TextureLayered, Texture3D) -
animated_texture.h/cpp -
atlas_texture.h/cpp -
camera_texture.h/cpp -
compressed_texture.h/cpp -
curve_texture.h/cpp -
image_texture.h/cpp -
gradient_texture.h/cpp -
mesh_texture.h/cpp -
portable_compressed_texture.h/cpp -
placeholder_textures.h(contains all PlaceholderXXX classes since they are very small) -
proxy_texture.h/cpp
1D/2D/3D variants are grouped together in one file because that made the most sense to me, but if we wan't to be really strict (one class per file), I could split them up as well. Part of the ongoing effort to have only one class per file (or at least have smaller source files) with the goal of improving the structure of the codebase in terms of readability and compilation speed. texture.h/texture.cpp were especially problematic since the header was around 1100 LOC long and the source file over 3500 LOC. Also introducing forward declarations of some classes to further improve compilation speed.
I am ok with this push for one class per cpp. Other people thoughts?
@Geometror I think we are ready to merge it in the next couple of weeks. So if you could do a rebase, it would be great!
Thanks! Love me some healthy and maintainable codebase <3