[vlc-devel] [PATCH 17/18] opengl: move compatibility defines to gl_common.h

Romain Vimont rom1v at videolabs.io
Fri Dec 20 15:48:59 CET 2019


---
 .../video_output/opengl/fragment_shaders.c    | 25 -------------------
 modules/video_output/opengl/gl_common.h       | 24 ++++++++++++++++++
 2 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index 043a582144..ce61e0481b 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -37,31 +37,6 @@
 #include "internal.h"
 #include "vout_helper.h"
 
-#ifndef GL_RED
-# define GL_RED 0x1903
-#endif
-#ifndef GL_RG
-# define GL_RG 0x8227
-#endif
-#ifndef GL_R16
-# define GL_R16 0x822A
-#endif
-#ifndef GL_BGRA
-# define GL_BGRA 0x80E1
-#endif
-#ifndef GL_RG16
-# define GL_RG16 0x822C
-#endif
-#ifndef GL_LUMINANCE16
-# define GL_LUMINANCE16 0x8042
-#endif
-#ifndef GL_TEXTURE_RED_SIZE
-# define GL_TEXTURE_RED_SIZE 0x805C
-#endif
-#ifndef GL_TEXTURE_LUMINANCE_SIZE
-# define GL_TEXTURE_LUMINANCE_SIZE 0x8060
-#endif
-
 static int GetTexFormatSize(const opengl_vtable_t *vt, int target,
                             int tex_format, int tex_internal, int tex_type)
 {
diff --git a/modules/video_output/opengl/gl_common.h b/modules/video_output/opengl/gl_common.h
index fb14ae3b66..384d3bddae 100644
--- a/modules/video_output/opengl/gl_common.h
+++ b/modules/video_output/opengl/gl_common.h
@@ -55,6 +55,30 @@
 #ifndef GL_TEXTURE_EXTERNAL_OES
 # define GL_TEXTURE_EXTERNAL_OES 0x8D65
 #endif
+#ifndef GL_RED
+# define GL_RED 0x1903
+#endif
+#ifndef GL_RG
+# define GL_RG 0x8227
+#endif
+#ifndef GL_R16
+# define GL_R16 0x822A
+#endif
+#ifndef GL_BGRA
+# define GL_BGRA 0x80E1
+#endif
+#ifndef GL_RG16
+# define GL_RG16 0x822C
+#endif
+#ifndef GL_LUMINANCE16
+# define GL_LUMINANCE16 0x8042
+#endif
+#ifndef GL_TEXTURE_RED_SIZE
+# define GL_TEXTURE_RED_SIZE 0x805C
+#endif
+#ifndef GL_TEXTURE_LUMINANCE_SIZE
+# define GL_TEXTURE_LUMINANCE_SIZE 0x8060
+#endif
 
 #ifndef APIENTRY
 # define APIENTRY
-- 
2.24.1



More information about the vlc-devel mailing list