Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: drawing antialiased line on OpenGL ES 2

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012
    Posts
    25

    drawing antialiased line on OpenGL ES 2

    Hi,

    As the topic says, i want to draw an antialiased line on OpenGL ES 2. Note that the glHint only accepts GL_GENERATE_MIPMAP_HINT in GLES2.

    Any help is greatly appreciated.

    guich

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,941
    Hint was only a quality setting where available.

    AA lines are not supported in OpenGL ES 2.0 specification. If you are using OpenGL ES 1.0 or the SC variant then the API would be:

    glEnable(GL_LINE_SMOOTH);

    Be aware though that this only produces alpha fragments you must also enable GL_BLEND and set an appropriate glBlendFunc to see antialiased lines.


    The alternative is to use multisample and not go with blended altialiased lines at all, but the edge quality will be lower.
    Last edited by dorbie; 10-24-2012 at 03:55 PM.

  3. #3
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    223
    See if you can find multisample EGL config, or something similar if your platform does not use EGL.

Posting Permissions

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