diff options
Diffstat (limited to 'progs')
-rw-r--r-- | progs/es1/xegl/render_tex.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/progs/es1/xegl/render_tex.c b/progs/es1/xegl/render_tex.c index 0d1027b712..0200fa4cb0 100644 --- a/progs/es1/xegl/render_tex.c +++ b/progs/es1/xegl/render_tex.c @@ -229,17 +229,19 @@ draw(EGLDisplay egl_dpy, EGLSurface egl_surf, EGLSurface egl_pbuf, printf("Error: eglMakeCurrent(pbuf) failed\n"); return; } - glBindTexture(GL_TEXTURE_2D, RenderTexture); - eglBindTexImage(egl_dpy, egl_pbuf, EGL_BACK_BUFFER); draw_torus_to_texture(); - eglReleaseTexImage(egl_dpy, egl_pbuf, EGL_BACK_BUFFER); /* draw textured quad to window */ if (!eglMakeCurrent(egl_dpy, egl_surf, egl_surf, egl_ctx)) { printf("Error: eglMakeCurrent(pbuffer) failed\n"); return; } + + glBindTexture(GL_TEXTURE_2D, RenderTexture); + eglBindTexImage(egl_dpy, egl_pbuf, EGL_BACK_BUFFER); draw_textured_quad(); + eglReleaseTexImage(egl_dpy, egl_pbuf, EGL_BACK_BUFFER); + eglSwapBuffers(egl_dpy, egl_surf); /*printf("End draw\n");*/ |