Commit Graph

7 Commits

Author SHA1 Message Date
Anas ce025f0ec3 render: skip textures the classic renderer can't upload
KTX textures crash the classic OpenGL renderer and the Python viewer with
"Number of channels not supported: 1": mjCTexture::LoadKTX stores the file as
an opaque single-channel blob for the Filament renderer, and mjr_uploadTexture
aborts via mju_error because the classic path only handles 3- or 4-channel
textures.

Skip textures the classic renderer can't upload (nchannel not 3 or 4) with a
warning instead of aborting, so the model still loads and the other textures
render. LoadKTX and the Filament path are unchanged. The guard also covers the
cube/skybox path, which previously over-read a single-channel blob as RGB.

Add a render_test.py regression test that builds a model with a KTX texture and
constructs an MjrContext; it aborts before this change and passes after.

Addresses #3343.
2026-06-21 01:49:23 -04:00
Baruch Tabanpour f3b3024291 Add pyink and isort config. Reformat.
PiperOrigin-RevId: 704533915
Change-Id: I37e9fd51261bd166b725c7460fc65d02fed2b391
2024-12-09 21:10:50 -08:00
Nimrod Gileadi d7844aa5be Fix links to documentation.
1. Links to the programming chapter were broken after 69c74f850e. They're now fixed with a redirect in readthedocs.io, but this commit updates them to the latest URL.

2. Most docs links should point to "stable" instead of "latest", since most users will want the docs for the released version, not the upcoming version. The exceptions are the programming chapter, and instructions for building the Python bindings from source.

PiperOrigin-RevId: 502821526
Change-Id: If0a55ab2be4751ba0165bf644030464234083133
2023-01-18 02:55:41 -08:00
Nimrod Gileadi a077db1b91 Implement __repr__ and __eq__ on MjrRect in Python bindings.
PiperOrigin-RevId: 457457401
Change-Id: I0d395ff301fbcf775b4766ac81c830a625b3be63
2022-06-27 05:55:38 -07:00
Saran Tunyasuvunakool 90dea1bdfb Version 2.1.4: Switch to GLAD, minor improvements to simulate.
PiperOrigin-RevId: 439277749
Change-Id: I741d1c499ae88753338fcc6d141a65e92e13023e
2022-04-04 13:53:21 +01:00
Nimrod Gileadi c6984b42af Add a free() method to mujoco.MjrContext.
Up the mujoco bindings version to 2.1.2.post2.

Keep the capsule deconstructor which calls mj_freeContext, because mjr_freeContext is idempotent.

PiperOrigin-RevId: 435714183
Change-Id: I9f8615f85f2b3e383f447f6684e61200039d57d4
2022-03-23 16:57:25 +00:00
Saran Tunyasuvunakool 3577e2cf8b Version 2.1.2: Python bindings, OBJ assets support, bugfixes.
PiperOrigin-RevId: 434731612
Change-Id: I0cfda3e7a3d1c72036764986efc252ffa1b8c6b0
2022-03-15 14:04:44 +00:00