Commit 03f5d5a5 authored by Emmanuele Bassi's avatar Emmanuele Bassi

gl: Put shaders in static storage

We are not changing the shader code.

The compiler will hopefully put them in the .rodata section.
parent 50187ae8
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment