You.i Engine
YiEGLAPIGenerated.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 /*******************************************************************************
3  * DO NOT EDIT THIS FILE!
4  * This file has been generated by tools/YiGLWrangler
5  ******************************************************************************/
6 
7 #ifndef _YI_EGL_H_
8 #error Do not include YiEGLAPIGenerated.h directly. Include YiEGL.h instead.
9 #endif
10 
11 #ifndef _YI_EGL_API_GENERATED_H_
12 #define _YI_EGL_API_GENERATED_H_
13 #if defined(YI_OPENGL_ES2_RENDERING) && !defined(YI_IOS) && !defined(YI_TVOS) && !defined(YI_WEBOS) && !defined(YI_TIZEN_NACL)
14 
15 #if defined(__egl_h_)
16 #error "EGL/egl.h included before YiEGL.h"
17 #endif
18 
19 #if defined(__eglext_h_)
20 #error "EGL/eglext.h included before YiEGL.h"
21 #endif
22 
23 #define __egl_h_ 1
24 #define __eglext_h_ 1
25 
26 #include "renderer/YiEGLDefines.h"
27 #include "renderer/YiEGLPlatform.h"
28 #include "renderer/YiEGLTypes.h"
29 #include "utility/YiError.h"
30 
31 /* Version IDs */
32 #define EGL_VERSION_1_0
33 #define EGL_VERSION_1_1
34 #define EGL_VERSION_1_2
35 #define EGL_VERSION_1_3
36 #define EGL_VERSION_1_4
37 #define EGL_VERSION_1_5
38 
39 /* Extension IDs */
40 #define EGL_ANDROID_blob_cache
41 #define EGL_ANDROID_create_native_client_buffer
42 #define EGL_ANDROID_framebuffer_target
43 #define EGL_ANDROID_front_buffer_auto_refresh
44 #define EGL_ANDROID_image_native_buffer
45 #define EGL_ANDROID_native_fence_sync
46 #define EGL_ANDROID_presentation_time
47 #define EGL_ANDROID_recordable
48 #define EGL_ANGLE_d3d_share_handle_client_buffer
49 #define EGL_ANGLE_device_d3d
50 #define EGL_ANGLE_query_surface_pointer
51 #define EGL_ANGLE_surface_d3d_texture_2d_share_handle
52 #define EGL_ANGLE_window_fixed_size
53 #define EGL_ARM_implicit_external_sync
54 #define EGL_ARM_pixmap_multisample_discard
55 #define EGL_EXT_buffer_age
56 #define EGL_EXT_client_extensions
57 #define EGL_EXT_create_context_robustness
58 #define EGL_EXT_device_base
59 #define EGL_EXT_device_drm
60 #define EGL_EXT_device_enumeration
61 #define EGL_EXT_device_openwf
62 #define EGL_EXT_device_query
63 #define EGL_EXT_image_dma_buf_import
64 #define EGL_EXT_multiview_window
65 #define EGL_EXT_output_base
66 #define EGL_EXT_output_drm
67 #define EGL_EXT_output_openwf
68 #define EGL_EXT_platform_base
69 #define EGL_EXT_platform_device
70 #define EGL_EXT_platform_wayland
71 #define EGL_EXT_platform_x11
72 #define EGL_EXT_protected_content
73 #define EGL_EXT_protected_surface
74 #define EGL_EXT_stream_consumer_egloutput
75 #define EGL_EXT_swap_buffers_with_damage
76 #define EGL_EXT_yuv_surface
77 #define EGL_HI_clientpixmap
78 #define EGL_HI_colorformats
79 #define EGL_IMG_context_priority
80 #define EGL_IMG_image_plane_attribs
81 #define EGL_KHR_cl_event
82 #define EGL_KHR_cl_event2
83 #define EGL_KHR_client_get_all_proc_addresses
84 #define EGL_KHR_config_attribs
85 #define EGL_KHR_context_flush_control
86 #define EGL_KHR_create_context
87 #define EGL_KHR_create_context_no_error
88 #define EGL_KHR_debug
89 #define EGL_KHR_fence_sync
90 #define EGL_KHR_get_all_proc_addresses
91 #define EGL_KHR_gl_colorspace
92 #define EGL_KHR_gl_renderbuffer_image
93 #define EGL_KHR_gl_texture_2D_image
94 #define EGL_KHR_gl_texture_3D_image
95 #define EGL_KHR_gl_texture_cubemap_image
96 #define EGL_KHR_image
97 #define EGL_KHR_image_base
98 #define EGL_KHR_image_pixmap
99 #define EGL_KHR_lock_surface
100 #define EGL_KHR_lock_surface2
101 #define EGL_KHR_lock_surface3
102 #define EGL_KHR_mutable_render_buffer
103 #define EGL_KHR_no_config_context
104 #define EGL_KHR_partial_update
105 #define EGL_KHR_platform_android
106 #define EGL_KHR_platform_gbm
107 #define EGL_KHR_platform_wayland
108 #define EGL_KHR_platform_x11
109 #define EGL_KHR_reusable_sync
110 #define EGL_KHR_stream
111 #define EGL_KHR_stream_attrib
112 #define EGL_KHR_stream_consumer_gltexture
113 #define EGL_KHR_stream_cross_process_fd
114 #define EGL_KHR_stream_fifo
115 #define EGL_KHR_stream_producer_aldatalocator
116 #define EGL_KHR_stream_producer_eglsurface
117 #define EGL_KHR_surfaceless_context
118 #define EGL_KHR_swap_buffers_with_damage
119 #define EGL_KHR_vg_parent_image
120 #define EGL_KHR_wait_sync
121 #define EGL_MESA_drm_image
122 #define EGL_MESA_image_dma_buf_export
123 #define EGL_MESA_platform_gbm
124 #define EGL_MESA_platform_surfaceless
125 #define EGL_NOK_swap_region
126 #define EGL_NOK_swap_region2
127 #define EGL_NOK_texture_from_pixmap
128 #define EGL_NV_3dvision_surface
129 #define EGL_NV_coverage_sample
130 #define EGL_NV_coverage_sample_resolve
131 #define EGL_NV_cuda_event
132 #define EGL_NV_depth_nonlinear
133 #define EGL_NV_device_cuda
134 #define EGL_NV_native_query
135 #define EGL_NV_post_convert_rounding
136 #define EGL_NV_post_sub_buffer
137 #define EGL_NV_robustness_video_memory_purge
138 #define EGL_NV_stream_consumer_gltexture_yuv
139 #define EGL_NV_stream_metadata
140 #define EGL_NV_stream_sync
141 #define EGL_NV_sync
142 #define EGL_NV_system_time
143 #define EGL_TIZEN_image_native_buffer
144 #define EGL_TIZEN_image_native_surface
145 
146 /*************************** INLINED IMPLEMENTATION ***************************/
147 
148 
154 inline EGLBoolean YiEGLBindAPI(EGLenum eApi)
155 {
156  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglBindAPIStr);
157  YI_ASSERT(CYIEGL::CurrentAPI.eglBindAPIProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglBindAPIStr, CYIEGL::EGL_VERSION_1_2_STR);
158  return CYIEGL::CurrentAPI.eglBindAPIProc(eApi);
159 }
160 #define eglBindAPI YiEGLBindAPI
161 
167 inline EGLBoolean YiEGLBindTexImage(EGLDisplay pDpy, EGLSurface pSurface, EGLint nBuffer)
168 {
169  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglBindTexImageStr);
170  YI_ASSERT(CYIEGL::CurrentAPI.eglBindTexImageProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglBindTexImageStr, CYIEGL::EGL_VERSION_1_1_STR);
171  return CYIEGL::CurrentAPI.eglBindTexImageProc(pDpy, pSurface, nBuffer);
172 }
173 #define eglBindTexImage YiEGLBindTexImage
174 
180 inline EGLBoolean YiEGLChooseConfig(EGLDisplay pDpy, const EGLint *pnAttribList, EGLConfig *ppConfigs, EGLint nConfigSize, EGLint *pnNumConfig)
181 {
182  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglChooseConfigStr);
183  YI_ASSERT(CYIEGL::CurrentAPI.eglChooseConfigProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglChooseConfigStr, CYIEGL::EGL_VERSION_1_0_STR);
184  return CYIEGL::CurrentAPI.eglChooseConfigProc(pDpy, pnAttribList, ppConfigs, nConfigSize, pnNumConfig);
185 }
186 #define eglChooseConfig YiEGLChooseConfig
187 
191 inline EGLint YiEGLClientWaitSync(EGLDisplay pDpy, EGLSync pSync, EGLint nFlags, EGLTime uTimeout)
192 {
193  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglClientWaitSyncStr);
194  YI_ASSERT(CYIEGL::CurrentAPI.eglClientWaitSyncProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglClientWaitSyncStr, CYIEGL::EGL_VERSION_1_5_STR);
195  return CYIEGL::CurrentAPI.eglClientWaitSyncProc(pDpy, pSync, nFlags, uTimeout);
196 }
197 #define eglClientWaitSync YiEGLClientWaitSync
198 
204 inline EGLBoolean YiEGLCopyBuffers(EGLDisplay pDpy, EGLSurface pSurface, EGLNativePixmapType pTarget)
205 {
206  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCopyBuffersStr);
207  YI_ASSERT(CYIEGL::CurrentAPI.eglCopyBuffersProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCopyBuffersStr, CYIEGL::EGL_VERSION_1_0_STR);
208  return CYIEGL::CurrentAPI.eglCopyBuffersProc(pDpy, pSurface, pTarget);
209 }
210 #define eglCopyBuffers YiEGLCopyBuffers
211 
217 inline EGLContext YiEGLCreateContext(EGLDisplay pDpy, EGLConfig pConfig, EGLContext pShareContext, const EGLint *pnAttribList)
218 {
219  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreateContextStr);
220  YI_ASSERT(CYIEGL::CurrentAPI.eglCreateContextProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreateContextStr, CYIEGL::EGL_VERSION_1_0_STR);
221  return CYIEGL::CurrentAPI.eglCreateContextProc(pDpy, pConfig, pShareContext, pnAttribList);
222 }
223 #define eglCreateContext YiEGLCreateContext
224 
228 inline EGLImage YiEGLCreateImage(EGLDisplay pDpy, EGLContext pCtx, EGLenum eTarget, EGLClientBuffer pBuffer, const EGLAttrib *pnAttribList)
229 {
230  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreateImageStr);
231  YI_ASSERT(CYIEGL::CurrentAPI.eglCreateImageProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreateImageStr, CYIEGL::EGL_VERSION_1_5_STR);
232  return CYIEGL::CurrentAPI.eglCreateImageProc(pDpy, pCtx, eTarget, pBuffer, pnAttribList);
233 }
234 #define eglCreateImage YiEGLCreateImage
235 
241 inline EGLSurface YiEGLCreatePbufferFromClientBuffer(EGLDisplay pDpy, EGLenum eBuftype, EGLClientBuffer pBuffer, EGLConfig pConfig, const EGLint *pnAttribList)
242 {
243  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreatePbufferFromClientBufferStr);
244  YI_ASSERT(CYIEGL::CurrentAPI.eglCreatePbufferFromClientBufferProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreatePbufferFromClientBufferStr, CYIEGL::EGL_VERSION_1_2_STR);
245  return CYIEGL::CurrentAPI.eglCreatePbufferFromClientBufferProc(pDpy, eBuftype, pBuffer, pConfig, pnAttribList);
246 }
247 #define eglCreatePbufferFromClientBuffer YiEGLCreatePbufferFromClientBuffer
248 
254 inline EGLSurface YiEGLCreatePbufferSurface(EGLDisplay pDpy, EGLConfig pConfig, const EGLint *pnAttribList)
255 {
256  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreatePbufferSurfaceStr);
257  YI_ASSERT(CYIEGL::CurrentAPI.eglCreatePbufferSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreatePbufferSurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
258  return CYIEGL::CurrentAPI.eglCreatePbufferSurfaceProc(pDpy, pConfig, pnAttribList);
259 }
260 #define eglCreatePbufferSurface YiEGLCreatePbufferSurface
261 
267 inline EGLSurface YiEGLCreatePixmapSurface(EGLDisplay pDpy, EGLConfig pConfig, EGLNativePixmapType pPixmap, const EGLint *pnAttribList)
268 {
269  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreatePixmapSurfaceStr);
270  YI_ASSERT(CYIEGL::CurrentAPI.eglCreatePixmapSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreatePixmapSurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
271  return CYIEGL::CurrentAPI.eglCreatePixmapSurfaceProc(pDpy, pConfig, pPixmap, pnAttribList);
272 }
273 #define eglCreatePixmapSurface YiEGLCreatePixmapSurface
274 
278 inline EGLSurface YiEGLCreatePlatformPixmapSurface(EGLDisplay pDpy, EGLConfig pConfig, void *pNativePixmap, const EGLAttrib *pnAttribList)
279 {
280  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreatePlatformPixmapSurfaceStr);
281  YI_ASSERT(CYIEGL::CurrentAPI.eglCreatePlatformPixmapSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreatePlatformPixmapSurfaceStr, CYIEGL::EGL_VERSION_1_5_STR);
282  return CYIEGL::CurrentAPI.eglCreatePlatformPixmapSurfaceProc(pDpy, pConfig, pNativePixmap, pnAttribList);
283 }
284 #define eglCreatePlatformPixmapSurface YiEGLCreatePlatformPixmapSurface
285 
289 inline EGLSurface YiEGLCreatePlatformWindowSurface(EGLDisplay pDpy, EGLConfig pConfig, void *pNativeWindow, const EGLAttrib *pnAttribList)
290 {
291  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreatePlatformWindowSurfaceStr);
292  YI_ASSERT(CYIEGL::CurrentAPI.eglCreatePlatformWindowSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreatePlatformWindowSurfaceStr, CYIEGL::EGL_VERSION_1_5_STR);
293  return CYIEGL::CurrentAPI.eglCreatePlatformWindowSurfaceProc(pDpy, pConfig, pNativeWindow, pnAttribList);
294 }
295 #define eglCreatePlatformWindowSurface YiEGLCreatePlatformWindowSurface
296 
300 inline EGLSync YiEGLCreateSync(EGLDisplay pDpy, EGLenum eType, const EGLAttrib *pnAttribList)
301 {
302  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreateSyncStr);
303  YI_ASSERT(CYIEGL::CurrentAPI.eglCreateSyncProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreateSyncStr, CYIEGL::EGL_VERSION_1_5_STR);
304  return CYIEGL::CurrentAPI.eglCreateSyncProc(pDpy, eType, pnAttribList);
305 }
306 #define eglCreateSync YiEGLCreateSync
307 
313 inline EGLSurface YiEGLCreateWindowSurface(EGLDisplay pDpy, EGLConfig pConfig, EGLNativeWindowType pWin, const EGLint *pnAttribList)
314 {
315  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglCreateWindowSurfaceStr);
316  YI_ASSERT(CYIEGL::CurrentAPI.eglCreateWindowSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglCreateWindowSurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
317  return CYIEGL::CurrentAPI.eglCreateWindowSurfaceProc(pDpy, pConfig, pWin, pnAttribList);
318 }
319 #define eglCreateWindowSurface YiEGLCreateWindowSurface
320 
326 inline EGLBoolean YiEGLDestroyContext(EGLDisplay pDpy, EGLContext pCtx)
327 {
328  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglDestroyContextStr);
329  YI_ASSERT(CYIEGL::CurrentAPI.eglDestroyContextProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglDestroyContextStr, CYIEGL::EGL_VERSION_1_0_STR);
330  return CYIEGL::CurrentAPI.eglDestroyContextProc(pDpy, pCtx);
331 }
332 #define eglDestroyContext YiEGLDestroyContext
333 
337 inline EGLBoolean YiEGLDestroyImage(EGLDisplay pDpy, EGLImage pImage)
338 {
339  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglDestroyImageStr);
340  YI_ASSERT(CYIEGL::CurrentAPI.eglDestroyImageProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglDestroyImageStr, CYIEGL::EGL_VERSION_1_5_STR);
341  return CYIEGL::CurrentAPI.eglDestroyImageProc(pDpy, pImage);
342 }
343 #define eglDestroyImage YiEGLDestroyImage
344 
350 inline EGLBoolean YiEGLDestroySurface(EGLDisplay pDpy, EGLSurface pSurface)
351 {
352  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglDestroySurfaceStr);
353  YI_ASSERT(CYIEGL::CurrentAPI.eglDestroySurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglDestroySurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
354  return CYIEGL::CurrentAPI.eglDestroySurfaceProc(pDpy, pSurface);
355 }
356 #define eglDestroySurface YiEGLDestroySurface
357 
361 inline EGLBoolean YiEGLDestroySync(EGLDisplay pDpy, EGLSync pSync)
362 {
363  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglDestroySyncStr);
364  YI_ASSERT(CYIEGL::CurrentAPI.eglDestroySyncProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglDestroySyncStr, CYIEGL::EGL_VERSION_1_5_STR);
365  return CYIEGL::CurrentAPI.eglDestroySyncProc(pDpy, pSync);
366 }
367 #define eglDestroySync YiEGLDestroySync
368 
374 inline EGLBoolean YiEGLGetConfigAttrib(EGLDisplay pDpy, EGLConfig pConfig, EGLint nAttribute, EGLint *pnValue)
375 {
376  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetConfigAttribStr);
377  YI_ASSERT(CYIEGL::CurrentAPI.eglGetConfigAttribProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetConfigAttribStr, CYIEGL::EGL_VERSION_1_0_STR);
378  return CYIEGL::CurrentAPI.eglGetConfigAttribProc(pDpy, pConfig, nAttribute, pnValue);
379 }
380 #define eglGetConfigAttrib YiEGLGetConfigAttrib
381 
387 inline EGLBoolean YiEGLGetConfigs(EGLDisplay pDpy, EGLConfig *ppConfigs, EGLint nConfigSize, EGLint *pnNumConfig)
388 {
389  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetConfigsStr);
390  YI_ASSERT(CYIEGL::CurrentAPI.eglGetConfigsProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetConfigsStr, CYIEGL::EGL_VERSION_1_0_STR);
391  return CYIEGL::CurrentAPI.eglGetConfigsProc(pDpy, ppConfigs, nConfigSize, pnNumConfig);
392 }
393 #define eglGetConfigs YiEGLGetConfigs
394 
400 inline EGLContext YiEGLGetCurrentContext(void)
401 {
402  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetCurrentContextStr);
403  YI_ASSERT(CYIEGL::CurrentAPI.eglGetCurrentContextProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetCurrentContextStr, CYIEGL::EGL_VERSION_1_4_STR);
404  return CYIEGL::CurrentAPI.eglGetCurrentContextProc();
405 }
406 #define eglGetCurrentContext YiEGLGetCurrentContext
407 
413 inline EGLDisplay YiEGLGetCurrentDisplay(void)
414 {
415  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetCurrentDisplayStr);
416  YI_ASSERT(CYIEGL::CurrentAPI.eglGetCurrentDisplayProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetCurrentDisplayStr, CYIEGL::EGL_VERSION_1_0_STR);
417  return CYIEGL::CurrentAPI.eglGetCurrentDisplayProc();
418 }
419 #define eglGetCurrentDisplay YiEGLGetCurrentDisplay
420 
426 inline EGLSurface YiEGLGetCurrentSurface(EGLint nReaddraw)
427 {
428  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetCurrentSurfaceStr);
429  YI_ASSERT(CYIEGL::CurrentAPI.eglGetCurrentSurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetCurrentSurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
430  return CYIEGL::CurrentAPI.eglGetCurrentSurfaceProc(nReaddraw);
431 }
432 #define eglGetCurrentSurface YiEGLGetCurrentSurface
433 
439 inline EGLDisplay YiEGLGetDisplay(EGLNativeDisplayType pDisplayId)
440 {
441  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetDisplayStr);
442  YI_ASSERT(CYIEGL::CurrentAPI.eglGetDisplayProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetDisplayStr, CYIEGL::EGL_VERSION_1_0_STR);
443  return CYIEGL::CurrentAPI.eglGetDisplayProc(pDisplayId);
444 }
445 #define eglGetDisplay YiEGLGetDisplay
446 
452 inline EGLint YiEGLGetError(void)
453 {
454  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetErrorStr);
455  YI_ASSERT(CYIEGL::CurrentAPI.eglGetErrorProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetErrorStr, CYIEGL::EGL_VERSION_1_0_STR);
456  return CYIEGL::CurrentAPI.eglGetErrorProc();
457 }
458 #define eglGetError YiEGLGetError
459 
463 inline EGLDisplay YiEGLGetPlatformDisplay(EGLenum ePlatform, void *pNativeDisplay, const EGLAttrib *pnAttribList)
464 {
465  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetPlatformDisplayStr);
466  YI_ASSERT(CYIEGL::CurrentAPI.eglGetPlatformDisplayProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetPlatformDisplayStr, CYIEGL::EGL_VERSION_1_5_STR);
467  return CYIEGL::CurrentAPI.eglGetPlatformDisplayProc(ePlatform, pNativeDisplay, pnAttribList);
468 }
469 #define eglGetPlatformDisplay YiEGLGetPlatformDisplay
470 
476 inline __eglMustCastToProperFunctionPointerType YiEGLGetProcAddress(const char *pProcname)
477 {
478  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetProcAddressStr);
479  YI_ASSERT(CYIEGL::CurrentAPI.eglGetProcAddressProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetProcAddressStr, CYIEGL::EGL_VERSION_1_0_STR);
480  return CYIEGL::CurrentAPI.eglGetProcAddressProc(pProcname);
481 }
482 #define eglGetProcAddress YiEGLGetProcAddress
483 
487 inline EGLBoolean YiEGLGetSyncAttrib(EGLDisplay pDpy, EGLSync pSync, EGLint nAttribute, EGLAttrib *pnValue)
488 {
489  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglGetSyncAttribStr);
490  YI_ASSERT(CYIEGL::CurrentAPI.eglGetSyncAttribProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglGetSyncAttribStr, CYIEGL::EGL_VERSION_1_5_STR);
491  return CYIEGL::CurrentAPI.eglGetSyncAttribProc(pDpy, pSync, nAttribute, pnValue);
492 }
493 #define eglGetSyncAttrib YiEGLGetSyncAttrib
494 
500 inline EGLBoolean YiEGLInitialize(EGLDisplay pDpy, EGLint *pnMajor, EGLint *pnMinor)
501 {
502  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglInitializeStr);
503  YI_ASSERT(CYIEGL::CurrentAPI.eglInitializeProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglInitializeStr, CYIEGL::EGL_VERSION_1_0_STR);
504  return CYIEGL::CurrentAPI.eglInitializeProc(pDpy, pnMajor, pnMinor);
505 }
506 #define eglInitialize YiEGLInitialize
507 
513 inline EGLBoolean YiEGLMakeCurrent(EGLDisplay pDpy, EGLSurface pDraw, EGLSurface pRead, EGLContext pCtx)
514 {
515  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglMakeCurrentStr);
516  YI_ASSERT(CYIEGL::CurrentAPI.eglMakeCurrentProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglMakeCurrentStr, CYIEGL::EGL_VERSION_1_0_STR);
517  return CYIEGL::CurrentAPI.eglMakeCurrentProc(pDpy, pDraw, pRead, pCtx);
518 }
519 #define eglMakeCurrent YiEGLMakeCurrent
520 
526 inline EGLenum YiEGLQueryAPI(void)
527 {
528  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglQueryAPIStr);
529  YI_ASSERT(CYIEGL::CurrentAPI.eglQueryAPIProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglQueryAPIStr, CYIEGL::EGL_VERSION_1_2_STR);
530  return CYIEGL::CurrentAPI.eglQueryAPIProc();
531 }
532 #define eglQueryAPI YiEGLQueryAPI
533 
539 inline EGLBoolean YiEGLQueryContext(EGLDisplay pDpy, EGLContext pCtx, EGLint nAttribute, EGLint *pnValue)
540 {
541  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglQueryContextStr);
542  YI_ASSERT(CYIEGL::CurrentAPI.eglQueryContextProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglQueryContextStr, CYIEGL::EGL_VERSION_1_0_STR);
543  return CYIEGL::CurrentAPI.eglQueryContextProc(pDpy, pCtx, nAttribute, pnValue);
544 }
545 #define eglQueryContext YiEGLQueryContext
546 
552 inline const char *YiEGLQueryString(EGLDisplay pDpy, EGLint nName)
553 {
554  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglQueryStringStr);
555  YI_ASSERT(CYIEGL::CurrentAPI.eglQueryStringProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglQueryStringStr, CYIEGL::EGL_VERSION_1_0_STR);
556  return CYIEGL::CurrentAPI.eglQueryStringProc(pDpy, nName);
557 }
558 #define eglQueryString YiEGLQueryString
559 
565 inline EGLBoolean YiEGLQuerySurface(EGLDisplay pDpy, EGLSurface pSurface, EGLint nAttribute, EGLint *pnValue)
566 {
567  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglQuerySurfaceStr);
568  YI_ASSERT(CYIEGL::CurrentAPI.eglQuerySurfaceProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglQuerySurfaceStr, CYIEGL::EGL_VERSION_1_0_STR);
569  return CYIEGL::CurrentAPI.eglQuerySurfaceProc(pDpy, pSurface, nAttribute, pnValue);
570 }
571 #define eglQuerySurface YiEGLQuerySurface
572 
578 inline EGLBoolean YiEGLReleaseTexImage(EGLDisplay pDpy, EGLSurface pSurface, EGLint nBuffer)
579 {
580  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglReleaseTexImageStr);
581  YI_ASSERT(CYIEGL::CurrentAPI.eglReleaseTexImageProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglReleaseTexImageStr, CYIEGL::EGL_VERSION_1_1_STR);
582  return CYIEGL::CurrentAPI.eglReleaseTexImageProc(pDpy, pSurface, nBuffer);
583 }
584 #define eglReleaseTexImage YiEGLReleaseTexImage
585 
591 inline EGLBoolean YiEGLReleaseThread(void)
592 {
593  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglReleaseThreadStr);
594  YI_ASSERT(CYIEGL::CurrentAPI.eglReleaseThreadProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglReleaseThreadStr, CYIEGL::EGL_VERSION_1_2_STR);
595  return CYIEGL::CurrentAPI.eglReleaseThreadProc();
596 }
597 #define eglReleaseThread YiEGLReleaseThread
598 
604 inline EGLBoolean YiEGLSurfaceAttrib(EGLDisplay pDpy, EGLSurface pSurface, EGLint nAttribute, EGLint nValue)
605 {
606  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglSurfaceAttribStr);
607  YI_ASSERT(CYIEGL::CurrentAPI.eglSurfaceAttribProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglSurfaceAttribStr, CYIEGL::EGL_VERSION_1_1_STR);
608  return CYIEGL::CurrentAPI.eglSurfaceAttribProc(pDpy, pSurface, nAttribute, nValue);
609 }
610 #define eglSurfaceAttrib YiEGLSurfaceAttrib
611 
617 inline EGLBoolean YiEGLSwapBuffers(EGLDisplay pDpy, EGLSurface pSurface)
618 {
619  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglSwapBuffersStr);
620  YI_ASSERT(CYIEGL::CurrentAPI.eglSwapBuffersProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglSwapBuffersStr, CYIEGL::EGL_VERSION_1_0_STR);
621  return CYIEGL::CurrentAPI.eglSwapBuffersProc(pDpy, pSurface);
622 }
623 #define eglSwapBuffers YiEGLSwapBuffers
624 
630 inline EGLBoolean YiEGLSwapInterval(EGLDisplay pDpy, EGLint nInterval)
631 {
632  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglSwapIntervalStr);
633  YI_ASSERT(CYIEGL::CurrentAPI.eglSwapIntervalProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglSwapIntervalStr, CYIEGL::EGL_VERSION_1_1_STR);
634  return CYIEGL::CurrentAPI.eglSwapIntervalProc(pDpy, nInterval);
635 }
636 #define eglSwapInterval YiEGLSwapInterval
637 
643 inline EGLBoolean YiEGLTerminate(EGLDisplay pDpy)
644 {
645  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglTerminateStr);
646  YI_ASSERT(CYIEGL::CurrentAPI.eglTerminateProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglTerminateStr, CYIEGL::EGL_VERSION_1_0_STR);
647  return CYIEGL::CurrentAPI.eglTerminateProc(pDpy);
648 }
649 #define eglTerminate YiEGLTerminate
650 
656 inline EGLBoolean YiEGLWaitClient(void)
657 {
658  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglWaitClientStr);
659  YI_ASSERT(CYIEGL::CurrentAPI.eglWaitClientProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglWaitClientStr, CYIEGL::EGL_VERSION_1_2_STR);
660  return CYIEGL::CurrentAPI.eglWaitClientProc();
661 }
662 #define eglWaitClient YiEGLWaitClient
663 
669 inline EGLBoolean YiEGLWaitGL(void)
670 {
671  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglWaitGLStr);
672  YI_ASSERT(CYIEGL::CurrentAPI.eglWaitGLProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglWaitGLStr, CYIEGL::EGL_VERSION_1_0_STR);
673  return CYIEGL::CurrentAPI.eglWaitGLProc();
674 }
675 #define eglWaitGL YiEGLWaitGL
676 
682 inline EGLBoolean YiEGLWaitNative(EGLint nEngine)
683 {
684  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglWaitNativeStr);
685  YI_ASSERT(CYIEGL::CurrentAPI.eglWaitNativeProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglWaitNativeStr, CYIEGL::EGL_VERSION_1_0_STR);
686  return CYIEGL::CurrentAPI.eglWaitNativeProc(nEngine);
687 }
688 #define eglWaitNative YiEGLWaitNative
689 
693 inline EGLBoolean YiEGLWaitSync(EGLDisplay pDpy, EGLSync pSync, EGLint nFlags)
694 {
695  YI_ASSERT(CYIEGL::CurrentAPI.bInitialized, CYIEGL::LOG_TAG, "CYIEGL was not initialized. Did you call CYIEGL::Init() before calling '%s'?", CYIEGL::eglWaitSyncStr);
696  YI_ASSERT(CYIEGL::CurrentAPI.eglWaitSyncProc, CYIEGL::LOG_TAG, "'%s' procedure for '%s' is null.", CYIEGL::eglWaitSyncStr, CYIEGL::EGL_VERSION_1_5_STR);
697  return CYIEGL::CurrentAPI.eglWaitSyncProc(pDpy, pSync, nFlags);
698 }
699 #define eglWaitSync YiEGLWaitSync
700 
701 #endif /* defined(YI_OPENGL_ES2_RENDERING) && !defined(YI_IOS) && !defined(YI_TVOS) && !defined(YI_WEBOS) && !defined(YI_TIZEN_NACL) */
702 #endif /* _YI_EGL_API_GENERATED_H_ */
#define YI_ASSERT(condition, tag, msg,...)
Platform-independent assertion macro.
Definition: YiError.h:37