renderer: measure meshing time on its own

This commit is contained in:
Archbirdplus 2024-05-25 22:49:35 -07:00 committed by IntegratedQuantum
parent 82a127db1c
commit a851de9ed2

View File

@ -123,7 +123,6 @@ pub fn updateViewport(width: u31, height: u31, fov: f32) void {
}
pub fn render(playerPosition: Vec3d) void {
const startTime = std.time.milliTimestamp();
// TODO: player bobbing
if(game.world) |world| {
// TODO: Handle colors and sun position in the world.
@ -135,6 +134,7 @@ pub fn render(playerPosition: Vec3d) void {
game.fog.color = skyColor;
renderWorld(world, ambient, skyColor, playerPosition);
const startTime = std.time.milliTimestamp();
mesh_storage.updateMeshes(startTime + maximumMeshTime);
} else {
MenuBackGround.render();