How to activate multisampling in OpenGL ES on iPhone?

I am experimenting with improving the "resolution" of an application based on OpenGL ES. Apple mentions here (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling ... and this can improve the graphics a bit. How to enable multisampling?

+5
source share
2 answers

In a WWDC session, a 415 video session runs a little, so grab and watch if you can.

Essentially, you create a second msaa framebuffer for rendering using glRenderbufferStorageMultisampleAPPLEyour deep and color buffers. Then you link this multisample framebuffer, render your scene, and then enable multisampling to your main framebuffer:

glBindFramebuffer(GL_READ_FRAMEBUFFER_APPLE, msaaFramebuffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER_APPLE, defaultFramebuffer);
glResolveMultisampleFramebufferAPPLE();

then attach your render buffer and present it as usual.

I'm still relatively new to OpenGL ES, but hope this helps you on the right track.

+12
source

All Articles