Add light ids.

PiperOrigin-RevId: 805755907
Change-Id: I92a1b1ea4ce1495c2746fd518f33ab2d1ad81399
This commit is contained in:
Haroon Qureshi
2025-09-11 03:19:48 -07:00
committed by Copybara-Service
parent da2fad4530
commit 017e7d5a73
6 changed files with 11 additions and 0 deletions
+2
View File
@@ -2310,6 +2310,7 @@ void mjv_makeLights(const mjModel* m, const mjData* d, mjvScene* scn) {
// set default properties
memset(thislight, 0, sizeof(mjvLight));
thislight->id = -1;
thislight->headlight = 1;
thislight->texid = -1;
thislight->type = mjLIGHT_DIRECTIONAL;
@@ -2341,6 +2342,7 @@ void mjv_makeLights(const mjModel* m, const mjData* d, mjvScene* scn) {
// copy properties
memset(thislight, 0, sizeof(mjvLight));
thislight->id = i;
thislight->type = m->light_type[i];
thislight->texid = m->light_texid[i];
thislight->castshadow = m->light_castshadow[i];