_COREGL_VENDOR_EGL_LIB_PATH);
COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
_COREGL_VENDOR_EGL_LIB_PATH_LEGACY);
+ return 0;
}
- return 0;
}
// test for invalid linking egl
_COREGL_VENDOR_GLV1_LIB_PATH);
COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
_COREGL_VENDOR_GLV1_LIB_PATH_LEGACY);
- }
- } else {
- // test for invalid linking gl
- if (dlsym(gl_lib_handle, "coregl_symbol_exported")) {
- COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
- _COREGL_VENDOR_GLV1_LIB_PATH);
return 0;
}
- COREGL_DBG("Driver GL version 1.1");
- _gl_sym_init(COREGL_GLAPI_1);
}
+
+ // test for invalid linking gl
+ if (dlsym(gl_lib_handle, "coregl_symbol_exported")) {
+ COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
+ _COREGL_VENDOR_GLV1_LIB_PATH);
+ return 0;
+ }
+ COREGL_DBG("Driver GL version 1.1");
+ _gl_sym_init(COREGL_GLAPI_1);
+
} else if (driver_gl_version == COREGL_GLAPI_2) {
// in case of driver library is separated
gl_lib_handle = dlopen(_COREGL_VENDOR_GLV1_LIB_PATH, RTLD_LAZY | RTLD_LOCAL);
_COREGL_VENDOR_GLV2_LIB_PATH);
COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
_COREGL_VENDOR_GLV2_LIB_PATH_LEGACY);
- }
- } else {
- // test for invalid linking gl
- if (dlsym(gl_lib_handle, "coregl_symbol_exported")) {
- COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
- _COREGL_VENDOR_GLV2_LIB_PATH);
return 0;
}
+ }
- // test for a GLES 3.x symbol
- if (dlsym(gl_lib_handle, "glBlendBarrier")) {
- COREGL_DBG("Driver GL version 3.2");
- driver_gl_version = COREGL_GLAPI_32;
- } else if (dlsym(gl_lib_handle, "glBindProgramPipeline")) {
- COREGL_DBG("Driver GL version 3.1");
- driver_gl_version = COREGL_GLAPI_31;
- } else if (dlsym(gl_lib_handle, "glReadBuffer")) {
- COREGL_DBG("Driver GL version 3.0");
- driver_gl_version = COREGL_GLAPI_3;
- } else {
- COREGL_DBG("Driver GL version 2.0");
- }
+ // test for invalid linking gl
+ if (dlsym(gl_lib_handle, "coregl_symbol_exported")) {
+ COREGL_ERR("Invalid library link! (Check linkage of libCOREGL -> %s)",
+ _COREGL_VENDOR_GLV2_LIB_PATH);
+ return 0;
+ }
- _gl_sym_init(COREGL_GLAPI_2);
+ // test for a GLES 3.x symbol
+ if (dlsym(gl_lib_handle, "glBlendBarrier")) {
+ COREGL_DBG("Driver GL version 3.2");
+ driver_gl_version = COREGL_GLAPI_32;
+ } else if (dlsym(gl_lib_handle, "glBindProgramPipeline")) {
+ COREGL_DBG("Driver GL version 3.1");
+ driver_gl_version = COREGL_GLAPI_31;
+ } else if (dlsym(gl_lib_handle, "glReadBuffer")) {
+ COREGL_DBG("Driver GL version 3.0");
+ driver_gl_version = COREGL_GLAPI_3;
+ } else {
+ COREGL_DBG("Driver GL version 2.0");
}
- }
+ _gl_sym_init(COREGL_GLAPI_2);
+
+ }
return 1;
}