summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-29 20:14:48 +0200
committerwm4 <wm4@nowhere>2017-07-29 20:14:48 +0200
commit8494fdadaeb25b3c1a42c71559be5bd74d1d4638 (patch)
treeda93683844c45e1fec754c68dc19c99d167562f2 /video/out/opengl/ra.h
parent0f9fcf0ed4ecb54eaadbddd3cbbc14d39ab93227 (diff)
downloadmpv-8494fdadaeb25b3c1a42c71559be5bd74d1d4638.tar.bz2
mpv-8494fdadaeb25b3c1a42c71559be5bd74d1d4638.tar.xz
vo_opengl: manage dither texture via ra
Also add some more helpers. Fix the broken math.h include statement. utils.c uses ra_gl.h internals, which it shouldn't, and which will be removed again as soon as this code gets converted to ra fully.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index 211f87077b..11b458b616 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -71,6 +71,9 @@ struct ra_tex_params {
// if true, repeat texture coordinates
bool non_normalized; // hack for GL_TEXTURE_RECTANGLE OSX idiocy
// always set to false, except in OSX code
+ // If non-NULL, the texture will be created with these contents, and is
+ // considered immutable afterwards (no upload, mapping, or rendering to it).
+ void *initial_data;
};
struct ra_tex {
@@ -137,6 +140,9 @@ struct ra_fns {
bool (*poll_mapped_buffer)(struct ra *ra, struct ra_mapped_buffer *buf);
};
+struct ra_tex *ra_tex_create(struct ra *ra, const struct ra_tex_params *params);
+void ra_tex_free(struct ra *ra, struct ra_tex **tex);
+
const struct ra_format *ra_find_unorm_format(struct ra *ra,
int bytes_per_component,
int n_components);