mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
renderer: measure meshing time on its own
This commit is contained in:
parent
82a127db1c
commit
a851de9ed2
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user