summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-14 18:51:32 +0200
committerwm4 <wm4@nowhere>2016-09-14 18:51:32 +0200
commitffbc85cde94da81c9ba1db64451ec11400f98497 (patch)
tree5596a33204ff55fd3f8445340dd465b5d277750e /video/out/opengl/video.c
parent8f1a889f75fb9ac385de12ff79b97b1e53cf304c (diff)
downloadmpv-ffbc85cde94da81c9ba1db64451ec11400f98497.tar.bz2
mpv-ffbc85cde94da81c9ba1db64451ec11400f98497.tar.xz
vo_opengl: remove a redundant glActiveTexture() call
This bound video textures to individual texture units - this is how it used to work long ago, but now is pointless, and maybe even dangerous.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 1399513897..040dbb2f3d 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -875,7 +875,6 @@ static void init_video(struct gl_video *p)
plane->w = plane->tex_w = mp_image_plane_w(&layout, n);
plane->h = plane->tex_h = mp_image_plane_h(&layout, n);
- gl->ActiveTexture(GL_TEXTURE0 + n);
gl->GenTextures(1, &plane->gl_texture);
gl->BindTexture(gl_target, plane->gl_texture);
@@ -889,9 +888,10 @@ static void init_video(struct gl_video *p)
gl->TexParameteri(gl_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
gl->TexParameteri(gl_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ gl->BindTexture(gl_target, 0);
+
MP_VERBOSE(p, "Texture for plane %d: %dx%d\n", n, plane->w, plane->h);
}
- gl->ActiveTexture(GL_TEXTURE0);
}
debug_check_gl(p, "after video texture creation");