[waffle] [PATCH 48/53] wflinfo: call get_proc_address after make_current

Emil Velikov emil.l.velikov at gmail.com
Sun Nov 9 14:58:53 PST 2014


WGL requires that an active context is available as wglGetProcAddress
is called otherwise the function pointer returned will be NULL.

v2: Rebase

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/utils/wflinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 161e355..c2af4dc 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -1058,8 +1058,6 @@ main(int argc, char **argv)
     if (!glGetString)
         error_get_gl_symbol("glGetString");
 
-    glGetStringi = waffle_get_proc_address("glGetStringi");
-
     const struct wflinfo_config_attrs config_attrs = {
         .api = opts.context_api,
         .profile = opts.context_profile,
@@ -1079,6 +1077,8 @@ main(int argc, char **argv)
     if (!ok)
         error_waffle();
 
+    glGetStringi = waffle_get_proc_address("glGetStringi");
+
     ok = print_wflinfo(&opts);
     if (!ok)
         error_waffle();
-- 
2.1.3



More information about the waffle mailing list