[vlc-commits] opengl: vt: add glGetFramebufferAttachmentParameteriv

Thomas Guillem git at videolan.org
Mon Jan 8 11:47:06 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan  4 09:31:23 2018 +0100| [8e09cff704fc541dcee6809e81b7ace20137771c] | committer: Jean-Baptiste Kempf

opengl: vt: add glGetFramebufferAttachmentParameteriv

Present since OpenGL 3.0. Will be used to fetch the framebuffer depth.

(cherry picked from commit 9cf9c390b24a537aee404fea8f73220c0b52419c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=8e09cff704fc541dcee6809e81b7ace20137771c
---

 modules/video_output/opengl/converter.h   | 4 ++++
 modules/video_output/opengl/vout_helper.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h
index 42ba005160..89e9fce66c 100644
--- a/modules/video_output/opengl/converter.h
+++ b/modules/video_output/opengl/converter.h
@@ -102,6 +102,7 @@ typedef void (APIENTRY *PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLs
 #   define PFNGLBUFFERDATAPROC               typeof(glBufferData)*
 #   define PFNGLBUFFERSUBDATAPROC            typeof(glBufferSubData)*
 #   define PFNGLDELETEBUFFERSPROC            typeof(glDeleteBuffers)*
+#   define PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC typeof(glGetFramebufferAttachmentParameteriv)*
 #if defined(__APPLE__)
 #   import <CoreFoundation/CoreFoundation.h>
 #endif
@@ -200,6 +201,9 @@ typedef struct {
     PFNGLBUFFERDATAPROC    BufferData;
     PFNGLDELETEBUFFERSPROC DeleteBuffers;
 
+    /* Framebuffers commands */
+    PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv;
+
     /* Commands used for PBO and/or Persistent mapping */
     PFNGLBUFFERSUBDATAPROC          BufferSubData; /* can be NULL */
     PFNGLBUFFERSTORAGEPROC          BufferStorage; /* can be NULL */
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index ed99996155..fe98279f5d 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -823,6 +823,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     GET_PROC_ADDR(BufferData);
     GET_PROC_ADDR(DeleteBuffers);
 
+    GET_PROC_ADDR_OPTIONAL(GetFramebufferAttachmentParameteriv);
+
     GET_PROC_ADDR_OPTIONAL(BufferSubData);
     GET_PROC_ADDR_OPTIONAL(BufferStorage);
     GET_PROC_ADDR_OPTIONAL(MapBufferRange);



More information about the vlc-commits mailing list