Skip to content
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

[Impeller] Add GLSL/HLSL formatting to the engine repo #115677

Closed
bdero opened this issue Nov 19, 2022 · 1 comment · Fixed by flutter/engine#37770
Closed

[Impeller] Add GLSL/HLSL formatting to the engine repo #115677

bdero opened this issue Nov 19, 2022 · 1 comment · Fixed by flutter/engine#37770
Labels
e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list

Comments

@bdero
Copy link
Member

bdero commented Nov 19, 2022

I've been formatting GLSL code similarly to our C++ code using the formatting functionality provided by this vscode extension: https://github.com/stef-levesque/vscode-shader

The reason the formatting is remarkably similar to our C++ code is that it actually just runs the C++ formatter over it (which in my case is set to the clang-format executable that ships with our clang SDK)! It saves a temp source file with a .cpp extension and tricks vscode into running the cpp formatter: https://github.com/stef-levesque/vscode-shader/blob/f1c804839f9f58a6749c9a840187c5527b76b053/src/extension.ts#L30

This has been giving me excellent results for both GLSL and HLSL, so perhaps we could just have format.sh run all shader files (.glsl, .hlsl, .vert, .frag, etc) through clang-format.

@bdero bdero added engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list e: impeller Impeller rendering backend issues and features requests labels Nov 19, 2022
@github-actions
Copy link

github-actions bot commented Dec 5, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant