glRenderbufferStorageMultisample
阅读原文时间:2023年07月14日阅读:1

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

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章