dlsym(NULL, ...) may return a valid pointer to a local symbol. We
need to search it in libGLESv2 explicitly first.
Change-Id: I6200679d7b69444798d3feeb77b685e2772eb3a7
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
void *yagl_get_gles2_sym(const char *name)
{
void *handle;
- void *sym = dlsym(NULL, name);
-
- if (sym) {
- return sym;
- }
+ void *sym = NULL;
handle = dlopen("libGLESv2.so.1", RTLD_NOW|RTLD_GLOBAL);
if (!handle) {
}
if (handle) {
- return dlsym(handle, name);
+ sym = dlsym(handle, name);
}
- return NULL;
+ if (!sym) {
+ sym = dlsym(NULL, name);
+ }
+
+ return sym;
}
static void yagl_egl_state_free(void* ptr)