diff options
author | Kurt Kartaltepe <kkartaltepe@gmail.com> | 2021-12-03 17:15:27 -0800 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-12-04 03:04:17 +0000 |
commit | fc94c8c365ebeb038af6052bf4ea0506c1220559 (patch) | |
tree | 702e2b99a09ee1d3eebae8ded2adb574d793b471 /video/out/opengl/common.h | |
parent | 181656955b6a556515238b2692a8bde210274793 (diff) | |
download | mpv-fc94c8c365ebeb038af6052bf4ea0506c1220559.tar.bz2 mpv-fc94c8c365ebeb038af6052bf4ea0506c1220559.tar.xz |
wayland: ensure read and draw buffers are assigned
This is a workaround for nvidia proprietary drivers. The authors of
those drivers interpret the spec such that eglMakeCurrent will not
reconfigure the read and draw buffers. Thus windows wont display
anything drawn by opengl. nvidia authors refer to
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_no_config_context.txt
specifically Issues 2/3 which reference eglMakeCurrent.
On mesa this is a non-issue and the read/draw targets are assigned with
eglMakeCurrent.
The context must be made current in order to query OpenGL strings. An
earlier proposal to create the wayland window surface similarly to X11
during init was deemed inappropriate so instead we manually set the
targets once we have created a window surface.
Diffstat (limited to 'video/out/opengl/common.h')
-rw-r--r-- | video/out/opengl/common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h index 38414fe18b..f89fcc953b 100644 --- a/video/out/opengl/common.h +++ b/video/out/opengl/common.h @@ -111,6 +111,7 @@ struct GL { void (GLAPIENTRY *ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); void (GLAPIENTRY *ReadBuffer)(GLenum); + void (GLAPIENTRY *DrawBuffer)(GLenum); void (GLAPIENTRY *DrawArrays)(GLenum, GLint, GLsizei); GLenum (GLAPIENTRY *GetError)(void); void (GLAPIENTRY *GetTexLevelParameteriv)(GLenum, GLint, GLenum, GLint *); |