From eb9c0920ab1f9485e669dad30cfe6965460e1e04 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 25 Apr 2016 11:09:25 +0100 Subject: [PATCH] gsk: Rename shaders for OpenGL --- gsk/gskglrenderer.c | 8 ++++++-- .../{base-renderer-fragment.glsl => gl3-base.fs.glsl} | 0 .../glsl/{base-renderer-vertex.glsl => gl3-base.vs.glsl} | 0 3 files changed, 6 insertions(+), 2 deletions(-) rename gsk/resources/glsl/{base-renderer-fragment.glsl => gl3-base.fs.glsl} (100%) rename gsk/resources/glsl/{base-renderer-vertex.glsl => gl3-base.vs.glsl} (100%) diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c index 96f04afe7d..c6037cfb8c 100644 --- a/gsk/gskglrenderer.c +++ b/gsk/gskglrenderer.c @@ -298,18 +298,22 @@ static void gsk_gl_renderer_create_program (GskGLRenderer *self) { guint vertex_shader = 0, fragment_shader = 0; + const char *fs_path, *vs_path; GBytes *source; int status; + vs_path = "/org/gtk/libgsk/glsl/gl3-base.vs.glsl"; + fs_path = "/org/gtk/libgsk/glsl/gl3-base.fs.glsl"; + GSK_NOTE (OPENGL, g_print ("Compiling vertex shader\n")); - source = g_resources_lookup_data ("/org/gtk/libgsk/glsl/base-renderer-vertex.glsl", 0, NULL); + source = g_resources_lookup_data (vs_path, 0, NULL); vertex_shader = create_shader (GL_VERTEX_SHADER, g_bytes_get_data (source, NULL)); g_bytes_unref (source); if (vertex_shader == 0) goto out; GSK_NOTE (OPENGL, g_print ("Compiling fragment shader\n")); - source = g_resources_lookup_data ("/org/gtk/libgsk/glsl/base-renderer-fragment.glsl", 0, NULL); + source = g_resources_lookup_data (fs_path, 0, NULL); fragment_shader = create_shader (GL_FRAGMENT_SHADER, g_bytes_get_data (source, NULL)); g_bytes_unref (source); if (fragment_shader == 0) diff --git a/gsk/resources/glsl/base-renderer-fragment.glsl b/gsk/resources/glsl/gl3-base.fs.glsl similarity index 100% rename from gsk/resources/glsl/base-renderer-fragment.glsl rename to gsk/resources/glsl/gl3-base.fs.glsl diff --git a/gsk/resources/glsl/base-renderer-vertex.glsl b/gsk/resources/glsl/gl3-base.vs.glsl similarity index 100% rename from gsk/resources/glsl/base-renderer-vertex.glsl rename to gsk/resources/glsl/gl3-base.vs.glsl