diff options
author | Konstantin Pugin <ria.freelander@gmail.com> | 2022-07-24 16:03:51 +0300 |
---|---|---|
committer | Emma Anholt <emma@anholt.net> | 2023-10-09 17:25:28 +0000 |
commit | ee107cd4911e692480ab2ff9c12e3c6958bdec4e (patch) | |
tree | 5f8ed817acb1f24dcaf3da248848f7b12ea90e5a /glamor/glamor_lines.c | |
parent | 8adff2891f23b1cb097a4132f39fa96667313af5 (diff) |
glamor: support GLES3 shaders
Some hardware (preferably mobile) working on GLES3 way faster than
on desktop GL and supports more features. This commit will allow using
GLES3 if glamor is running over GL ES, and version 3 is supported.
Changes are the following:
1. Add compatibility layer for 120/GLES2 shaders with defines in and out
2. Switch attribute and varying to in and out in almost all shaders
(aside gradient)
3. Add newGL-only frag_color variable, which defines as gl_FragColor on
old pipelines
4. Switch all shaders to use frag_color.
5. Previous commit is reverted, because now we have more than one GL ES
version, previous commit used to set version 100 for all ES shaders, which
is not true for ES 3
Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com>
Diffstat (limited to 'glamor/glamor_lines.c')
-rw-r--r-- | glamor/glamor_lines.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glamor/glamor_lines.c b/glamor/glamor_lines.c index ec70804ac..c9b776bb5 100644 --- a/glamor/glamor_lines.c +++ b/glamor/glamor_lines.c @@ -27,7 +27,7 @@ static const glamor_facet glamor_facet_poly_lines = { .name = "poly_lines", - .vs_vars = "attribute vec2 primitive;\n", + .vs_vars = "in vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0.0,0.0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; |