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

glow: enable GL_ARB_explicit_attrib_location to fix crashes #1703

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

greatest-ape
Copy link
Contributor

@greatest-ape greatest-ape commented Feb 13, 2023

Current shaders use ARB_explicit_attrib_location without enabling the extension:

layout (location = 0) out vec4 fragColor;

This causes crashes: #1625

@ids1024
Copy link
Contributor

ids1024 commented Feb 13, 2023

Presumably it would be safer (though annoying) to always query the attribute location and not rely on explicit locations, since it would work on GL implementations that only support lower versions and don't have this extension.

Though hopefully this shouldn't break things anywhere it's currently working, so it should strictly improve support relative to the existing version, at least.

@hecrj hecrj added the bug Something isn't working label Feb 14, 2023
@hecrj hecrj added this to the 0.8.0 milestone Feb 14, 2023
@greatest-ape
Copy link
Contributor Author

@ids1024 Fair point. There is a larger rewrite of the gradient code which seems to also fix the issue here. The benefit of the simple fix is that it is small and that it is not breaking and could therefore be part of a point release.

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Let's apply this fix for now.

Waiting for a couple of things to line up before the gradient rewrite can land.

@hecrj hecrj merged commit 871f59f into iced-rs:master Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants