From 215afe7a41a20d7de1ca96cabfb89b2234b564ff Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 4 Sep 2015 12:34:00 +0200 Subject: vo_opengl: use the correct attribute name for vertex position This didn't seem entirely sane. It probably worked by accident, because "position" is always the first attribute, and thus the default value 0 for the location was always correct. --- video/out/gl_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/gl_utils.c b/video/out/gl_utils.c index 7e13f839d6..b88e04c6c0 100644 --- a/video/out/gl_utils.c +++ b/video/out/gl_utils.c @@ -877,8 +877,8 @@ void gl_sc_gen_shader_and_reset(struct gl_shader_cache *sc) if (strcmp(e->name, "position") == 0) { // setting raster pos. requires setting gl_Position magic variable assert(e->num_elems == 2 && e->type == GL_FLOAT); - ADD(vert_head, "%s vec2 position;\n", vert_in); - ADD(vert_body, "gl_Position = vec4(position, 1.0, 1.0);\n"); + ADD(vert_head, "%s vec2 vertex_position;\n", vert_in); + ADD(vert_body, "gl_Position = vec4(vertex_position, 1.0, 1.0);\n"); } else { ADD(vert_head, "%s %s vertex_%s;\n", vert_in, glsl_type, e->name); ADD(vert_head, "%s %s %s;\n", vert_out, glsl_type, e->name); -- cgit v1.2.3