Multisampling and Anti-Aliasing help needed

I have found that in the ES 1.1 reference manual it discusses a GL_LINE_SMOOTH for smoothing lines and GL_MULTISAMPLE along with setting SAMPLE_BUFFERS to 1.

When I put a glEnable(GL_LINE_SMOOTH) in my ES1Renderer.m code it only appears to up the LineWidth by 1 pixel and I get no smoothing. Example if LineWidth is set to 1, with Line_Smooth added it will look identical (at least to me) as if LineWidth was set to 2 and Line_Smooth was NOT enabled.

I understand that glEnable(GL_Multisample) is called to enable multisampling, but how do I set the SAMPLE_BUFFERS to 1, or any value for that matter? What is the syntax for setting the SAMPLE_BUFFERS? The reference manual just assumes you know the syntax to set this along with assuming you already know much of the OpenGL syntax. Where does one go to learn the syntax?? The Khronos reference manuals don’t seem to give code examples for much of anything. Manual says to set this and set that, and doesn’t explain how to set it.

GL_LINE_SMOOTH works by modifying the alpha value of fragments along the edge of the line. You need to enable blending for it to work correctly. Also, be aware that some OpenGL ES implementations don’t support GL_LINE_SMOOTH.

I understand that glEnable(GL_Multisample) is called to enable multisampling, but how do I set the SAMPLE_BUFFERS to 1, or any value for that matter? What is the syntax for setting the SAMPLE_BUFFERS?

Setting up the default framebuffer is outside the scope of GL. If you are targeting a platform which uses EGL, you have to choose an EGLConfig with EGL_SAMPLE_BUFFERS == 1 to create your EGL window surface.

I forgot to specify what device I am attempting to anti-alias for… I am asking about doing this on the iPhone/iPod Touch and iPad.

From other reading I have been doing, it appears that the iPhone/iPod Touch and iPad devices do not support GL_LINE_SMOOTH. And perhaps setting the SAMPLE_BUFFERS value is not possible on these devices either? I don’t think they support the EGL commands?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.