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