Move texture block copy out of render context so it can be modified online via mjmodel

This commit is contained in:
Pedro Morais
2026-07-09 11:08:43 -04:00
parent bdeb7e7c4d
commit d43c3ed426
12 changed files with 54 additions and 95 deletions
-6
View File
@@ -24,7 +24,6 @@ extern "C" {
#define mjNAUX 10 // number of auxiliary buffers
#define mjMAXTEXTURE 1000 // maximum number of textures
#define mjMAXMATERIAL 1000 // maximum number of materials with textures
//---------------------------------- primitive types (mjt) -----------------------------------------
@@ -170,11 +169,6 @@ typedef struct mjrContext_ { // custom OpenGL context
unsigned int auxColor[mjNAUX]; // auxiliary color buffer
unsigned int auxColor_r[mjNAUX]; // auxiliary color buffer for resolving
// materials with textures
int mat_texid[mjMAXMATERIAL*mjNTEXROLE]; // material texture ids (-1: no texture)
int mat_texuniform[mjMAXMATERIAL]; // uniform cube mapping
float mat_texrepeat[mjMAXMATERIAL*2]; // texture repetition for 2d mapping
// texture objects and info
int ntexture; // number of allocated textures
int textureType[mjMAXTEXTURE]; // type of texture (mjtTexture) (ntexture)
+3
View File
@@ -229,6 +229,8 @@ typedef struct mjvGeom_ { // abstract geom
int objid; // mujoco object id; -1 for decor
int category; // visual category
int matid; // material id; -1: no textured material
int texid; // texture id; -1: none
int texuniform; // uniform cube mapping
int texcoord; // mesh or flex geom has texture coordinates
int segid; // segmentation id; -1: not shown
@@ -243,6 +245,7 @@ typedef struct mjvGeom_ { // abstract geom
float specular; // specular coef
float shininess; // shininess coef
float reflectance; // reflectance coef
float texrepeat[2]; // texture repetition for 2d mapping
char label[100]; // text label