Open3D (C++ API)  0.19.0
Data Structures | Public Member Functions
open3d::visualization::rendering::GaussianSplatRenderer Class Reference

#include <GaussianSplatRenderer.h>

Data Structures

class  Backend
 GPU backend for geometry + composite compute (OpenGL or Metal). More...
 
struct  OutputTargets
 
struct  RenderConfig
 Tunable knobs for the compute pipeline, set once at construction. More...
 
struct  ViewRenderData
 Camera and viewport state extracted per-view each geometry pass. More...
 

Public Member Functions

 GaussianSplatRenderer (filament::Engine &engine, FilamentResourceManager &resource_mgr)
 
 ~GaussianSplatRenderer ()
 
void BeginFrame ()
 
void RenderGeometryStage (FilamentView &view, const FilamentScene &scene)
 
bool RenderCompositeStage (FilamentView &view)
 Returns true if the composite pass ran and the backend reported success. More...
 
void PruneOutputs (const std::unordered_set< const FilamentView * > &live_views)
 
void InvalidateOutputForView (FilamentView &view)
 
void RequestRedrawForView (const FilamentView &view)
 
bool IsEnabled () const
 
void SetEnabled (bool enabled)
 
bool IsSupported () const
 
bool HasOutput (const FilamentView &view) const
 
TextureHandle GetColorTexture (const FilamentView &view) const
 
TextureHandle GetDepthTexture (const FilamentView &view) const
 
RenderTargetHandle GetColorReadbackRT (const FilamentView &view) const
 
bool ReadMergedDepthToUint16Cpu (const FilamentView &view, std::vector< std::uint16_t > &out, std::uint32_t width, std::uint32_t height)
 
bool ReadCompositeDepthToFloatCpu (const FilamentView &view, std::vector< float > &out, std::uint32_t width, std::uint32_t height)
 
void RequestDepthReadbackForView (const FilamentView &view, bool wanted=true)
 
std::uint32_t GetSceneDepthGLHandle (const FilamentView &view) const
 
const ViewRenderDataGetViewRenderData (const FilamentView &view) const
 
const RenderConfigGetRenderConfig () const
 
void SetRenderConfig (const RenderConfig &config)
 
const char * GetBackendName () const
 

Detailed Description

Manages per-view GPU output targets, backend lifetime, and frame orchestration for the Gaussian splat compute pipeline. One instance lives inside FilamentRenderer and FilamentRenderToBuffer.

Constructor & Destructor Documentation

◆ GaussianSplatRenderer()

open3d::visualization::rendering::GaussianSplatRenderer::GaussianSplatRenderer ( filament::Engine &  engine,
FilamentResourceManager resource_mgr 
)

◆ ~GaussianSplatRenderer()

open3d::visualization::rendering::GaussianSplatRenderer::~GaussianSplatRenderer ( )

Member Function Documentation

◆ BeginFrame()

void open3d::visualization::rendering::GaussianSplatRenderer::BeginFrame ( )

◆ GetBackendName()

const char * open3d::visualization::rendering::GaussianSplatRenderer::GetBackendName ( ) const

◆ GetColorReadbackRT()

RenderTargetHandle open3d::visualization::rendering::GaussianSplatRenderer::GetColorReadbackRT ( const FilamentView view) const

Returns a color-only render target suitable for readPixels readback. Only valid after RenderCompositeStage has been called for this view.

◆ GetColorTexture()

TextureHandle open3d::visualization::rendering::GaussianSplatRenderer::GetColorTexture ( const FilamentView view) const

◆ GetDepthTexture()

TextureHandle open3d::visualization::rendering::GaussianSplatRenderer::GetDepthTexture ( const FilamentView view) const

◆ GetRenderConfig()

const GaussianSplatRenderer::RenderConfig & open3d::visualization::rendering::GaussianSplatRenderer::GetRenderConfig ( ) const

◆ GetSceneDepthGLHandle()

std::uint32_t open3d::visualization::rendering::GaussianSplatRenderer::GetSceneDepthGLHandle ( const FilamentView view) const

Returns the GL texture handle for the scene depth texture that Filament should render into (shared via import).

◆ GetViewRenderData()

const GaussianSplatRenderer::ViewRenderData * open3d::visualization::rendering::GaussianSplatRenderer::GetViewRenderData ( const FilamentView view) const

◆ HasOutput()

bool open3d::visualization::rendering::GaussianSplatRenderer::HasOutput ( const FilamentView view) const

◆ InvalidateOutputForView()

void open3d::visualization::rendering::GaussianSplatRenderer::InvalidateOutputForView ( FilamentView view)

Destroys GS output targets for a specific view immediately, clearing the view's render target first. Must be called before any Filament texture used as an attachment is freed (e.g. on window resize before FilamentView::color_buffer_ is destroyed) to prevent a use-after-free crash in Filament's handle validation.

◆ IsEnabled()

bool open3d::visualization::rendering::GaussianSplatRenderer::IsEnabled ( ) const

◆ IsSupported()

bool open3d::visualization::rendering::GaussianSplatRenderer::IsSupported ( ) const

◆ PruneOutputs()

void open3d::visualization::rendering::GaussianSplatRenderer::PruneOutputs ( const std::unordered_set< const FilamentView * > &  live_views)

◆ ReadCompositeDepthToFloatCpu()

bool open3d::visualization::rendering::GaussianSplatRenderer::ReadCompositeDepthToFloatCpu ( const FilamentView view,
std::vector< float > &  out,
std::uint32_t  width,
std::uint32_t  height 
)

Read the GS composite depth (R32F, linear eye-space) into out when no scene depth (mesh) is present and the merge pass was skipped.

◆ ReadMergedDepthToUint16Cpu()

bool open3d::visualization::rendering::GaussianSplatRenderer::ReadMergedDepthToUint16Cpu ( const FilamentView view,
std::vector< std::uint16_t > &  out,
std::uint32_t  width,
std::uint32_t  height 
)

Read the GPU-merged GS+Filament depth (R16UI, [0,65535]) into out for offscreen RenderToDepthImage. Returns false when no merged depth texture exists for this view.

◆ RenderCompositeStage()

bool open3d::visualization::rendering::GaussianSplatRenderer::RenderCompositeStage ( FilamentView view)

Returns true if the composite pass ran and the backend reported success.

◆ RenderGeometryStage()

void open3d::visualization::rendering::GaussianSplatRenderer::RenderGeometryStage ( FilamentView view,
const FilamentScene scene 
)

◆ RequestDepthReadbackForView()

void open3d::visualization::rendering::GaussianSplatRenderer::RequestDepthReadbackForView ( const FilamentView view,
bool  wanted = true 
)

Signal that an offscreen depth readback is needed for view in the next composite pass. Causes the merged_depth_u16_tex to be allocated only when a scene-depth texture is also available.

◆ RequestRedrawForView()

void open3d::visualization::rendering::GaussianSplatRenderer::RequestRedrawForView ( const FilamentView view)

Marks the view so the next geometry + composite passes run even if the scene and camera are unchanged. Used by offscreen FilamentRenderToBuffer captures: without this, needs_render stays false after the first composite and subsequent RenderToImage calls would skip the GS pipeline and read only the Filament swapchain (no splats).

◆ SetEnabled()

void open3d::visualization::rendering::GaussianSplatRenderer::SetEnabled ( bool  enabled)

◆ SetRenderConfig()

void open3d::visualization::rendering::GaussianSplatRenderer::SetRenderConfig ( const RenderConfig config)

The documentation for this class was generated from the following files: