[vlc-commits] [Git][videolan/vlc][master] opengl: sampler: check OpenGL at runtime
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 5 21:43:34 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
47a6a9ea by Alexandre Janniaux at 2023-08-05T21:26:22+00:00
opengl: sampler: check OpenGL at runtime
OpenGL ES2 and 3 have this glGetFramebufferAttachmentParameteriv
function but the allowed targets MUST be one of GL_BACK, GL_DEPTH or
GL_STENCIL. We cannot use this on GL_BACK_LEFT then, which is a
different value.
- - - - -
1 changed file:
- modules/video_output/opengl/sampler.c
Changes:
=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -790,10 +790,13 @@ opengl_fragment_shader_init(struct vlc_gl_sampler *sampler, bool expose_planes)
#if !defined(USE_OPENGL_ES2)
const opengl_vtable_t *vt = priv->vt;
/* fetch framebuffer depth (we are already bound to the default one). */
- if (vt->GetFramebufferAttachmentParameteriv != NULL)
+ if (priv->gl->api_type == VLC_OPENGL &&
+ vt->GetFramebufferAttachmentParameteriv != NULL)
+ {
vt->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK_LEFT,
GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
&fb_depth);
+ }
#endif
if (fb_depth <= 0)
fb_depth = 8;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/47a6a9ea155c10607a7b54febc75ec78b6c169fd
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/47a6a9ea155c10607a7b54febc75ec78b6c169fd
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list