[vlc-devel] [PATCH 01/24] opengl: move compat definition to gl_common.h

Romain Vimont rom1v at videolabs.io
Mon Jan 27 21:19:51 CET 2020


---
 modules/video_output/opengl/gl_common.h   | 13 +++++++++++++
 modules/video_output/opengl/interop_sw.c  | 11 -----------
 modules/video_output/opengl/vout_helper.c |  4 ----
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/modules/video_output/opengl/gl_common.h b/modules/video_output/opengl/gl_common.h
index 384d3bddae..f5f7f54a9f 100644
--- a/modules/video_output/opengl/gl_common.h
+++ b/modules/video_output/opengl/gl_common.h
@@ -80,6 +80,19 @@
 # define GL_TEXTURE_LUMINANCE_SIZE 0x8060
 #endif
 
+#ifndef GL_CLAMP_TO_EDGE
+# define GL_CLAMP_TO_EDGE 0x812F
+#endif
+#ifndef GL_UNPACK_ROW_LENGTH
+# define GL_UNPACK_ROW_LENGTH 0x0CF2
+#endif
+#ifndef GL_PIXEL_UNPACK_BUFFER
+# define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#endif
+#ifndef GL_DYNAMIC_DRAW
+# define GL_DYNAMIC_DRAW 0x88E8
+#endif
+
 #ifndef APIENTRY
 # define APIENTRY
 #endif
diff --git a/modules/video_output/opengl/interop_sw.c b/modules/video_output/opengl/interop_sw.c
index 6e4376c7b6..11c0946c5d 100644
--- a/modules/video_output/opengl/interop_sw.c
+++ b/modules/video_output/opengl/interop_sw.c
@@ -29,17 +29,6 @@
 #include <vlc_common.h>
 #include "internal.h"
 
-#ifndef GL_UNPACK_ROW_LENGTH
-# define GL_UNPACK_ROW_LENGTH 0x0CF2
-#endif
-
-#ifndef GL_PIXEL_UNPACK_BUFFER
-# define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#endif
-#ifndef GL_DYNAMIC_DRAW
-# define GL_DYNAMIC_DRAW 0x88E8
-#endif
-
 #define PBO_DISPLAY_COUNT 2 /* Double buffering */
 typedef struct
 {
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 7697f364bb..a8c73074fb 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -42,10 +42,6 @@
 #include "vout_helper.h"
 #include "internal.h"
 
-#ifndef GL_CLAMP_TO_EDGE
-# define GL_CLAMP_TO_EDGE 0x812F
-#endif
-
 #define SPHERE_RADIUS 1.f
 
 /* FIXME: GL_ASSERT_NOERROR disabled for now because:
-- 
2.25.0



More information about the vlc-devel mailing list