- if (new_drawable == drawable && new_context == context) {
- return;
- }
-
- if (drawable && context) {
- glFlush();
- if (!retrace::doubleBuffer) {
- frame_complete(call);
- }
- }
-
- bool result = glws::makeCurrent(new_drawable, new_context);
-
- if (new_drawable && new_context && result) {
- drawable = new_drawable;
- context = new_context;
- } else {
- drawable = NULL;
- context = NULL;
- }