I am making a game that uses pygame-ce to draw graphics on screen and taichi lang to calculate graphics. To render frame I need to load scene, it is a class that contains some taichi fields. I want to load new map by pressing a button in main game cycle, but I want display to be updated while scene is loading. It takes some time for scene to load so my game freezes and never updates screen. I tried putting scene loading in another thread using the threading library, but I get taichi error:
[E 03/27/25 15:25:04.007 9162] [llvm_context.cpp:add_struct_module@674] Assertion failure: std::this_thread::get_id() == main_thread_id_
I tried putting screen update in another process, but screen doesn't update and pygame throws an error:
pygame.error: Unable to make GL context current
How to bypass this?