drawing antialiased line on OpenGL ES 2


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.


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:


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.

See if you can find multisample EGL config, or something similar if your platform does not use EGL.