Results 1 to 4 of 4

Thread: Aliasing problem drawing primitives on iPhone OS 2.x

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    5

    Aliasing problem drawing primitives on iPhone OS 2.x

    Hi. I am working on iPhone application using OpenGL ES.

    I am drawing a polygon with glDrawElements(GL_LINE_LOOP, ... );
    but the polygon has a aliasing on it.
    To remove aliasing, I applied the below codes, but it doesn't work.

    glEnable(GL_LINE_SMOOTH);
    glEnable(GL_POINT_SMOOTH);

    Is there any other API applying antiAliasing on OpenGL ES ?
    Or something which I missed ?

    Environment : iPhone OS 2.1

  2. #2
    Junior Member
    Join Date
    Dec 2008
    Location
    Oslo, Norway
    Posts
    25

    Re: Aliasing problem drawing primitives on iPhone OS 2.x

    GL_LINE_SMOOTH and GL_POINT_SMOOTH only applies to points and lines. To get anti-aliasing on polygons, you need to use multisampling. This is done by selecting a multisapled EGL-config, and enabling the GL_MULTISAMPLE state.
    Erik "kusma" Faye-Lund

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Posts
    5

    Re: Aliasing problem drawing primitives on iPhone OS 2.x

    Actually, sorry I was confused with a terminalogy.
    I drew a polyline not a polygon.
    I think GL_POLYGON_SMOOTH is not supported in OpenGL ES.

    enabling GL_MULTISAMPLE state LINE_SMOOTH is applied on a simulator of PC.
    But smoothing is not applied on a real device.

  4. #4
    Junior Member
    Join Date
    Dec 2008
    Location
    Oslo, Norway
    Posts
    25

    Re: Aliasing problem drawing primitives on iPhone OS 2.x

    What's a "polyline"? If it's a line, keep in mind that line smooth calculates coverage and outputs it to the alpha-channel of each pixel. So you need to apply blending for linesmooth to work correctly.
    Erik "kusma" Faye-Lund

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

Posting Permissions

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