- fbo=new Framebuffer;
- color_buf=new Texture2D;
- color_buf->set_min_filter(NEAREST);
- color_buf->set_mag_filter(NEAREST);
- color_buf->storage((hdr ? RGB16F : RGB), width, height, 0);
- color_buf->image(0, RGB, UNSIGNED_BYTE, 0);
- fbo->attach(COLOR_ATTACHMENT0, *color_buf, 0);
- depth_buf=new Renderbuffer;
- depth_buf->storage(DEPTH_COMPONENT, width, height);
- fbo->attach(DEPTH_ATTACHMENT, *depth_buf);
- Framebuffer::unbind();