diff options
author | 2016-09-14 20:42:52 +0200 | |
---|---|---|
committer | 2016-09-14 20:46:45 +0200 | |
commit | 88a07c5f53812b4bb4959e6cfc8353180b6b5c91 (patch) | |
tree | 2f696c828d06b73fa6bf91efa66aade61c070d54 /video/out/vo.h | |
parent | e24ba8fa7f1a0645307ab53e16d9d6d1fe2349b2 (diff) |
vo_opengl: dynamically manage texture units
A minor cleanup that makes the code simpler, and guarantees that we
cleanup the GL state properly at any point.
We do this by reusing the uniform caching, and assigning each sampler
uniform its own texture unit by incrementing a counter. This has various
subtle consequences for the GL driver, which hopefully don't matter. For
example, it will bind fewer textures at a time, but also rebind them
more often.
For some reason we keep TEXUNIT_VIDEO_NUM, because it limits the number
of hook passes that can be bound at the same time.
OSD rendering is an exception: we do many passes with the same shader,
and rebinding the texture each pass. For now, this is handled in an
unclean way, and we make the shader cache reserve texture unit 0 for the
OSD texture. At a later point, we should allocate that one dynamically
too, and just pass the texture unit to the OSD rendering code. Right now
I feel like vo_rpi.c (may it rot in hell) is in the way.
Diffstat (limited to 'video/out/vo.h')
0 files changed, 0 insertions, 0 deletions