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.
This commit is contained in:
wm4 2015-09-04 12:34:00 +02:00
parent d04d2380e3
commit 215afe7a41
1 changed files with 2 additions and 2 deletions

View File

@ -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);