From 81851febc4766e053cc17134c779959f5942025a Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 26 Jul 2017 11:19:51 +0200 Subject: vo_opengl: start work on rendering API abstraction This starts work on moving OpenGL-specific code out of the general renderer code, so that we can support other other GPU APIs. This is in a very early stage and it's only a proof of concept. It's unknown whether this will succeed or result in other backends. For now, the GL rendering API ("ra") and its only provider (ra_gl) does texture creation/upload/destruction only. And it's used for the main video texture only. All other code is still hardcoded to GL. There is some duplication with ra_format and gl_format handling. In the end, only the ra variants will be needed (plus the gl_format table of course). For now, this is simpler, because for some reason lots of hwdec code still requires the GL variants, and would have to be updated to use the ra ones. Currently, the video.c code accesses private ra_gl fields. In the end, it should not do that of course, and it would not include ra_gl.h. Probably adds bugs, but you can keep them. --- wscript_build.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index 12ef2c5490..58e5743d4e 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -413,6 +413,8 @@ def build(ctx): ( "video/out/opengl/hwdec_vdpau.c", "vdpau-gl-x11" ), ( "video/out/opengl/lcms.c", "gl" ), ( "video/out/opengl/osd.c", "gl" ), + ( "video/out/opengl/ra.c", "gl" ), + ( "video/out/opengl/ra_gl.c", "gl" ), ( "video/out/opengl/user_shaders.c", "gl" ), ( "video/out/opengl/utils.c", "gl" ), ( "video/out/opengl/video.c", "gl" ), -- cgit v1.2.3