1
0

Fixes for newer numpy version and set env var for headless rendering

This commit is contained in:
m11
2026-01-28 23:08:50 +01:00
parent 8ae9a9116e
commit 5c097d612c
2 changed files with 5 additions and 3 deletions

View File

@@ -57,8 +57,8 @@ colors = np.array([
colors = np.reshape(colors, (colors.size//3, 3))
grid = np.zeros((Ny,Nx), dtype=np.int)
gridout = np.zeros((Ny,Nx), dtype=np.int)
grid = np.zeros((Ny,Nx), dtype=np.int32)
gridout = np.zeros((Ny,Nx), dtype=np.int32)
grid[0,:].fill(colors.shape[0]-1)
clock = pygame.time.Clock()
@@ -98,4 +98,4 @@ while True:
out = np.dstack((state2red(gridout), state2green(gridout), state2blue(gridout))).astype(np.uint8).tobytes()
os.write(1, out)
clock.tick_busy_loop(fps)
clock.tick_busy_loop(fps)

View File

@@ -2,6 +2,8 @@
shaderfile="$(shuf -n1 -e shaders/*)"
export EGL_PLATFORM=surfaceless
export MESA_GL_VERSION_OVERRIDE=3.3
shady -i "${shaderfile}" -ofmt rgb24 -g "${1}x${2}" -f "${3:-20}" -rt