Ah, that’s probably because I used the wrong print function on android (each platform always does something slightly weird)
I’ll make new editor
Ah, that’s probably because I used the wrong print function on android (each platform always does something slightly weird)
I’ll make new editor
Thanks, now I see the loggings with logcat. Here are Defold logs from crash and from working device. Those full logs with all the device loggings were most likely useless anyway.
Crash
defold_logs3.txt (1.8 KB)
Working device
working_device_logs2.txt (3.7 KB)
Alright, thank you so much for this info!
So, this is the input to the erring glDrawElements
:
W/defold (24492): WARNING:GRAPHICS: MAWE: DrawElements:
W/defold (24492): WARNING:GRAPHICS: MAWE: prim_type: 4
W/defold (24492): WARNING:GRAPHICS: MAWE: count: 36 00000024
W/defold (24492): WARNING:GRAPHICS: MAWE: type: 5125
W/defold (24492): WARNING:GRAPHICS: MAWE: first: 0 00000000
E/defold (24492): ERROR:GRAPHICS: DrawElements(1311): gl error 1280: 'GL_INVALID_ENUM' from glDrawElements
The error it gives is GL_INVALID_ENUM
, and looking at the input enums prim_type
, a.k.a mode in the documentation, and type
:
Prim type 4
corresponds to GL_TRIANGLES
And type 5125
(or 1405
in hexadecimal), is GL_UNSIGNED_INT.
Although, in the gl.h
I looked at in our current Android SDK, that enum isn’t defined(!)
The GL_UNSIGNED_INT
means that there are indices higher than 65535, which is quite a lot.
By the looks of your game, I guess you’re not using 3d models, but only sprites?
Have you by any chance increased the game project setting sprite.max_count
to something high?
Thank you very much! These are excellent news indeed!
When I decreased the sprite max count from 16384 (which seemed to be the maximum in editor when we added this value) to 4000 everything started working on Zenpad also. We maxed those values when the first default count of some resource was exceeded and they didn’t seem to cause any harm being so high
We are not using any 3d models but only sprites in the game.
Good to hear you found a solution!
Yep, you guys rock!
I still suggest that this would somehow be fixes on the engine’s side as well to prevent weird problems with some devices since this setting was working before. When I got time I will test what happens for example with 16383 sprite max count if it is somehow error by one or something like that that causes the cast to GL_UNSIGNED_INT.
In cases like this we’re are the mercy of both the mobile vendor graphics driver and the Android SDK, when they change behavior.
I’ll try to think of a good way to deal with this, not sure how yet though.
I made some research just for fun and noticed that largest working maximum count of sprites is 8192. Luckily this is enough for most of the usages I think.