Refactor FilamentContext to prepare for upcoming changes.

Separate out the parts of the FilamentContext initialization that
depends on the mjModel into a separate Init function.

PiperOrigin-RevId: 890373341
Change-Id: I06b524668cd60dad804d437958f4f6606c46200b
This commit is contained in:
Haroon Qureshi
2026-03-27 04:25:34 -07:00
committed by Copybara-Service
parent d597b23e5e
commit 1c2100e27c
5 changed files with 31 additions and 24 deletions
+2
View File
@@ -88,6 +88,8 @@ void Renderer::Init(const mjModel* model) {
mjrFilamentConfig render_config;
mjrf_defaultFilamentConfig(&render_config);
render_config.native_window = native_window_;
render_config.width = model->vis.global.offwidth;
render_config.height = model->vis.global.offheight;
render_config.force_software_rendering = IsSoftware(gfx_);
render_config.graphics_api =
IsOpenGl(gfx_) || IsWebGl(gfx_) ? mjGFX_OPENGL : mjGFX_VULKAN;