1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/video/out/opengl
wm4 eb83ee4a4a vo_opengl: add our own copy of OpenGL headers
gl_headers.h is basically header_fixes.h done consequently. It contains
all OpenGL defines (and some typedefs) we need. We don't include GL
headers provided by the system anymore.

Some care has to be taken by certain windowing APIs including all of
gl.h anyway. Then the definitions could clash. Fortunately, redefining
preprocessor symbols to the same content is allowed and ignored. Also,
redefining typedefs to the same thing is allowed in C11. Apparently the
latter is not allowed in C99, so there is an imperfect attempt to avoid
the typedefs if required API symbols are apparently present already.

The nost risky part about this are the standard typedefs and GLAPIENTRY.
The latter is different only on win32 (and at least consistently so).
The typedefs are mostly based on stdint.h typedefs, which khrplatform.h
clumsily emulates on platforms which don't have it. The biggest
difference is that we define GLsizeiptr directly to ptrdiff_t, instead
of checking for the _WIN64 symbol and defining it to long or long long.

This also typedefs GLsync to __GLsync, just like the khronos headers.
Although symbols prefixed with __ are implementation reserved, khronos
also violates this rule, and having the same definition as khronos will
avoid problems on duplicate definitions.

We can simplify the build scripts too. The ios-gl check seems a bit
wrong now (what we really want to test for is EAGLContext), but I can't
test and thus can't improve it.

cuda_dynamic.h redefined two GL symbols; just include the new headers
directly instead.
2017-04-07 15:09:27 +02:00
..
angle_dynamic.c angle_dynamic: silence warnings during compilation 2016-11-25 09:49:49 +01:00
angle_dynamic.h vo_opengl: angle: rewrite with custom swap chain 2017-02-07 22:45:07 +11:00
common.c vo_opengl: add hw overlay support and use it for RPI 2016-09-12 19:58:58 +02:00
common.h vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_angle.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context_cocoa.c cocoa: add option to force dedicated GPU 2017-02-27 23:53:53 +01:00
context_drm_egl.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context_dxinterop.c vo_opengl: read framebuffer depth from actual FBO used for rendering 2017-03-20 13:31:28 +01:00
context_mali_fbdev.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context_rpi.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context_vdpau.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_w32.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_wayland.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context_x11.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_x11egl.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
context.c vo_opengl: add a backend start_frame callback for context_vdpau 2017-03-20 13:37:47 +01:00
context.h vo_opengl: add a backend start_frame callback for context_vdpau 2017-03-20 13:37:47 +01:00
cuda_dynamic.c vo_opengl: hwdec_cuda: Prefix cuda symbols to avoid collisions 2016-11-24 20:15:57 +01:00
cuda_dynamic.h vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
egl_helpers.c vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
egl_helpers.h vo_opengl: add a generic EGL function loader function 2017-04-06 14:50:19 +02:00
formats.c vo_opengl: don't crash on unsupported formats 2017-02-17 19:48:29 +01:00
formats.h vo_opengl: hwdec_vaegl: use new format setup function 2017-02-17 17:26:01 +01:00
gl_headers.h vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
hwdec_cuda.c vo_opengl: hwdec_cuda: use new format setup function 2017-02-17 16:39:10 +01:00
hwdec_d3d11egl.c vo_opengl: hwdec_d3d11egl: make it work with some ANGLE DLL versions 2017-02-27 15:40:11 +01:00
hwdec_d3d11eglrgb.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
hwdec_dxva2egl.c vo_opengl: hwdec: reset hw_subfmt field 2016-07-15 13:04:17 +02:00
hwdec_dxva2gldx.c vo_opengl: hwdec: reset hw_subfmt field 2016-07-15 13:04:17 +02:00
hwdec_ios.m vo_opengl: implement videotoolbox hwdec on iOS 2017-02-17 11:43:24 -08:00
hwdec_osx.c vo_opengl: hwdec_osx: use new format setup function 2017-02-17 17:08:37 +01:00
hwdec_rpi.c vo_opengl: hwdec_rpi: fix NULL pointer deref in certain cases 2016-10-04 16:36:20 +02:00
hwdec_vaegl.c vo_opengl: hwdec_vaegl: use new format setup function 2017-02-17 17:26:01 +01:00
hwdec_vaglx.c vaapi: remove central lock around vaapi API calls 2017-01-28 18:27:30 +01:00
hwdec_vdpau.c vdpau: use libavutil for surface allocation during decoding 2017-01-17 15:48:56 +01:00
hwdec.c vo_opengl: remove dxva2 dummy hwdec backend 2017-02-20 08:39:08 +01:00
hwdec.h vo_opengl: handle GL_LUMINANCE_ALPHA and integer textures differently 2017-02-17 16:28:31 +01:00
lcms.c options: add M_OPT_FILE to some more file options 2017-03-06 15:41:06 +01:00
lcms.h vo_opengl: simplify option handling 2016-09-06 11:11:36 +02:00
osd.c vo_opengl: remove caching GL_MAX_TEXTURE_SIZE value 2016-07-03 17:33:59 +02:00
osd.h vo_opengl, osd: allow osc.lua to react faster on resizes 2016-03-21 22:23:41 +01:00
user_shaders.c vo_opengl: use misc/ctype.h instead of <ctype.h> 2017-02-25 14:33:27 +01:00
user_shaders.h vo_opengl: move eval_szexpr to user_shaders.c 2016-07-03 19:42:52 +02:00
utils.c vo_opengl: use 16 bit textures with angle 2017-04-03 18:12:42 +02:00
utils.h vo_opengl: read framebuffer depth from actual FBO used for rendering 2017-03-20 13:31:28 +01:00
video_shaders.c filter_kernels: Keep f.radius in terms of dest/filter coords. 2017-03-06 03:31:40 +00:00
video_shaders.h vo_opengl: generalize HDR tone mapping mechanism 2016-07-03 19:42:52 +02:00
video.c vo_opengl: use 16 bit textures with angle 2017-04-03 18:12:42 +02:00
video.h options: remove deprecated sub-option handling for --vo and --ao 2016-11-25 21:17:25 +01:00