Add mjmodel support for textures with different number of channels.
PiperOrigin-RevId: 653974959 Change-Id: Ia280e0bdb21027646249f104f21bedee792ba7e5
This commit is contained in:
committed by
Copybara-Service
parent
70ac76bb4b
commit
e92af73cbf
@@ -924,8 +924,9 @@ struct mjModel_ {
|
||||
int* tex_type; // texture type (mjtTexture) (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_adr; // address in rgb (ntex x 1)
|
||||
mjtByte* tex_rgb; // rgb (alpha = 1) (ntexdata x 1)
|
||||
int* tex_nchannel; // number of channels in texture image (ntex x 1)
|
||||
int* tex_adr; // start address in tex_data (ntex x 1)
|
||||
mjtByte* tex_data; // pixel values (ntexdata x 1)
|
||||
int* tex_pathadr; // address of texture asset path; -1: none (ntex x 1)
|
||||
|
||||
// materials
|
||||
|
||||
@@ -410,8 +410,9 @@
|
||||
X ( int, tex_type, ntex, 1 ) \
|
||||
X ( int, tex_height, ntex, 1 ) \
|
||||
X ( int, tex_width, ntex, 1 ) \
|
||||
X ( int, tex_nchannel, ntex, 1 ) \
|
||||
X ( int, tex_adr, ntex, 1 ) \
|
||||
X ( mjtByte, tex_rgb, ntexdata, 1 ) \
|
||||
X ( mjtByte, tex_data, ntexdata, 1 ) \
|
||||
XMJV( int, tex_pathadr, ntex, 1 ) \
|
||||
XMJV( int, mat_texid, nmat, mjNTEXMAT ) \
|
||||
XMJV( mjtByte, mat_texuniform, nmat, 1 ) \
|
||||
|
||||
Reference in New Issue
Block a user