TAMSVIZ
Visualization and annotation tool for ROS
rendertarget.h
1 // TAMSVIZ
2 // (c) 2020 Philipp Ruppel
3 
4 #pragma once
5 
6 #include "framebuffer.h"
7 #include "renderbuffer.h"
8 #include "texture.h"
9 
10 class RenderTarget : public ResourceBase {
11  Watcher _watcher;
12  bool _can_present = false;
13 
14 public:
15  void update(int width, int height, int multisampling);
16  void bind();
17  void present(int target = 0);
18 
19 public:
20  int _width = -1, _height = -1;
21  int _samples = 0;
22 
23  std::mutex _mutex;
24 
25  Renderbuffer _depth_buffer;
26 
27  Renderbuffer _pick_id;
28  Renderbuffer _pick_depth;
29  Framebuffer _pick_framebuffer;
30 
31  Texture _opaque_texture;
32  Framebuffer _opaque_framebuffer;
33 
34  Texture _transparent_texture_head;
35  Framebuffer _transparent_framebuffer_head;
36 
37  Texture _transparent_texture_tail_color;
38  Texture _transparent_texture_tail_alpha;
39  Framebuffer _transparent_framebuffer_tail;
40 
41  Framebuffer _front_framebuffer, _present_framebuffer;
42  Texture _front_colorbuffer;
43 };
Definition: watcher.h:8