diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-01-12 17:14:14 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-01-12 17:17:19 +0000 |
commit | 49da75221f9c9d69eadc28e6b23af8c5afa26374 (patch) | |
tree | 6db242ef4789b46732666bf541044927373f7e59 | |
parent | bb4a8ff963d2bf38ff60e36c70eac6c3dbce2857 (diff) |
Revert "glretrace: avoid glXSwapBuffers failures because of "bad" windows".
This reverts commit 485846b2a40d8ac7d6c1c5f8af6d15b0c10af19d.
It seems that with commit c51694c012985318763d3faf46b1077b985a637b this
is no longer necessary.
-rw-r--r-- | retrace/glws_glx.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/retrace/glws_glx.cpp b/retrace/glws_glx.cpp index 5d956daa..08a29d9a 100644 --- a/retrace/glws_glx.cpp +++ b/retrace/glws_glx.cpp @@ -67,12 +67,10 @@ class GlxDrawable : public Drawable public: Window window = 0; GLXDrawable drawable = 0; - bool ever_current; GlxDrawable(const Visual *vis, int w, int h, const glws::pbuffer_info *pbInfo) : - Drawable(vis, w, h, pbInfo ? true : false), - ever_current(false) + Drawable(vis, w, h, pbInfo ? true : false) { const GlxVisual *glxvisual = static_cast<const GlxVisual *>(visual); XVisualInfo *visinfo = glxvisual->visinfo; @@ -147,15 +145,7 @@ public: void swapBuffers(void) { assert(!pbuffer); - if (ever_current) { - // The window has been bound to a context at least once - glXSwapBuffers(display, drawable); - } else { - // Don't call glXSwapBuffers on this window to avoid an - // (untrappable) X protocol error with NVIDIA's driver. - std::cerr << "warning: attempt to issue SwapBuffers on unbound window " - " - skipping.\n"; - } + glXSwapBuffers(display, drawable); if (window) { processKeys(window); } @@ -374,7 +364,6 @@ makeCurrentInternal(Drawable *drawable, Context *context) Window draw = None; if (drawable) { GlxDrawable *glxDrawable = static_cast<GlxDrawable *>(drawable); - glxDrawable->ever_current = true; draw = glxDrawable->drawable; } |