diff options
Diffstat (limited to 'src/cairo-egl.cpp')
| -rw-r--r-- | src/cairo-egl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-egl.cpp b/src/cairo-egl.cpp index 5a81308..253bc7c 100644 --- a/src/cairo-egl.cpp +++ b/src/cairo-egl.cpp @@ -32,6 +32,8 @@ create_cairo_surface_egl (int width, int height) return NULL; } + eglMakeCurrent(state->egl_display, state->egl_surface, state->egl_surface, state->egl_context); + cairo_device = cairo_egl_device_create (state->egl_display, state->egl_context); cairo_gl_device_set_thread_aware (cairo_device, 0); cairo_surface = cairo_gl_surface_create_for_egl (cairo_device, @@ -40,6 +42,9 @@ create_cairo_surface_egl (int width, int height) cairo_device_destroy (cairo_device); + glClearColor(1, 1, 1, 1); + glClear(GL_COLOR_BUFFER_BIT); + return cairo_surface; } @@ -52,4 +57,5 @@ destroy_cairo_egl(void) void update_cairo_egl(void) { + eglSwapBuffers(state->egl_display, state->egl_surface); } |