diff options
Diffstat (limited to 'video/out/gl_utils.h')
-rw-r--r-- | video/out/gl_utils.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/video/out/gl_utils.h b/video/out/gl_utils.h index 4f32e5ff56..482c88a0fa 100644 --- a/video/out/gl_utils.h +++ b/video/out/gl_utils.h @@ -43,4 +43,27 @@ mp_image_t *glGetWindowScreenshot(GL *gl); // log, lev: module and log level, as in mp_msg() void mp_log_source(struct mp_log *log, int lev, const char *src); +struct gl_vao_entry { + const char *name; + int num_elems; + GLenum type; + bool normalized; + int offset; +}; + +struct gl_vao { + GL *gl; + GLuint vao; + GLuint buffer; + int stride; // always assuming interleaved elements + const struct gl_vao_entry *entries; +}; + +void gl_vao_init(struct gl_vao *vao, GL *gl, int stride, + const struct gl_vao_entry *entries); +void gl_vao_uninit(struct gl_vao *vao); +void gl_vao_bind(struct gl_vao *vao); +void gl_vao_unbind(struct gl_vao *vao); +void gl_vao_bind_attribs(struct gl_vao *vao, GLuint program); + #endif |