DBG("Redraw rect %d %d %d %d", x, y, w, h);
re = (Render_Engine *)data;
+ eng_window_lock_focus(re->win);
evas_gl_common_context_resize(re->win->gl_context, re->win->width, re->win->height, 0);
/* simple bounding box */
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->width, re->win->height);
#endif
eng_window_swap_buffers(re->win);
-
+ eng_window_unlock_focus(re->win);
}
static void
void eng_window_swap_buffers(Evas_GL_Cocoa_Window *gw);
void eng_window_vsync_set(int on);
void eng_window_resize(Evas_GL_Cocoa_Window *gw, int width, int height);
+void eng_window_lock_focus(Evas_GL_Cocoa_Window *gw);
+void eng_window_unlock_focus(Evas_GL_Cocoa_Window *gw);
#endif /* __EVAS_ENGINE_H__ */
[(EvasGLView*)gw->view setFrame:view_frame];
[[(NSOpenGLView*)gw->view openGLContext] flushBuffer];
}
+
+void
+eng_window_lock_focus(Evas_GL_Cocoa_Window *gw)
+{
+ [(NSOpenGLView*)gw->view lockFocus];
+}
+
+void
+eng_window_unlock_focus(Evas_GL_Cocoa_Window *gw)
+{
+ [(NSOpenGLView*)gw->view unlockFocus];
+}