Refactored compilation and startup. Now everything is orchestrated through a simple API described in sideros_api.h. Also refactored some of the code to get rid of global C imports.

Signed-off-by: Lorenzo Torres <torres@sideros.org>
This commit is contained in:
Ernesto Lanchares 2025-08-05 18:05:17 +00:00 committed by Lorenzo Torres
parent 5b51a3d571
commit b1bd949db5
12 changed files with 420 additions and 212 deletions

View file

@ -1,7 +1,6 @@
const std = @import("std");
const ecs = @import("ecs");
const sideros = @import("sideros");
const math = sideros.math;
const math = @import("math");
const Camera = @This();
const UP = @Vector(3, f32){ 0.0, 1.0, 0.0 };
@ -13,9 +12,9 @@ pub const Uniform = struct {
};
position: @Vector(3, f32),
target: @Vector(3, f32) = .{0.0, 0.0, 0.0},
front: @Vector(3, f32) = .{0.0, 0.0, 1.0 },
up: @Vector(3, f32) = .{0.0, 1.0, 0.0 },
target: @Vector(3, f32) = .{ 0.0, 0.0, 0.0 },
front: @Vector(3, f32) = .{ 0.0, 0.0, 1.0 },
up: @Vector(3, f32) = .{ 0.0, 1.0, 0.0 },
speed: f32 = 2.5,
pub fn getProjection(width: usize, height: usize) math.Matrix {