summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/utils.c')
-rw-r--r--video/out/opengl/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index 8c52b61cba..024b8d4bbe 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -33,6 +33,7 @@
#include "options/path.h"
#include "stream/stream.h"
#include "formats.h"
+#include "ra_gl.h"
#include "utils.h"
// GLU has this as gluErrorString (we don't use GLU, as it is legacy-OpenGL)
@@ -746,6 +747,17 @@ void gl_sc_uniform_tex_ui(struct gl_shader_cache *sc, char *name, GLuint texture
u->tex_handle = texture;
}
+void gl_sc_uniform_texture(struct gl_shader_cache *sc, char *name,
+ struct ra_tex *tex)
+{
+ struct ra_tex_gl *tex_gl = tex->priv;
+ if (tex->params.format->ctype == RA_CTYPE_UINT) {
+ gl_sc_uniform_tex_ui(sc, name, tex_gl->texture);
+ } else {
+ gl_sc_uniform_tex(sc, name, tex_gl->target, tex_gl->texture);
+ }
+}
+
static const char *mp_image2D_type(GLenum access)
{
switch (access) {