Results 1 to 3 of 3

Thread: Multisampling and Anti-Aliasing help needed

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    2

    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.

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: Multisampling and Anti-Aliasing help needed

    Quote Originally Posted by Number99
    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.
    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.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Re: Multisampling and Anti-Aliasing help needed

    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?

Similar Threads

  1. [Anti-aliasing] how do i remove aliasing problem on ES1.0?
    By balladry in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 02-09-2012, 05:58 PM
  2. Anti Aliasing
    By Raj in forum OpenGL ES general technical discussions
    Replies: 2
    Last Post: 08-19-2005, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •