summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-22 21:51:32 +0200
committerwm4 <wm4@nowhere>2017-07-22 21:51:32 +0200
commita24df94fedb762c5fb587d3e8a442ae22b5ce053 (patch)
treea9c41e4a63d2e4560d7e70aad6cf46e8ae42aa85 /video/out/opengl/utils.h
parent1c8131167334183ad24b90cbbf4fd86d3d5406cc (diff)
downloadmpv-a24df94fedb762c5fb587d3e8a442ae22b5ce053.tar.bz2
mpv-a24df94fedb762c5fb587d3e8a442ae22b5ce053.tar.xz
vo_opengl: add mechanism to create/cache VAO on the fly
This removes VAO handling from video.c. Instead the shader cache will create the VAO as needed. The consequence is that this creates a VAO per shader, which might be a bit wasteful, but doesn't matter anyway.
Diffstat (limited to 'video/out/opengl/utils.h')
-rw-r--r--video/out/opengl/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h
index 191565dd93..7a5606871f 100644
--- a/video/out/opengl/utils.h
+++ b/video/out/opengl/utils.h
@@ -166,8 +166,13 @@ void gl_sc_uniform_mat2(struct gl_shader_cache *sc, char *name,
void gl_sc_uniform_mat3(struct gl_shader_cache *sc, char *name,
bool transpose, GLfloat *v);
void gl_sc_set_vao(struct gl_shader_cache *sc, struct gl_vao *vao);
+void gl_sc_set_vertex_format(struct gl_shader_cache *sc,
+ const struct gl_vao_entry *entries,
+ size_t vertex_size);
void gl_sc_enable_extension(struct gl_shader_cache *sc, char *name);
struct mp_pass_perf gl_sc_generate(struct gl_shader_cache *sc);
+void gl_sc_draw_data(struct gl_shader_cache *sc, GLenum prim, void *ptr,
+ size_t num);
void gl_sc_reset(struct gl_shader_cache *sc);
struct mpv_global;
void gl_sc_set_cache_dir(struct gl_shader_cache *sc, struct mpv_global *global,