Splash screen

how do i make a splash screen that shows up before the scenegraph is going to load??

wxPython has built in splashscreen

ok ty

but panda doesn’t have an option itself?

its comparebly easy.
just load a small scene (for a splashscreen a simple textured card with your splash would be enough).
then call

base.graphicsEngine.renderFrame()

a few times… like 3 or 4 times.
this will show your splash in the window.
this is not a “real splash”, it still has window-decoration or, depending on your settings is a full-screen image.
but you have a screen indicating your application is running.

after the renderFrame() you can load your actual content. and then call run()

Another question: What about a loading bar for (eg) while game models / content is loading?

ty for explaining

but i think the wxpython option is still the best!

aurilliance - ty this was just my next question. :slight_smile:

To be more specific, 2 times, as when you call renderframe, the last frame rendered is shown, so when you call it twice, you get the frame rendered by the first call.

In my game, I’m using this method, and have this code right after my directstart import and before my main imports, so it shows when they’re loading. Feel free to use this.

from direct.gui.OnscreenImage import OnscreenImage
loadingImage = OnscreenImage(image = 'materials/textures/loading.jpg', pos = (0, 0, 0.0), parent=render2d)
base.graphicsEngine.renderFrame()
base.graphicsEngine.renderFrame()
loadingImage.destroy()