Allow uploading textures for use with ImGui.

PiperOrigin-RevId: 840669528
Change-Id: I7c5854d966dd024cd492953f86bca961cfaf88b8
This commit is contained in:
Haroon Qureshi
2025-12-05 04:30:40 -08:00
committed by Copybara-Service
parent e93786c161
commit f18c9996e6
6 changed files with 76 additions and 8 deletions
@@ -137,6 +137,13 @@ void mjr_readPixels(unsigned char* rgb, float* depth, mjrRect viewport,
g_filament_context->ReadPixels(viewport, rgb, depth);
}
uintptr_t mjr_uploadGuiImage(uintptr_t tex_id, const unsigned char* pixels,
int width, int height, int bpp,
const mjrContext* con) {
CheckFilamentContext();
return g_filament_context->UploadGuiImage(tex_id, pixels, width, height, bpp);
}
double mjr_getFrameRate(const mjrContext* con) {
CheckFilamentContext();
return g_filament_context->GetFrameRate();