diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-02-10 03:33:02 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-02-10 03:33:02 +0000 |
commit | 03f5d5a5e41bc42835dc02774a27a5eb5d4d023b (patch) | |
tree | 32cee750090bf989088fb5f9d6423a9a307c9d3b /gdk/gdkgl.c | |
parent | 50187ae86dfdb4c5815731da25dc9e57296d28c5 (diff) | |
download | gtk+-03f5d5a5e41bc42835dc02774a27a5eb5d4d023b.tar.gz |
gl: Put shaders in static storage
We are not changing the shader code.
The compiler will hopefully put them in the .rodata section.
Diffstat (limited to 'gdk/gdkgl.c')
-rw-r--r-- | gdk/gdkgl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c index e497ccc910..1d7d2d4bb9 100644 --- a/gdk/gdkgl.c +++ b/gdk/gdkgl.c @@ -146,7 +146,7 @@ bind_vao (GdkGLContextPaintData *paint_data) static void use_texture_2d_program (GdkGLContextPaintData *paint_data) { - const char *vertex_shader_code = + static const char *vertex_shader_code = "#version 150\n" "uniform sampler2D map;" "attribute vec2 position;\n" @@ -156,7 +156,7 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data) " gl_Position = vec4(position, 0, 1);\n" " vUv = uv;\n" "}\n"; - const char *fragment_shader_code = + static const char *fragment_shader_code = "#version 150\n" "varying vec2 vUv;\n" "uniform sampler2D map;\n" @@ -177,7 +177,7 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data) static void use_texture_rect_program (GdkGLContextPaintData *paint_data) { - const char *vertex_shader_code = + static const char *vertex_shader_code = "#version 150\n" "uniform sampler2DRect map;" "attribute vec2 position;\n" @@ -187,7 +187,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data) " gl_Position = vec4(position, 0, 1);\n" " vUv = uv;\n" "}\n"; - const char *fragment_shader_code = + static const char *fragment_shader_code = "#version 150\n" "varying vec2 vUv;\n" "uniform sampler2DRect map;\n" |