Skip to content

Commit

Permalink
Reinstate shader version in GTK4 backend
Browse files Browse the repository at this point in the history
Reinstate shader version declarations, but use #version 100 (1.00 ES)
instead of #version 330 (3.3).
  • Loading branch information
Cwiiis authored and aperezdc committed Jan 11, 2022
1 parent 7f786b3 commit ffa5057
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions platform/gtk4/cog-platform-gtk4.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ static struct platform_window win = {
.device_scale_factor = 1,
};

static const char s_vertex_shader[] = "attribute vec2 pos;\n"
static const char s_vertex_shader[] = "#version 100\n"
"attribute vec2 pos;\n"
"attribute vec2 texture;\n"
"varying vec2 v_texture;\n"
"void main() {\n"
" v_texture = texture;\n"
" gl_Position = vec4(pos, 0, 1);\n"
"}\n";

static const char s_fragment_shader[] = "precision mediump float;\n"
static const char s_fragment_shader[] = "#version 100\n"
"precision mediump float;\n"
"uniform sampler2D u_tex;\n"
"varying vec2 v_texture;\n"
"void main() {\n"
Expand Down

0 comments on commit ffa5057

Please sign in to comment.