https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorage.xhtml
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorageMultisample.xhtml
glRenderbufferStorage — establish data storage, format and dimensions of a renderbuffer object‘s image
有点像descriptor
bind前后用 sample
//渲染缓冲区作为颜色缓冲区
glGenRenderbuffers(1,& colorBuffer);
glBindRenderbuffer(GL_RENDERBUFFER,colorBuffer);
glRenderbufferStorage(GL_RENDERBUFFER,GL_RGBA,width,height);
glBindRenderbuffer(GL_RENDERBUFFER,0);
//将渲染缓冲区作为颜色缓冲区附加到fbo
glFramebufferRenderbuffer(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_RENDERBUFFER,colorBuffer);
有了扩展就可以用glRenderbufferStorageMultisample 作为ogles上msaa stay in tile 的解决方案(memoryless)
kGL_EXT_multisampled_render_to_texture
kGL_IMG_multisampled_render_to_texture
kGL_APPLE_framebuffer_multisample(apple现在用metal
kGL_NV_framebuffer_multisample kGL_NV_framebuffer_blit