Support image/ktx format for textures.

PiperOrigin-RevId: 761926074
Change-Id: I6a312634b5bdc706ea5166bc3b2be273e14c1c8a
This commit is contained in:
Google DeepMind
2025-05-22 05:46:49 -07:00
committed by Copybara-Service
parent 3e9bc79b54
commit 373b4c0437
4 changed files with 52 additions and 19 deletions
+1 -1
View File
@@ -2406,7 +2406,7 @@ const char* mj_validateReferences(const mjModel* m) {
}
}
for (int i=0; i < m->ntex; i++) {
int tex_adr = m->tex_adr[i] + 3*m->tex_height[i]*m->tex_width[i];
int tex_adr = m->tex_adr[i] + m->tex_nchannel[i]*m->tex_height[i]*m->tex_width[i];
if (tex_adr > m->ntexdata || m->tex_adr[i] < 0) {
return "Invalid model: tex_adr out of bounds.";
}