| 144 } |
144 } |
| 145 AscWindow *window = &asc_context.windows[index]; |
145 AscWindow *window = &asc_context.windows[index]; |
| 146 // necessary safeguard |
146 // necessary safeguard |
| 147 if (window->id == 0) return; |
147 if (window->id == 0) return; |
| 148 |
148 |
| 149 // activate the window that shall be synced temporarily |
149 // activate the window that shall be synced |
| 150 unsigned int active_index = asc_window_activate(index); |
150 unsigned int active_index = asc_window_activate(index); |
| |
151 |
| |
152 // copy and reset the counters |
| |
153 memcpy(&asc_active_glctx->counters, &asc_active_glctx->ctr, sizeof(AscGLCounters)); |
| |
154 memset(&asc_active_glctx->ctr, 0, sizeof(AscGLCounters)); |
| 151 |
155 |
| 152 // Clear the color buffer for the window frame |
156 // Clear the color buffer for the window frame |
| 153 glViewport(0, 0, |
157 glViewport(0, 0, |
| 154 (GLsizei) window->rect.size.width, |
158 (GLsizei) window->rect.size.width, |
| 155 (GLsizei) window->rect.size.height); |
159 (GLsizei) window->rect.size.height); |