From a2cc291573df3f9ab782cc450ef1fd56732feb48 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 25 Oct 2016 03:04:06 +0900 Subject: [PATCH] graphics: Rename variables --- internal/graphics/program.go | 2 +- internal/graphics/shader.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/graphics/program.go b/internal/graphics/program.go index 1eed62833..bb32d6878 100644 --- a/internal/graphics/program.go +++ b/internal/graphics/program.go @@ -80,7 +80,7 @@ var ( normalize: true, }, { - name: "geo_matrix", + name: "geo_matrix_body", dataType: opengl.Float, num: 4, normalize: false, diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go index 011b176b5..886038b96 100644 --- a/internal/graphics/shader.go +++ b/internal/graphics/shader.go @@ -42,20 +42,20 @@ uniform highp mat4 projection_matrix; uniform highp mat4 modelview_matrix; // TODO: Remove this attribute highp vec2 vertex; attribute highp vec2 tex_coord; -attribute highp vec4 geo_matrix; +attribute highp vec4 geo_matrix_body; attribute highp vec2 geo_matrix_translation; varying highp vec2 vertex_out_tex_coord; void main(void) { vertex_out_tex_coord = tex_coord; mat4 x = modelview_matrix; // temporary hack not to omit modelview_matrix - mat4 geom = mat4( - vec4(geo_matrix[0], geo_matrix[2], 0, 0), - vec4(geo_matrix[1], geo_matrix[3], 0, 0), + mat4 geo_matrix = mat4( + vec4(geo_matrix_body[0], geo_matrix_body[2], 0, 0), + vec4(geo_matrix_body[1], geo_matrix_body[3], 0, 0), vec4(0, 0, 1, 0), vec4(geo_matrix_translation, 0, 1) ); - gl_Position = projection_matrix * geom * vec4(vertex, 0, 1); + gl_Position = projection_matrix * geo_matrix * vec4(vertex, 0, 1); } `, shaderFragmentTexture: `