<?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[GlClampColor missing in QT]]></title><description><![CDATA[<p dir="auto">Hello All,</p>
<p dir="auto">I'm working on a Render to Texture in QT with QGLWidget and a QGLFramebufferObject. My intention is to write floating point values to the texture via a shader.</p>
<p dir="auto">I use a GL_RGB32F texture and the RTT seems to be happening. However, the values stored in the texture seem to be clamped between 0 and 1.</p>
<p dir="auto">A test value of gl_FragData[0] = vec4(120.0, 2.0, 0.8, 1.0); in the shader results in 1.0, 1.0, 0.8 in the texture.</p>
<p dir="auto">I see posts that suggest that calls to glClampColor</p>
<p dir="auto">glClampColorARB(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); glClampColorARB(GL_CLAMP_READ_COLOR, GL_FALSE);</p>
<p dir="auto">will get rid of this clamping, but unfortunately I'm not able to find this call in QT 5.0.2. It seems to be removed after QT 4.3 inside QOpenGLFunctions</p>
<p dir="auto">How can I achieve this? Any help would be much appreciated.</p>
]]></description><link>https://forum.qt.io/topic/33066/glclampcolor-missing-in-qt</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 17:38:40 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/33066.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Oct 2013 22:18:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GlClampColor missing in QT on Thu, 17 Oct 2013 00:32:44 GMT]]></title><description><![CDATA[<p dir="auto">Thanks! glGetTexImage seemed to help. It is a bit slower, but works nevertheless.</p>
]]></description><link>https://forum.qt.io/post/199333</link><guid isPermaLink="true">https://forum.qt.io/post/199333</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 17 Oct 2013 00:32:44 GMT</pubDate></item><item><title><![CDATA[Reply to GlClampColor missing in QT on Tue, 15 Oct 2013 07:29:04 GMT]]></title><description><![CDATA[<p dir="auto">Non-QT related answer, but how do you inspect the values? If you download the texture using glReadPixels, then the clamping may very well occur while downloading (see e.g. glPixelTransfer). Perhaps you should try glGetTexImage.</p>
]]></description><link>https://forum.qt.io/post/199043</link><guid isPermaLink="true">https://forum.qt.io/post/199043</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 15 Oct 2013 07:29:04 GMT</pubDate></item></channel></rss>