Cosmetica

Cosmetica

2M Downloads

Inconsistent Custom Texture Uploading Behaviour

valoeghese opened this issue ยท 0 comments

commented

The TextureAtlasSprite#upload method, when called, seems to only work about 3/20ths of the time or less on average. Other times it silently fails, or spits out OpenGL errors such as GL_INVALID_VALUE and GL_INVALID_OPERATION.

Observations:
The behaviour seemingly is random per game session (resetting caches would provide the same behaviour. only restarting the game changes it). This somewhat resembled what would be expected from a race condition aside from I would expect it to be random every time with a race condition, rather than per game session.

The images are always present and stored in the NativeImage[] successfully enough that an image dump will provide the correct value. Therefore it is the uploading that fails.

Making it generate the baked model every time doesn't change anything. The problem is with uploading.

Helpful Debugging Mechanisms:
If you launch the game in a dev environment or with -Dcosmetics.debug=true, you will enable debug mode, in which a config file called debug_settings.json will be created. Various debug settings can be enabled from there, and this file will be read at game launch.

Set your UUID in the dev environment using the vanilla --uuid flag
Relevant code is currently in the regional-effects-&-guis branch