Relative Content

Tag Archive for pythonpython-moderngl

Loading screen in moderngl and pygame

Recently I managed to create a simple voxel engine with pygame and moderngl and everything functions well.
However when I start my program the pygame window is pitch black for about 10 seconds, looking at my code I managed to find the instruction which caused such a slowdown and I wanted to replace the solid black color with a loading screen (just an image for the moment).
The instruction was the initialization of the scene object (I have a system with multiple classes for different purposes and the scene class is meant to group all the parts that compose a frame such as chunks, clouds or water).Here’s the code of scene.py: