From 85e6f6de3c659f83dc1979052ba2e3953c3313be Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Tue, 9 Dec 2025 09:21:20 -0800 Subject: [PATCH] Ignore unsupported light types in GL3 renderer. PiperOrigin-RevId: 842271116 Change-Id: I632f7ed8e2a6488d5a8eb228928e26c8fcbdff66 --- src/render/render_gl3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/render/render_gl3.c b/src/render/render_gl3.c index 4c931cc7..b4b9cf71 100644 --- a/src/render/render_gl3.c +++ b/src/render/render_gl3.c @@ -695,7 +695,7 @@ static void initLights(mjvScene* scn) { } else { - mju_error("Unsupported light type: %d", scn->lights[i].type); + // ignore unsupported light types: mjLIGHT_POINT, mjLIGHT_IMAGE } } @@ -808,7 +808,7 @@ static void adjustLight(const mjvLight* thislight, int n) { mjr_setf4(temp, thislight->pos[0], thislight->pos[1], thislight->pos[2], 1); glLightfv(GL_LIGHT0+n, GL_POSITION, temp); } else { - mju_error("Unsupported light type: %d", thislight->type); + // ignore unsupported light types: mjLIGHT_POINT, mjLIGHT_IMAGE } } @@ -1202,7 +1202,7 @@ void mjr_render(mjrRect viewport, mjvScene* scn, const mjrContext* con) { mjr_perspective(mju_min(2*thislight->cutoff*con->shadowScale, 160), 1, cam.frustum_near, cam.frustum_far); } else { - mju_error("Unsupported light type: %d", thislight->type); + // ignore unsupported light types: mjLIGHT_POINT, mjLIGHT_IMAGE } glGetFloatv(GL_PROJECTION_MATRIX, lightProject);