30 #include <unordered_map> 31 #include <unordered_set> 46 namespace visualization {
49 class FilamentMaterialModifier;
50 class FilamentRenderToBuffer;
51 class FilamentResourceManager;
58 void* native_drawable,
71 virtual void SetClearColor(
const Eigen::Vector4f&
color)
override;
72 void SetPreserveBuffer(
bool preserve)
override;
73 void UpdateSwapChain()
override;
75 void EnableCaching(
bool enable)
override;
76 void BeginFrame()
override;
78 void EndFrame()
override;
88 bool srgb =
false)
override;
89 TextureHandle AddTexture(
const std::shared_ptr<geometry::Image>& image,
90 bool srgb =
false)
override;
100 std::shared_ptr<visualization::rendering::RenderToBuffer>
101 CreateBufferRenderer()
override;
113 filament::Engine& engine_;
114 filament::Renderer* renderer_ =
nullptr;
115 filament::SwapChain* swap_chain_ =
nullptr;
116 filament::SwapChain* swap_chain_cached_ =
nullptr;
118 std::unordered_map<REHandle_abstract, std::unique_ptr<FilamentScene>>
120 std::unique_ptr<FilamentScene> gui_scene_;
122 std::unique_ptr<FilamentMaterialModifier> materials_modifier_;
125 std::unordered_set<FilamentRenderToBuffer*> buffer_renderers_;
127 bool frame_started_ =
false;
128 bool render_caching_enabled_ =
false;
129 int render_count_ = 0;
130 float clear_color_[4];
131 bool preserve_buffer_ =
false;
void Draw(const std::vector< std::shared_ptr< geometry::Geometry3D >> &geometries, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
Definition: Draw.cpp:54
Definition: MaterialModifier.h:126
Definition: FilamentRenderToBuffer.h:48
Definition: FilamentResourceManager.h:62
FilamentScene * GetGuiScene() const
Definition: FilamentRenderer.h:106
math::float4 color
Definition: LineSetBuffers.cpp:64
Definition: Renderer.h:64
Definition: Renderer.h:45
Definition: FilamentRenderer.h:55
filament::Renderer * GetNative()
Definition: FilamentRenderer.h:108
Definition: FilamentScene.h:85
Definition: PinholeCameraIntrinsic.cpp:35
int height
Definition: FilePCD.cpp:72
Definition: FilamentEngine.h:31
int width
Definition: FilePCD.cpp:71