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:
parent
5b51a3d571
commit
b1bd949db5
12 changed files with 420 additions and 212 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue