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

Shaders with non-empty macros throw off #insert line numbers #1339

Open
VReaperV opened this issue Oct 3, 2024 · 2 comments
Open

Shaders with non-empty macros throw off #insert line numbers #1339

VReaperV opened this issue Oct 3, 2024 · 2 comments

Comments

@VReaperV
Copy link
Contributor

VReaperV commented Oct 3, 2024

void GLShaderManager::InitShader( GLShader* shader ) {
receives the shader without any macros set, so #insert gets incorrect line count if any macros are set.

@VReaperV
Copy link
Contributor Author

VReaperV commented Oct 3, 2024

A quick and dirty fix would be to add 3 commented out lines for every disabled macro, and then just add 3 lines to the count for #insert. Another option is to put all those compile macros into a separately attached shader.

@VReaperV
Copy link
Contributor Author

VReaperV commented Oct 4, 2024

@illwieckz Any thoughts on the above? Maybe another approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant