<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 8, 2014 at 12:59 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</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">We explicitly turn it off in specific tests where it has to be turned off (depth compositing and surface selection for example).<div>
<br></div><div>My preference is that the default is 0 on all platforms, we make it simple and obvious how to turn it on for apps that need higher quality images, and we work to turn it off automatically whenever the features that require it to be off are running. </div>
</div></blockquote><div><br></div><div style>I agree as its obvious it does not come for free. Plus having it consistent helps. The second part where we turn it off auto-matically, I think can be handled by a particular algorithm but that may require bit more discussion. </div>
<div style><br></div><div style>- Aashish</div><div style><br></div><div style> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

</div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>

<br><br><div class="gmail_quote"><div><div class="h5">On Wed, Jan 8, 2014 at 12:43 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></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">Folks, <div><br></div><div>While looking into some failing test on Linux, we realized this code below in vtkOpenGLRenderWindow </div>


<div><br></div><div><div>// Initialize static member that controls global maximum number of multisamples</div>
<div>// (off by default on Apple because it causes problems on some Mac models).</div><div>#if defined(__APPLE__)</div><div>static int vtkOpenGLRenderWindowGlobalMaximumNumberOfMultiSamples = 0;</div><div>#else</div><div>



static int vtkOpenGLRenderWindowGlobalMaximumNumberOfMultiSamples = 8;</div><div>#endif</div></div><div><br></div><div><br></div><div>and in vtkXOpenGLRenderWindow.cxx</div><div><div>if (multisamples)</div><div>    {</div>



<div>#ifdef GLX_SAMPLE_BUFFERS_SGIS</div><div>    attributes[index++] = GLX_SAMPLE_BUFFERS_SGIS;</div><div>    attributes[index++] = 1;</div><div>    attributes[index++] = GLX_SAMPLES_SGIS;</div><div>    attributes[index++] = multisamples;</div>



<div>#endif</div><div>    }</div><div><br></div><div>Basically in OpenGL, we can achieve anti-aliasing for each primitive type by invoking enable / disable on <font color="#000000">GL_POINT_SMOOTH, GL_LINE_SMOOTH or GL_POLYGON_SMOOTH. The other route that applies anti-aliasing to all of the primitives is to use mutli-sampling if available (this always wins if both methods are used). Now by default, on LINUX (the code above set the sample size to 0 effectively disabling anti-aliasing) we have anti-aliasing ON with a sample size of 8. The anti-aliasing is an expensive operation and not all of the implementation supports it (Please refer to the documentation on </font>GLX_SAMPLES_SGIS or <span style="white-space:pre-wrap">ARB_multisample). </span></div>



<div><span style="white-space:pre-wrap"><br></span></div><div><font color="#000000"><span style="white-space:pre-wrap">I am asking if we should set the sample size to 0 default on Linux as well (like Mac) and if applications needs it then they can explicitly turn it ON. I can make an argument for either side but I am bit more inclined towards setting it to 0 so that applications can still control it if wanted but if not they won't get it by default (and will get better performance overall). </span></font></div>



<div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Now we don't agree on this, can we agree on setting to 0 for testing (May be via environment variable like others we used in our testing?)</span></font></div>



<div><br></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Thoughts? </span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br>



</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Helpful links: </span></font></div><div><a href="http://www.opengl.org/registry/specs/ARB/multisample.txt" target="_blank">http://www.opengl.org/registry/specs/ARB/multisample.txt</a></div>



<div><a href="http://www.opengl.org/registry/specs/SGIS/multisample.txt" target="_blank">http://www.opengl.org/registry/specs/SGIS/multisample.txt</a><br></div><div><a href="http://www.opengl.org/wiki/Multisampling" target="_blank">http://www.opengl.org/wiki/Multisampling</a><span><font color="#888888"><br>



</font></span></div><span><font color="#888888"><div><br></div><div><br></div><div><font color="#000000"><span style="white-space:pre-wrap">- Aashish</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br>


</span></font></div><div><br>
</div><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer         <br>| Kitware Inc.            <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>    
</font></span></div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer         <br>| Kitware Inc.            <br>| <a href="http://www.kitware.com">www.kitware.com</a>    
</div></div>