-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixed issues with old GL versions ( <= 2.1 ) #1518
Conversation
b43ca5b
to
bbdffb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the spaces, they have cause me trouble on the past.
Also for reference, the gl_FragColor
was deprecated on GLSL 1.30 (which "starts on" GL 3.0 and GLES 3.0), which means that on shaders that are higher than this (thus the definition of HIGHER_THAN_300
), when using the core profile, we should use the shader output variables out
.
@@ -14,7 +14,7 @@ | |||
in vec2 raw_position; | |||
|
|||
uniform vec4 gradient_direction; | |||
uniform uint color_stops_size; | |||
uniform int color_stops_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint
being supported in GLSL 1.50 but the glUniform1u
not existing in GL 2.0 brings me great pain
What is the best way to test things with an old OpenGL version? I know when I've tried in the past it's been problematic since the driver just gave a context for a newer (compatible) version. If possible it would be good to have some automated CI testing of this. It's something that breaks easily if changes aren't being tested with the older version. |
My current (new) strategy for testing OpenGL versions is to use Mesa & |
1cf75cd
to
9841d19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for the quick fix 🥳
Fixes an issue with older GL versions <= 2.1 with new shader changes.