diff options
author | wm4 <wm4@nowhere> | 2017-08-05 14:20:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-05 16:27:09 +0200 |
commit | 333cae74ef0fa62e0355e85d21f0f41ced3963e7 (patch) | |
tree | 08e390dd9bdf7e997bf91ebef5bd5579336f27eb /video/out/opengl/ra_gl.h | |
parent | f72a33d2cb223df921967cfe7ae203f882ba6921 (diff) | |
download | mpv-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/ra_gl.h')
-rw-r--r-- | video/out/opengl/ra_gl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/opengl/ra_gl.h b/video/out/opengl/ra_gl.h index 016ce13419..0d3828c978 100644 --- a/video/out/opengl/ra_gl.h +++ b/video/out/opengl/ra_gl.h @@ -28,9 +28,21 @@ struct ra_mapped_buffer_gl { GLsync fence; }; +// For ra_renderpass.priv +struct ra_renderpass_gl { + GLuint program; + // 1 entry for each ra_renderpass_params.inputs[] entry + GLint *uniform_loc; + int num_uniform_loc; // == ra_renderpass_params.num_inputs + struct gl_vao vao; + bool first_run; +}; + int ra_init_gl(struct ra *ra, GL *gl); struct ra_tex *ra_create_wrapped_texture(struct ra *ra, GLuint gl_texture, GLenum gl_target, GLint gl_iformat, GLenum gl_format, GLenum gl_type, int w, int h); struct ra_tex *ra_create_wrapped_fb(struct ra *ra, GLuint gl_fbo, int w, int h); + +GL *ra_gl_get(struct ra *ra); |