admin管理员组文章数量:1395883
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?
本文标签: pythonHow to update pygame display from another processStack Overflow
版权声明:本文标题:python - How to update pygame display from another process? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744088581a2588998.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论