Support image/ktx format for textures.
PiperOrigin-RevId: 761926074 Change-Id: I6a312634b5bdc706ea5166bc3b2be273e14c1c8a
This commit is contained in:
committed by
Copybara-Service
parent
3e9bc79b54
commit
373b4c0437
@@ -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.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user