summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-09-30 15:12:13 -0700
committerCedric BAIL <cedric@osg.samsung.com>2015-09-30 15:16:27 -0700
commit6d095064e6a3a474d884557fc4d002ce55dae52b (patch)
tree614176001f182966950c157c08eb2d9b016e4182
parent130a58dab2a982acdc1d8aa273cfeac272422d9c (diff)
evas: move all GL safe define to a common header and use it.
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h247
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_define.h261
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c6
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c11
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c1
5 files changed, 266 insertions, 260 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 1356610472..6539ff9c0c 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -40,252 +40,7 @@
40# endif 40# endif
41#endif 41#endif
42 42
43#ifndef GL_TEXTURE_RECTANGLE_NV 43#include "evas_gl_define.h"
44# define GL_TEXTURE_RECTANGLE_NV 0x84F5
45#endif
46#ifndef GL_BGRA
47# define GL_BGRA 0x80E1
48#endif
49#ifndef GL_RGBA4
50# define GL_RGBA4 0x8056
51#endif
52#ifndef GL_RGBA8
53# define GL_RGBA8 0x8058
54#endif
55#ifndef GL_RGBA12
56# define GL_RGBA12 0x805A
57#endif
58#ifndef GL_RGBA16
59# define GL_RGBA16 0x805B
60#endif
61#ifndef GL_R3_G3_B2
62# define GL_R3_G3_B2 0x2A10
63#endif
64#ifndef GL_RGB4
65# define GL_RGB4 0x804F
66#endif
67#ifndef GL_RGB5
68# define GL_RGB5 0x8050
69#endif
70#ifndef GL_RGB8
71# define GL_RGB8 0x8051
72#endif
73#ifndef GL_RGB10
74# define GL_RGB10 0x8052
75#endif
76#ifndef GL_RGB12
77# define GL_RGB12 0x8053
78#endif
79#ifndef GL_RGB16
80# define GL_RGB16 0x8054
81#endif
82#ifndef GL_ALPHA4
83# define GL_ALPHA4 0x803B
84#endif
85#ifndef GL_ALPHA8
86# define GL_ALPHA8 0x803C
87#endif
88#ifndef GL_ALPHA12
89# define GL_ALPHA12 0x803D
90#endif
91#ifndef GL_ALPHA16
92# define GL_ALPHA16 0x803E
93#endif
94#ifndef GL_LUMINANCE4
95# define GL_LUMINANCE4 0x803F
96#endif
97#ifndef GL_LUMINANCE8
98# define GL_LUMINANCE8 0x8040
99#endif
100#ifndef GL_LUMINANCE12
101# define GL_LUMINANCE12 0x8041
102#endif
103#ifndef GL_LUMINANCE16
104# define GL_LUMINANCE16 0x8042
105#endif
106#ifndef GL_LUMINANCE4_ALPHA4
107# define GL_LUMINANCE4_ALPHA4 0x8043
108#endif
109#ifndef GL_LUMINANCE8_ALPHA8
110# define GL_LUMINANCE8_ALPHA8 0x8045
111#endif
112#ifndef GL_LUMINANCE12_ALPHA12
113# define GL_LUMINANCE12_ALPHA12 0x8047
114#endif
115#ifndef GL_LUMINANCE16_ALPHA16
116# define GL_LUMINANCE16_ALPHA16 0x8048
117#endif
118#ifndef GL_ETC1_RGB8_OES
119# define GL_ETC1_RGB8_OES 0x8D64
120#endif
121#ifndef GL_COMPRESSED_RGB8_ETC2
122# define GL_COMPRESSED_RGB8_ETC2 0x9274
123#endif
124#ifndef GL_COMPRESSED_RGBA8_ETC2_EAC
125# define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
126#endif
127#ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
128# define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
129#endif
130#ifndef GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
131# define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
132#endif
133#ifndef GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
134# define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
135#endif
136#ifndef GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
137# define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
138#endif
139#ifndef GL_TEXTURE_EXTERNAL_OES
140# define GL_TEXTURE_EXTERNAL_OES 0x8D65
141#endif
142#ifndef GL_UNPACK_ROW_LENGTH
143# define GL_UNPACK_ROW_LENGTH 0x0CF2
144#endif
145#ifndef EGL_NO_DISPLAY
146# define EGL_NO_DISPLAY 0
147#endif
148#ifndef EGL_NO_CONTEXT
149# define EGL_NO_CONTEXT 0
150#endif
151#ifndef EGL_NONE
152# define EGL_NONE 0x3038
153#endif
154#ifndef EGL_TRUE
155# define EGL_TRUE 1
156#endif
157#ifndef EGL_FALSE
158# define EGL_FALSE 0
159#endif
160
161#ifndef EGL_MAP_GL_TEXTURE_2D_SEC
162# define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201
163#endif
164#ifndef EGL_MAP_GL_TEXTURE_HEIGHT_SEC
165# define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202
166#endif
167#ifndef EGL_MAP_GL_TEXTURE_WIDTH_SEC
168# define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203
169#endif
170#ifndef EGL_MAP_GL_TEXTURE_FORMAT_SEC
171# define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204
172#endif
173#ifndef EGL_MAP_GL_TEXTURE_RGB_SEC
174# define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205
175#endif
176#ifndef EGL_MAP_GL_TEXTURE_RGBA_SEC
177# define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206
178#endif
179#ifndef EGL_MAP_GL_TEXTURE_BGRA_SEC
180# define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207
181#endif
182#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC
183# define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208
184#endif
185#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC
186# define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209
187#endif
188#ifndef EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC
189# define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a
190#endif
191#ifndef EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC
192# define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b
193#endif
194#ifndef EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC
195# define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c
196#endif
197#ifndef EGL_IMAGE_PRESERVED_KHR
198# define EGL_IMAGE_PRESERVED_KHR 0x30D2
199#endif
200#ifndef EGL_NATIVE_SURFACE_TIZEN
201#define EGL_NATIVE_SURFACE_TIZEN 0x32A1
202#endif
203#ifndef GL_PROGRAM_BINARY_LENGTH
204# define GL_PROGRAM_BINARY_LENGTH 0x8741
205#endif
206#ifndef GL_NUM_PROGRAM_BINARY_FORMATS
207# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
208#endif
209#ifndef GL_PROGRAM_BINARY_FORMATS
210# define GL_PROGRAM_BINARY_FORMATS 0x87FF
211#endif
212#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT
213# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
214#endif
215#ifndef GL_MAX_SAMPLES_IMG
216#define GL_MAX_SAMPLES_IMG 0x9135
217#endif
218#ifndef GL_MAX_SAMPLES_EXT
219#define GL_MAX_SAMPLES_EXT 0x8D57
220#endif
221#ifndef GL_WRITE_ONLY
222#define GL_WRITE_ONLY 0x88B9
223#endif
224#ifndef EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC
225#define EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC 1
226#endif
227#ifndef EGL_MAP_GL_TEXTURE_DEVICE_G2D_SEC
228#define EGL_MAP_GL_TEXTURE_DEVICE_G2D_SEC 2
229#endif
230#ifndef EGL_MAP_GL_TEXTURE_OPTION_READ_SEC
231#define EGL_MAP_GL_TEXTURE_OPTION_READ_SEC (1<<0)
232#endif
233#ifndef EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC
234#define EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC (1<<1)
235#endif
236#ifndef EGL_GL_TEXTURE_2D_KHR
237#define EGL_GL_TEXTURE_2D_KHR 0x30B1
238#endif
239#ifndef EGL_GL_TEXTURE_LEVEL_KHR
240#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
241#endif
242#ifndef EGL_IMAGE_PRESERVED_KHR
243#define EGL_IMAGE_PRESERVED_KHR 0x30D2
244#endif
245#ifndef EGL_OPENGL_ES3_BIT_KHR
246#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
247#endif
248
249// Evas_3d require GL_BGR, but that's an extention and will not be necessary once we move to Evas_GL_Image
250#ifndef GL_BGR
251#define GL_BGR 0x80E0
252#endif
253
254#ifndef GL_COLOR_BUFFER_BIT0_QCOM
255// if GL_COLOR_BUFFER_BIT0_QCOM just assume the rest arent... saves fluff
256#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
257#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
258#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
259#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
260#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
261#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
262#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
263#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
264#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
265#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
266#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
267#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
268#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
269#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
270#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
271#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
272#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
273#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
274#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
275#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
276#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
277#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
278#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
279#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
280#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
281#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
282#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
283#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
284#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
285#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
286#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
287#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
288#endif
289 44
290#define EVAS_GL_TILE_SIZE 16 45#define EVAS_GL_TILE_SIZE 16
291 46
diff --git a/src/modules/evas/engines/gl_common/evas_gl_define.h b/src/modules/evas/engines/gl_common/evas_gl_define.h
new file mode 100644
index 0000000000..2b5de74541
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/evas_gl_define.h
@@ -0,0 +1,261 @@
1#ifndef EVAS_GL_DEFINE_H_
2# define EVAS_GL_DEFINE_H_
3
4
5#ifndef GL_TEXTURE_RECTANGLE_NV
6# define GL_TEXTURE_RECTANGLE_NV 0x84F5
7#endif
8#ifndef GL_BGRA
9# define GL_BGRA 0x80E1
10#endif
11#ifndef GL_RGBA4
12# define GL_RGBA4 0x8056
13#endif
14#ifndef GL_RGBA8
15# define GL_RGBA8 0x8058
16#endif
17#ifndef GL_RGBA12
18# define GL_RGBA12 0x805A
19#endif
20#ifndef GL_RGBA16
21# define GL_RGBA16 0x805B
22#endif
23#ifndef GL_R3_G3_B2
24# define GL_R3_G3_B2 0x2A10
25#endif
26#ifndef GL_RGB4
27# define GL_RGB4 0x804F
28#endif
29#ifndef GL_RGB5
30# define GL_RGB5 0x8050
31#endif
32#ifndef GL_RGB8
33# define GL_RGB8 0x8051
34#endif
35#ifndef GL_RGB10
36# define GL_RGB10 0x8052
37#endif
38#ifndef GL_RGB12
39# define GL_RGB12 0x8053
40#endif
41#ifndef GL_RGB16
42# define GL_RGB16 0x8054
43#endif
44#ifndef GL_ALPHA4
45# define GL_ALPHA4 0x803B
46#endif
47#ifndef GL_ALPHA8
48# define GL_ALPHA8 0x803C
49#endif
50#ifndef GL_ALPHA12
51# define GL_ALPHA12 0x803D
52#endif
53#ifndef GL_ALPHA16
54# define GL_ALPHA16 0x803E
55#endif
56#ifndef GL_LUMINANCE4
57# define GL_LUMINANCE4 0x803F
58#endif
59#ifndef GL_LUMINANCE8
60# define GL_LUMINANCE8 0x8040
61#endif
62#ifndef GL_LUMINANCE12
63# define GL_LUMINANCE12 0x8041
64#endif
65#ifndef GL_LUMINANCE16
66# define GL_LUMINANCE16 0x8042
67#endif
68#ifndef GL_LUMINANCE4_ALPHA4
69# define GL_LUMINANCE4_ALPHA4 0x8043
70#endif
71#ifndef GL_LUMINANCE8_ALPHA8
72# define GL_LUMINANCE8_ALPHA8 0x8045
73#endif
74#ifndef GL_LUMINANCE12_ALPHA12
75# define GL_LUMINANCE12_ALPHA12 0x8047
76#endif
77#ifndef GL_LUMINANCE16_ALPHA16
78# define GL_LUMINANCE16_ALPHA16 0x8048
79#endif
80#ifndef GL_ETC1_RGB8_OES
81# define GL_ETC1_RGB8_OES 0x8D64
82#endif
83#ifndef GL_COMPRESSED_RGB8_ETC2
84# define GL_COMPRESSED_RGB8_ETC2 0x9274
85#endif
86#ifndef GL_COMPRESSED_RGBA8_ETC2_EAC
87# define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
88#endif
89#ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
90# define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
91#endif
92#ifndef GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
93# define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
94#endif
95#ifndef GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
96# define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
97#endif
98#ifndef GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
99# define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
100#endif
101#ifndef GL_TEXTURE_EXTERNAL_OES
102# define GL_TEXTURE_EXTERNAL_OES 0x8D65
103#endif
104#ifndef GL_UNPACK_ROW_LENGTH
105# define GL_UNPACK_ROW_LENGTH 0x0CF2
106#endif
107#ifndef EGL_NO_DISPLAY
108# define EGL_NO_DISPLAY 0
109#endif
110#ifndef EGL_NO_CONTEXT
111# define EGL_NO_CONTEXT 0
112#endif
113#ifndef EGL_NONE
114# define EGL_NONE 0x3038
115#endif
116#ifndef EGL_TRUE
117# define EGL_TRUE 1
118#endif
119#ifndef EGL_FALSE
120# define EGL_FALSE 0
121#endif
122
123#ifndef EGL_MAP_GL_TEXTURE_2D_SEC
124# define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201
125#endif
126#ifndef EGL_MAP_GL_TEXTURE_HEIGHT_SEC
127# define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202
128#endif
129#ifndef EGL_MAP_GL_TEXTURE_WIDTH_SEC
130# define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203
131#endif
132#ifndef EGL_MAP_GL_TEXTURE_FORMAT_SEC
133# define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204
134#endif
135#ifndef EGL_MAP_GL_TEXTURE_RGB_SEC
136# define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205
137#endif
138#ifndef EGL_MAP_GL_TEXTURE_RGBA_SEC
139# define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206
140#endif
141#ifndef EGL_MAP_GL_TEXTURE_BGRA_SEC
142# define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207
143#endif
144#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC
145# define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208
146#endif
147#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC
148# define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209
149#endif
150#ifndef EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC
151# define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a
152#endif
153#ifndef EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC
154# define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b
155#endif
156#ifndef EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC
157# define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c
158#endif
159#ifndef EGL_IMAGE_PRESERVED_KHR
160# define EGL_IMAGE_PRESERVED_KHR 0x30D2
161#endif
162#ifndef EGL_NATIVE_SURFACE_TIZEN
163#define EGL_NATIVE_SURFACE_TIZEN 0x32A1
164#endif
165#ifndef GL_PROGRAM_BINARY_LENGTH
166# define GL_PROGRAM_BINARY_LENGTH 0x8741
167#endif
168#ifndef GL_NUM_PROGRAM_BINARY_FORMATS
169# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
170#endif
171#ifndef GL_PROGRAM_BINARY_FORMATS
172# define GL_PROGRAM_BINARY_FORMATS 0x87FF
173#endif
174#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT
175# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
176#endif
177#ifndef GL_MAX_SAMPLES_IMG
178#define GL_MAX_SAMPLES_IMG 0x9135
179#endif
180#ifndef GL_MAX_SAMPLES_EXT
181#define GL_MAX_SAMPLES_EXT 0x8D57
182#endif
183#ifndef GL_WRITE_ONLY
184#define GL_WRITE_ONLY 0x88B9
185#endif
186#ifndef EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC
187#define EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC 1
188#endif
189#ifndef EGL_MAP_GL_TEXTURE_DEVICE_G2D_SEC
190#define EGL_MAP_GL_TEXTURE_DEVICE_G2D_SEC 2
191#endif
192#ifndef EGL_MAP_GL_TEXTURE_OPTION_READ_SEC
193#define EGL_MAP_GL_TEXTURE_OPTION_READ_SEC (1<<0)
194#endif
195#ifndef EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC
196#define EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC (1<<1)
197#endif
198#ifndef EGL_GL_TEXTURE_2D_KHR
199#define EGL_GL_TEXTURE_2D_KHR 0x30B1
200#endif
201#ifndef EGL_GL_TEXTURE_LEVEL_KHR
202#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
203#endif
204#ifndef EGL_IMAGE_PRESERVED_KHR
205#define EGL_IMAGE_PRESERVED_KHR 0x30D2
206#endif
207#ifndef EGL_OPENGL_ES3_BIT_KHR
208#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
209#endif
210#ifndef EGL_NATIVE_PIXMAP_KHR
211# define EGL_NATIVE_PIXMAP_KHR 0x30b0
212#endif
213#ifndef EGL_Y_INVERTED_NOK
214# define EGL_Y_INVERTED_NOK 0x307F
215#endif
216#ifndef EGL_OPENGL_ES3_BIT
217# define EGL_OPENGL_ES3_BIT 0x00000040
218#endif
219
220// Evas_3d require GL_BGR, but that's an extention and will not be necessary once we move to Evas_GL_Image
221#ifndef GL_BGR
222#define GL_BGR 0x80E0
223#endif
224
225#ifndef GL_COLOR_BUFFER_BIT0_QCOM
226// if GL_COLOR_BUFFER_BIT0_QCOM just assume the rest arent... saves fluff
227#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
228#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
229#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
230#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
231#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
232#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
233#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
234#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
235#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
236#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
237#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
238#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
239#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
240#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
241#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
242#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
243#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
244#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
245#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
246#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
247#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
248#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
249#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
250#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
251#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
252#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
253#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
254#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
255#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
256#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
257#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
258#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
259#endif
260
261#endif
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index 07ac4e3e18..b424c702ca 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1,5 +1,7 @@
1#include "config.h" 1#include "config.h"
2#include "evas_engine.h" 2#include "evas_engine.h"
3#include "../gl_common/evas_gl_define.h"
4
3#include <wayland-client.h> 5#include <wayland-client.h>
4 6
5#ifdef HAVE_DLSYM 7#ifdef HAVE_DLSYM
@@ -17,10 +19,6 @@
17 19
18#define EVAS_GL_UPDATE_TILE_SIZE 16 20#define EVAS_GL_UPDATE_TILE_SIZE 16
19 21
20#ifndef EGL_NATIVE_PIXMAP_KHR
21# define EGL_NATIVE_PIXMAP_KHR 0x30b0
22#endif
23
24/* external variables */ 22/* external variables */
25int _evas_engine_gl_drm_log_dom = -1; 23int _evas_engine_gl_drm_log_dom = -1;
26int _extn_have_buffer_age = 1; 24int _extn_have_buffer_age = 1;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 23e00179c4..747ec98771 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1,5 +1,6 @@
1#include "evas_common_private.h" /* Also includes international specific stuff */ 1#include "evas_common_private.h" /* Also includes international specific stuff */
2#include "evas_engine.h" 2#include "evas_engine.h"
3#include "../gl_common/evas_gl_define.h"
3 4
4//#define TIMDBG 1 5//#define TIMDBG 1
5#ifdef TIMDBG 6#ifdef TIMDBG
@@ -82,16 +83,6 @@ glsym_func_void_ptr glsym_evas_gl_common_current_context_get = NULL;
82 83
83#ifdef GL_GLES 84#ifdef GL_GLES
84 85
85#ifndef EGL_NATIVE_PIXMAP_KHR
86# define EGL_NATIVE_PIXMAP_KHR 0x30b0
87#endif
88#ifndef EGL_Y_INVERTED_NOK
89# define EGL_Y_INVERTED_NOK 0x307F
90#endif
91
92#ifndef EGL_OPENGL_ES3_BIT
93# define EGL_OPENGL_ES3_BIT 0x00000040
94#endif
95_eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; 86_eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL;
96void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; 87void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL;
97void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL; 88void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL;
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 4b1ebab032..80c606fac7 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -1,4 +1,5 @@
1#include "evas_engine.h" 1#include "evas_engine.h"
2#include "../gl_common/evas_gl_define.h"
2 3
3static Eina_TLS _outbuf_key = 0; 4static Eina_TLS _outbuf_key = 0;
4static Eina_TLS _context_key = 0; 5static Eina_TLS _context_key = 0;