diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-10-11 19:33:22 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-10-11 20:29:36 +0100 |
commit | 96d9dda5334c63cbe46ecc654bf76167541d537a (patch) | |
tree | 4567691d5d69c9d5f65216f4a5f5263b3c6e8f39 | |
parent | 02bf5b48c041ef6fb575953b911e4268a44a9a9f (diff) |
Fix retracing of wglShareLists for currently bound contexts.
-rw-r--r-- | glretrace_wgl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glretrace_wgl.cpp b/glretrace_wgl.cpp index 7df2485..8f6a624 100644 --- a/glretrace_wgl.cpp +++ b/glretrace_wgl.cpp @@ -116,8 +116,13 @@ static void retrace_wglShareLists(Trace::Call &call) { glws::Context *new_context = glws::createContext(old_context->visual, share_context); if (new_context) { - delete old_context; + if (context == old_context) { + glws::makeCurrent(drawable, new_context); + } + context_map[hglrc2] = new_context; + + delete old_context; } } |