Rename enum values to match type name.

PiperOrigin-RevId: 906014884
Change-Id: I0f37ab0a0a910724723fb9f7e477b64643ca05fc
This commit is contained in:
Haroon Qureshi
2026-04-26 14:03:15 -07:00
committed by Copybara-Service
parent 2fa2db7ae0
commit 8f32f6e72e
3 changed files with 11 additions and 10 deletions
@@ -31,13 +31,13 @@ static filament::Engine::Backend ResolveBackend(int graphics_api) {
#endif
switch (graphics_api) {
case mjGFX_DEFAULT:
case mjGRAPHICS_API_DEFAULT:
// Use the default based on the platform above.
break;
case mjGFX_OPENGL:
case mjGRAPHICS_API_OPENGL:
backend = filament::Engine::Backend::OPENGL;
break;
case mjGFX_VULKAN:
case mjGRAPHICS_API_VULKAN:
backend = filament::Engine::Backend::VULKAN;
break;
default:
@@ -29,11 +29,11 @@ extern "C" {
// IMPORTANT: This API should still be considered experimental and is likely
// change frequently.
typedef enum mjtGraphicsApi_ { // backend graphics API to use
mjGFX_DEFAULT = 0, // default based on platform
mjGFX_OPENGL, // OpenGL (desktop)
mjGFX_VULKAN // Vulkan
} mjtGraphicsApi;
typedef enum mjrGraphicsApi_ { // backend graphics API to use
mjGRAPHICS_API_DEFAULT = 0, // default based on platform
mjGRAPHICS_API_OPENGL, // OpenGL (desktop) / WebGL
mjGRAPHICS_API_VULKAN // Vulkan
} mjrGraphicsApi;
struct mjrFilamentConfig {
// The native window handle into which we can render directly.
+3 -2
View File
@@ -90,8 +90,9 @@ void Renderer::Init(const mjModel* model) {
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;
render_config.graphics_api = IsOpenGl(gfx_) || IsWebGl(gfx_)
? mjGRAPHICS_API_OPENGL
: mjGRAPHICS_API_VULKAN;
mjrf_makeFilamentContext(model, &render_context_, &render_config);
render_ = [&](mjrRect rect, mjvScene* scene) {
mjrf_render(rect, scene, &render_context_);