mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
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:
parent
d04d2380e3
commit
215afe7a41
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user