summaryrefslogtreecommitdiff
path: root/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/rpidistro-vlc/files/3004-use-GLESv2-headers-over-GL-headers.patch
blob: 8016ab3795d6a9142ccbc20b0ac243d868291a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 377a67af6c3f7c38f6f7ba24f042ba1a6cfd3f24 Mon Sep 17 00:00:00 2001
From: Vincent Davis Jr <vince@underview.tech>
Date: Fri, 9 Dec 2022 00:21:43 -0600
Subject: [PATCH] use GLESv2 headers over GL headers

Upstream-Status: Inappropriate

RPI-Distro repo forks original vlc and applies patches to enable
raspiberry pi support.

We utilize GLESv2 during compilation. Patches ensures
we utilize headers for it.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
 modules/video_output/opengl/converter.h | 12 +++---------
 modules/visualization/glspectrum.c      |  4 +++-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h
index 7000e1f38..a3fe32671 100644
--- a/modules/video_output/opengl/converter.h
+++ b/modules/video_output/opengl/converter.h
@@ -41,15 +41,9 @@
 #  include <OpenGLES/ES2/glext.h>
 # endif
 #else /* !defined (__APPLE__) */
-# if defined (USE_OPENGL_ES2)
-#  include <GLES2/gl2.h>
-#  include <GLES2/gl2ext.h>
-# else
-#  ifdef _WIN32
-#   include <GL/glew.h>
-#  endif
-#  include <GL/gl.h>
-# endif
+#define USE_OPENGL_ES2
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
 #endif
 
 #define VLCGL_PICTURE_MAX 128
diff --git a/modules/visualization/glspectrum.c b/modules/visualization/glspectrum.c
index 06f8d1bdf..470080b1a 100644
--- a/modules/visualization/glspectrum.c
+++ b/modules/visualization/glspectrum.c
@@ -37,7 +37,9 @@
 #ifdef __APPLE__
 # include <OpenGL/gl.h>
 #else
-# include <GL/gl.h>
+#define USE_OPENGL_ES2
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
 #endif
 
 #include <math.h>
-- 
2.38.1