tangled
alpha
login
or
join now
altagos.dev
/
rayray
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
added zigimg
altagos.dev
2 years ago
d38a4f73
fde489b4
+15
-6
2 changed files
expand all
collapse all
unified
split
build.zig
src
rayray.zig
+7
-4
build.zig
···
9
9
.target = target,
10
10
.optimize = optimize,
11
11
});
12
12
-
add_deps(b, rayray);
12
12
+
addDeps(b, rayray);
13
13
14
14
const exe = b.addExecutable(.{
15
15
.name = "rayray",
···
42
42
test_step.dependOn(&run_lib_unit_tests.step);
43
43
}
44
44
45
45
-
fn add_deps(b: *std.Build, module: *std.Build.Module) void {
46
46
-
const zmath_pkg = b.dependency("zmath", .{
45
45
+
fn addDeps(b: *std.Build, module: *std.Build.Module) void {
46
46
+
const zmath = b.dependency("zmath", .{
47
47
.enable_cross_platform_determinism = true,
48
48
});
49
49
-
module.addImport("zmath", zmath_pkg.module("zmath"));
49
49
+
module.addImport("zmath", zmath.module("zmath"));
50
50
+
51
51
+
const zigimg = b.dependency("zigimg", .{});
52
52
+
module.addImport("zigimg", zigimg.module("zigimg"));
50
53
}
+8
-2
src/rayray.zig
···
3
3
pub const Raytracer = struct {
4
4
const Self = @This();
5
5
6
6
-
pub fn init() Self {
7
7
-
return .{};
6
6
+
allocator: std.mem.Allocator,
7
7
+
8
8
+
pub fn init(allocator: std.mem.Allocator) Self {
9
9
+
return .{
10
10
+
.allocator = allocator,
11
11
+
};
8
12
}
9
13
10
14
pub fn deinit(self: *const Self) void {
···
15
19
_ = self;
16
20
}
17
21
};
22
22
+
23
23
+
pub const Camera = struct {};