Merge ~morphis/libhybris/+git/libhybris-ubuntu:fixes-for-multi-linker into ~libhybris-maintainers/libhybris/+git/libhybris:master

Proposed by Simon Fels
Status: Merged
Approved by: Simon Fels
Approved revision: 118774b6d4e9402e26d97fe815b8f885a41ce424
Merged at revision: 9ee10efa93049e4b45753f26b9d52268f8a6f41d
Proposed branch: ~morphis/libhybris/+git/libhybris-ubuntu:fixes-for-multi-linker
Merge into: ~libhybris-maintainers/libhybris/+git/libhybris:master
Diff against target: 2224 lines (+498/-745)
9 files modified
debian/rules (+6/-0)
dev/null (+0/-46)
hybris/common/Makefile.am (+3/-0)
hybris/common/hooks.c (+143/-92)
hybris/common/jb/Makefile.am (+2/-3)
hybris/common/jb/linker.c (+4/-2)
hybris/common/mm/linker.cpp (+6/-4)
hybris/configure.ac (+7/-0)
hybris/glesv2/glesv2.c (+327/-598)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) code Approve
Libhybris Maintainers Pending
Review via email: mp+297877@code.launchpad.net

Description of the change

Multiple fixes for the dynamic linker implementation

* pass hook retrieval method to linker at initialization time
* differentiate between hooks for the jb and mm linker and only load those required
* don't use the GNU indirect feature for the GLESv2 wrapper as it breaks the dynamic module loading
* force jb linker for turbo/frieza/cooler for now
* allow outside to override selected Android SDK version with the HYBRIS_ANDROID_SDK_VERSION environment variable

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

All good except on just a few comments/questions.

review: Needs Fixing (code)
Revision history for this message
Simon Fels (morphis) :
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

