summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/gl_utils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-05 14:20:14 +0200
committerwm4 <wm4@nowhere>2017-08-05 16:27:09 +0200
commit333cae74ef0fa62e0355e85d21f0f41ced3963e7 (patch)
tree08e390dd9bdf7e997bf91ebef5bd5579336f27eb /video/out/opengl/gl_utils.h
parentf72a33d2cb223df921967cfe7ae203f882ba6921 (diff)
downloadmpv-333cae74ef0fa62e0355e85d21f0f41ced3963e7.tar.bz2
mpv-333cae74ef0fa62e0355e85d21f0f41ced3963e7.tar.xz
vo_opengl: move shader handling to ra
Now all GL-specifics of shader compilation are abstracted through ra. Of course we still have everything hardcoded to GLSL - that isn't going to change. Some things will probably change later - in particular, the way we pass uniforms and textures to the shader. Currently, there is a confusing mismatch between "primitive" uniforms like floats, and others like textures. Also, SSBOs are not abstracted yet.
Diffstat (limited to 'video/out/opengl/gl_utils.h')
-rw-r--r--video/out/opengl/gl_utils.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/video/out/opengl/gl_utils.h b/video/out/opengl/gl_utils.h
index 5ae8d1590b..6192a6b312 100644
--- a/video/out/opengl/gl_utils.h
+++ b/video/out/opengl/gl_utils.h
@@ -34,32 +34,22 @@ void gl_upload_tex(GL *gl, GLenum target, GLenum format, GLenum type,
mp_image_t *gl_read_fbo_contents(GL *gl, int fbo, int w, int h);
-const char* mp_sampler_type(GLenum texture_target);
-
// print a multi line string with line numbers (e.g. for shader sources)
// 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 {
- // used for shader / glBindAttribLocation
- const char *name;
- // glVertexAttribPointer() arguments
- int num_elems; // size (number of elements)
- GLenum type;
- bool normalized;
- int offset;
-};
-
struct gl_vao {
GL *gl;
GLuint vao; // the VAO object, or 0 if unsupported by driver
GLuint buffer; // GL_ARRAY_BUFFER used for the data
int stride; // size of each element (interleaved elements are assumed)
- const struct gl_vao_entry *entries;
+ const struct ra_renderpass_input *entries;
+ int num_entries;
};
void gl_vao_init(struct gl_vao *vao, GL *gl, int stride,
- const struct gl_vao_entry *entries);
+ const struct ra_renderpass_input *entries,
+ int num_entries);
void gl_vao_uninit(struct gl_vao *vao);
void gl_vao_draw_data(struct gl_vao *vao, GLenum prim, void *ptr, size_t num);