diff options
author | wm4 <wm4@nowhere> | 2014-03-24 23:30:12 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-24 23:33:10 +0100 |
commit | 7f39b4655e76bf26a32a415b0c21bfd4102c6b31 (patch) | |
tree | bf88ceae97d2f28c61be2ff2c1c70c9b115eebe0 /video/out/gl_video.c | |
parent | 99044308b5820a450d5440f6c2a424cad02cb019 (diff) | |
download | mpv-7f39b4655e76bf26a32a415b0c21bfd4102c6b31.tar.bz2 mpv-7f39b4655e76bf26a32a415b0c21bfd4102c6b31.tar.xz |
vo_opengl: runtime icc profile switching
The changes in vo_opengl.c are merely for adding the icc options to the
set of options than can be changed with the vo_cmdline command.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r-- | video/out/gl_video.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 204b8a8c70..56a56cb1ae 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1214,12 +1214,17 @@ void gl_video_set_lut3d(struct gl_video *p, struct lut3d *lut3d) { GL *gl = p->gl; - assert(!p->lut_3d_texture); - - if (!lut3d) + if (!lut3d) { + if (p->use_lut_3d) { + p->use_lut_3d = false; + reinit_rendering(p); + } return; + } + + if (!p->lut_3d_texture) + gl->GenTextures(1, &p->lut_3d_texture); - gl->GenTextures(1, &p->lut_3d_texture); gl->ActiveTexture(GL_TEXTURE0 + TEXUNIT_3DLUT); gl->BindTexture(GL_TEXTURE_3D, p->lut_3d_texture); gl->PixelStorei(GL_UNPACK_ALIGNMENT, 4); @@ -1237,6 +1242,8 @@ void gl_video_set_lut3d(struct gl_video *p, struct lut3d *lut3d) check_gl_features(p); debug_check_gl(p, "after 3d lut creation"); + + reinit_rendering(p); } static void set_image_textures(struct gl_video *p, struct video_image *vimg, |