Closed TheMaverickProgrammer closed 3 years ago
I would be really happy accepting pull request improving the coding style! Even the ones breaking API.
I am following the chromium coding style: https://chromium.googlesource.com/chromium/src/+/master/styleguide/styleguide.md (more or less consistently)
You can auto format using clang-format: https://github.com/ArthurSonzogni/smk/blob/master/.clang-format
window.input() use camel case because of: https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#inline-functions
I don't really remember what was the goo dreason to put color_texture as a public attribute here.
Gotta say I'm not a fan of the style but it's not my library haha I'll sweep through and standardize it to chromium
Gotta say I'm not a fan of the style but it's not my library haha
That was my initial reaction when I started working on Chromium.... Now I am used to it, I am loving it ;-)
I'll sweep through and standardize it to chromium
Some formatting can be done using clang-format and also by running: https://github.com/ArthurSonzogni/smk/blob/master/other/format.sh
maybe it's because I spent the last day reviewing the style and patching up smk, but now it's growing on me too
I see a lot of different coding styles throughout the project and many places where doxygen-style documentation is not enforced.
For instance, the global default shaders use snake case
shader_program_2d()
while the rest of the code is Pascal case, so shouldn't it beShaderProgram2D()
?window.input()
instead ofwindow.Input()
as well.There are also a number of places where getters/setters are avoided completely by exposing the variable itself. Like in FrameBuffer's
color_texture
. There ought to be a getter for thatsmk::Texture& ColorTexture()
...What are the coding standards?
If there are none, I'd like to have your blessing to spruce up the library by enforcing Pascal-case, I'll add more documentation, and proper encapsulation with appropriate getters and setters.
Not to be pushy but let me know soon! I have free time tomorrow to do all of this and I am porting a big project to SMK so it'd be a great use of my free time and SMK would greatly benefit from it!