Implementation:Google deepmind Mujoco Filament GUI View
| Knowledge Sources | |
|---|---|
| Domains | Rendering, GUI |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Renders the ImGui-based graphical user interface overlay as a Filament view layer on top of the 3D scene.
Description
gui_view.cc implements GuiView, which bridges ImGui draw data to Filament renderables. It creates a dedicated Filament scene, camera, and view for the GUI overlay, then converts ImGui vertex and index buffers into Filament buffer objects. Each ImGui draw command is translated into a Filament renderable primitive with the appropriate material instance and texture. The class manages the lifecycle of all GPU resources (vertex buffers, index buffers, material instances, textures) and rebuilds the renderable each frame as ImGui content changes.
Usage
Instantiated by FilamentContext when GUI rendering is enabled. Updated each frame after ImGui has been processed, converting the current ImGui draw lists into Filament renderables that are composited over the 3D scene view.
Code Reference
Source Location
- Repository: Google_deepmind_Mujoco
- File: src/experimental/filament/filament/gui_view.cc
- Lines: 1-411
Key Functions
GuiView::GuiView(filament::Engine* engine, ObjectManager* object_mgr);
GuiView::~GuiView();
void GuiView::ResetRenderable();
// Converts ImGui draw data to Filament vertex/index buffers and material instances
Import
#include "experimental/filament/filament/gui_view.h"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| engine | filament::Engine* | Yes | Filament engine for resource creation |
| object_mgr | ObjectManager* | Yes | Provides the unlit UI material for GUI rendering |
| ImGui draw data | ImDrawData* | Yes | Current frame ImGui vertex/index/command data |
Outputs
| Name | Type | Description |
|---|---|---|
| view_ | filament::View* | Filament view containing the GUI overlay renderables |