Use mjResourceProvider instead of custom LoadAsset callbacks.

PiperOrigin-RevId: 853172824
Change-Id: I60ef1207611c4da119cc3f0a7819088cffca6e4f
This commit is contained in:
Haroon Qureshi
2026-01-07 03:02:06 -08:00
committed by Copybara-Service
parent 4830f5a79e
commit 9743c2d385
12 changed files with 142 additions and 167 deletions
+5 -6
View File
@@ -111,13 +111,12 @@ static constexpr std::array<const char*, 31> kPercentRealTime = {
};
// clang-format on
App::App(int width, int height, std::string ini_path,
const platform::LoadAssetFn& load_asset_fn)
: ini_path_(std::move(ini_path)), load_asset_fn_(load_asset_fn) {
App::App(int width, int height, std::string ini_path)
: ini_path_(std::move(ini_path)) {
window_ = std::make_unique<platform::Window>("MuJoCo Studio", width, height,
kWindowConfig, load_asset_fn);
renderer_ = std::make_unique<platform::Renderer>(
window_->GetNativeWindowHandle(), load_asset_fn);
kWindowConfig);
renderer_ =
std::make_unique<platform::Renderer>(window_->GetNativeWindowHandle());
ImPlot::CreateContext();
mjv_defaultPerturb(&perturb_);