Run forever.
This commit is contained in:
parent
81f0745feb
commit
1649bb6dc9
@ -37,7 +37,7 @@ proj_ratio = 16.0 / 9.0
|
|||||||
proj_near_z = 8.0
|
proj_near_z = 8.0
|
||||||
proj_far_z = 3000.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
|
sun_power = 1.0
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -162,6 +162,7 @@ def main():
|
|||||||
print("Running... Ctrl+c to quit")
|
print("Running... Ctrl+c to quit")
|
||||||
start_time = time.monotonic()
|
start_time = time.monotonic()
|
||||||
current_time = 0.0
|
current_time = 0.0
|
||||||
|
frame = 0
|
||||||
frame_min = 10000.0
|
frame_min = 10000.0
|
||||||
frame_max = 0.0
|
frame_max = 0.0
|
||||||
frame_avg = 0.0
|
frame_avg = 0.0
|
||||||
@ -170,7 +171,7 @@ def main():
|
|||||||
draw_avg = 0.0
|
draw_avg = 0.0
|
||||||
perf_count = 0
|
perf_count = 0
|
||||||
try:
|
try:
|
||||||
for frame in range(10000):
|
while True:
|
||||||
current_time = time.monotonic() - start_time
|
current_time = time.monotonic() - start_time
|
||||||
frame_begin = time.thread_time()
|
frame_begin = time.thread_time()
|
||||||
|
|
||||||
@ -250,6 +251,7 @@ def main():
|
|||||||
frame_max = max(frame_max, frame_ms)
|
frame_max = max(frame_max, frame_ms)
|
||||||
frame_avg += frame_ms
|
frame_avg += frame_ms
|
||||||
perf_count += 1
|
perf_count += 1
|
||||||
|
frame += 1
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user