Bump engine submodule and update timings.

This commit is contained in:
Roz K 2022-12-30 14:58:40 +01:00
parent bd445575fd
commit b6553db09e
Signed by: roz
GPG Key ID: 51FBF4E483E1C822
3 changed files with 11 additions and 11 deletions

2
engine

@ -1 +1 @@
Subproject commit 628f8bcaa4eb3c4da5a534b55d58218b894b9822
Subproject commit 3b21e1610a687edcd91d5fe1c05823c2834928db

View File

@ -21,12 +21,12 @@ from engine import (vec3, mat3, buffer,
class Batch:
__slots__ = '_batch', 'size', 'max_size', 'flags', 'meshes', 'params', '_params', '__dict__'
def __init__(self, vertices, max_size, **params_decls):
def __init__(self, vertices, max_size, max_meshes, **params_decls):
assert max_size <= BATCH_MAX_SIZE
nparams = len(params_decls)
names = params_decls.keys()
formats = params_decls.values()
self._batch = create_batch(vertices, max_size, params_format(*formats))
self._batch = create_batch(vertices, max_size, max_meshes, params_format(*formats))
self.size = 0
self.max_size = max_size
self.flags = buffer(c_ubyte, max_size)

View File

@ -84,7 +84,7 @@ def main():
rock_model = archive.get_model('rock')
mud_model = archive.get_model('mud')
lava_model = archive.get_model('lava')
terrain_batch = Batch(tiles_vertices, generated.size ** 2, translation = PARAM_FORMAT_VEC3_SHORT)
terrain_batch = Batch(tiles_vertices, generated.size ** 2, 8, translation = PARAM_FORMAT_VEC3_SHORT)
#TODO: generator & for real
vc = generated.volcano_c
@ -123,7 +123,7 @@ def main():
blob_model = archive.get_model('blob')
cube_model = archive.get_model('cube')
clouds_model = archive.get_model('clouds')
tests_batch = Batch(tests_vertices, 3,
tests_batch = Batch(tests_vertices, 3, 3,
translation = PARAM_FORMAT_VEC3_FLOAT,
orientation = PARAM_FORMAT_MAT3_INT10 | PARAM_FORMAT_NORMALIZE)
blob_spawn_translation = vec3(-100.0, -500.0, 0.0)
@ -269,13 +269,13 @@ def main():
# for _ in range(10000):
# current_time = 0 # time.monotonic() - start_time
# Draw * 9999 : min = 0.14 , max = 0.86 , avg = 0.2 ms
# Draw * 9999 : min = 0.14 , max = 0.93 , avg = 0.2 ms
# Draw * 9999 : min = 0.14 , max = 0.77 , avg = 0.2 ms
# Draw * 9999 : min = 0.13 , max = 0.86 , avg = 0.2 ms
# Draw * 9999 : min = 0.14 , max = 0.75 , avg = 0.2 ms
# Draw * 9999 : min = 0.14 , max = 0.84 , avg = 0.2 ms
# Frame * 9999 : min = 0.20 , max = 0.95 , avg = 0.34 ms
# Frame * 9999 : min = 0.21 , max = 1.03 , avg = 0.34 ms
# Frame * 9999 : min = 0.21 , max = 1.09 , avg = 0.34 ms
# Frame * 9999 : min = 0.19 , max = 0.98 , avg = 0.34 ms
# Frame * 9999 : min = 0.21 , max = 0.94 , avg = 0.34 ms
# Frame * 9999 : min = 0.21 , max = 1.0 , avg = 0.34 ms
print("Quitting...")
del tests_batch