Concept

Flags For Initializing a Display in Pygame

There are multiple flags you can choose when calling display.set_mode() to customize your display. You can chain multiple flags together using the or operator |.

pygame.FULLSCREEN #create a fullscreen display pygame.DOUBLEBUF #recommended for HWSURFACE or OPENGL pygame.HWSURFACE #hardware accelerated, only in FULLSCREEN pygame.OPENGL #create an OpenGL-renderable display pygame.RESIZABLE #display window should be sizeable pygame.NOFRAME #display window will have no border or controls

Pygame 2 includes the following extra flags:

pygame.SCALED #resolution depends on desktop size and scale graphics pygame.SHOWN #window is opened in visible mode (default) pygame.HIDDEN #window is opened in hidden mode

0

1

Updated 2021-06-16

Tags

Python Programming Language

Data Science