Reformat array to be readable

This commit is contained in:
Doxin 2025-01-18 17:20:42 +01:00
parent 250b387d52
commit 2830bd8d69

View File

@ -17,30 +17,18 @@ class GameWindow(mglw.WindowConfig):
self.texture = self.ctx.texture(self.window_size, 4)
buff = self.ctx.buffer(
np.array(
[
-1.0,
-1.0,
0.0,
1.0,
-1.0,
0.0,
-1.0,
1.0,
0.0,
1.0,
-1.0,
0.0,
1.0,
1.0,
0.0,
-1.0,
1.0,
0.0,
]
)
.astype("f4")
.tobytes()
# fmt: off
np.array([
-1.0, -1.0, 0.0,
1.0, -1.0, 0.0,
-1.0, 1.0, 0.0,
1.0, -1.0, 0.0,
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
])
# fmt: on
.astype("f4").tobytes()
)
self.vao = self.ctx.vertex_array(self.program, buff, "in_position")