I'm a little confused about FrameBuffers. Currently, for drawing on the screen, I am generating a framebuffer using Renderbuffer for GL_COLOR_ATTACHMENT0 using this code.
-(void)initializeBuffers{
And I show the contents of the buffer with
[context presentRenderbuffer:GL_RENDERBUFFER]
Considering this question , I saw a comment by Artu Peltonen, who says:
The default framebuffer, where you render by default, you donβt have to do anything to get it. Framebuffer objects are what you can render instead, and the other is off-screen rendering. If you do this, you will get your image in the texture instead of the default framebuffer (which is displayed on the screen). You can copy the image from this texture to the standard framebuffer (on the screen), this is usually done with blitting (but it is only available in OpenGL ES 3.0). But if you only wanted to show the image on the screen, you probably would not use FBO in the first place.
So, interestingly, my method is just used for off-screen rendering. And in this case, what should I do to display in the default buffer ?! (Note, I do not want to use GLKView ...)
source share