[vlc-commits] opengl: vt: add glGetFramebufferAttachmentParameteriv

Thomas Guillem git at videolan.org
Thu Jan 4 12:09:53 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan  4 09:31:23 2018 +0100| [9cf9c390b24a537aee404fea8f73220c0b52419c] | committer: Thomas Guillem

opengl: vt: add glGetFramebufferAttachmentParameteriv

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9cf9c390b24a537aee404fea8f73220c0b52419c
---

 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 ef4e90fa41..4ea603f9f0 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 87e53a3a0f..7d7d3e75ca 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