title: Enable antialiasing in Opengl ES 2 (ios)
body: <p>i'm having issues enabling multisampling in IOS.</p>
  
  <p>I'm referring to this <a href="https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/WorkingwithEAGLContexts/WorkingwithEAGLContexts.html#//apple_ref/doc/uid/TP40008793-CH103-SW12" rel="nofollow">guide</a></p>
  
  <p>If you scroll down to</p>
  
  <p>Listing 4-5  Creating the multisample buffer</p>
  
  <p>You can see it clearly state we need (of course) a resolve buffer. However, it doesn't show any kind of initialization in the first step. Do i just need to</p>
  
  <pre><code>glGenFramebuffers(1, &amp;resolveBuffer);
  glBindFramebuffer(GL_FRAMEBUFFER, resolveBuffer);
  </code></pre>
  
  <p>when should i initialize my frame buffer object?</p>
  
  <p>Also, last step is not clear to me.</p>
  
  <pre><code>glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
  [context presentRenderbuffer:GL_RENDERBUFFER];
  </code></pre>
  
  <p>where exactly should i do this? and what does it accomplish? I guess after the draw calls from my fbo and vbo but i'm not really sure.</p>
  
  <p>Has anyone a link to some kind of example project i can look up? i googled but i can't find any :(</p>
  
  <p>Lastly, i'm using float textures to render HDR images. Do i have to keep GL_RGBA8_OES in this instruction?</p>
  
  <pre><code>glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, 4, GL_RGBA8_OES, width, height);
  </code></pre>
  
  <p>it's not really clear to me if at this point i've already rendered to a texture.</p>
  
  <p>thanks in advance!</p>