LGTM

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/rules b/debian/rules
2index 9cac1f1..0716d9f 100755
3--- a/debian/rules
4+++ b/debian/rules
5@@ -89,6 +89,12 @@ ARCH_CONFIGURATION = \
6 --enable-arch=arm \
7 --enable-mali-quirks \
8 --enable-experimental
9+# We enable the linker selection overrides here as we want to stay
10+# with the jb linker on a range of selected production devices to
11+# not cause any extra risk for regressions on them. They will
12+# migrate to a newer linker version when ported to arm64.
13+ARCH_CONFIGURATION += \
14+ --enable-ubuntu-linker-overrides
15 endif
16 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), arm64))
17 ARCH_CONFIGURATION = \
18diff --git a/hybris/common/Makefile.am b/hybris/common/Makefile.am
19index 78e30c1..cb1cdbd 100644
20--- a/hybris/common/Makefile.am
21+++ b/hybris/common/Makefile.am
22@@ -32,6 +32,9 @@ endif
23 if WANT_MALI_QUIRKS
24 libhybris_common_la_CPPFLAGS += -DMALI_QUIRKS
25 endif
26+if WANT_UBUNTU_LINKER_OVERRIDES
27+libhybris_common_la_CPPFLAGS += -DUBUNTU_LINKER_OVERRIDES
28+endif
29 libhybris_common_la_LDFLAGS = \
30 -ldl \
31 -lrt \
32diff --git a/hybris/common/hooks.c b/hybris/common/hooks.c
33index 133bf46..f60f58a 100644
34--- a/hybris/common/hooks.c
35+++ b/hybris/common/hooks.c
36@@ -74,7 +74,7 @@ static locale_t hybris_locale;
37 static int locale_inited = 0;
38 static hybris_hook_cb hook_callback = NULL;
39
40-static void (*_android_linker_init)(int sdk_version) = NULL;
41+static void (*_android_linker_init)(int sdk_version, void* (*get_hooked_symbol)(const char*, const char*)) = NULL;
42 static void* (*_android_dlopen)(const char *filename, int flags) = NULL;
43 static void* (*_android_dlsym)(void *handle, const char *symbol) = NULL;
44 static void* (*_android_dladdr)(void *addr, Dl_info *info) = NULL;
45@@ -1004,7 +1004,7 @@ int _hybris_hook_pthread_setname_np(pthread_t thread, const char *name)
46 return;
47 }
48
49- pthread_exit(thread);
50+ pthread_exit((void*) thread);
51
52 return;
53 }
54@@ -2219,25 +2219,18 @@ static const char *_hybris_hook_android_dlerror(void)
55 return android_dlerror();
56 }
57
58-static struct _hook hooks[] = {
59+static struct _hook hooks_common[] = {
60 {"property_get", _hybris_hook_property_get },
61 {"property_set", _hybris_hook_property_set },
62 {"__system_property_get", _hybris_hook_system_property_get },
63 {"getenv", _hybris_hook_getenv},
64- {"setenv", _hybris_hook_setenv},
65- {"putenv", _hybris_hook_putenv},
66- {"clearenv", _hybris_hook_clearenv},
67 {"printf", printf },
68- {"dprintf", dprintf},
69- {"mallinfo", mallinfo},
70 {"malloc", _hybris_hook_malloc },
71- {"malloc_usable_size", _hybris_hook_malloc_usable_size},
72 {"free", free },
73 {"calloc", calloc },
74 {"cfree", cfree },
75 {"realloc", realloc },
76 {"memalign", memalign },
77- {"posix_memalign", _hybris_hook_posix_memalign},
78 {"valloc", valloc },
79 {"pvalloc", pvalloc },
80 {"fread", fread },
81@@ -2252,10 +2245,7 @@ static struct _hook hooks[] = {
82 {"memmove",memmove},
83 {"memset",memset},
84 {"memmem",memmem},
85- {"mempcpy",mempcpy},
86 {"getlogin", getlogin},
87- {"__memcpy_chk", __memcpy_chk},
88- {"__memset_chk", __memset_chk},
89 // {"memswap",memswap},
90 {"index",index},
91 {"rindex",rindex},
92@@ -2273,16 +2263,12 @@ static struct _hook hooks[] = {
93 {"strtok_r",strtok_r},
94 {"strerror",_hybris_hook_strerror},
95 {"strerror_r",strerror_r},
96- {"__gnu_strerror_r",_hybris_hook__gnu_strerror_r},
97 {"strnlen",strnlen},
98 {"strncat",strncat},
99 {"strndup",strndup},
100 {"strncmp",strncmp},
101 {"strncpy",strncpy},
102 {"strtod", _hybris_hook_strtod},
103- {"strtol", _hybris_hook_strtol},
104- {"strlcat",strlcat},
105- {"strlcpy",strlcpy},
106 {"strcspn",strcspn},
107 {"strpbrk",strpbrk},
108 {"strsep",strsep},
109@@ -2301,7 +2287,6 @@ static struct _hook hooks[] = {
110 {"strcasecmp",strcasecmp},
111 {"__sprintf_chk", __sprintf_chk},
112 {"__snprintf_chk", __snprintf_chk},
113- {"__strncpy_chk",__strncpy_chk},
114 {"strncasecmp",strncasecmp},
115 /* dirent.h */
116 {"opendir", opendir},
117@@ -2377,8 +2362,6 @@ static struct _hook hooks[] = {
118 {"pthread_rwlockattr_destroy", _hybris_hook_pthread_rwlockattr_destroy},
119 {"pthread_rwlockattr_setpshared", _hybris_hook_pthread_rwlockattr_setpshared},
120 {"pthread_rwlockattr_getpshared", _hybris_hook_pthread_rwlockattr_getpshared},
121- {"pthread_rwlockattr_getkind_np", _hybris_hook_pthread_rwlockattr_getkind_np},
122- {"pthread_rwlockattr_setkind_np", _hybris_hook_pthread_rwlockattr_setkind_np},
123 {"pthread_rwlock_init", _hybris_hook_pthread_rwlock_init},
124 {"pthread_rwlock_destroy", _hybris_hook_pthread_rwlock_destroy},
125 {"pthread_rwlock_unlock", _hybris_hook_pthread_rwlock_unlock},
126@@ -2391,9 +2374,6 @@ static struct _hook hooks[] = {
127 /* bionic-only pthread */
128 {"__pthread_gettid", _hybris_hook_pthread_gettid},
129 {"pthread_gettid_np", _hybris_hook_pthread_gettid},
130- /* unistd.h */
131- {"fork", _hybris_hook_fork},
132- {"ttyname", ttyname},
133 /* stdio.h */
134 {"__isthreaded", &___hybris_hook_isthreaded},
135 {"__sF", &_hybris_hook_sF},
136@@ -2407,7 +2387,6 @@ static struct _hook hooks[] = {
137 {"snprintf", snprintf},
138 {"vsprintf", vsprintf},
139 {"vsnprintf", vsnprintf},
140- {"swprintf", swprintf},
141 {"clearerr", _hybris_hook_clearerr},
142 {"fclose", _hybris_hook_fclose},
143 {"feof", _hybris_hook_feof},
144@@ -2446,10 +2425,6 @@ static struct _hook hooks[] = {
145 {"funlockfile", _hybris_hook_funlockfile},
146 {"getc_unlocked", _hybris_hook_getc_unlocked},
147 {"putc_unlocked", _hybris_hook_putc_unlocked},
148- {"fmemopen", fmemopen},
149- {"open_memstream", open_memstream},
150- {"open_wmemstream", open_wmemstream},
151- {"ptsname", ptsname},
152 //{"fgetln", _hybris_hook_fgetln},
153 {"fpurge", _hybris_hook_fpurge},
154 {"getw", _hybris_hook_getw},
155@@ -2458,7 +2433,6 @@ static struct _hook hooks[] = {
156 {"setlinebuf", _hybris_hook_setlinebuf},
157 {"__errno", __errno_location},
158 {"__set_errno", _hybris_hook_set_errno},
159- {"__hybris_set_errno_internal", _hybris_hook_set_errno},
160 /* net specifics, to avoid __res_get_state */
161 {"getaddrinfo", _hybris_hook_getaddrinfo},
162 {"freeaddrinfo", _hybris_hook_freeaddrinfo},
163@@ -2466,7 +2440,6 @@ static struct _hook hooks[] = {
164 {"gethostbyname", gethostbyname},
165 {"gethostbyname2", gethostbyname2},
166 {"gethostent", gethostent},
167- {"getservbyname", getservbyname},
168 {"strftime", strftime},
169 {"sysconf", _hybris_hook_sysconf},
170 {"dlopen", _hybris_hook_android_dlopen},
171@@ -2487,8 +2460,6 @@ static struct _hook hooks[] = {
172 /* fcntl.h */
173 {"open", _hybris_hook_open},
174 // TODO: scandir, scandirat, alphasort, versionsort
175- {"scandir", scandir},
176- {"scandir64", scandir64},
177 {"__get_tls_hooks", _hybris_hook_get_tls_hooks},
178 {"sscanf", sscanf},
179 {"scanf", scanf},
180@@ -2526,6 +2497,38 @@ static struct _hook hooks[] = {
181 {"__system_property_find_nth", ___hybris_hook_system_property_find_nth},
182 /* sys/prctl.h */
183 {"prctl", _hybris_hook_prctl},
184+};
185+
186+static struct _hook hooks_mm[] = {
187+ {"strtol", _hybris_hook_strtol},
188+ {"strlcat",strlcat},
189+ {"strlcpy",strlcpy},
190+ {"setenv", _hybris_hook_setenv},
191+ {"putenv", _hybris_hook_putenv},
192+ {"clearenv", _hybris_hook_clearenv},
193+ {"dprintf", dprintf},
194+ {"mallinfo", mallinfo},
195+ {"malloc_usable_size", _hybris_hook_malloc_usable_size},
196+ {"posix_memalign", _hybris_hook_posix_memalign},
197+ {"mprotect", _hybris_hook_mprotect},
198+ {"__memcpy_chk", __memcpy_chk},
199+ {"__memset_chk", __memset_chk},
200+ {"__gnu_strerror_r",_hybris_hook__gnu_strerror_r},
201+ {"__strncpy_chk",__strncpy_chk},
202+ {"pthread_rwlockattr_getkind_np", _hybris_hook_pthread_rwlockattr_getkind_np},
203+ {"pthread_rwlockattr_setkind_np", _hybris_hook_pthread_rwlockattr_setkind_np},
204+ /* unistd.h */
205+ {"fork", _hybris_hook_fork},
206+ {"ttyname", ttyname},
207+ {"swprintf", swprintf},
208+ {"fmemopen", fmemopen},
209+ {"open_memstream", open_memstream},
210+ {"open_wmemstream", open_wmemstream},
211+ {"ptsname", ptsname},
212+ {"__hybris_set_errno_internal", _hybris_hook_set_errno},
213+ {"getservbyname", getservbyname},
214+ {"scandir", scandir},
215+ {"scandir64", scandir64},
216 /* libgen.h */
217 {"basename", _hybris_hook_basename},
218 {"dirname", _hybris_hook_dirname},
219@@ -2563,6 +2566,10 @@ static struct _hook hooks[] = {
220 {"endmntent", _hybris_hook_endmntent},
221 /* stdlib.h */
222 {"system", system},
223+ /* pwd.h */
224+ {"getgrnam", getgrnam},
225+ {"getpwuid", getpwuid},
226+ {"getpwnam", getpwnam},
227 /* signal.h */
228 {"sigaction", sigaction},
229 {"sigaddset", sigaddset},
230@@ -2587,12 +2594,9 @@ static struct _hook hooks[] = {
231 {"sigtimedwait", sigtimedwait},
232 {"sigwait", sigwait},
233 {"sigwaitinfo", sigwaitinfo},
234- /* pwd.h */
235- {"getgrnam", getgrnam},
236- {"getpwuid", getpwuid},
237- {"getpwnam", getpwnam},
238 };
239
240+
241 static int hook_cmp(const void *a, const void *b)
242 {
243 return strcmp(((struct _hook*)a)->name, ((struct _hook*)b)->name);
244@@ -2603,11 +2607,52 @@ void hybris_set_hook_callback(hybris_hook_cb callback)
245 hook_callback = callback;
246 }
247
248-void* __hybris_get_hooked_symbol(const char *sym, const char *requester)
249+static int get_android_sdk_version()
250+{
251+ static int sdk_version = -1;
252+
253+ if (sdk_version > 0)
254+ return sdk_version;
255+
256+ char value[PROP_VALUE_MAX];
257+ property_get("ro.build.version.sdk", value, "19");
258+
259+ sdk_version = 19;
260+ if (strlen(value) > 0)
261+ sdk_version = atoi(value);
262+
263+#ifdef UBUNTU_LINKER_OVERRIDES
264+ /* We override both frieza and turbo here until they are ready to be
265+ * upgraded to the newer linker. */
266+ char device_name[PROP_VALUE_MAX];
267+ memset(device_name, 0, sizeof(device_name));
268+ property_get("ro.build.product", device_name, "");
269+ if (strlen(device_name) > 0) {
270+ /* Force SDK version for both frieza/cooler and turbo for the time being */
271+ if (strcmp(device_name, "frieza") == 0 ||
272+ strcmp(device_name, "cooler") == 0 ||
273+ strcmp(device_name, "turbo") == 0)
274+ sdk_version = 19;
275+ }
276+#endif
277+
278+ char *version_override = getenv("HYBRIS_ANDROID_SDK_VERSION");
279+ if (version_override)
280+ sdk_version = atoi(version_override);
281+
282+ LOGD("Using SDK API version %i\n", sdk_version);
283+
284+ return sdk_version;
285+}
286+
287+#define HOOKS_SIZE(hooks) \
288+ (sizeof(hooks) / sizeof(hooks[0]))
289+
290+
291+static void* __hybris_get_hooked_symbol(const char *sym, const char *requester)
292 {
293- static int counter = -1;
294 static int sorted = 0;
295- const int nhooks = sizeof(hooks) / sizeof(hooks[0]);
296+ static int counter = -1;
297 void *found = NULL;
298 struct _hook key;
299
300@@ -2622,17 +2667,20 @@ void* __hybris_get_hooked_symbol(const char *sym, const char *requester)
301
302 if (!sorted)
303 {
304- qsort(hooks, nhooks, sizeof(hooks[0]), hook_cmp);
305+ qsort(hooks_common, HOOKS_SIZE(hooks_common), sizeof(hooks_common[0]), hook_cmp);
306+ qsort(hooks_mm, HOOKS_SIZE(hooks_mm), sizeof(hooks_mm[0]), hook_cmp);
307 sorted = 1;
308 }
309
310+ /* Allow newer hooks to override those which are available for all versions */
311 key.name = sym;
312- found = bsearch(&key, hooks, nhooks, sizeof(hooks[0]), hook_cmp);
313- if (found != NULL)
314- {
315- LOGD("Found hook for symbol %s", sym);
316- return ((struct _hook*)found)->func;
317- }
318+ if (get_android_sdk_version() > 21)
319+ found = bsearch(&key, hooks_mm, HOOKS_SIZE(hooks_mm), sizeof(hooks_mm[0]), hook_cmp);
320+ if (!found)
321+ found = bsearch(&key, hooks_common, HOOKS_SIZE(hooks_common), sizeof(hooks_common[0]), hook_cmp);
322+
323+ if (found)
324+ return ((struct _hook*) found)->func;
325
326 if (strncmp(sym, "pthread", 7) == 0 ||
327 strncmp(sym, "__pthread", 9) == 0)
328@@ -2655,28 +2703,11 @@ void* __hybris_get_hooked_symbol(const char *sym, const char *requester)
329 return NULL;
330 }
331
332-static int get_android_sdk_version()
333-{
334- static int sdk_version = -1;
335-
336- if (sdk_version > 0)
337- return sdk_version;
338-
339- char *value = NULL;
340- property_get("ro.build.version.sdk", value, "19");
341-
342- sdk_version = 19;
343- if (value)
344- sdk_version = atoi(value);
345-
346- return sdk_version;
347-}
348-
349 static void *linker_handle = NULL;
350
351-static void* load_linker(const char *path)
352+static void* __hybris_load_linker(const char *path)
353 {
354- void *handle = dlopen(path, RTLD_LAZY);
355+ void *handle = dlopen(path, RTLD_NOW | RTLD_LOCAL);
356 if (!handle) {
357 fprintf(stderr, "ERROR: Failed to load hybris linker for Android SDK version %d\n",
358 get_android_sdk_version());
359@@ -2688,10 +2719,9 @@ static void* load_linker(const char *path)
360 #define LINKER_NAME_JB "jb"
361 #define LINKER_NAME_MM "mm"
362
363-static void android_linker_init(int sdk_version);
364+static int linker_initialized = 0;
365
366-__attribute__((constructor))
367-static void hybris_linker_init()
368+static void __hybris_linker_init()
369 {
370 LOGD("Linker initialization");
371
372@@ -2707,12 +2737,7 @@ static void hybris_linker_init()
373 else
374 name = LINKER_NAME_MM;
375
376- /* Allow our user to override the linker we select */
377- const char *user_linker = getenv("HYBRIS_LINKER");
378- if (user_linker)
379- name = user_linker;
380-
381- char *linker_dir = LINKER_PLUGIN_DIR;
382+ const char *linker_dir = LINKER_PLUGIN_DIR;
383 const char *user_linker_dir = getenv("HYBRIS_LINKER_DIR");
384 if (user_linker_dir)
385 linker_dir = user_linker_dir;
386@@ -2721,7 +2746,7 @@ static void hybris_linker_init()
387
388 LOGD("Loading linker from %s..", path);
389
390- linker_handle = load_linker(path);
391+ linker_handle = __hybris_load_linker(path);
392 if (!linker_handle)
393 exit(1);
394
395@@ -2734,49 +2759,75 @@ static void hybris_linker_init()
396 _android_dlerror = dlsym(linker_handle, "android_dlerror");
397
398 /* Now its time to setup the linker itself */
399- _android_linker_init(sdk_version);
400+ _android_linker_init(sdk_version, __hybris_get_hooked_symbol);
401+
402+ linker_initialized = 1;
403 }
404
405-void *hybris_dlopen(const char *filename, int flag)
406+#define ENSURE_LINKER_IS_LOADED() \
407+ if (!linker_initialized) \
408+ __hybris_linker_init();
409+
410+/* NOTE: As we're not linking directly with the linker anymore
411+ * but several users are using android_* functions directly we
412+ * have to export them here. */
413+
414+void *android_dlopen(const char *filename, int flag)
415 {
416+ ENSURE_LINKER_IS_LOADED();
417+
418+ if (!_android_dlopen)
419+ return NULL;
420+
421 return _android_dlopen(filename,flag);
422 }
423
424-void *hybris_dlsym(void *handle, const char *symbol)
425+void *android_dlsym(void *handle, const char *symbol)
426 {
427+ ENSURE_LINKER_IS_LOADED();
428+
429+ if (!_android_dlsym)
430+ return NULL;
431+
432 return _android_dlsym(handle,symbol);
433 }
434
435-int hybris_dlclose(void *handle)
436+int android_dlclose(void *handle)
437 {
438+ ENSURE_LINKER_IS_LOADED();
439+
440+ if (!_android_dlclose)
441+ return -1;
442+
443 return _android_dlclose(handle);
444 }
445
446-const char *hybris_dlerror(void)
447+const char *android_dlerror(void)
448 {
449+ ENSURE_LINKER_IS_LOADED();
450+
451+ if (!_android_dlerror)
452+ return NULL;
453+
454 return _android_dlerror();
455 }
456
457-/* NOTE: As we're not linking directly with the linker anymore
458- * but several users are using android_* functions directly we
459- * have to export them here. */
460-
461-void *android_dlopen(const char *filename, int flag)
462+void *hybris_dlopen(const char *filename, int flag)
463 {
464- return _android_dlopen(filename,flag);
465+ return android_dlopen(filename,flag);
466 }
467
468-void *android_dlsym(void *handle, const char *symbol)
469+void *hybris_dlsym(void *handle, const char *symbol)
470 {
471- return _android_dlsym(handle,symbol);
472+ return android_dlsym(handle,symbol);
473 }
474
475-int android_dlclose(void *handle)
476+int hybris_dlclose(void *handle)
477 {
478- return _android_dlclose(handle);
479+ return android_dlclose(handle);
480 }
481
482-const char *android_dlerror(void)
483+const char *hybris_dlerror(void)
484 {
485- return _android_dlerror();
486+ return android_dlerror();
487 }
488diff --git a/hybris/common/jb/Makefile.am b/hybris/common/jb/Makefile.am
489index 24513fe..e87d98d 100644
490--- a/hybris/common/jb/Makefile.am
491+++ b/hybris/common/jb/Makefile.am
492@@ -13,14 +13,13 @@ jb_la_SOURCES = \
493 linker.c \
494 linker_environ.c \
495 linker_format.c \
496- rt.c
497+ rt.c \
498+ ../strlcpy.c
499 jb_la_CFLAGS = \
500 -I$(top_srcdir)/include \
501 $(ANDROID_HEADERS_CFLAGS) \
502 -I$(top_srcdir)/common \
503 -D_GNU_SOURCE \
504- -DLINKER_TEXT_BASE=0xB0000100 \
505- -DLINKER_AREA_SIZE=0x01000000 \
506 -DDEFAULT_HYBRIS_LD_LIBRARY_PATH="\"@DEFAULT_HYBRIS_LD_LIBRARY_PATH@\"" \
507 $(ARCHFLAGS)
508 jb_la_LDFLAGS = \
509diff --git a/hybris/common/jb/arch/arm/begin.S b/hybris/common/jb/arch/arm/begin.S
510deleted file mode 100644
511index e259902..0000000
512--- a/hybris/common/jb/arch/arm/begin.S
513+++ /dev/null
514@@ -1,45 +0,0 @@
515-/*
516- * Copyright (C) 2008 The Android Open Source Project
517- * All rights reserved.
518- *
519- * Redistribution and use in source and binary forms, with or without
520- * modification, are permitted provided that the following conditions
521- * are met:
522- * * Redistributions of source code must retain the above copyright
523- * notice, this list of conditions and the following disclaimer.
524- * * Redistributions in binary form must reproduce the above copyright
525- * notice, this list of conditions and the following disclaimer in
526- * the documentation and/or other materials provided with the
527- * distribution.
528- *
529- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
530- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
531- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
532- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
533- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
534- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
535- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
536- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
537- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
538- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
539- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
540- * SUCH DAMAGE.
541- */
542-
543- .text
544- .align 4
545- .type _start,#function
546- .globl _start
547-
548-_start:
549- mov r0, sp
550- mov r1, #0
551- bl __linker_init
552-
553- /* linker init returns the _entry address in the main image */
554- mov pc, r0
555-
556- .section .ctors, "wa"
557- .globl __CTOR_LIST__
558-__CTOR_LIST__:
559- .long -1
560diff --git a/hybris/common/jb/arch/x86/begin.S b/hybris/common/jb/arch/x86/begin.S
561deleted file mode 100644
562index b4427e0..0000000
563--- a/hybris/common/jb/arch/x86/begin.S
564+++ /dev/null
565@@ -1,46 +0,0 @@
566-/*
567- * Copyright (C) 2008 The Android Open Source Project
568- * All rights reserved.
569- *
570- * Redistribution and use in source and binary forms, with or without
571- * modification, are permitted provided that the following conditions
572- * are met:
573- * * Redistributions of source code must retain the above copyright
574- * notice, this list of conditions and the following disclaimer.
575- * * Redistributions in binary form must reproduce the above copyright
576- * notice, this list of conditions and the following disclaimer in
577- * the documentation and/or other materials provided with the
578- * distribution.
579- *
580- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
581- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
582- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
583- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
584- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
585- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
586- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
587- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
588- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
589- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
590- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
591- * SUCH DAMAGE.
592- */
593-
594-.text
595-.align 4
596-.type _start, @function
597-.globl _start
598-
599-_start:
600- /* save the elfdata ptr to %eax, AND push it onto the stack */
601- mov %esp, %eax
602- pushl %esp
603-
604- pushl %eax
605- call __linker_init
606-
607- /* linker init returns (%eax) the _entry address in the main image */
608- /* entry point expects sp to point to elfdata */
609- popl %esp
610- jmp *%eax
611-
612diff --git a/hybris/common/jb/linker.c b/hybris/common/jb/linker.c
613index dd89968..47ebbfa 100644
614--- a/hybris/common/jb/linker.c
615+++ b/hybris/common/jb/linker.c
616@@ -79,6 +79,7 @@
617 * having a hard limit (64)
618 */
619
620+static void* (*_get_hooked_symbol)(const char *symbol, const char *requester);
621
622 static int link_image(soinfo *si, unsigned wr_offset);
623
624@@ -1327,7 +1328,7 @@ static int reloc_library(soinfo *si, Elf_Rel *rel, unsigned count)
625 if(sym != 0) {
626 sym_name = (char *)(strtab + symtab[sym].st_name);
627 INFO("HYBRIS: '%s' checking hooks for sym '%s'\n", si->name, sym_name);
628- sym_addr = __hybris_get_hooked_symbol(sym_name, si->name);
629+ sym_addr = _get_hooked_symbol(sym_name, si->name);
630 if (sym_addr != NULL) {
631 INFO("HYBRIS: '%s' hooked symbol %s to %x\n", si->name,
632 sym_name, sym_addr);
633@@ -2334,6 +2335,7 @@ unsigned __linker_init(unsigned **elfdata) {
634 return __linker_init_post_relocation(elfdata);
635 }
636
637-void android_linker_init(int sdk_version) {
638+void android_linker_init(int sdk_version, void *(get_hooked_symbol)(const char*, const char*)) {
639 (void) sdk_version;
640+ _get_hooked_symbol = get_hooked_symbol;
641 }
642diff --git a/hybris/common/mm/linker.cpp b/hybris/common/mm/linker.cpp
643index cbf48f9..3709956 100644
644--- a/hybris/common/mm/linker.cpp
645+++ b/hybris/common/mm/linker.cpp
646@@ -140,6 +140,8 @@ static r_debug _r_debug =
647
648 static link_map* r_debug_tail = 0;
649
650+static void* (*_get_hooked_symbol)(const char *sym, const char *requester);
651+
652 static void insert_soinfo_into_debug_map(soinfo* info) {
653 // Copy the necessary fields into the debug structure.
654 link_map* map = &(info->link_map_head);
655@@ -1763,8 +1765,6 @@ static ElfW(Addr) get_addend(ElfW(Rel)* rel, ElfW(Addr) reloc_addr) {
656 }
657 #endif
658
659-extern "C" void* __hybris_get_hooked_symbol(const char *sym, const char *requester);
660-
661 template<typename ElfRelIteratorT>
662 bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& rel_iterator,
663 const soinfo_list_t& global_group, const soinfo_list_t& local_group) {
664@@ -1794,7 +1794,7 @@ bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& r
665 sym_name = get_string(symtab_[sym].st_name);
666 const version_info* vi = nullptr;
667
668- sym_addr = reinterpret_cast<ElfW(Addr)>(__hybris_get_hooked_symbol(sym_name, get_realpath()));
669+ sym_addr = reinterpret_cast<ElfW(Addr)>(_get_hooked_symbol(sym_name, get_realpath()));
670 if (!sym_addr) {
671 if (!lookup_version_info(version_tracker, sym, sym_name, &vi)) {
672 return false;
673@@ -3292,7 +3292,7 @@ static ElfW(Addr) get_elf_exec_load_bias(const ElfW(Ehdr)* elf) {
674 return 0;
675 }
676
677-extern "C" void android_linker_init(int sdk_version) {
678+extern "C" void android_linker_init(int sdk_version, void* (*get_hooked_symbol)(const char*, const char*)) {
679 // Get a few environment variables.
680 const char* LD_DEBUG = getenv("HYBRIS_LD_DEBUG");
681 if (LD_DEBUG != nullptr) {
682@@ -3301,6 +3301,8 @@ extern "C" void android_linker_init(int sdk_version) {
683
684 if (sdk_version > 0)
685 set_application_target_sdk_version(sdk_version);
686+
687+ _get_hooked_symbol = get_hooked_symbol;
688 }
689
690 #ifdef DISABLED_FOR_HYBRIS_SUPPORT
691diff --git a/hybris/configure.ac b/hybris/configure.ac
692index e95687b..dc5d3af 100644
693--- a/hybris/configure.ac
694+++ b/hybris/configure.ac
695@@ -85,6 +85,11 @@ AC_ARG_ENABLE(property_cache,
696 [property_cache=no])
697 AM_CONDITIONAL( [WANT_RUNTIME_PROPERTY_CACHE], [test x"$property_cache" = x"yes"])
698
699+AC_ARG_ENABLE(ubuntu-linker-overrides,
700+ [ --enable-ubuntu-linker-overrides Enable Ubuntu linker overrides (default=disabled)],
701+ [ubuntu_linker_overrides=$enableval],
702+ [ubuntu_linker_overrides=no])
703+AM_CONDITIONAL([WANT_UBUNTU_LINKER_OVERRIDES], [test x"$ubuntu_linker_overrides" = x"yes"])
704
705 AC_ARG_ENABLE(arch,
706 [ --enable-arch[=arch] Compile specific CPU target(default=arm)
707@@ -293,6 +298,8 @@ echo "Features:"
708 echo
709 echo " stub linker.............: $stub_linker"
710 echo
711+echo " Ubuntu linker overrides.: $ubuntu_linker_overrides"
712+echo
713 echo "------------------------------------------------------------------------"
714 echo
715 echo "Now type 'make' to compile and 'make install' to install this package."
716diff --git a/hybris/glesv2/glesv2.c b/hybris/glesv2/glesv2.c
717index 37fb2b6..5591fc9 100644
718--- a/hybris/glesv2/glesv2.c
719+++ b/hybris/glesv2/glesv2.c
720@@ -22,40 +22,19 @@
721 #include <stddef.h>
722 #include <stdlib.h>
723
724-#include <egl/ws.h>
725 #include <hybris/common/binding.h>
726-#include <hybris/common/floating_point_abi.h>
727
728 static void *_libglesv2 = NULL;
729
730-/* Only functions with floating point argument need a wrapper to change the call convention correctly */
731-
732-static void (*_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
733-static void (*_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
734-static void (*_glClearDepthf)(GLclampf depth) FP_ATTRIB = NULL;
735-static void (*_glDepthRangef)(GLclampf zNear, GLclampf zFar) FP_ATTRIB = NULL;
736-static void (*_glLineWidth)(GLfloat width) FP_ATTRIB = NULL;
737-static void (*_glPolygonOffset)(GLfloat factor, GLfloat units) FP_ATTRIB = NULL;
738-static void (*_glSampleCoverage)(GLclampf value, GLboolean invert) FP_ATTRIB = NULL;
739-static void (*_glTexParameterf)(GLenum target, GLenum pname, GLfloat param) FP_ATTRIB = NULL;
740-static void (*_glUniform1f)(GLint location, GLfloat x) FP_ATTRIB = NULL;
741-static void (*_glUniform2f)(GLint location, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
742-static void (*_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
743-static void (*_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
744-static void (*_glVertexAttrib1f)(GLuint indx, GLfloat x) FP_ATTRIB = NULL;
745-static void (*_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
746-static void (*_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
747-static void (*_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
748-static void (*_glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) = NULL;
749-
750 static void (*_glActiveTexture)(GLenum texture) = NULL;
751 static void (*_glAttachShader)(GLuint program, GLuint shader) = NULL;
752 static void (*_glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) = NULL;
753 static void (*_glBindBuffer)(GLenum target, GLuint buffer) = NULL;
754 static void (*_glBindFramebuffer)(GLenum target, GLuint framebuffer) = NULL;
755-static void (*_glBindRenderbuffer)(GLenum target, GLuint framebuffer) = NULL;
756+static void (*_glBindRenderbuffer)(GLenum target, GLuint renderbuffer) = NULL;
757 static void (*_glBindTexture)(GLenum target, GLuint texture) = NULL;
758-static void (*_glBlendEquation)(GLenum mode) = NULL;
759+static void (*_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
760+static void (*_glBlendEquation)(GLenum mode ) = NULL;
761 static void (*_glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) = NULL;
762 static void (*_glBlendFunc)(GLenum sfactor, GLenum dfactor) = NULL;
763 static void (*_glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = NULL;
764@@ -63,6 +42,8 @@ static void (*_glBufferData)(GLenum target, GLsizeiptr size, const GLvoi
765 static void (*_glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) = NULL;
766 static GLenum (*_glCheckFramebufferStatus)(GLenum target) = NULL;
767 static void (*_glClear)(GLbitfield mask) = NULL;
768+static void (*_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
769+static void (*_glClearDepthf)(GLclampf depth) FP_ATTRIB = NULL;
770 static void (*_glClearStencil)(GLint s) = NULL;
771 static void (*_glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL;
772 static void (*_glCompileShader)(GLuint shader) = NULL;
773@@ -74,13 +55,14 @@ static GLuint (*_glCreateProgram)(void) = NULL;
774 static GLuint (*_glCreateShader)(GLenum type) = NULL;
775 static void (*_glCullFace)(GLenum mode) = NULL;
776 static void (*_glDeleteBuffers)(GLsizei n, const GLuint* buffers) = NULL;
777-static void (*_glDeleteFramebuffers)(GLsizei n, const GLuint* buffers) = NULL;
778+static void (*_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) = NULL;
779 static void (*_glDeleteProgram)(GLuint program) = NULL;
780 static void (*_glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) = NULL;
781 static void (*_glDeleteShader)(GLuint shader) = NULL;
782 static void (*_glDeleteTextures)(GLsizei n, const GLuint* textures) = NULL;
783 static void (*_glDepthFunc)(GLenum func) = NULL;
784 static void (*_glDepthMask)(GLboolean flag) = NULL;
785+static void (*_glDepthRangef)(GLclampf zNear, GLclampf zFar) FP_ATTRIB = NULL;
786 static void (*_glDetachShader)(GLuint program, GLuint shader) = NULL;
787 static void (*_glDisable)(GLenum cap) = NULL;
788 static void (*_glDisableVertexAttribArray)(GLuint index) = NULL;
789@@ -132,11 +114,14 @@ static GLboolean (*_glIsProgram)(GLuint program) = NULL;
790 static GLboolean (*_glIsRenderbuffer)(GLuint renderbuffer) = NULL;
791 static GLboolean (*_glIsShader)(GLuint shader) = NULL;
792 static GLboolean (*_glIsTexture)(GLuint texture) = NULL;
793+static void (*_glLineWidth)(GLfloat width) FP_ATTRIB = NULL;
794 static void (*_glLinkProgram)(GLuint program) = NULL;
795 static void (*_glPixelStorei)(GLenum pname, GLint param) = NULL;
796+static void (*_glPolygonOffset)(GLfloat factor, GLfloat units) FP_ATTRIB = NULL;
797 static void (*_glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) = NULL;
798 static void (*_glReleaseShaderCompiler)(void) = NULL;
799 static void (*_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = NULL;
800+static void (*_glSampleCoverage)(GLclampf value, GLboolean invert) FP_ATTRIB = NULL;
801 static void (*_glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
802 static void (*_glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) = NULL;
803 static void (*_glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) = NULL;
804@@ -147,19 +132,24 @@ static void (*_glStencilMaskSeparate)(GLenum face, GLuint mask) = NULL;
805 static void (*_glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) = NULL;
806 static void (*_glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = NULL;
807 static void (*_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) = NULL;
808+static void (*_glTexParameterf)(GLenum target, GLenum pname, GLfloat param) FP_ATTRIB = NULL;
809 static void (*_glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) = NULL;
810 static void (*_glTexParameteri)(GLenum target, GLenum pname, GLint param) = NULL;
811 static void (*_glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) = NULL;
812 static void (*_glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) = NULL;
813+static void (*_glUniform1f)(GLint location, GLfloat x) FP_ATTRIB = NULL;
814 static void (*_glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
815 static void (*_glUniform1i)(GLint location, GLint x) = NULL;
816 static void (*_glUniform1iv)(GLint location, GLsizei count, const GLint* v) = NULL;
817+static void (*_glUniform2f)(GLint location, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
818 static void (*_glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
819 static void (*_glUniform2i)(GLint location, GLint x, GLint y) = NULL;
820 static void (*_glUniform2iv)(GLint location, GLsizei count, const GLint* v) = NULL;
821+static void (*_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
822 static void (*_glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
823 static void (*_glUniform3i)(GLint location, GLint x, GLint y, GLint z) = NULL;
824 static void (*_glUniform3iv)(GLint location, GLsizei count, const GLint* v) = NULL;
825+static void (*_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
826 static void (*_glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
827 static void (*_glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) = NULL;
828 static void (*_glUniform4iv)(GLint location, GLsizei count, const GLint* v) = NULL;
829@@ -168,51 +158,23 @@ static void (*_glUniformMatrix3fv)(GLint location, GLsizei count, GLbool
830 static void (*_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL;
831 static void (*_glUseProgram)(GLuint program) = NULL;
832 static void (*_glValidateProgram)(GLuint program) = NULL;
833+static void (*_glVertexAttrib1f)(GLuint indx, GLfloat x) FP_ATTRIB = NULL;
834 static void (*_glVertexAttrib1fv)(GLuint indx, const GLfloat* values) = NULL;
835+static void (*_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
836 static void (*_glVertexAttrib2fv)(GLuint indx, const GLfloat* values) = NULL;
837+static void (*_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
838 static void (*_glVertexAttrib3fv)(GLuint indx, const GLfloat* values) = NULL;
839+static void (*_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
840 static void (*_glVertexAttrib4fv)(GLuint indx, const GLfloat* values) = NULL;
841 static void (*_glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) = NULL;
842 static void (*_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
843+static void (*_glEGLImageTargetTexture2DOES) (GLenum target, GLeglImageOES image) = NULL;
844
845
846 #define GLES2_LOAD(sym) { *(&_ ## sym) = (void *) android_dlsym(_libglesv2, #sym); }
847
848-/*
849-This generates a function that when first called overwrites it's plt entry with new address. Subsequent calls jump directly at the target function in the android library. This means effectively 0 call overhead after the first call.
850-*/
851-
852-#define GLES2_IDLOAD(sym) \
853- __asm__ (".type " #sym ", %gnu_indirect_function"); \
854-typeof(sym) * sym ## _dispatch (void) __asm__ (#sym);\
855-typeof(sym) * sym ## _dispatch (void) \
856-{ \
857- if (_libglesv2) \
858- return (void *) android_dlsym(_libglesv2, #sym); \
859- else \
860- return &sym ## _wrapper; \
861-}
862-
863 static void __attribute__((constructor)) _init_androidglesv2() {
864 _libglesv2 = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_NOW);
865- GLES2_LOAD(glBlendColor);
866- GLES2_LOAD(glClearColor);
867- GLES2_LOAD(glClearDepthf);
868- GLES2_LOAD(glDepthRangef);
869- GLES2_LOAD(glLineWidth);
870- GLES2_LOAD(glPolygonOffset);
871- GLES2_LOAD(glSampleCoverage);
872- GLES2_LOAD(glTexParameterf);
873- GLES2_LOAD(glUniform1f);
874- GLES2_LOAD(glUniform2f);
875- GLES2_LOAD(glUniform3f);
876- GLES2_LOAD(glUniform4f);
877- GLES2_LOAD(glVertexAttrib1f);
878- GLES2_LOAD(glVertexAttrib2f);
879- GLES2_LOAD(glVertexAttrib3f);
880- GLES2_LOAD(glVertexAttrib4f);
881- GLES2_LOAD(glEGLImageTargetTexture2DOES);
882-
883 GLES2_LOAD(glActiveTexture);
884 GLES2_LOAD(glAttachShader);
885 GLES2_LOAD(glBindAttribLocation);
886@@ -220,6 +182,7 @@ static void __attribute__((constructor)) _init_androidglesv2() {
887 GLES2_LOAD(glBindFramebuffer);
888 GLES2_LOAD(glBindRenderbuffer);
889 GLES2_LOAD(glBindTexture);
890+ GLES2_LOAD(glBlendColor);
891 GLES2_LOAD(glBlendEquation);
892 GLES2_LOAD(glBlendEquationSeparate);
893 GLES2_LOAD(glBlendFunc);
894@@ -228,6 +191,8 @@ static void __attribute__((constructor)) _init_androidglesv2() {
895 GLES2_LOAD(glBufferSubData);
896 GLES2_LOAD(glCheckFramebufferStatus);
897 GLES2_LOAD(glClear);
898+ GLES2_LOAD(glClearColor);
899+ GLES2_LOAD(glClearDepthf);
900 GLES2_LOAD(glClearStencil);
901 GLES2_LOAD(glColorMask);
902 GLES2_LOAD(glCompileShader);
903@@ -246,6 +211,7 @@ static void __attribute__((constructor)) _init_androidglesv2() {
904 GLES2_LOAD(glDeleteTextures);
905 GLES2_LOAD(glDepthFunc);
906 GLES2_LOAD(glDepthMask);
907+ GLES2_LOAD(glDepthRangef);
908 GLES2_LOAD(glDetachShader);
909 GLES2_LOAD(glDisable);
910 GLES2_LOAD(glDisableVertexAttribArray);
911@@ -297,10 +263,14 @@ static void __attribute__((constructor)) _init_androidglesv2() {
912 GLES2_LOAD(glIsRenderbuffer);
913 GLES2_LOAD(glIsShader);
914 GLES2_LOAD(glIsTexture);
915+ GLES2_LOAD(glLineWidth);
916 GLES2_LOAD(glLinkProgram);
917 GLES2_LOAD(glPixelStorei);
918+ GLES2_LOAD(glPolygonOffset);
919+ GLES2_LOAD(glReadPixels);
920 GLES2_LOAD(glReleaseShaderCompiler);
921 GLES2_LOAD(glRenderbufferStorage);
922+ GLES2_LOAD(glSampleCoverage);
923 GLES2_LOAD(glScissor);
924 GLES2_LOAD(glShaderBinary);
925 GLES2_LOAD(glShaderSource);
926@@ -311,19 +281,24 @@ static void __attribute__((constructor)) _init_androidglesv2() {
927 GLES2_LOAD(glStencilOp);
928 GLES2_LOAD(glStencilOpSeparate);
929 GLES2_LOAD(glTexImage2D);
930+ GLES2_LOAD(glTexParameterf);
931 GLES2_LOAD(glTexParameterfv);
932 GLES2_LOAD(glTexParameteri);
933 GLES2_LOAD(glTexParameteriv);
934 GLES2_LOAD(glTexSubImage2D);
935+ GLES2_LOAD(glUniform1f);
936 GLES2_LOAD(glUniform1fv);
937 GLES2_LOAD(glUniform1i);
938 GLES2_LOAD(glUniform1iv);
939+ GLES2_LOAD(glUniform2f);
940 GLES2_LOAD(glUniform2fv);
941 GLES2_LOAD(glUniform2i);
942 GLES2_LOAD(glUniform2iv);
943+ GLES2_LOAD(glUniform3f);
944 GLES2_LOAD(glUniform3fv);
945 GLES2_LOAD(glUniform3i);
946 GLES2_LOAD(glUniform3iv);
947+ GLES2_LOAD(glUniform4f);
948 GLES2_LOAD(glUniform4fv);
949 GLES2_LOAD(glUniform4i);
950 GLES2_LOAD(glUniform4iv);
951@@ -332,981 +307,735 @@ static void __attribute__((constructor)) _init_androidglesv2() {
952 GLES2_LOAD(glUniformMatrix4fv);
953 GLES2_LOAD(glUseProgram);
954 GLES2_LOAD(glValidateProgram);
955+ GLES2_LOAD(glVertexAttrib1f);
956 GLES2_LOAD(glVertexAttrib1fv);
957+ GLES2_LOAD(glVertexAttrib2f);
958 GLES2_LOAD(glVertexAttrib2fv);
959+ GLES2_LOAD(glVertexAttrib3f);
960 GLES2_LOAD(glVertexAttrib3fv);
961+ GLES2_LOAD(glVertexAttrib4f);
962 GLES2_LOAD(glVertexAttrib4fv);
963 GLES2_LOAD(glVertexAttribPointer);
964 GLES2_LOAD(glViewport);
965+ GLES2_LOAD(glEGLImageTargetTexture2DOES);
966+
967+}
968+
969+
970+void glActiveTexture (GLenum texture)
971+{
972+ (*_glActiveTexture)(texture);
973 }
974
975-static void glActiveTexture_wrapper(GLenum texture)
976+void glAttachShader (GLuint program, GLuint shader)
977 {
978- return (*_glActiveTexture)(texture);
979+ (*_glAttachShader)(program, shader);
980 }
981
982-static void glAttachShader_wrapper(GLuint program, GLuint shader)
983+void glBindAttribLocation (GLuint program, GLuint index, const GLchar* name)
984 {
985- return (*_glAttachShader)(program, shader);
986+ (*_glBindAttribLocation)(program, index, name);
987 }
988
989-static void glBindAttribLocation_wrapper(GLuint program, GLuint index, const GLchar* name)
990+void glBindBuffer (GLenum target, GLuint buffer)
991 {
992- return (*_glBindAttribLocation)(program, index, name);
993+ (*_glBindBuffer)(target, buffer);
994 }
995
996-static void glBindBuffer_wrapper(GLenum target, GLuint buffer)
997+void glBindFramebuffer (GLenum target, GLuint framebuffer)
998 {
999- return (*_glBindBuffer)(target, buffer);
1000+ (*_glBindFramebuffer)(target, framebuffer);
1001 }
1002
1003-static void glBindFramebuffer_wrapper(GLenum target, GLuint framebuffer)
1004+void glBindRenderbuffer (GLenum target, GLuint renderbuffer)
1005 {
1006- return (*_glBindFramebuffer)(target, framebuffer);
1007+ (*_glBindRenderbuffer)(target, renderbuffer);
1008 }
1009
1010-static void glBindRenderbuffer_wrapper(GLenum target, GLuint framebuffer)
1011+void glBindTexture (GLenum target, GLuint texture)
1012 {
1013- return (*_glBindRenderbuffer)(target, framebuffer);
1014+ (*_glBindTexture)(target, texture);
1015 }
1016
1017-static void glBindTexture_wrapper(GLenum target, GLuint texture)
1018+void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
1019 {
1020- return (*_glBindTexture)(target, texture);
1021+ (*_glBlendColor)(red, green, blue, alpha);
1022 }
1023
1024-static void glBlendEquation_wrapper(GLenum mode)
1025+void glBlendEquation ( GLenum mode )
1026 {
1027- return (*_glBlendEquation)(mode);
1028+ (*_glBlendEquation)(mode);
1029 }
1030
1031-static void glBlendEquationSeparate_wrapper(GLenum modeRGB, GLenum modeAlpha)
1032+void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
1033 {
1034- return (*_glBlendEquationSeparate)(modeRGB, modeAlpha);
1035+ (*_glBlendEquationSeparate)(modeRGB, modeAlpha);
1036 }
1037
1038-static void glBlendFunc_wrapper(GLenum sfactor, GLenum dfactor)
1039+void glBlendFunc (GLenum sfactor, GLenum dfactor)
1040 {
1041- return (*_glBlendFunc)(sfactor, dfactor);
1042+ (*_glBlendFunc)(sfactor, dfactor);
1043 }
1044
1045-static void glBlendFuncSeparate_wrapper(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
1046+void glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
1047 {
1048- return (*_glBlendFuncSeparate)(srcRGB, dstRGB, srcAlpha, dstAlpha);
1049+ (*_glBlendFuncSeparate)(srcRGB, dstRGB, srcAlpha, dstAlpha);
1050 }
1051
1052-static void glBufferData_wrapper(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
1053+void glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
1054 {
1055- return (*_glBufferData)(target, size, data, usage);
1056+ (*_glBufferData)(target, size, data, usage);
1057 }
1058
1059-static void glBufferSubData_wrapper(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
1060+void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
1061 {
1062- return (*_glBufferSubData)(target, offset, size, data);
1063+ (*_glBufferSubData)(target, offset, size, data);
1064 }
1065
1066-static GLenum glCheckFramebufferStatus_wrapper(GLenum target)
1067+GLenum glCheckFramebufferStatus (GLenum target)
1068 {
1069 return (*_glCheckFramebufferStatus)(target);
1070 }
1071
1072-static void glClear_wrapper(GLbitfield mask)
1073+void glClear (GLbitfield mask)
1074+{
1075+ (*_glClear)(mask);
1076+}
1077+
1078+void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
1079+{
1080+ (*_glClearColor)(red, green, blue, alpha);
1081+}
1082+
1083+void glClearDepthf (GLclampf depth)
1084 {
1085- return (*_glClear)(mask);
1086+ (*_glClearDepthf)(depth);
1087 }
1088
1089-static void glClearStencil_wrapper(GLint s)
1090+void glClearStencil (GLint s)
1091 {
1092- return (*_glClearStencil)(s);
1093+ (*_glClearStencil)(s);
1094 }
1095
1096-static void glColorMask_wrapper(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
1097+void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
1098 {
1099- return (*_glColorMask)(red, green, blue, alpha);
1100+ (*_glColorMask)(red, green, blue, alpha);
1101 }
1102
1103-static void glCompileShader_wrapper(GLuint shader)
1104+void glCompileShader (GLuint shader)
1105 {
1106- return (*_glCompileShader)(shader);
1107+ (*_glCompileShader)(shader);
1108 }
1109
1110-static void glCompressedTexImage2D_wrapper(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
1111+void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
1112 {
1113- return (*_glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data);
1114+ (*_glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data);
1115 }
1116
1117-static void glCompressedTexSubImage2D_wrapper(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
1118+void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
1119 {
1120- return (*_glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
1121+ (*_glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
1122 }
1123
1124-static void glCopyTexImage2D_wrapper(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
1125+void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
1126 {
1127- return (*_glCopyTexImage2D)(target, level, internalformat, x, y, width, height, border);
1128+ (*_glCopyTexImage2D)(target, level, internalformat, x, y, width, height, border);
1129 }
1130
1131-static void glCopyTexSubImage2D_wrapper(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1132+void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1133 {
1134- return (*_glCopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height);
1135+ (*_glCopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height);
1136 }
1137
1138-static GLuint glCreateProgram_wrapper(void)
1139+GLuint glCreateProgram (void)
1140 {
1141 return (*_glCreateProgram)();
1142 }
1143
1144-static GLuint glCreateShader_wrapper(GLenum type)
1145+GLuint glCreateShader (GLenum type)
1146 {
1147 return (*_glCreateShader)(type);
1148 }
1149
1150-static void glCullFace_wrapper(GLenum mode)
1151+void glCullFace (GLenum mode)
1152+{
1153+ (*_glCullFace)(mode);
1154+}
1155+
1156+void glDeleteBuffers (GLsizei n, const GLuint* buffers)
1157 {
1158- return (*_glCullFace)(mode);
1159+ (*_glDeleteBuffers)(n, buffers);
1160 }
1161
1162-static void glDeleteBuffers_wrapper(GLsizei n, const GLuint* buffers)
1163+void glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
1164 {
1165- return (*_glDeleteBuffers)(n, buffers);
1166+ (*_glDeleteFramebuffers)(n, framebuffers);
1167 }
1168
1169-static void glDeleteFramebuffers_wrapper(GLsizei n, const GLuint* buffers)
1170+void glDeleteProgram (GLuint program)
1171 {
1172- return (*_glDeleteFramebuffers)(n, buffers);
1173+ (*_glDeleteProgram)(program);
1174 }
1175
1176-static void glDeleteProgram_wrapper(GLuint program)
1177+void glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
1178 {
1179- return (*_glDeleteProgram)(program);
1180+ (*_glDeleteRenderbuffers)(n, renderbuffers);
1181 }
1182
1183-static void glDeleteRenderbuffers_wrapper(GLsizei n, const GLuint* renderbuffers)
1184+void glDeleteShader (GLuint shader)
1185 {
1186- return (*_glDeleteRenderbuffers)(n, renderbuffers);
1187+ (*_glDeleteShader)(shader);
1188 }
1189
1190-static void glDeleteShader_wrapper(GLuint shader)
1191+void glDeleteTextures (GLsizei n, const GLuint* textures)
1192 {
1193- return (*_glDeleteShader)(shader);
1194+ (*_glDeleteTextures)(n, textures);
1195 }
1196
1197-static void glDeleteTextures_wrapper(GLsizei n, const GLuint* textures)
1198+void glDepthFunc (GLenum func)
1199 {
1200- return (*_glDeleteTextures)(n, textures);
1201+ (*_glDepthFunc)(func);
1202 }
1203
1204-static void glDepthFunc_wrapper(GLenum func)
1205+void glDepthMask (GLboolean flag)
1206 {
1207- return (*_glDepthFunc)(func);
1208+ (*_glDepthMask)(flag);
1209 }
1210
1211-static void glDepthMask_wrapper(GLboolean flag)
1212+void glDepthRangef (GLclampf zNear, GLclampf zFar)
1213 {
1214- return (*_glDepthMask)(flag);
1215+ (*_glDepthRangef)(zNear, zFar);
1216 }
1217
1218-static void glDetachShader_wrapper(GLuint program, GLuint shader)
1219+void glDetachShader (GLuint program, GLuint shader)
1220 {
1221- return (*_glDetachShader)(program, shader);
1222+ (*_glDetachShader)(program, shader);
1223 }
1224
1225-static void glDisable_wrapper(GLenum cap)
1226+void glDisable (GLenum cap)
1227 {
1228- return (*_glDisable)(cap);
1229+ (*_glDisable)(cap);
1230 }
1231
1232-static void glDisableVertexAttribArray_wrapper(GLuint index)
1233+void glDisableVertexAttribArray (GLuint index)
1234 {
1235- return (*_glDisableVertexAttribArray)(index);
1236+ (*_glDisableVertexAttribArray)(index);
1237 }
1238
1239-static void glDrawArrays_wrapper(GLenum mode, GLint first, GLsizei count)
1240+void glDrawArrays (GLenum mode, GLint first, GLsizei count)
1241 {
1242- return (*_glDrawArrays)(mode, first, count);
1243+ (*_glDrawArrays)(mode, first, count);
1244 }
1245
1246-static void glDrawElements_wrapper(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
1247+void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
1248 {
1249- return (*_glDrawElements)(mode, count, type, indices);
1250+ (*_glDrawElements)(mode, count, type, indices);
1251 }
1252
1253-static void glEnable_wrapper(GLenum cap)
1254+void glEnable (GLenum cap)
1255 {
1256- return (*_glEnable)(cap);
1257+ (*_glEnable)(cap);
1258 }
1259
1260-static void glEnableVertexAttribArray_wrapper(GLuint index)
1261+void glEnableVertexAttribArray (GLuint index)
1262 {
1263- return (*_glEnableVertexAttribArray)(index);
1264+ (*_glEnableVertexAttribArray)(index);
1265 }
1266
1267-static void glFinish_wrapper(void)
1268+void glFinish (void)
1269 {
1270- return (*_glFinish)();
1271+ (*_glFinish)();
1272 }
1273
1274-static void glFlush_wrapper(void)
1275+void glFlush (void)
1276 {
1277- return (*_glFlush)();
1278+ (*_glFlush)();
1279 }
1280
1281-static void glFramebufferRenderbuffer_wrapper(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
1282+void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
1283 {
1284- return (*_glFramebufferRenderbuffer)(target, attachment, renderbuffertarget, renderbuffer);
1285+ (*_glFramebufferRenderbuffer)(target, attachment, renderbuffertarget, renderbuffer);
1286 }
1287
1288-static void glFramebufferTexture2D_wrapper(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
1289+void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
1290 {
1291- return (*_glFramebufferTexture2D)(target, attachment, textarget, texture, level);
1292+ (*_glFramebufferTexture2D)(target, attachment, textarget, texture, level);
1293 }
1294
1295-static void glFrontFace_wrapper(GLenum mode)
1296+void glFrontFace (GLenum mode)
1297 {
1298- return (*_glFrontFace)(mode);
1299+ (*_glFrontFace)(mode);
1300 }
1301
1302-static void glGenBuffers_wrapper(GLsizei n, GLuint* buffers)
1303+void glGenBuffers (GLsizei n, GLuint* buffers)
1304 {
1305- return (*_glGenBuffers)(n, buffers);
1306+ (*_glGenBuffers)(n, buffers);
1307 }
1308
1309-static void glGenerateMipmap_wrapper(GLenum target)
1310+void glGenerateMipmap (GLenum target)
1311 {
1312- return (*_glGenerateMipmap)(target);
1313+ (*_glGenerateMipmap)(target);
1314 }
1315
1316-static void glGenFramebuffers_wrapper(GLsizei n, GLuint* framebuffers)
1317+void glGenFramebuffers (GLsizei n, GLuint* framebuffers)
1318 {
1319- return (*_glGenFramebuffers)(n, framebuffers);
1320+ (*_glGenFramebuffers)(n, framebuffers);
1321 }
1322
1323-static void glGenRenderbuffers_wrapper(GLsizei n, GLuint* renderbuffers)
1324+void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
1325 {
1326- return (*_glGenRenderbuffers)(n, renderbuffers);
1327+ (*_glGenRenderbuffers)(n, renderbuffers);
1328 }
1329
1330-static void glGenTextures_wrapper(GLsizei n, GLuint* textures)
1331+void glGenTextures (GLsizei n, GLuint* textures)
1332 {
1333- return (*_glGenTextures)(n, textures);
1334+ (*_glGenTextures)(n, textures);
1335 }
1336
1337-static void glGetActiveAttrib_wrapper(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
1338+void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
1339 {
1340- return (*_glGetActiveAttrib)(program, index, bufsize, length, size, type, name);
1341+ (*_glGetActiveAttrib)(program, index, bufsize, length, size, type, name);
1342 }
1343
1344-static void glGetActiveUniform_wrapper(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
1345+void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
1346 {
1347- return (*_glGetActiveUniform)(program, index, bufsize, length, size, type, name);
1348+ (*_glGetActiveUniform)(program, index, bufsize, length, size, type, name);
1349 }
1350
1351-static void glGetAttachedShaders_wrapper(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
1352+void glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
1353 {
1354- return (*_glGetAttachedShaders)(program, maxcount, count, shaders);
1355+ (*_glGetAttachedShaders)(program, maxcount, count, shaders);
1356 }
1357
1358-static int glGetAttribLocation_wrapper(GLuint program, const GLchar* name)
1359+int glGetAttribLocation (GLuint program, const GLchar* name)
1360 {
1361- return (*_glGetAttribLocation)(program, name);
1362+ (*_glGetAttribLocation)(program, name);
1363 }
1364
1365-static void glGetBooleanv_wrapper(GLenum pname, GLboolean* params)
1366+void glGetBooleanv (GLenum pname, GLboolean* params)
1367 {
1368- return (*_glGetBooleanv)(pname, params);
1369+ (*_glGetBooleanv)(pname, params);
1370 }
1371
1372-static void glGetBufferParameteriv_wrapper(GLenum target, GLenum pname, GLint* params)
1373+void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
1374 {
1375- return (*_glGetBufferParameteriv)(target, pname, params);
1376+ (*_glGetBufferParameteriv)(target, pname, params);
1377 }
1378
1379-static GLenum glGetError_wrapper(void)
1380+GLenum glGetError (void)
1381 {
1382 return (*_glGetError)();
1383 }
1384
1385-static void glGetFloatv_wrapper(GLenum pname, GLfloat* params)
1386+void glGetFloatv (GLenum pname, GLfloat* params)
1387 {
1388- return (*_glGetFloatv)(pname, params);
1389+ (*_glGetFloatv)(pname, params);
1390 }
1391
1392-static void glGetFramebufferAttachmentParameteriv_wrapper(GLenum target, GLenum attachment, GLenum pname, GLint* params)
1393+void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
1394 {
1395- return (*_glGetFramebufferAttachmentParameteriv)(target, attachment, pname, params);
1396+ (*_glGetFramebufferAttachmentParameteriv)(target, attachment, pname, params);
1397 }
1398
1399-static void glGetIntegerv_wrapper(GLenum pname, GLint* params)
1400+void glGetIntegerv (GLenum pname, GLint* params)
1401 {
1402- return (*_glGetIntegerv)(pname, params);
1403+ (*_glGetIntegerv)(pname, params);
1404 }
1405
1406-static void glGetProgramiv_wrapper(GLuint program, GLenum pname, GLint* params)
1407+void glGetProgramiv (GLuint program, GLenum pname, GLint* params)
1408 {
1409- return (*_glGetProgramiv)(program, pname, params);
1410+ (*_glGetProgramiv)(program, pname, params);
1411 }
1412
1413-static void glGetProgramInfoLog_wrapper(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
1414+void glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
1415 {
1416- return (*_glGetProgramInfoLog)(program, bufsize, length, infolog);
1417+ (*_glGetProgramInfoLog)(program, bufsize, length, infolog);
1418 }
1419
1420-static void glGetRenderbufferParameteriv_wrapper(GLenum target, GLenum pname, GLint* params)
1421+void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
1422 {
1423- return (*_glGetRenderbufferParameteriv)(target, pname, params);
1424+ (*_glGetRenderbufferParameteriv)(target, pname, params);
1425 }
1426
1427-static void glGetShaderiv_wrapper(GLuint shader, GLenum pname, GLint* params)
1428+void glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
1429 {
1430- return (*_glGetShaderiv)(shader, pname, params);
1431+ (*_glGetShaderiv)(shader, pname, params);
1432 }
1433
1434-static void glGetShaderInfoLog_wrapper(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
1435+void glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
1436 {
1437- return (*_glGetShaderInfoLog)(shader, bufsize, length, infolog);
1438+ (*_glGetShaderInfoLog)(shader, bufsize, length, infolog);
1439 }
1440
1441-static void glGetShaderPrecisionFormat_wrapper(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
1442+void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
1443 {
1444- return (*_glGetShaderPrecisionFormat)(shadertype, precisiontype, range, precision);
1445+ (*_glGetShaderPrecisionFormat)(shadertype, precisiontype, range, precision);
1446 }
1447
1448-static void glGetShaderSource_wrapper(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
1449+void glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
1450 {
1451- return (*_glGetShaderSource)(shader, bufsize, length, source);
1452+ (*_glGetShaderSource)(shader, bufsize, length, source);
1453 }
1454
1455-static const GLubyte* glGetString_wrapper(GLenum name)
1456+const GLubyte* glGetString (GLenum name)
1457 {
1458- return (*_glGetString)(name);
1459+ (*_glGetString)(name);
1460 }
1461
1462-static void glGetTexParameterfv_wrapper(GLenum target, GLenum pname, GLfloat* params)
1463+void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
1464 {
1465- return (*_glGetTexParameterfv)(target, pname, params);
1466+ (*_glGetTexParameterfv)(target, pname, params);
1467 }
1468
1469-static void glGetTexParameteriv_wrapper(GLenum target, GLenum pname, GLint* params)
1470+void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
1471 {
1472- return (*_glGetTexParameteriv)(target, pname, params);
1473+ (*_glGetTexParameteriv)(target, pname, params);
1474 }
1475
1476-static void glGetUniformfv_wrapper(GLuint program, GLint location, GLfloat* params)
1477+void glGetUniformfv (GLuint program, GLint location, GLfloat* params)
1478 {
1479- return (*_glGetUniformfv)(program, location, params);
1480+ (*_glGetUniformfv)(program, location, params);
1481 }
1482
1483-static void glGetUniformiv_wrapper(GLuint program, GLint location, GLint* params)
1484+void glGetUniformiv (GLuint program, GLint location, GLint* params)
1485 {
1486- return (*_glGetUniformiv)(program, location, params);
1487+ (*_glGetUniformiv)(program, location, params);
1488 }
1489
1490-static int glGetUniformLocation_wrapper(GLuint program, const GLchar* name)
1491+int glGetUniformLocation (GLuint program, const GLchar* name)
1492 {
1493- return (*_glGetUniformLocation)(program, name);
1494+ (*_glGetUniformLocation)(program, name);
1495 }
1496
1497-static void glGetVertexAttribfv_wrapper(GLuint index, GLenum pname, GLfloat* params)
1498+void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
1499 {
1500- return (*_glGetVertexAttribfv)(index, pname, params);
1501+ (*_glGetVertexAttribfv)(index, pname, params);
1502 }
1503
1504-static void glGetVertexAttribiv_wrapper(GLuint index, GLenum pname, GLint* params)
1505+void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
1506 {
1507- return (*_glGetVertexAttribiv)(index, pname, params);
1508+ (*_glGetVertexAttribiv)(index, pname, params);
1509 }
1510
1511-static void glGetVertexAttribPointerv_wrapper(GLuint index, GLenum pname, GLvoid** pointer)
1512+void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer)
1513 {
1514- return (*_glGetVertexAttribPointerv)(index, pname, pointer);
1515+ (*_glGetVertexAttribPointerv)(index, pname, pointer);
1516 }
1517
1518-static void glHint_wrapper(GLenum target, GLenum mode)
1519+void glHint (GLenum target, GLenum mode)
1520 {
1521- return (*_glHint)(target, mode);
1522+ (*_glHint)(target, mode);
1523 }
1524
1525-static GLboolean glIsBuffer_wrapper(GLuint buffer)
1526+GLboolean glIsBuffer (GLuint buffer)
1527 {
1528 return (*_glIsBuffer)(buffer);
1529 }
1530
1531-static GLboolean glIsEnabled_wrapper(GLenum cap)
1532+GLboolean glIsEnabled (GLenum cap)
1533 {
1534 return (*_glIsEnabled)(cap);
1535 }
1536
1537-static GLboolean glIsFramebuffer_wrapper(GLuint framebuffer)
1538+GLboolean glIsFramebuffer (GLuint framebuffer)
1539 {
1540 return (*_glIsFramebuffer)(framebuffer);
1541 }
1542
1543-static GLboolean glIsProgram_wrapper(GLuint program)
1544+GLboolean glIsProgram (GLuint program)
1545 {
1546 return (*_glIsProgram)(program);
1547 }
1548
1549-static GLboolean glIsRenderbuffer_wrapper(GLuint renderbuffer)
1550+GLboolean glIsRenderbuffer (GLuint renderbuffer)
1551 {
1552 return (*_glIsRenderbuffer)(renderbuffer);
1553 }
1554
1555-static GLboolean glIsShader_wrapper(GLuint shader)
1556+GLboolean glIsShader (GLuint shader)
1557 {
1558 return (*_glIsShader)(shader);
1559 }
1560
1561-static GLboolean glIsTexture_wrapper(GLuint texture)
1562+GLboolean glIsTexture (GLuint texture)
1563 {
1564 return (*_glIsTexture)(texture);
1565 }
1566
1567-static void glLinkProgram_wrapper(GLuint program)
1568+void glLineWidth (GLfloat width)
1569 {
1570- return (*_glLinkProgram)(program);
1571+ (*_glLineWidth)(width);
1572 }
1573
1574-static void glPixelStorei_wrapper(GLenum pname, GLint param)
1575+void glLinkProgram (GLuint program)
1576 {
1577- return (*_glPixelStorei)(pname, param);
1578+ (*_glLinkProgram)(program);
1579 }
1580
1581-static void glReadPixels_wrapper(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
1582+void glPixelStorei (GLenum pname, GLint param)
1583 {
1584- return (*_glReadPixels)(x, y, width, height, format, type, pixels);
1585+ (*_glPixelStorei)(pname, param);
1586 }
1587
1588-static void glReleaseShaderCompiler_wrapper(void)
1589+void glPolygonOffset (GLfloat factor, GLfloat units)
1590 {
1591- return (*_glReleaseShaderCompiler)();
1592+ (*_glPolygonOffset)(factor, units);
1593 }
1594
1595-static void glRenderbufferStorage_wrapper(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1596+void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
1597 {
1598- return (*_glRenderbufferStorage)(target, internalformat, width, height);
1599-}
1600+ (*_glReadPixels)(x, y, width, height, format, type, pixels);
1601
1602-static void glScissor_wrapper(GLint x, GLint y, GLsizei width, GLsizei height)
1603-{
1604- return (*_glScissor)(x, y, width, height);
1605 }
1606
1607-static void glShaderBinary_wrapper(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
1608+void glReleaseShaderCompiler (void)
1609 {
1610- return (*_glShaderBinary)(n, shaders, binaryformat, binary, length);
1611+ (*_glReleaseShaderCompiler)();
1612 }
1613
1614-static void glShaderSource_wrapper(GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
1615+void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1616 {
1617- return (*_glShaderSource)(shader, count, string, length);
1618+ (*_glRenderbufferStorage)(target, internalformat, width, height);
1619 }
1620
1621-static void glStencilFunc_wrapper(GLenum func, GLint ref, GLuint mask)
1622+void glSampleCoverage (GLclampf value, GLboolean invert)
1623 {
1624- return (*_glStencilFunc)(func, ref, mask);
1625+ (*_glSampleCoverage)(value, invert);
1626 }
1627
1628-static void glStencilFuncSeparate_wrapper(GLenum face, GLenum func, GLint ref, GLuint mask)
1629+void glScissor (GLint x, GLint y, GLsizei width, GLsizei height)
1630 {
1631- return (*_glStencilFuncSeparate)(face, func, ref, mask);
1632+ (*_glScissor)(x, y, width, height);
1633 }
1634
1635-static void glStencilMask_wrapper(GLuint mask)
1636+void glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
1637 {
1638- return (*_glStencilMask)(mask);
1639+ (*_glShaderBinary)(n, shaders, binaryformat, binary, length);
1640 }
1641
1642-static void glStencilMaskSeparate_wrapper(GLenum face, GLuint mask)
1643+void glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
1644 {
1645- return (*_glStencilMaskSeparate)(face, mask);
1646+ (*_glShaderSource)(shader, count, string, length);
1647 }
1648
1649-static void glStencilOp_wrapper(GLenum fail, GLenum zfail, GLenum zpass)
1650+void glStencilFunc (GLenum func, GLint ref, GLuint mask)
1651 {
1652- return (*_glStencilOp)(fail, zfail, zpass);
1653+ (*_glStencilFunc)(func, ref, mask);
1654 }
1655
1656-static void glStencilOpSeparate_wrapper(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1657+void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
1658 {
1659- return (*_glStencilOpSeparate)(face, fail, zfail, zpass);
1660+ (*_glStencilFuncSeparate)(face, func, ref, mask);
1661 }
1662
1663-static void glTexImage2D_wrapper(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1664+void glStencilMask (GLuint mask)
1665 {
1666- return (*_glTexImage2D)(target, level, internalformat, width, height, border, format, type, pixels);
1667+ (*_glStencilMask)(mask);
1668 }
1669
1670-static void glTexParameterfv_wrapper(GLenum target, GLenum pname, const GLfloat* params)
1671+void glStencilMaskSeparate (GLenum face, GLuint mask)
1672 {
1673- return (*_glTexParameterfv)(target, pname, params);
1674+ (*_glStencilMaskSeparate)(face, mask);
1675 }
1676
1677-static void glTexParameteri_wrapper(GLenum target, GLenum pname, GLint param)
1678+void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
1679 {
1680- return (*_glTexParameteri)(target, pname, param);
1681+ (*_glStencilOp)(fail, zfail, zpass);
1682 }
1683
1684-static void glTexParameteriv_wrapper(GLenum target, GLenum pname, const GLint* params)
1685+void glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1686 {
1687- return (*_glTexParameteriv)(target, pname, params);
1688+ (*_glStencilOpSeparate)(face, fail, zfail, zpass);
1689 }
1690
1691-static void glTexSubImage2D_wrapper(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
1692+void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1693 {
1694- return (*_glTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels);
1695+ (*_glTexImage2D)(target, level, internalformat, width, height, border, format, type, pixels);
1696 }
1697
1698-static void glUniform1fv_wrapper(GLint location, GLsizei count, const GLfloat* v)
1699+void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
1700 {
1701- return (*_glUniform1fv)(location, count, v);
1702+ (*_glTexParameterf)(target, pname, param);
1703 }
1704
1705-static void glUniform1i_wrapper(GLint location, GLint x)
1706+void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
1707 {
1708- return (*_glUniform1i)(location, x);
1709+ (*_glTexParameterfv)(target, pname, params);
1710 }
1711
1712-static void glUniform1iv_wrapper(GLint location, GLsizei count, const GLint* v)
1713+void glTexParameteri (GLenum target, GLenum pname, GLint param)
1714 {
1715- return (*_glUniform1iv)(location, count, v);
1716+ (*_glTexParameteri)(target, pname, param);
1717 }
1718
1719-static void glUniform2fv_wrapper(GLint location, GLsizei count, const GLfloat* v)
1720+void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
1721 {
1722- return (*_glUniform2fv)(location, count, v);
1723+ (*_glTexParameteriv)(target, pname, params);
1724 }
1725
1726-static void glUniform2i_wrapper(GLint location, GLint x, GLint y)
1727+void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
1728 {
1729- return (*_glUniform2i)(location, x, y);
1730+ (*_glTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels);
1731 }
1732
1733-static void glUniform2iv_wrapper(GLint location, GLsizei count, const GLint* v)
1734+void glUniform1f (GLint location, GLfloat x)
1735 {
1736- return (*_glUniform2iv)(location, count, v);
1737+ (*_glUniform1f)(location, x);
1738 }
1739
1740-static void glUniform3fv_wrapper(GLint location, GLsizei count, const GLfloat* v)
1741+void glUniform1fv (GLint location, GLsizei count, const GLfloat* v)
1742 {
1743- return (*_glUniform3fv)(location, count, v);
1744+ (*_glUniform1fv)(location, count, v);
1745 }
1746
1747-static void glUniform3i_wrapper(GLint location, GLint x, GLint y, GLint z)
1748+void glUniform1i (GLint location, GLint x)
1749 {
1750- return (*_glUniform3i)(location, x, y, z);
1751+ (*_glUniform1i)(location, x);
1752 }
1753
1754-static void glUniform3iv_wrapper(GLint location, GLsizei count, const GLint* v)
1755+void glUniform1iv (GLint location, GLsizei count, const GLint* v)
1756 {
1757- return (*_glUniform3iv)(location, count, v);
1758+ (*_glUniform1iv)(location, count, v);
1759 }
1760
1761-static void glUniform4fv_wrapper(GLint location, GLsizei count, const GLfloat* v)
1762+void glUniform2f (GLint location, GLfloat x, GLfloat y)
1763 {
1764- return (*_glUniform4fv)(location, count, v);
1765+ (*_glUniform2f)(location, x, y);
1766 }
1767
1768-static void glUniform4i_wrapper(GLint location, GLint x, GLint y, GLint z, GLint w)
1769+void glUniform2fv (GLint location, GLsizei count, const GLfloat* v)
1770 {
1771- return (*_glUniform4i)(location, x, y, z, w);
1772+ (*_glUniform2fv)(location, count, v);
1773 }
1774
1775-static void glUniform4iv_wrapper(GLint location, GLsizei count, const GLint* v)
1776+void glUniform2i (GLint location, GLint x, GLint y)
1777 {
1778- return (*_glUniform4iv)(location, count, v);
1779+ (*_glUniform2i)(location, x, y);
1780 }
1781
1782-static void glUniformMatrix2fv_wrapper(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1783+void glUniform2iv (GLint location, GLsizei count, const GLint* v)
1784 {
1785- return (*_glUniformMatrix2fv)(location, count, transpose, value);
1786+ (*_glUniform2iv)(location, count, v);
1787 }
1788
1789-static void glUniformMatrix3fv_wrapper(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1790+void glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
1791 {
1792- return (*_glUniformMatrix3fv)(location, count, transpose, value);
1793+ (*_glUniform3f)(location, x, y, z);
1794 }
1795
1796-static void glUniformMatrix4fv_wrapper(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1797+void glUniform3fv (GLint location, GLsizei count, const GLfloat* v)
1798 {
1799- return (*_glUniformMatrix4fv)(location, count, transpose, value);
1800+ (*_glUniform3fv)(location, count, v);
1801 }
1802
1803-static void glUseProgram_wrapper(GLuint program)
1804+void glUniform3i (GLint location, GLint x, GLint y, GLint z)
1805 {
1806- return (*_glUseProgram)(program);
1807+ (*_glUniform3i)(location, x, y, z);
1808 }
1809
1810-static void glValidateProgram_wrapper(GLuint program)
1811+void glUniform3iv (GLint location, GLsizei count, const GLint* v)
1812 {
1813- return (*_glValidateProgram)(program);
1814+ (*_glUniform3iv)(location, count, v);
1815 }
1816
1817-static void glVertexAttrib1fv_wrapper(GLuint indx, const GLfloat* values)
1818+void glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1819 {
1820- return (*_glVertexAttrib1fv)(indx, values);
1821+ (*_glUniform4f)(location, x, y, z, w);
1822 }
1823
1824-static void glVertexAttrib2fv_wrapper(GLuint indx, const GLfloat* values)
1825+void glUniform4fv (GLint location, GLsizei count, const GLfloat* v)
1826 {
1827- return (*_glVertexAttrib2fv)(indx, values);
1828+ (*_glUniform4fv)(location, count, v);
1829 }
1830
1831-static void glVertexAttrib3fv_wrapper(GLuint indx, const GLfloat* values)
1832+void glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
1833 {
1834- return (*_glVertexAttrib3fv)(indx, values);
1835+ (*_glUniform4i)(location, x, y, z, w);
1836 }
1837
1838-static void glVertexAttrib4fv_wrapper(GLuint indx, const GLfloat* values)
1839+void glUniform4iv (GLint location, GLsizei count, const GLint* v)
1840 {
1841- return (*_glVertexAttrib4fv)(indx, values);
1842+ (*_glUniform4iv)(location, count, v);
1843 }
1844
1845-static void glVertexAttribPointer_wrapper(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1846+void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1847 {
1848- return (*_glVertexAttribPointer)(indx, size, type, normalized, stride, ptr);
1849+ (*_glUniformMatrix2fv)(location, count, transpose, value);
1850 }
1851
1852-static void glViewport_wrapper(GLint x, GLint y, GLsizei width, GLsizei height)
1853+void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1854 {
1855- return (*_glViewport)(x, y, width, height);
1856+ (*_glUniformMatrix3fv)(location, count, transpose, value);
1857 }
1858
1859-
1860-
1861-GLES2_IDLOAD(glActiveTexture);
1862-
1863-GLES2_IDLOAD(glAttachShader);
1864-
1865-GLES2_IDLOAD(glBindAttribLocation);
1866-
1867-GLES2_IDLOAD(glBindBuffer);
1868-
1869-GLES2_IDLOAD(glBindFramebuffer);
1870-
1871-GLES2_IDLOAD(glBindRenderbuffer);
1872-
1873-GLES2_IDLOAD(glBindTexture);
1874-
1875-GLES2_IDLOAD(glBlendEquation);
1876-
1877-GLES2_IDLOAD(glBlendEquationSeparate);
1878-
1879-GLES2_IDLOAD(glBlendFunc);
1880-
1881-GLES2_IDLOAD(glBlendFuncSeparate);
1882-
1883-GLES2_IDLOAD(glBufferData);
1884-
1885-GLES2_IDLOAD(glBufferSubData);
1886-
1887-GLES2_IDLOAD(glCheckFramebufferStatus);
1888-
1889-GLES2_IDLOAD(glClear);
1890-
1891-GLES2_IDLOAD(glClearStencil);
1892-
1893-GLES2_IDLOAD(glColorMask);
1894-
1895-GLES2_IDLOAD(glCompileShader);
1896-
1897-GLES2_IDLOAD(glCompressedTexImage2D);
1898-
1899-GLES2_IDLOAD(glCompressedTexSubImage2D);
1900-
1901-GLES2_IDLOAD(glCopyTexImage2D);
1902-
1903-GLES2_IDLOAD(glCopyTexSubImage2D);
1904-
1905-GLES2_IDLOAD(glCreateProgram);
1906-
1907-GLES2_IDLOAD(glCreateShader);
1908-
1909-GLES2_IDLOAD(glCullFace);
1910-
1911-GLES2_IDLOAD(glDeleteBuffers);
1912-
1913-GLES2_IDLOAD(glDeleteFramebuffers);
1914-
1915-GLES2_IDLOAD(glDeleteProgram);
1916-
1917-GLES2_IDLOAD(glDeleteRenderbuffers);
1918-
1919-GLES2_IDLOAD(glDeleteShader);
1920-
1921-GLES2_IDLOAD(glDeleteTextures);
1922-
1923-GLES2_IDLOAD(glDepthFunc);
1924-
1925-GLES2_IDLOAD(glDepthMask);
1926-
1927-GLES2_IDLOAD(glDetachShader);
1928-
1929-GLES2_IDLOAD(glDisable);
1930-
1931-GLES2_IDLOAD(glDisableVertexAttribArray);
1932-
1933-GLES2_IDLOAD(glDrawArrays);
1934-
1935-GLES2_IDLOAD(glDrawElements);
1936-
1937-GLES2_IDLOAD(glEnable);
1938-
1939-GLES2_IDLOAD(glEnableVertexAttribArray);
1940-
1941-GLES2_IDLOAD(glFinish);
1942-
1943-GLES2_IDLOAD(glFlush);
1944-
1945-GLES2_IDLOAD(glFramebufferRenderbuffer);
1946-
1947-GLES2_IDLOAD(glFramebufferTexture2D);
1948-
1949-GLES2_IDLOAD(glFrontFace);
1950-
1951-GLES2_IDLOAD(glGenBuffers);
1952-
1953-GLES2_IDLOAD(glGenerateMipmap);
1954-
1955-GLES2_IDLOAD(glGenFramebuffers);
1956-
1957-GLES2_IDLOAD(glGenRenderbuffers);
1958-
1959-GLES2_IDLOAD(glGenTextures);
1960-
1961-GLES2_IDLOAD(glGetActiveAttrib);
1962-
1963-GLES2_IDLOAD(glGetActiveUniform);
1964-
1965-GLES2_IDLOAD(glGetAttachedShaders);
1966-
1967-GLES2_IDLOAD(glGetAttribLocation);
1968-
1969-GLES2_IDLOAD(glGetBooleanv);
1970-
1971-GLES2_IDLOAD(glGetBufferParameteriv);
1972-
1973-GLES2_IDLOAD(glGetError);
1974-
1975-GLES2_IDLOAD(glGetFloatv);
1976-
1977-GLES2_IDLOAD(glGetFramebufferAttachmentParameteriv);
1978-
1979-GLES2_IDLOAD(glGetIntegerv);
1980-
1981-GLES2_IDLOAD(glGetProgramiv);
1982-
1983-GLES2_IDLOAD(glGetProgramInfoLog);
1984-
1985-GLES2_IDLOAD(glGetRenderbufferParameteriv);
1986-
1987-GLES2_IDLOAD(glGetShaderiv);
1988-
1989-GLES2_IDLOAD(glGetShaderInfoLog);
1990-
1991-GLES2_IDLOAD(glGetShaderPrecisionFormat);
1992-
1993-GLES2_IDLOAD(glGetShaderSource);
1994-
1995-GLES2_IDLOAD(glGetString);
1996-
1997-GLES2_IDLOAD(glGetTexParameterfv);
1998-
1999-GLES2_IDLOAD(glGetTexParameteriv);
2000-
2001-GLES2_IDLOAD(glGetUniformfv);
2002-
2003-GLES2_IDLOAD(glGetUniformiv);
2004-
2005-GLES2_IDLOAD(glGetUniformLocation);
2006-
2007-GLES2_IDLOAD(glGetVertexAttribfv);
2008-
2009-GLES2_IDLOAD(glGetVertexAttribiv);
2010-
2011-GLES2_IDLOAD(glGetVertexAttribPointerv);
2012-
2013-GLES2_IDLOAD(glHint);
2014-
2015-GLES2_IDLOAD(glIsBuffer);
2016-
2017-GLES2_IDLOAD(glIsEnabled);
2018-
2019-GLES2_IDLOAD(glIsFramebuffer);
2020-
2021-GLES2_IDLOAD(glIsProgram);
2022-
2023-GLES2_IDLOAD(glIsRenderbuffer);
2024-
2025-GLES2_IDLOAD(glIsShader);
2026-
2027-GLES2_IDLOAD(glIsTexture);
2028-
2029-GLES2_IDLOAD(glLinkProgram);
2030-
2031-GLES2_IDLOAD(glPixelStorei);
2032-
2033-GLES2_IDLOAD(glReadPixels);
2034-
2035-GLES2_IDLOAD(glReleaseShaderCompiler);
2036-
2037-GLES2_IDLOAD(glRenderbufferStorage);
2038-
2039-GLES2_IDLOAD(glScissor);
2040-
2041-GLES2_IDLOAD(glShaderBinary);
2042-
2043-GLES2_IDLOAD(glShaderSource);
2044-
2045-GLES2_IDLOAD(glStencilFunc);
2046-
2047-GLES2_IDLOAD(glStencilFuncSeparate);
2048-
2049-GLES2_IDLOAD(glStencilMask);
2050-
2051-GLES2_IDLOAD(glStencilMaskSeparate);
2052-
2053-GLES2_IDLOAD(glStencilOp);
2054-
2055-GLES2_IDLOAD(glStencilOpSeparate);
2056-
2057-GLES2_IDLOAD(glTexImage2D);
2058-
2059-GLES2_IDLOAD(glTexParameterfv);
2060-
2061-GLES2_IDLOAD(glTexParameteri);
2062-
2063-GLES2_IDLOAD(glTexParameteriv);
2064-
2065-GLES2_IDLOAD(glTexSubImage2D);
2066-
2067-GLES2_IDLOAD(glUniform1fv);
2068-
2069-GLES2_IDLOAD(glUniform1i);
2070-
2071-GLES2_IDLOAD(glUniform1iv);
2072-
2073-GLES2_IDLOAD(glUniform2fv);
2074-
2075-GLES2_IDLOAD(glUniform2i);
2076-
2077-GLES2_IDLOAD(glUniform2iv);
2078-
2079-GLES2_IDLOAD(glUniform3fv);
2080-
2081-GLES2_IDLOAD(glUniform3i);
2082-
2083-GLES2_IDLOAD(glUniform3iv);
2084-
2085-GLES2_IDLOAD(glUniform4fv);
2086-
2087-GLES2_IDLOAD(glUniform4i);
2088-
2089-GLES2_IDLOAD(glUniform4iv);
2090-
2091-GLES2_IDLOAD(glUniformMatrix2fv);
2092-
2093-GLES2_IDLOAD(glUniformMatrix3fv);
2094-
2095-GLES2_IDLOAD(glUniformMatrix4fv);
2096-
2097-GLES2_IDLOAD(glUseProgram);
2098-
2099-GLES2_IDLOAD(glValidateProgram);
2100-
2101-GLES2_IDLOAD(glVertexAttrib1fv);
2102-
2103-GLES2_IDLOAD(glVertexAttrib2fv);
2104-
2105-GLES2_IDLOAD(glVertexAttrib3fv);
2106-
2107-GLES2_IDLOAD(glVertexAttrib4fv);
2108-
2109-GLES2_IDLOAD(glVertexAttribPointer);
2110-
2111-GLES2_IDLOAD(glViewport);
2112-
2113-void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
2114+void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2115 {
2116- struct egl_image *img = image;
2117- return (*_glEGLImageTargetTexture2DOES)(target, img ? img->egl_image : NULL);
2118+ (*_glUniformMatrix4fv)(location, count, transpose, value);
2119 }
2120
2121-void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
2122+void glUseProgram (GLuint program)
2123 {
2124- return (*_glBlendColor)(red, green, blue, alpha);
2125+ (*_glUseProgram)(program);
2126 }
2127
2128-void glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2129+void glValidateProgram (GLuint program)
2130 {
2131- return (*_glVertexAttrib4f)(indx, x, y, z, w);
2132+ (*_glValidateProgram)(program);
2133 }
2134
2135-void glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
2136+void glVertexAttrib1f (GLuint indx, GLfloat x)
2137 {
2138- return (*_glVertexAttrib2f)(indx, x, y);
2139+ (*_glVertexAttrib1f)(indx, x);
2140 }
2141
2142-void glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
2143+void glVertexAttrib1fv (GLuint indx, const GLfloat* values)
2144 {
2145- return (*_glVertexAttrib3f)(indx, x, y, z);
2146+ (*_glVertexAttrib1fv)(indx, values);
2147 }
2148
2149-
2150-void glVertexAttrib1f (GLuint indx, GLfloat x)
2151+void glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
2152 {
2153- return (*_glVertexAttrib1f)(indx, x);
2154+ (*_glVertexAttrib2f)(indx, x, y);
2155 }
2156
2157-void glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2158+void glVertexAttrib2fv (GLuint indx, const GLfloat* values)
2159 {
2160- return (*_glUniform4f)(location, x, y, z, w);
2161+ (*_glVertexAttrib2fv)(indx, values);
2162 }
2163
2164-void glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
2165+void glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
2166 {
2167- return (*_glUniform3f)(location, x, y, z);
2168+ (*_glVertexAttrib3f)(indx, x, y, z);
2169 }
2170
2171-void glUniform2f (GLint location, GLfloat x, GLfloat y)
2172+void glVertexAttrib3fv (GLuint indx, const GLfloat* values)
2173 {
2174- return (*_glUniform2f)(location, x, y);
2175+ (*_glVertexAttrib3fv)(indx, values);
2176 }
2177
2178-void glUniform1f (GLint location, GLfloat x)
2179+void glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2180 {
2181- return (*_glUniform1f)(location, x);
2182+ (*_glVertexAttrib4f)(indx, x, y, z, w);
2183 }
2184
2185-void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
2186+void glVertexAttrib4fv (GLuint indx, const GLfloat* values)
2187 {
2188- return (*_glTexParameterf)(target, pname, param);
2189+ (*_glVertexAttrib4fv)(indx, values);
2190 }
2191
2192-void glSampleCoverage (GLclampf value, GLboolean invert)
2193-{
2194- return (*_glSampleCoverage)(value, invert);
2195-}
2196-void glPolygonOffset (GLfloat factor, GLfloat units)
2197-{
2198- return (*_glPolygonOffset)(factor, units);
2199-}
2200-void glDepthRangef (GLclampf zNear, GLclampf zFar)
2201+void glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
2202 {
2203- return (*_glDepthRangef)(zNear, zFar);
2204+ (*_glVertexAttribPointer)(indx, size, type, normalized, stride, ptr);
2205 }
2206
2207-
2208-void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
2209+void glViewport (GLint x, GLint y, GLsizei width, GLsizei height)
2210 {
2211- return (*_glClearColor)(red, green, blue, alpha);
2212+ (*_glViewport)(x, y, width, height);
2213 }
2214
2215-void glClearDepthf (GLclampf depth)
2216-{
2217- return (*_glClearDepthf)(depth);
2218-}
2219-void glLineWidth (GLfloat width)
2220+void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
2221 {
2222- return (*_glLineWidth)(width);
2223+ (*_glEGLImageTargetTexture2DOES)(target, image);
2224 }
2225
2226

Subscribers

People subscribed via source and target branches