+
+ screen->pLibrary = util_dl_open(filename);
+ if (!screen->pLibrary) {
+ fprintf(stderr, "(skipping: %s).\n", util_dl_error());
+ return false;
+ }
+
+ util_dl_proc pApiProc = util_dl_get_proc_address(screen->pLibrary,
+ "SwrGetInterface");
+ util_dl_proc pTileApiProc = util_dl_get_proc_address(screen->pLibrary,
+ "SwrGetTileIterface");
+ util_dl_proc pInitFunc = util_dl_get_proc_address(screen->pLibrary,
+ "InitTilesTable");
+ if (!pApiProc || !pInitFunc || !pTileApiProc) {
+ fprintf(stderr, "(skipping: %s).\n", util_dl_error());
+ util_dl_close(screen->pLibrary);
+ screen->pLibrary = NULL;
+ return false;
+ }
+
+ screen->pfnSwrGetInterface = (PFNSwrGetInterface)pApiProc;
+ screen->pfnSwrGetTileInterface = (PFNSwrGetTileInterface)pTileApiProc;
+
+ SWR_ASSERT(screen->pfnSwrGetInterface != nullptr);
+ SWR_ASSERT(screen->pfnSwrGetTileInterface != nullptr);
+ SWR_ASSERT(pInitFunc != nullptr);
+
+ pInitFunc();
+
+ fprintf(stderr, "(using: %s).\n", filename);