static struct st_api * egl_st_load_gl(void) { const char module[] = "st_GL"; const char symbol[] = "st_api_create_OpenGL"; struct st_api *stapi; stapi = load_gl(module, symbol); /* try again with libglapi.so loaded */ if (!stapi) { struct util_dl_library *glapi = util_dl_open("libglapi" UTIL_DL_EXT); if (glapi) { _eglLog(_EGL_DEBUG, "retry with libglapi" UTIL_DL_EXT " loaded"); stapi = load_gl(module, symbol); util_dl_close(glapi); } } if (!stapi) _eglLog(_EGL_WARNING, "unable to load %s" UTIL_DL_EXT, module); return stapi; }
//---------------------------------------------------------------------------------------------------------------------- // voglbench_init //---------------------------------------------------------------------------------------------------------------------- static bool voglbench_init(int argc, char *argv[]) { VOGL_FUNC_TRACER colorized_console::init(); colorized_console::set_exception_callback(); //console::set_tool_prefix("(voglbench) "); tool_print_title(); if (!init_command_line_params(argc, argv)) return false; #ifdef USE_TELEMETRY int telemetry_level = g_command_line_params().get_value_as_int("telemetry_level", 0, TELEMETRY_LEVEL_MIN + 1, TELEMETRY_LEVEL_MIN, TELEMETRY_LEVEL_MAX); telemetry_set_level(telemetry_level); telemetry_tick(); #endif vogl_common_lib_early_init(); vogl_common_lib_global_init(); if (g_command_line_params().get_value_as_bool("quiet")) console::set_output_level(cMsgError); else if (g_command_line_params().get_value_as_bool("debug")) console::set_output_level(cMsgDebug); else if (g_command_line_params().get_value_as_bool("verbose")) console::set_output_level(cMsgVerbose); if (g_command_line_params().get_value_as_bool("gl_debug_log")) { vogl_set_direct_gl_func_prolog(vogl_direct_gl_func_prolog, NULL); vogl_set_direct_gl_func_epilog(vogl_direct_gl_func_epilog, NULL); } #if VOGL_PLATFORM_HAS_SDL if (SDL_Init(SDL_INIT_VIDEO) < 0) return false; #endif if (!load_gl()) return false; bool wrap_all_gl_calls = false; vogl_init_actual_gl_entrypoints(vogl_get_proc_address_helper, wrap_all_gl_calls); return true; }