<div dir="ltr"><div><span style="font-size:12.8px">Hi Voerman,</span></div><span style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Yes, </span><span style="font-size:12.8px">GL_DEPTH_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">COMPONENT32 was what I was missing ... Thanks a lot!</span></div><div><span style="font-size:12.8px"><br></span></div><div>Trajce</div></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 9:25 AM, Voerman, L. <span dir="ltr"><<a href="mailto:l.voerman@rug.nl" target="_blank">l.voerman@rug.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Trajce,<div>maybe this sniplet helps?<br><div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_textureDepthBuffer = new osg::Texture2D;</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_textureDepthBuffer-><wbr>setTextureSize(_width+2.0f*_<wbr>width*_guardBandPercentage, _height+2.0f*_height*_<wbr>guardBandPercentage);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer-><wbr>setSourceFormat(GL_DEPTH_<wbr>COMPONENT); </div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_textureDepthBuffer-><wbr>setInternalFormat(GL_DEPTH_<wbr>COMPONENT32); </div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>_textureDepthBuffer-><wbr>setFilter(osg::Texture2D::MIN_<wbr>FILTER,osg::Texture2D::<wbr>NEAREST);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>_textureDepthBuffer-><wbr>setFilter(osg::Texture2D::MAG_<wbr>FILTER,osg::Texture2D::<wbr>NEAREST);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>_textureDepthBuffer-><wbr>setShadowComparison(false);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_textureDepthBuffer->setWrap(<wbr>osg::Texture::WRAP_R,osg::<wbr>Texture::CLAMP_TO_EDGE);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>_textureDepthBuffer->setWrap(<wbr>osg::Texture::WRAP_S,osg::<wbr>Texture::CLAMP_TO_EDGE);</div><div><br></div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>// camera </div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>_colorDepthCamera = new osg::Camera;</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera->setStats(<wbr>new osg::Stats("Camera"));</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_colorDepthCamera->setName("<wbr>colorDepth");</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>_colorDepthCamera-><wbr>setClearMask(GL_COLOR_BUFFER_<wbr>BIT | GL_DEPTH_BUFFER_BIT);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>_colorDepthCamera-><wbr>setReferenceFrame(osg::<wbr>Transform::RELATIVE_RF);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>// set viewport</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>_colorDepthCamera-><wbr>setViewport(0,0,_width+2.0f*_<wbr>width*_guardBandPercentage,_<wbr>height+2.0f*_height*_<wbr>guardBandPercentage);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>_colorDepthCamera-><wbr>setRenderOrder(osg::Camera::<wbr>PRE_RENDER,0);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>_colorDepthCamera-><wbr>setRenderTargetImplementation(<wbr>osg::Camera::FRAME_BUFFER_<wbr>OBJECT);</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>_colorDepthCamera->attach(osg:<wbr>:Camera::DEPTH_BUFFER, _textureDepthBuffer.get(),0,0,<wbr>false,0,0); // depth</div><div><span class="m_3475550486276027419gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>_colorDepthCamera->attach(osg:<wbr>:Camera::COLOR_BUFFER, _textureColorBuffer.get(),0,0,<wbr>false,_msaa,_msaa); // color</div></div><div>regards, Laurens.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Oct 19, 2016 at 11:15 PM, Trajce Nikolov NICK <span dir="ltr"><<a href="mailto:trajce.nikolov.nick@gmail.com" target="_blank">trajce.nikolov.nick@gmail.com</a><wbr>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi Community,<div><br></div><div>anyone with clue how to set RTT osg::Texture with 32bit DEPTH?</div><div><br></div><div>Thanks a bunch as always!</div><div>Cheers,</div><div>Nick<span class="m_3475550486276027419HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_3475550486276027419m_-382122667145903556gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>