TAMSVIZ
Visualization and annotation tool for ROS
framebuffer.h
1 // TAMSVIZ
2 // (c) 2020 Philipp Ruppel
3 
4 #pragma once
5 
6 #include "opengl.h"
7 #include "resource.h"
8 
9 class Renderbuffer;
10 class Texture;
11 
12 class Framebuffer : public ResourceBase {
13 protected:
14  GLuint _id = 0;
15  void destroy();
16 
17 public:
18  ~Framebuffer() { destroy(); }
19  inline GLuint id() const { return _id; }
20  void create();
21  void bind();
22  void attach(Renderbuffer &renderbuffer, int attachment);
23  void attach(Texture &texture, int attachment);
24 };