<?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[Draw a QWidget into a FBO or a OpenGL texture]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I want to make the rendering of my QWidget into a OpenGL texture. Currently I use the function grab(), convert the result to QImage and get the constData to send it on VRAM. The question is : is it possible to render the QWidget directly on a FBO or glTexture ?</p>
<p dir="auto">I looking on setRedirected() but this function seem deprecied.</p>
<p dir="auto">Best regards,<br />
Robin</p>
]]></description><link>https://forum.qt.io/topic/63296/draw-a-qwidget-into-a-fbo-or-a-opengl-texture</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 23:06:24 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/63296.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jan 2016 11:00:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 15:35:10 GMT]]></title><description><![CDATA[<p dir="auto">You're rigth. It seem a good way to solve my problem.</p>
<p dir="auto">Thanks :)</p>
]]></description><link>https://forum.qt.io/post/309679</link><guid isPermaLink="true">https://forum.qt.io/post/309679</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 26 Jan 2016 15:35:10 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 14:20:33 GMT]]></title><description><![CDATA[<p dir="auto">If you can switch from QWidgets to QtQuick then there might be a high performance solution: QtQuick scenes are rendered with OpenGL and one can set the render target of a QQuickWindow to an FBO of your choice. You could then use this FBO in your own OpenGL scene. This should be pretty fast as the rendered image of your "3D GUI" would never leave the graphics card's memory.</p>
]]></description><link>https://forum.qt.io/post/309651</link><guid isPermaLink="true">https://forum.qt.io/post/309651</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 26 Jan 2016 14:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 13:21:23 GMT]]></title><description><![CDATA[<p dir="auto">I need to draw a QMainWindow into an OpenGL texture. The aim is, I want a Qt GUI into a OpenGL scene.<br />
I think the t3685's method is too slow. Too much swap OpenGL context (one per widget I suppose).</p>
]]></description><link>https://forum.qt.io/post/309640</link><guid isPermaLink="true">https://forum.qt.io/post/309640</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 26 Jan 2016 13:21:23 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 11:14:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robinsondesbois">@<bdi>Robinsondesbois</bdi></a></p>
<p dir="auto">Although this does not work completely for us, it gave us a good starting point:</p>
<p dir="auto"><a href="https://dangelog.wordpress.com/2013/02/10/using-fbos-instead-of-pbuffers-in-qt-5-2/" target="_blank" rel="noopener noreferrer nofollow ugc">https://dangelog.wordpress.com/2013/02/10/using-fbos-instead-of-pbuffers-in-qt-5-2/</a></p>
]]></description><link>https://forum.qt.io/post/309610</link><guid isPermaLink="true">https://forum.qt.io/post/309610</guid><dc:creator><![CDATA[t3685]]></dc:creator><pubDate>Tue, 26 Jan 2016 11:14:31 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 10:50:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robinsondesbois">@<bdi>Robinsondesbois</bdi></a> Hi! May I ask what this is good for? Maybe there is a better way.</p>
]]></description><link>https://forum.qt.io/post/309598</link><guid isPermaLink="true">https://forum.qt.io/post/309598</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 26 Jan 2016 10:50:04 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 10:20:27 GMT]]></title><description><![CDATA[<p dir="auto">Ok. seems more direct but still not directly on gl texture but I guess its as close as you get :)</p>
]]></description><link>https://forum.qt.io/post/309595</link><guid isPermaLink="true">https://forum.qt.io/post/309595</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 26 Jan 2016 10:20:27 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Tue, 26 Jan 2016 10:18:07 GMT]]></title><description><![CDATA[<p dir="auto">Thanks again ^^</p>
<p dir="auto">the code below</p>
<pre><code>renderTarget_ = QPixmap(width(), height());
renderTarget_.fill(QColor(0, 0, 0, 0));
QPainter painter(&amp;renderTarget_);
render(&amp;painter);
</code></pre>
<p dir="auto">is speeder than this code : widget-&gt;grab();</p>
]]></description><link>https://forum.qt.io/post/309594</link><guid isPermaLink="true">https://forum.qt.io/post/309594</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 26 Jan 2016 10:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to Draw a QWidget into a FBO or a OpenGL texture on Mon, 25 Jan 2016 22:24:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Me again. Still not super with opengl but I wonder if this is something like it<br />
<a href="https://github.com/belab/widgetTo3dTexture" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/belab/widgetTo3dTexture</a></p>
]]></description><link>https://forum.qt.io/post/309534</link><guid isPermaLink="true">https://forum.qt.io/post/309534</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 25 Jan 2016 22:24:33 GMT</pubDate></item></channel></rss>