views:

451

answers:

3

Hello, all!

I need in antialiasing in iPhone 3G (OpenGL ES1.1), NOT iPhone 3Gs with OpenGL ES.2.0. I've draw 3d model and have next: pixels on the edges of the model look like teeth.

I've try set any filters for texture, but this filters making ONLY texture INSIDE look better.

How can i make good antialising ? May be i should use any smooth for drawing triangles ? If yes, then how it possible in OpenGL ES1.1 ?

thanks.

A: 

Check out the EGL_SAMPLE_BUFFERS and EGL_SAMPLES parameters to eglChooseConfig(), as well as glEnable(GL_MULTISAMPLE).

EDIT: Hrm, apparently you're out of luck, at least as far as standardized approaches go. As mentioned in that thread you can render to a large off-screen texture and scale to a smaller on-screen quad or jitter the view matrix several times.

genpfault
Thanks, but openGL on the iPhone has no support eglChooseConfig().Or am I mistaken?But when i set GL_LINE_SMOOTH and use glDrawArrays with GL_LINE_STRIP i have SUPER antialiased line.But when i set GL_TRIANGLES then this effects is disappear.
Sergey
Looks like you're right. Odd. Anyway, found a thread with some alternative approaches and edited the answer.
genpfault
genpfault,may be. i've googled more sites and feeling that there is only one way - try to use this http://www.gamedev.net/community/forums/topic.asp?topic_id=548956 or similar.
Sergey
+2  A: 

You can render into a larger FBO and then use that as a texture on a square.

Have a look at this article for an explanation.

epatel
Can you explain in more detail?thanks.
Sergey
Thank you very much for this link!And i'll try "render into a larger FBO".
Sergey