11 #include <unordered_map>
12 #include <unordered_set>
27 namespace visualization {
30 class FilamentMaterialModifier;
31 class FilamentRenderToBuffer;
32 class FilamentResourceManager;
39 void* native_drawable,
60 std::function<
void(std::shared_ptr<core::Tensor>)>
74 bool srgb =
false)
override;
76 bool srgb =
false)
override;
78 bool srgb =
false)
override;
80 const std::shared_ptr<geometry::Image>
image,
94 std::shared_ptr<visualization::rendering::RenderToBuffer>
107 filament::Engine& engine_;
108 filament::Renderer* renderer_ =
nullptr;
109 filament::SwapChain* swap_chain_ =
nullptr;
110 filament::SwapChain* swap_chain_cached_ =
nullptr;
112 std::unordered_map<REHandle_abstract, std::unique_ptr<FilamentScene>>
114 std::unique_ptr<FilamentScene> gui_scene_;
116 std::unique_ptr<FilamentMaterialModifier> materials_modifier_;
119 std::unordered_set<std::shared_ptr<FilamentRenderToBuffer>>
122 bool frame_started_ =
false;
123 std::function<
void()> on_after_draw_;
124 bool needs_wait_after_draw_ =
false;
std::shared_ptr< core::Tensor > image
Definition: FilamentRenderer.cpp:183
std::function< void(std::shared_ptr< core::Tensor >)> callback
Definition: FilamentRenderer.cpp:182
math::float4 color
Definition: LineSetBuffers.cpp:45
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:29
Definition: FilamentRenderToBuffer.h:29
Definition: FilamentRenderer.h:36
virtual void SetClearColor(const Eigen::Vector4f &color) override
Definition: FilamentRenderer.cpp:101
SkyboxHandle AddSkybox(const ResourceLoadRequest &request) override
Definition: FilamentRenderer.cpp:312
void SetOnAfterDraw(std::function< void()> callback) override
Definition: FilamentRenderer.cpp:112
SceneHandle CreateScene() override
Definition: FilamentRenderer.cpp:80
void RemoveSkybox(const SkyboxHandle &id) override
Definition: FilamentRenderer.cpp:322
TextureHandle AddTexture(const ResourceLoadRequest &request, bool srgb=false) override
Definition: FilamentRenderer.cpp:269
bool UpdateTexture(TextureHandle texture, const std::shared_ptr< geometry::Image > image, bool srgb) override
Definition: FilamentRenderer.cpp:280
void BeginFrame() override
Definition: FilamentRenderer.cpp:128
MaterialModifier & ModifyMaterial(const MaterialHandle &id) override
Definition: FilamentRenderer.cpp:229
void UpdateSwapChain() override
Definition: FilamentRenderer.cpp:116
void RequestReadPixels(int width, int height, std::function< void(std::shared_ptr< core::Tensor >)> callback) override
Definition: FilamentRenderer.cpp:198
void UpdateBitmapSwapChain(int width, int height) override
Definition: FilamentRenderer.cpp:122
filament::Renderer * GetNative()
Definition: FilamentRenderer.h:102
FilamentScene * GetGuiScene() const
Definition: FilamentRenderer.h:100
void ConvertToGuiScene(const SceneHandle &id)
Definition: FilamentRenderer.cpp:332
MaterialInstanceHandle AddMaterialInstance(const MaterialHandle &material) override
Definition: FilamentRenderer.cpp:224
std::shared_ptr< visualization::rendering::RenderToBuffer > CreateBufferRenderer() override
Definition: FilamentRenderer.cpp:326
FilamentRenderer(filament::Engine &engine, void *native_drawable, FilamentResourceManager &resource_mgr)
Definition: FilamentRenderer.cpp:50
void RemoveTexture(const TextureHandle &id) override
Definition: FilamentRenderer.cpp:293
void Draw() override
Definition: FilamentRenderer.cpp:149
void EndFrame() override
Definition: FilamentRenderer.cpp:169
IndirectLightHandle AddIndirectLight(const ResourceLoadRequest &request) override
Definition: FilamentRenderer.cpp:297
void RemoveIndirectLight(const IndirectLightHandle &id) override
Definition: FilamentRenderer.cpp:308
Scene * GetScene(const SceneHandle &id) const override
Definition: FilamentRenderer.cpp:88
~FilamentRenderer() override
Definition: FilamentRenderer.cpp:73
void RemoveMaterialInstance(const MaterialInstanceHandle &id) override
Definition: FilamentRenderer.cpp:264
MaterialHandle AddMaterial(const ResourceLoadRequest &request) override
Definition: FilamentRenderer.cpp:219
void DestroyScene(const SceneHandle &id) override
Definition: FilamentRenderer.cpp:97
Definition: FilamentResourceManager.h:50
Definition: FilamentScene.h:66
Definition: MaterialModifier.h:107
Definition: Renderer.h:55
Definition: Renderer.h:36
Definition: FilamentEngine.h:12
const char const char value recording_handle imu_sample void
Definition: K4aPlugin.cpp:250
Definition: PinholeCameraIntrinsic.cpp:16