Add mjmodel support for textures with different number of channels.

PiperOrigin-RevId: 653974959
Change-Id: Ia280e0bdb21027646249f104f21bedee792ba7e5
This commit is contained in:
Tom Erez
2024-07-19 05:21:16 -07:00
committed by Copybara-Service
parent 70ac76bb4b
commit e92af73cbf
11 changed files with 43 additions and 24 deletions
+6 -1
View File
@@ -5,10 +5,15 @@ Changelog
Upcoming version (not yet released)
-----------------------------------
General
^^^^^^^
1. Renamed ``mjModel.tex_rbg`` to ``mjModel.tex_data``.
MJX
^^^
1. Added more fields to ``mjx.Model`` and ``mjx.Data`` for further compatibility with the corresponding MuJoCo structs.
2. Added more fields to ``mjx.Model`` and ``mjx.Data`` for further compatibility with the corresponding MuJoCo structs.
Python bindings
^^^^^^^^^^^^^^^
+3 -2
View File
@@ -1211,8 +1211,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