<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
FYI -  There has been some talk about this here - <A HREF="http://www.paraview.org/pipermail/paraview/2005-September/002054.html">http://www.paraview.org/pipermail/paraview/2005-September/002054.html</A><BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<IMG SRC="cid:1389205388.3739.2.camel@sanganak-ubuntu" ALIGN="bottom" BORDER="0"><BR>
<BR>
</TD>
</TR>
</TABLE>
On Wed, 2014-01-08 at 12:43 -0500, Aashish Chaudhary wrote:
<BLOCKQUOTE TYPE=CITE>
    Folks, 
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    While looking into some failing test on Linux, we realized this code below in vtkOpenGLRenderWindow 
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    // Initialize static member that controls global maximum number of multisamples
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    // (off by default on Apple because it causes problems on some Mac models).
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    #if defined(__APPLE__)
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    static int vtkOpenGLRenderWindowGlobalMaximumNumberOfMultiSamples = 0;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    #else
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    static int vtkOpenGLRenderWindowGlobalMaximumNumberOfMultiSamples = 8;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    #endif
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    and in vtkXOpenGLRenderWindow.cxx
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    if (multisamples)
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        {
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    #ifdef GLX_SAMPLE_BUFFERS_SGIS
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        attributes[index++] = GLX_SAMPLE_BUFFERS_SGIS;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        attributes[index++] = 1;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        attributes[index++] = GLX_SAMPLES_SGIS;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        attributes[index++] = multisamples;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    #endif
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
        }
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    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 ARB_multisample). 
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">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). </FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">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?)</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">Thoughts? </FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">Helpful links: </FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <A HREF="http://www.opengl.org/registry/specs/ARB/multisample.txt">http://www.opengl.org/registry/specs/ARB/multisample.txt</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <A HREF="http://www.opengl.org/registry/specs/SGIS/multisample.txt">http://www.opengl.org/registry/specs/SGIS/multisample.txt</A><BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <A HREF="http://www.opengl.org/wiki/Multisampling">http://www.opengl.org/wiki/Multisampling</A><BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">- Aashish</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    -- <BR>
    | Aashish Chaudhary <BR>
    | R&D Engineer         <BR>
    | Kitware Inc.            <BR>
    | <A HREF="http://www.kitware.com">www.kitware.com</A>    
</BLOCKQUOTE>
</BODY>
</HTML>