[gtk+/wip/ebassi/gsk-renderer: 423/545] gsk: Rename shaders for OpenGL



commit 4ca89931bdf8f15c665ea83d0dcf4a7a848244f2
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Apr 25 11:09:25 2016 +0100

    gsk: Rename shaders for OpenGL

 gsk/gskglrenderer.c                                |    8 ++++++--
 ...ase-renderer-fragment.glsl => gl3-base.fs.glsl} |    0
 ...{base-renderer-vertex.glsl => gl3-base.vs.glsl} |    0
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index 96f04af..c6037cf 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]