if (drawable && context) {
glFlush();
if (!double_buffer) {
- frame_complete(call.no);
+ frame_complete(call);
}
}
}
static void retrace_wglSwapBuffers(Trace::Call &call) {
- frame_complete(call.no);
+ frame_complete(call);
if (double_buffer) {
drawable->swapBuffers();
} else {
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;
}
}