[vlc-devel] [PATCH 10/27] opengl: add support for renderbuffers API
Romain Vimont
rom1v at videolabs.io
Thu Jun 25 14:22:57 CEST 2020
Co-authored-by: Alexandre Janniaux <ajanni at videolabs.io>
---
modules/video_output/opengl/gl_api.c | 5 +++++
modules/video_output/opengl/gl_common.h | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/modules/video_output/opengl/gl_api.c b/modules/video_output/opengl/gl_api.c
index 6bead1cb6b..bdfd9c030b 100644
--- a/modules/video_output/opengl/gl_api.c
+++ b/modules/video_output/opengl/gl_api.c
@@ -119,6 +119,11 @@ vlc_gl_api_Init(struct vlc_gl_api *api, vlc_gl_t *gl)
GET_PROC_ADDR(DeleteBuffers);
GET_PROC_ADDR_OPTIONAL(GetFramebufferAttachmentParameteriv);
+ GET_PROC_ADDR_OPTIONAL(GenFramebuffers);
+ GET_PROC_ADDR_OPTIONAL(DeleteFramebuffers);
+ GET_PROC_ADDR_OPTIONAL(BindFramebuffer);
+ GET_PROC_ADDR_OPTIONAL(FramebufferTexture2D);
+ GET_PROC_ADDR_OPTIONAL(CheckFramebufferStatus);
GET_PROC_ADDR_OPTIONAL(BufferSubData);
GET_PROC_ADDR_OPTIONAL(BufferStorage);
diff --git a/modules/video_output/opengl/gl_common.h b/modules/video_output/opengl/gl_common.h
index 26ff00d7cc..a1dd060dff 100644
--- a/modules/video_output/opengl/gl_common.h
+++ b/modules/video_output/opengl/gl_common.h
@@ -243,6 +243,11 @@ typedef void (APIENTRY *PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLs
# define PFNGLBUFFERSUBDATAPROC typeof(glBufferSubData)*
# define PFNGLDELETEBUFFERSPROC typeof(glDeleteBuffers)*
# define PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC typeof(glGetFramebufferAttachmentParameteriv)*
+# define PFNGLGENFRAMEBUFFERSPROC typeof(glGenFramebuffers)*
+# define PFNGLDELETEFRAMEBUFFERSPROC typeof(glDeleteFramebuffers)*
+# define PFNGLBINDFRAMEBUFFERPROC typeof(glBindFramebuffer)*
+# define PFNGLFRAMEBUFFERTEXTURE2DPROC typeof(glFramebufferTexture2D)*
+# define PFNGLCHECKFRAMEBUFFERSTATUSPROC typeof(glCheckFramebufferStatus)*
#if defined(__APPLE__)
# import <CoreFoundation/CoreFoundation.h>
#endif
@@ -343,6 +348,11 @@ typedef struct {
/* Framebuffers commands */
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv;
+ PFNGLGENFRAMEBUFFERSPROC GenFramebuffers;
+ PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers;
+ PFNGLBINDFRAMEBUFFERPROC BindFramebuffer;
+ PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D;
+ PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus;
/* Commands used for PBO and/or Persistent mapping */
PFNGLBUFFERSUBDATAPROC BufferSubData; /* can be NULL */
--
2.27.0
More information about the vlc-devel
mailing list