<div dir="ltr">Hi Krzysztof,<div><br></div><div>Not sure about PBO but FBO support in OSG works with multisampling. </div><div>See  <br></div><div><br></div><div>Camera::attach(</div><div>  BufferComponent buffer, </div><div>  osg::Texture* texture, </div><div>  unsigned int level, </div><div>  unsigned int face, </div><div>  bool mipMapGeneration,<div>  unsigned int multisampleSamples,</div><div>  unsigned int multisampleColorSamples)</div><div><br></div><div>method.</div><div><br></div><div>Cheers,</div></div><div>Wojtek Lewandowski</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-09 11:01 GMT+01:00 Krzysztof Rahn <span dir="ltr"><<a href="mailto:Krzysztof.Rahn+OpenSceneGraph@gmail.com" target="_blank">Krzysztof.Rahn+OpenSceneGraph@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I'm working on a company project that displays navigation maps for ships with OpenSceneGraph.<br>
The product we develop is a library that generates map images, so a customer (developer)<br>
can use our library to develop its own navigation system.<br>
<br>
This requires to generate a offscreen image and if possible an antialiased one.<br>
Unfortunately we can not generate a antialiased offscreen image.<br>
<br>
I already tried<br>
> osg::DisplaySettings::<wbr>instance()-><wbr>setNumMultiSamples(4);<br>
<br>
and<br>
> traits->samples = 4;<br>
 to create a osg::GraphicsContext<br>
but this only works with a window generated from OpenSceneGraph or<br>
with a embedded context (osgViewer::<wbr>GraphicsWindowEmbedded()).<br>
<br>
I know we can enable "GL_LINE_SMOOTH". This is what we use at this moment and it is<br>
working with offscreen rendering but we really need multisampling for better results (or any other form of anitaliasing).<br>
<br>
I created a small peace of C++ sourcecode on a Linux system that does offscreen rendering (with a pbuffer)<br>
into a tga image file (I think you also need OpenSceneGraph plugins for that to work),<br>
so you can roughly see how we use it at this moment (without GL_LINE_SMOOTH to keep it simple).<br>
<br>
Of course I looked into the examples and this peace of code is based of one of them.<br>
But I could not spot anything in the examples that could help me.<br>
I also searched in the forum on this topic but most threads about offscreen rendering don't consider if multisampling is enabled.<br>
<br>
I would really appreciate if someone could help us with this small code in the right direction<br>
or make any suggestion if there is any other way to solve this if OpenSceneGraph is not able to do this.<br>
<br>
A main.cpp and a CMakeLists.txt should be attached to this post.<br>
<br>
Thank you very much,<br>
  Kris<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=69644#69644" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=69644#<wbr>69644</a><br>
<br>
<br>
<br>
<br>
Attachments:<br>
<a href="http://forum.openscenegraph.org//files/cmakelists_664.txt" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org//files/cmakelists_664.txt</a><br>
<a href="http://forum.openscenegraph.org//files/main_667.cpp" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org//files/main_667.cpp</a><br>
<br>
<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>
</blockquote></div><br></div>