Rendering in another thread...?

Is it at all possible in Panda3D to render something–even just 2D stuff–from a secondary thread?

(I think that I recall reading somewhere that this cannot be done–but I’m not sure of that, and feel that it’s worth asking in case I’m mistaken.)

To explain, I’m looking at improving my game’s loading screen. With no threading, the game of course pretty much stops responding while loading.

My first thought, then, was to move my level-loading into a separate thread. But having looked into this, it seems that doing so might well call for a significant re-engineering of my loading process, something that I’m loath to do: I’m not clear on what does and what does not reliably work in a separate thread; the loading process is, I fear, fairly complex; and the process currently works.

Another idea, then, is to approach the problem the other way around: instead of putting the level-loading into a thread, perhaps I could put the loading-screen into a separate thread. That might, I think, achieve the same effect, and much more simply.

The logic of the loading screen isn’t a major issue, I imagine. But will Panda3D render in some way from another thread…?

You could put the logic for your loading screen on a separate thread, but the actual rendering has to happen on Panda’s main thread, which will be lock up with the loading logic.

Ah, that’s a pity, but as expected. :/ Thank you for the answer! :slight_smile:

I may end up leaving my loading-screen static, then. It’s a pity, but it may be better than re-engineering my loading process at this point…