Increase material count limit to 1000.

The texture limit used to be 1000, but when materials with multiple textures were introduced in 3.2.0, the limit was reduced to 100. Since there are model out there that already have more than 100 and fewer than 1000 textures/materials, we should maintain backwards compat.

Fixes #1877

PiperOrigin-RevId: 659901629
Change-Id: If0f6d0500d1d808bc3ec2d87d4a3faf24007da59
This commit is contained in:
Nimrod Gileadi
2024-08-06 04:20:07 -07:00
committed by Copybara-Service
parent 881b777ffd
commit 9db9df7380
4 changed files with 23 additions and 21 deletions
+7 -7
View File
@@ -54,8 +54,8 @@ public const bool THIRD_PARTY_MUJOCO_INCLUDE_MJPLUGIN_H_ = true;
public const bool mjEXTERNC = true;
public const bool THIRD_PARTY_MUJOCO_MJRENDER_H_ = true;
public const int mjNAUX = 10;
public const int mjMAXTEXTURE = 100;
public const int mjMAXMATERIAL = 100;
public const int mjMAXTEXTURE = 1000;
public const int mjMAXMATERIAL = 1000;
public const bool THIRD_PARTY_MUJOCO_INCLUDE_MJSPEC_H_ = true;
public const bool THIRD_PARTY_MUJOCO_INCLUDE_MJTHREAD_H_ = true;
public const int mjMAXTHREAD = 128;
@@ -5644,12 +5644,12 @@ public unsafe struct mjrContext_ {
public fixed uint auxFBO_r[10];
public fixed uint auxColor[10];
public fixed uint auxColor_r[10];
public fixed int mat_texid[1000];
public fixed int mat_texuniform[100];
public fixed int mat_texrepeat[200];
public fixed int mat_texid[10000];
public fixed int mat_texuniform[1000];
public fixed int mat_texrepeat[2000];
public int ntexture;
public fixed int textureType[100];
public fixed uint texture[100];
public fixed int textureType[1000];
public fixed uint texture[1000];
public uint basePlane;
public uint baseMesh;
public uint baseHField;