if (!wgl_get_procaddr_fn || !wgl_create_context_fn ||
!wgl_make_current_fn || !wgl_delete_context_fn) {
+ YAGL_LOG_ERROR_WIN();
goto out;
}
win = yagl_egl_wgl_dummy_win_create();
if (!win) {
+ YAGL_LOG_ERROR_WIN();
goto out;
}
dc = GetDC(win);
if (!dc) {
+ YAGL_LOG_ERROR_WIN();
goto out;
}
/* We need to set pixel format of dc before we can create GL context */
if (!yagl_egl_wgl_dc_set_def_pixfmt(dc)) {
+ YAGL_LOG_ERROR_WIN();
goto out;
}
glc = wgl_create_context_fn(dc);
if (!glc) {
+ YAGL_LOG_ERROR_WIN();
goto out;
}
if (wgl_make_current_fn(dc, glc) == FALSE) {
+ YAGL_LOG_ERROR_WIN();
wgl_make_current_fn(NULL, NULL);
wgl_delete_context_fn(glc);
goto out;
}
out:
- if (!proc) {
- YAGL_LOG_ERROR_WIN();
- }
-
if (win) {
if (dc) {
ReleaseDC(win, dc);
void *proc = NULL;
YAGL_LOG_FUNC_ENTER(yagl_egl_wgl_get_procaddr,
- "Retrieving %s address", sym);
+ "Retrieving %s address", sym);
proc = yagl_egl_wgl_extaddr_get(dyn_lib, sym);
if (!proc) {
- YAGL_LOG_TRACE("wglGetProcAddress failed for %s, trying GetProcAddress",
- sym);
+ YAGL_LOG_TRACE("wglGetProcAddress failed for %s, "
+ "trying GetProcAddress", sym);
proc = yagl_dyn_lib_get_sym(dyn_lib, sym);
+ if (!proc) {
+ YAGL_LOG_ERROR("wglGetProcAddress & GetProcAddress failed for %s",
+ sym);
+ }
}
YAGL_LOG_FUNC_EXIT("%s address: %p", sym, proc);