I've recently been needing to review GLSL code, and I'm looking to enforce formatting conventions. Are there any tools like clang-format
for GLSL where I can specify a config file and have it auto-format? Or, since GLSL is C-like, should I just use clang-format
itself and hope for the best?
I need to enforce things like spacing, brace style, and indentation.
clang-format seems to handle GLSL fine:
$ clang-format -i myshader.glsl