-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract and reorganize texture resource classes #68460
Conversation
e51fb0e
to
dbe9174
Compare
I am ok with this push for one class per cpp. Other people thoughts? |
36da0ab
to
1472827
Compare
1472827
to
a4577f4
Compare
@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! |
9aa6f1a
to
9d07e9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of style notes, but otherwise this is good to go!
9d07e9e
to
7e21eb7
Compare
Thanks! Love me some healthy and maintainable codebase <3 |
@@ -0,0 +1,203 @@ | |||
/**************************************************************************/ | |||
/* image_texture.h */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put these in a textures subfolder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do that.
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)[got removed]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.