Run forever.

This commit is contained in:
Roz K 2022-12-29 14:36:30 +01:00
parent 81f0745feb
commit 1649bb6dc9
Signed by: roz
GPG Key ID: 51FBF4E483E1C822

View File

@ -37,7 +37,7 @@ proj_ratio = 16.0 / 9.0
proj_near_z = 8.0
proj_far_z = 3000.0
sun_direction = math.vec3_normalize((1.0, 0.0, 1.0))
sun_direction = math.vec3_normalize((1.0, 0.0, 0.5))
sun_power = 1.0
def main():
@ -162,6 +162,7 @@ def main():
print("Running... Ctrl+c to quit")
start_time = time.monotonic()
current_time = 0.0
frame = 0
frame_min = 10000.0
frame_max = 0.0
frame_avg = 0.0
@ -170,7 +171,7 @@ def main():
draw_avg = 0.0
perf_count = 0
try:
for frame in range(10000):
while True:
current_time = time.monotonic() - start_time
frame_begin = time.thread_time()
@ -250,6 +251,7 @@ def main():
frame_max = max(frame_max, frame_ms)
frame_avg += frame_ms
perf_count += 1
frame += 1
except KeyboardInterrupt:
pass