X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglws_egl_xlib.cpp;h=0e6b8237305dd302c67c98bca88124d2a1de020e;hb=ee0fdfe385b70d95b3c3d590468fa6e329bf2cc7;hp=58824c29b2b897765e0af4c8fe36753e907ef79e;hpb=e7cb2b98575d5ff3801bd3527a648e0dbfdebdad;p=apitrace diff --git a/retrace/glws_egl_xlib.cpp b/retrace/glws_egl_xlib.cpp index 58824c2..0e6b823 100644 --- a/retrace/glws_egl_xlib.cpp +++ b/retrace/glws_egl_xlib.cpp @@ -92,8 +92,9 @@ public: EGLSurface surface; EGLint api; - EglDrawable(const Visual *vis, int w, int h) : - Drawable(vis, w, h), api(EGL_OPENGL_ES_API) + EglDrawable(const Visual *vis, int w, int h, bool pbuffer) : + Drawable(vis, w, h, pbuffer), + api(EGL_OPENGL_ES_API) { XVisualInfo *visinfo = static_cast(visual)->visinfo; @@ -159,7 +160,7 @@ public: recreate(void) { EGLContext currentContext = eglGetCurrentContext(); EGLSurface currentDrawSurface = eglGetCurrentSurface(EGL_DRAW); - EGLSurface currentReadSurface = eglGetCurrentSurface(EGL_DRAW); + EGLSurface currentReadSurface = eglGetCurrentSurface(EGL_READ); bool rebindDrawSurface = currentDrawSurface == surface; bool rebindReadSurface = currentReadSurface == surface; @@ -393,9 +394,9 @@ createVisual(bool doubleBuffer, Profile profile) { } Drawable * -createDrawable(const Visual *visual, int width, int height) +createDrawable(const Visual *visual, int width, int height, bool pbuffer) { - return new EglDrawable(visual, width, height); + return new EglDrawable(visual, width, height, pbuffer); } Context *