<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem with shared QGLWidget and contexts]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">We're currently fighting the following Qt warning "QOpenGLContext::swapBuffers() called without corresponding makeCurrent() ".</p>
<p dir="auto">We have several QGLWidgets visible at the same time. No multi-threading used. There also is an invisible QGLWidget which is used as share widget for the other OpenGL Widgets.</p>
<p dir="auto">We are getting the warning message each frame in one of our widgets where we try to render an overlay using QPainter like this:</p>
<p dir="auto">QPainter painter(this);<br />
painter.setRenderHint(QPainter::Antialiasing);<br />
painter.setRenderHint(QPainter::HighQualityAntialiasing);<br />
painter.setFont( font );<br />
painter.setPen( Qt::NoPen );<br />
painter.setBrush( textColor );<br />
QPainterPath path;<br />
path.addText( textPos, font, text );<br />
painter.drawPath( path );</p>
<p dir="auto">We call makeCurrent() at the top of the paintGL() function. So the context should be set correctly.</p>
<p dir="auto">Does anyone have an idea or hint on how to fix this or an answer why we are seeing this warning?</p>
<p dir="auto">Cheers and thanks a lot! ;)</p>
]]></description><link>https://forum.qt.io/topic/35837/problem-with-shared-qglwidget-and-contexts</link><generator>RSS for Node</generator><lastBuildDate>Fri, 30 Oct 2026 00:44:45 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/35837.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Dec 2013 22:52:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with shared QGLWidget and contexts on Thu, 26 Jun 2014 11:48:18 GMT]]></title><description><![CDATA[<p dir="auto">Have the same issue, also with multiple shared contexts.</p>
<p dir="auto">We're doing drawing in paintGL(), wrapped in a beginNativeRendering/endNativeRendering and overlays using after that.</p>
<p dir="auto">(Using Qt-5.2.1)</p>
]]></description><link>https://forum.qt.io/post/225990</link><guid isPermaLink="true">https://forum.qt.io/post/225990</guid><dc:creator><![CDATA[u.hertlein]]></dc:creator><pubDate>Thu, 26 Jun 2014 11:48:18 GMT</pubDate></item></channel></rss>