4 #include "renderbuffer.h" 6 void Renderbuffer::destroy() {
9 cleanup([fbo]() { V_GL(glDeleteRenderbuffers(1, &fbo)); });
14 void Renderbuffer::create() {
16 V_GL(glGenRenderbuffers(1, &_id));
20 void Renderbuffer::bind() {
22 V_GL(glBindRenderbuffer(GL_RENDERBUFFER, _id));
25 void Renderbuffer::update(
int width,
int height,
int format,
int samples) {
27 if (_watcher.changed(width, height, format, samples)) {
29 V_GL(glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, format,