diff options
author | igv <igv@users.noreply.github.com> | 2016-02-28 00:56:33 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-28 17:46:16 +0100 |
commit | b638a413c37e8c892fcf40ca4ae29693f4942d0c (patch) | |
tree | cc438259a5da3936f67a7f5d1b602edfa5b1edf9 | |
parent | ad2d10af1993591e8b175b10cb83f91fa13e8fe8 (diff) | |
download | mpv-b638a413c37e8c892fcf40ca4ae29693f4942d0c.tar.bz2 mpv-b638a413c37e8c892fcf40ca4ae29693f4942d0c.tar.xz |
vo_opengl: remove redundant code
-rw-r--r-- | video/out/opengl/video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 9c031d5149..c10e16fe41 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -522,6 +522,7 @@ static void get_scale_factors(struct gl_video *p, double xy[2]); #define GLSL(x) gl_sc_add(p->sc, #x "\n"); #define GLSLF(...) gl_sc_addf(p->sc, __VA_ARGS__) +#define GLSLHF(...) gl_sc_haddf(p->sc, __VA_ARGS__) // Return a fixed point texture format with given characteristics. static const struct fmt_entry *find_tex_format(GL *gl, int bytes_per_comp, @@ -990,8 +991,6 @@ static void load_shader(struct gl_video *p, const char *body) gl_sc_uniform_f(p->sc, "frame", p->frames_uploaded); gl_sc_uniform_vec2(p->sc, "image_size", (GLfloat[]){p->image_params.w, p->image_params.h}); - gl_sc_uniform_vec2(p->sc, "pixel_size", (GLfloat[]){1.0f / p->texture_w, - 1.0f / p->texture_h}); } static const char *get_custom_shader_fn(struct gl_video *p, const char *body) @@ -1021,6 +1020,7 @@ static bool apply_shaders(struct gl_video *p, char **shaders, if (!body) continue; finish_pass_fbo(p, &textures[tex], w, h, tex_num, 0); + GLSLHF("#define pixel_size pixel_size%d\n", tex_num); load_shader(p, body); const char *fn_name = get_custom_shader_fn(p, body); GLSLF("// custom shader\n"); |