Adds color space to textures.
PiperOrigin-RevId: 761907261 Change-Id: Iec546d1d5907a15e57ef809ec31850640fc52915
This commit is contained in:
committed by
Copybara-Service
parent
62a9d5b98d
commit
3e9bc79b54
@@ -151,6 +151,13 @@ typedef enum mjtTextureRole_ { // role of texture map in rendering
|
||||
} mjtTextureRole;
|
||||
|
||||
|
||||
typedef enum mjtColorSpace_ { // type of color space encoding
|
||||
mjCOLORSPACE_AUTO = 0, // attempts to autodetect color space, defaults to linear
|
||||
mjCOLORSPACE_LINEAR, // linear color space
|
||||
mjCOLORSPACE_SRGB // standard RGB color space
|
||||
} mjtColorSpace;
|
||||
|
||||
|
||||
typedef enum mjtIntegrator_ { // integrator mode
|
||||
mjINT_EULER = 0, // semi-implicit Euler
|
||||
mjINT_RK4, // 4th-order Runge Kutta
|
||||
@@ -994,6 +1001,7 @@ struct mjModel_ {
|
||||
|
||||
// textures
|
||||
int* tex_type; // texture type (mjtTexture) (ntex x 1)
|
||||
int* tex_colorspace; // texture colorspace (mjtColorSpace) (ntex x 1)
|
||||
int* tex_height; // number of rows in texture image (ntex x 1)
|
||||
int* tex_width; // number of columns in texture image (ntex x 1)
|
||||
int* tex_nchannel; // number of channels in texture image (ntex x 1)
|
||||
|
||||
@@ -525,6 +525,7 @@ typedef struct mjsTexture_ { // texture specification
|
||||
mjsElement* element; // element type
|
||||
mjString* name; // name
|
||||
mjtTexture type; // texture type
|
||||
mjtColorSpace colorspace; // colorspace
|
||||
|
||||
// method 1: builtin
|
||||
int builtin; // builtin type (mjtBuiltin)
|
||||
|
||||
@@ -439,6 +439,7 @@
|
||||
XNV ( float, hfield_data, nhfielddata, 1 ) \
|
||||
X ( int, hfield_pathadr, nhfield, 1 ) \
|
||||
X ( int, tex_type, ntex, 1 ) \
|
||||
X ( int, tex_colorspace, ntex, 1 ) \
|
||||
X ( int, tex_height, ntex, 1 ) \
|
||||
X ( int, tex_width, ntex, 1 ) \
|
||||
X ( int, tex_nchannel, ntex, 1 ) \
|
||||
|
||||
Reference in New Issue
Block a user