updated build scripts
This commit is contained in:
parent
a7505acf8b
commit
4d57518bc0
111
build.zig
111
build.zig
|
|
@ -14,6 +14,8 @@ backlogRoot: []const u8,
|
||||||
// content/_shaders/def
|
// content/_shaders/def
|
||||||
reflectShaderPathList: [][]u8 = undefined,
|
reflectShaderPathList: [][]u8 = undefined,
|
||||||
|
|
||||||
|
staticBuild: bool = false,
|
||||||
|
|
||||||
const engineDepList = [_][]const u8{
|
const engineDepList = [_][]const u8{
|
||||||
"assets",
|
"assets",
|
||||||
"audio",
|
"audio",
|
||||||
|
|
@ -37,14 +39,24 @@ const ozz = @import("ozz");
|
||||||
pub const InitOptions = struct {
|
pub const InitOptions = struct {
|
||||||
import_name: []const u8 = "Backlog",
|
import_name: []const u8 = "Backlog",
|
||||||
backlogRoot: []const u8 = "./BacklogEngine",
|
backlogRoot: []const u8 = "./BacklogEngine",
|
||||||
|
staticBuild: bool = false,
|
||||||
target: Build.ResolvedTarget,
|
target: Build.ResolvedTarget,
|
||||||
optimize: std.builtin.OptimizeMode,
|
optimize: std.builtin.OptimizeMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn init(b: *std.Build, opts: InitOptions) BuildSystem {
|
pub fn init(b: *std.Build, opts: InitOptions) BuildSystem {
|
||||||
|
var buildOpts = declareBuildOptions(b);
|
||||||
|
|
||||||
|
if (opts.target.result.os.tag == .linux) {
|
||||||
|
// using a static build for linux... object loading hell is not fun
|
||||||
|
std.debug.print("Important! only supporting static builds for linux", .{});
|
||||||
|
buildOpts.static_build = true;
|
||||||
|
}
|
||||||
|
|
||||||
const nwdep = b.dependency(opts.import_name, .{
|
const nwdep = b.dependency(opts.import_name, .{
|
||||||
.target = opts.target,
|
.target = opts.target,
|
||||||
.optimize = opts.optimize,
|
.optimize = opts.optimize,
|
||||||
|
.static_build = buildOpts.static_build,
|
||||||
});
|
});
|
||||||
|
|
||||||
const self = BuildSystem{
|
const self = BuildSystem{
|
||||||
|
|
@ -55,9 +67,11 @@ pub fn init(b: *std.Build, opts: InitOptions) BuildSystem {
|
||||||
.nw_mod = nwdep.module("Backlog"),
|
.nw_mod = nwdep.module("Backlog"),
|
||||||
.backlogRoot = opts.backlogRoot,
|
.backlogRoot = opts.backlogRoot,
|
||||||
.spirvReflect = SpirvReflect.SpirvGenerator2.init(nwdep.builder, .{}),
|
.spirvReflect = SpirvReflect.SpirvGenerator2.init(nwdep.builder, .{}),
|
||||||
.options = createGameOptions(b),
|
.options = createGameOptions(b, buildOpts),
|
||||||
.gltf2ozz = ozz.GltfToOzz.init(nwdep.builder, .{}),
|
.gltf2ozz = ozz.GltfToOzz.init(nwdep.builder, .{}),
|
||||||
.cookShaders = b.option(bool, "cookShaders", "generates shaders and updates .json files before running the build. (needs to be done whenever shaders are updated, this just runs tools/scripts/cook-shaders.py)") orelse false,
|
.cookShaders = b.option(bool, "cookShaders", "generates shaders and updates .json files before running the build. (needs to be done whenever shaders are updated, this just runs tools/scripts/cook-shaders.py)") orelse false,
|
||||||
|
|
||||||
|
.staticBuild = buildOpts.static_build,
|
||||||
};
|
};
|
||||||
|
|
||||||
const exeList = [2]*std.Build.Step.Compile{ self.gltf2ozz.exe, self.spirvReflect.reflect };
|
const exeList = [2]*std.Build.Step.Compile{ self.gltf2ozz.exe, self.spirvReflect.reflect };
|
||||||
|
|
@ -147,57 +161,81 @@ pub fn addProgram(self: *BuildSystem, opts: AddProgramOptions) *std.Build.Module
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn createGameOptions(b: *std.Build) *std.Build.Step.Options {
|
pub const BuildOptions = struct {
|
||||||
|
mutex_job_queue: bool,
|
||||||
|
static_build: bool,
|
||||||
|
zero_logging: bool,
|
||||||
|
slow_logging: bool,
|
||||||
|
force_mailbox: bool,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub fn declareBuildOptions(b: *std.Build) BuildOptions {
|
||||||
|
return .{
|
||||||
|
.mutex_job_queue = b.option(bool, "mutex_job_queue", "temporary test, reverts to old mutex based queue behaviour in jobs.zig:JobManager") orelse false,
|
||||||
|
.static_build = b.option(bool, "static_build", "builds the entire game as a single executable") orelse false,
|
||||||
|
.zero_logging = b.option(bool, "zero_logging", "disables all logging, only intended for use on job dispatch testing") orelse false,
|
||||||
|
.slow_logging = b.option(bool, "slow_logging", "Disables buffered logging, takes a hit to performance but gain timing information on logging") orelse false,
|
||||||
|
.force_mailbox = b.option(bool, "force_mailbox", "forces mailbox mode for present mode. unlocks framerate to irresponsible levels") orelse false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn createGameOptions(b: *std.Build, options: BuildOptions) *std.Build.Step.Options {
|
||||||
const opts = b.addOptions();
|
const opts = b.addOptions();
|
||||||
|
|
||||||
|
inline for (@typeInfo(BuildOptions).@"struct".fields) |field| {
|
||||||
|
opts.addOption(bool, field.name, @field(options, field.name));
|
||||||
|
}
|
||||||
|
|
||||||
// build options for core.zig
|
// build options for core.zig
|
||||||
opts.addOption(
|
// opts.addOption(
|
||||||
bool,
|
// bool,
|
||||||
"mutex_job_queue",
|
// "mutex_job_queue",
|
||||||
b.option(bool, "mutex_job_queue", "temporary test, reverts to old mutex based queue behaviour in jobs.zig:JobManager") orelse false,
|
// );
|
||||||
);
|
|
||||||
opts.addOption(
|
// opts.addOption(
|
||||||
bool,
|
// bool,
|
||||||
"zero_logging",
|
// "static_build",
|
||||||
b.option(bool, "zero_logging", "disables all logging, only intended for use on job dispatch testing") orelse false,
|
// );
|
||||||
);
|
|
||||||
opts.addOption(
|
// opts.addOption(
|
||||||
bool,
|
// bool,
|
||||||
"slow_logging",
|
// "zero_logging",
|
||||||
b.option(bool, "slow_logging", "Disables buffered logging, takes a hit to performance but gain timing information on logging") orelse false,
|
// );
|
||||||
);
|
// opts.addOption(
|
||||||
opts.addOption(
|
// bool,
|
||||||
bool,
|
// "slow_logging",
|
||||||
"force_mailbox",
|
// );
|
||||||
b.option(bool, "force_mailbox", "forces mailbox mode for present mode. unlocks framerate to irresponsible levels") orelse false,
|
// opts.addOption(
|
||||||
);
|
// bool,
|
||||||
opts.addOption(
|
// "force_mailbox",
|
||||||
bool,
|
// );
|
||||||
"use_renderthread",
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn addExtraModule(self: *BuildSystem, mod: *std.Build.Module, moduleName: []const u8) void {
|
pub fn addExtraModule(self: *BuildSystem, mod: *std.Build.Module, moduleName: []const u8) void {
|
||||||
const dep = self.b.dependency(moduleName, .{ .target = self.target, .optimize = self.optimize });
|
const dep = self.b.dependency(moduleName, .{ .target = self.target, .optimize = self.optimize, .static_build = self.staticBuild });
|
||||||
mod.addImport(moduleName, dep.module(moduleName));
|
mod.addImport(moduleName, dep.module(moduleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn addDependencyInstalls(self: *BuildSystem, b: *std.Build, optimize: std.builtin.OptimizeMode) void {
|
pub fn addDependencyInstalls(self: *BuildSystem, b: *std.Build, optimize: std.builtin.OptimizeMode) void {
|
||||||
// b.installArtifact(b.dependency("sdl3_lib", .{ .target = self.target, .optimize = optimize }).artifact("SDL3"));
|
if (self.staticBuild) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (cDependencyList) |d| {
|
inline for (cDependencyList) |d| {
|
||||||
b.installArtifact(b.dependency(
|
b.installArtifact(b.dependency(
|
||||||
d.dep,
|
d.dep,
|
||||||
.{ .target = self.target, .optimize = optimize },
|
.{ .target = self.target, .optimize = optimize, .static_build = self.staticBuild },
|
||||||
).artifact(d.artifact));
|
).artifact(d.artifact));
|
||||||
}
|
}
|
||||||
|
b.installArtifact(b.dependency(
|
||||||
|
"sdl3_lib",
|
||||||
|
.{ .target = self.target, .optimize = optimize, .static_build = self.staticBuild, .preferred_linkage = .dynamic },
|
||||||
|
).artifact("SDL3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
const cDependencyList: []const struct { dep: []const u8, artifact: []const u8 } = &.{
|
const cDependencyList: []const struct { dep: []const u8, artifact: []const u8 } = &.{
|
||||||
.{ .dep = "sdl3_lib", .artifact = "SDL3" },
|
|
||||||
.{ .dep = "spng", .artifact = "spng_c" },
|
.{ .dep = "spng", .artifact = "spng_c" },
|
||||||
.{ .dep = "lua", .artifact = "luac" },
|
.{ .dep = "lua", .artifact = "luac" },
|
||||||
.{ .dep = "miniaudio", .artifact = "miniaudio_c" },
|
.{ .dep = "miniaudio", .artifact = "miniaudio_c" },
|
||||||
|
|
@ -210,10 +248,12 @@ const cDependencyList: []const struct { dep: []const u8, artifact: []const u8 }
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const spirvDep = b.dependency("SpirvReflect", .{
|
const spirvDep = b.dependency("SpirvReflect", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
.static_build = static_build,
|
||||||
});
|
});
|
||||||
_ = spirvDep;
|
_ = spirvDep;
|
||||||
|
|
||||||
|
|
@ -230,6 +270,7 @@ pub fn build(b: *std.Build) void {
|
||||||
.{
|
.{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
.static_build = static_build,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
mod.addImport(depName, dep.module(depName));
|
mod.addImport(depName, dep.module(depName));
|
||||||
|
|
@ -237,7 +278,11 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
// link in large platform support functions
|
// link in large platform support functions
|
||||||
{
|
{
|
||||||
const dep = b.dependency("sdl3", .{ .target = target, .optimize = optimize });
|
const dep = b.dependency("sdl3", .{
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
.static_build = static_build,
|
||||||
|
});
|
||||||
const lib = dep.module("sdl3_lib");
|
const lib = dep.module("sdl3_lib");
|
||||||
|
|
||||||
mod.addImport("sdl3_fwd", lib);
|
mod.addImport("sdl3_fwd", lib);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("assets", .{
|
const mod = b.addModule("assets", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -12,13 +13,13 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
const core_dep = b.dependency(
|
const core_dep = b.dependency(
|
||||||
"core",
|
"core",
|
||||||
.{ .target = target, .optimize = optimize },
|
.{ .target = target, .optimize = optimize, .static_build = static_build },
|
||||||
);
|
);
|
||||||
mod.addImport("core", core_dep.module("core"));
|
mod.addImport("core", core_dep.module("core"));
|
||||||
|
|
||||||
const packer_dep = b.dependency(
|
const packer_dep = b.dependency(
|
||||||
"packer",
|
"packer",
|
||||||
.{ .target = target, .optimize = optimize },
|
.{ .target = target, .optimize = optimize, .static_build = static_build },
|
||||||
);
|
);
|
||||||
|
|
||||||
mod.addImport("packer", packer_dep.module("packer"));
|
mod.addImport("packer", packer_dep.module("packer"));
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ const depList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("audio", .{
|
const mod = b.addModule("audio", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -17,7 +18,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (depList) |depName| {
|
for (depList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
mod.addImport(depName, dep.module(depName));
|
mod.addImport(depName, dep.module(depName));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ const dependencyList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("core", .{
|
const mod = b.addModule("core", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -22,7 +23,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (dependencyList) |depName| {
|
for (dependencyList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
mod.addImport(depName, dep.module(depName));
|
mod.addImport(depName, dep.module(depName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ pub const ModuleLoader = struct {
|
||||||
backingAllocator: std.mem.Allocator,
|
backingAllocator: std.mem.Allocator,
|
||||||
arena: std.heap.ArenaAllocator,
|
arena: std.heap.ArenaAllocator,
|
||||||
loadedModules: std.ArrayListUnmanaged(*LoadedModule) = .{},
|
loadedModules: std.ArrayListUnmanaged(*LoadedModule) = .{},
|
||||||
|
watchInitialized: bool = false,
|
||||||
|
|
||||||
pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.ModuleLoader");
|
pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.ModuleLoader");
|
||||||
pub fn create(allocator: std.mem.Allocator) !*@This() {
|
pub fn create(allocator: std.mem.Allocator) !*@This() {
|
||||||
|
|
@ -130,17 +131,25 @@ pub const ModuleLoader = struct {
|
||||||
.arena = std.heap.ArenaAllocator.init(allocator),
|
.arena = std.heap.ArenaAllocator.init(allocator),
|
||||||
};
|
};
|
||||||
|
|
||||||
//core.fs().watchPath("zig-out/modules/");
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn addModule(self: *@This(), moduleName: []const u8) !void {
|
pub fn addModule(self: *@This(), moduleName: []const u8) !void {
|
||||||
// modules are always looked for under zig-out/modules
|
// modules are always looked for under zig-out/modules
|
||||||
|
if (core.BuildOption("static_build")) {
|
||||||
|
core.engine_log("[ModuleLoader]: skipping dynamic load, hot loading is not available", .{moduleName});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
core.engine_log("[ModuleLoader]: adding module to watch '{s}'", .{moduleName});
|
core.engine_log("[ModuleLoader]: adding module to watch '{s}'", .{moduleName});
|
||||||
const libFileName = try p2.sharedLibNameAlloc(self.arena.allocator(), moduleName);
|
const libFileName = try p2.sharedLibNameAlloc(self.arena.allocator(), moduleName);
|
||||||
const loaded = try self.arena.allocator().create(LoadedModule);
|
const loaded = try self.arena.allocator().create(LoadedModule);
|
||||||
|
|
||||||
|
if (self.watchInitialized == false) {
|
||||||
|
core.fs().watchPath("zig-out/modules/");
|
||||||
|
self.watchInitialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
loaded.* = LoadedModule{
|
loaded.* = LoadedModule{
|
||||||
.baseModulePath = try std.fmt.allocPrint(self.arena.allocator(), "zig-out/modules/{s}", .{libFileName}),
|
.baseModulePath = try std.fmt.allocPrint(self.arena.allocator(), "zig-out/modules/{s}", .{libFileName}),
|
||||||
.moduleName = moduleName,
|
.moduleName = moduleName,
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ const dependencyList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("imgui", .{
|
const mod = b.addModule("imgui", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -19,7 +20,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (dependencyList) |depName| {
|
for (dependencyList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
const dep_mod = dep.module(depName);
|
const dep_mod = dep.module(depName);
|
||||||
mod.addImport(depName, dep_mod);
|
mod.addImport(depName, dep_mod);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("papyrus", .{
|
const mod = b.addModule("papyrus", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -14,7 +15,7 @@ pub fn build(b: *std.Build) void {
|
||||||
mod.addIncludePath(b.path("src/"));
|
mod.addIncludePath(b.path("src/"));
|
||||||
mod.addCSourceFile(.{ .file = b.path("src/compat.cpp") });
|
mod.addCSourceFile(.{ .file = b.path("src/compat.cpp") });
|
||||||
|
|
||||||
const core_dep = b.dependency("core", .{ .target = target, .optimize = optimize });
|
const core_dep = b.dependency("core", .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
mod.addImport("core", core_dep.module("core"));
|
mod.addImport("core", core_dep.module("core"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("physics", .{
|
const mod = b.addModule("physics", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -12,9 +13,9 @@ pub fn build(b: *std.Build) void {
|
||||||
.root_source_file = b.path("src/physics.zig"),
|
.root_source_file = b.path("src/physics.zig"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const core_dep = b.dependency("core", .{ .target = target, .optimize = optimize });
|
const core_dep = b.dependency("core", .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
const zphysics_dep = b.dependency("zphysics", .{ .target = target, .optimize = optimize });
|
const zphysics_dep = b.dependency("zphysics", .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
mod.addImport("core", core_dep.module("core"));
|
mod.addImport("core", core_dep.module("core"));
|
||||||
mod.addImport("zphysics", zphysics_dep.module("root"));
|
mod.addImport("zphysics", zphysics_dep.module("root"));
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ const dependencyList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("platform", .{
|
const mod = b.addModule("platform", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -23,7 +24,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (dependencyList) |depName| {
|
for (dependencyList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
const dep_mod = dep.module(depName);
|
const dep_mod = dep.module(depName);
|
||||||
mod.addImport(depName, dep_mod);
|
mod.addImport(depName, dep_mod);
|
||||||
tests.root_module.addImport(depName, dep_mod);
|
tests.root_module.addImport(depName, dep_mod);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const dependencyList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("rend", .{
|
const mod = b.addModule("rend", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -23,7 +24,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (dependencyList) |depName| {
|
for (dependencyList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
const dep_mod = dep.module(depName);
|
const dep_mod = dep.module(depName);
|
||||||
mod.addImport(depName, dep_mod);
|
mod.addImport(depName, dep_mod);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ const dependencyList = [_][]const u8{
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("ui", .{
|
const mod = b.addModule("ui", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -21,7 +22,7 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (dependencyList) |depName| {
|
for (dependencyList) |depName| {
|
||||||
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize });
|
const dep = b.dependency(depName, .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
const dep_mod = dep.module(depName);
|
const dep_mod = dep.module(depName);
|
||||||
mod.addImport(depName, dep_mod);
|
mod.addImport(depName, dep_mod);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const mod = b.addModule("cimgui", .{
|
const mod = b.addModule("cimgui", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("lua", .{
|
const mod = b.addModule("lua", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -11,7 +12,12 @@ pub fn build(b: *std.Build) void {
|
||||||
.link_libc = true,
|
.link_libc = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const luac = b.addSharedLibrary(.{
|
const luac = if (static_build) b.addStaticLibrary(.{
|
||||||
|
.name = "luac",
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
.link_libc = true,
|
||||||
|
}) else b.addSharedLibrary(.{
|
||||||
.name = "luac",
|
.name = "luac",
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,14 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const miniaudio_c = b.addSharedLibrary(.{
|
const miniaudio_c = if (static_build) b.addStaticLibrary(.{
|
||||||
|
.name = "miniaudio_c",
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
.link_libc = true,
|
||||||
|
}) else b.addSharedLibrary(.{
|
||||||
.name = "miniaudio_c",
|
.name = "miniaudio_c",
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const mod = b.addModule("nfd", .{
|
const mod = b.addModule("nfd", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
@ -46,7 +47,7 @@ pub fn build(b: *std.Build) void {
|
||||||
// mod.linkSystemLibrary("gobject-2.0", .{});
|
// mod.linkSystemLibrary("gobject-2.0", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
const p2dep = b.dependency("p2", .{ .target = target, .optimize = optimize });
|
const p2dep = b.dependency("p2", .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
const p2mod = p2dep.module("p2");
|
const p2mod = p2dep.module("p2");
|
||||||
mod.addImport("p2", p2mod);
|
mod.addImport("p2", p2mod);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const mod = b.addModule("objLoader", .{
|
const mod = b.addModule("objLoader", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,20 @@ pub const GltfToOzz = struct {
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const ozz_cpp = b.addSharedLibrary(.{
|
const ozz_cpp = if (static_build)
|
||||||
.name = "ozz_cpp",
|
b.addStaticLibrary(.{
|
||||||
.target = target,
|
.name = "ozz_cpp",
|
||||||
.optimize = optimize,
|
.target = target,
|
||||||
});
|
.optimize = optimize,
|
||||||
|
})
|
||||||
|
else
|
||||||
|
b.addSharedLibrary(.{
|
||||||
|
.name = "ozz_cpp",
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
|
||||||
b.installArtifact(ozz_cpp);
|
b.installArtifact(ozz_cpp);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse unreachable;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const mod = b.addModule("p2", .{
|
const mod = b.addModule("p2", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const p2dep = b.dependency("p2", .{ .target = target, .optimize = optimize });
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
|
const p2dep = b.dependency("p2", .{ .target = target, .optimize = optimize, .static_build = static_build });
|
||||||
|
|
||||||
const mod = b.addModule("packer", .{
|
const mod = b.addModule("packer", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ pub const revision = formatted_version ++ " (" ++ vendor_info ++ ")";
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const preferred_linkage: std.builtin.LinkMode = b.option(
|
const preferred_linkage: std.builtin.LinkMode = b.option(
|
||||||
std.builtin.LinkMode,
|
std.builtin.LinkMode,
|
||||||
"preferred_linkage",
|
"preferred_linkage",
|
||||||
|
|
|
||||||
|
|
@ -42,23 +42,9 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
var linux = false;
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
var windows = false;
|
|
||||||
var macos = false;
|
|
||||||
switch (target.result.os.tag) {
|
|
||||||
.windows => {
|
|
||||||
windows = true;
|
|
||||||
},
|
|
||||||
.linux => {
|
|
||||||
linux = true;
|
|
||||||
},
|
|
||||||
.macos => {
|
|
||||||
macos = true;
|
|
||||||
},
|
|
||||||
else => {},
|
|
||||||
}
|
|
||||||
|
|
||||||
const preferred_linkage: std.builtin.LinkMode = if (linux) .static else .dynamic;
|
const preferred_linkage: std.builtin.LinkMode = if (static_build) .static else .dynamic;
|
||||||
|
|
||||||
const sdl_dep = b.dependency("sdl", .{
|
const sdl_dep = b.dependency("sdl", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const mod = b.addModule("shaderTypes", .{
|
const mod = b.addModule("shaderTypes", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,8 @@ pub const SpirvGenerator2 = struct {
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const test_step = b.step("test", "");
|
const test_step = b.step("test", "");
|
||||||
const tests = b.addTest(.{
|
const tests = b.addTest(.{
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,26 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const spng_c = b.addSharedLibrary(
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
.{
|
|
||||||
.optimize = optimize,
|
const spng_c = if (static_build)
|
||||||
.target = target,
|
b.addStaticLibrary(
|
||||||
.name = "spng_c",
|
.{
|
||||||
.link_libc = true,
|
.optimize = optimize,
|
||||||
},
|
.target = target,
|
||||||
);
|
.name = "spng_c",
|
||||||
|
.link_libc = true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
else
|
||||||
|
b.addSharedLibrary(
|
||||||
|
.{
|
||||||
|
.optimize = optimize,
|
||||||
|
.target = target,
|
||||||
|
.name = "spng_c",
|
||||||
|
.link_libc = true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
spng_c.addCSourceFile(.{ .file = b.path("spng/spng.c") });
|
spng_c.addCSourceFile(.{ .file = b.path("spng/spng.c") });
|
||||||
spng_c.addCSourceFile(.{ .file = b.path("miniz.c") });
|
spng_c.addCSourceFile(.{ .file = b.path("miniz.c") });
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ const tracy_path_include = tracy_path ++ "/tracy";
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
//const tracy_enabled = b.option(bool, "tracy", "Enables tracy integration") orelse false;
|
//const tracy_enabled = b.option(bool, "tracy", "Enables tracy integration") orelse false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
_ = b.addModule("zgltf", .{
|
_ = b.addModule("zgltf", .{
|
||||||
.root_source_file = b.path("src/main.zig"),
|
.root_source_file = b.path("src/main.zig"),
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
_ = static_build;
|
||||||
|
|
||||||
const mod = b.addModule("zmath", .{
|
const mod = b.addModule("zmath", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const std = @import("std");
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
|
const static_build = b.option(bool, "static_build", "builds backlog dependencies for static linking") orelse false;
|
||||||
|
|
||||||
const options = .{
|
const options = .{
|
||||||
.use_double_precision = b.option(
|
.use_double_precision = b.option(
|
||||||
|
|
@ -42,7 +43,11 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
zjolt.addIncludePath(b.path("libs/JoltC"));
|
zjolt.addIncludePath(b.path("libs/JoltC"));
|
||||||
|
|
||||||
const joltc = b.addSharedLibrary(.{
|
const joltc = if (static_build) b.addStaticLibrary(.{
|
||||||
|
.name = "joltc",
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
}) else b.addSharedLibrary(.{
|
||||||
.name = "joltc",
|
.name = "joltc",
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,18 @@ pub fn build(b: *std.Build) void {
|
||||||
.root_source_file = b.path("sampleGame/main.zig"),
|
.root_source_file = b.path("sampleGame/main.zig"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// new build api
|
||||||
|
//
|
||||||
|
// const game:BlProgram = blbuild.addProgram(...)
|
||||||
|
// game.addExtraModule(...)
|
||||||
|
// game.setModuleEnabled("physics", true);
|
||||||
|
// game.setModuleEnabled("audio", true);
|
||||||
|
// game.setModuleEnabled("audio", true);
|
||||||
|
//
|
||||||
|
//// commits changes and adds compile steps to the builder
|
||||||
|
// const sampleGame = game.addCompileSteps();
|
||||||
|
//
|
||||||
|
|
||||||
blbuild.addExtraModule(sampleGame, "gameExtras");
|
blbuild.addExtraModule(sampleGame, "gameExtras");
|
||||||
blbuild.addExtraModule(sampleGame, "videoplayer");
|
blbuild.addExtraModule(sampleGame, "videoplayer");
|
||||||
blbuild.addExtraModule(sampleGame, "doomplayer");
|
blbuild.addExtraModule(sampleGame, "doomplayer");
|
||||||
|
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
[ENGINE ]: defining componentScene
|
|
||||||
[ENGINE ]: Component container created scene.Scene @16ed1884f98
|
|
||||||
[ENGINE ]: creating lua metatable Scene
|
|
||||||
[ENGINE ]: module started >>>> core <<<<
|
|
||||||
[ENGINE ]: platform settings windowing.PlatformParams{ .extent = math.Vector2Type(c_int,"Vector2c"[0..8]){ .x = 1600, .y = 900 }, .windowName = { 66, 97, 99, 107, 108, 111, 103, 32, 69, 110, 103, 105, 110, 101 }, .icon = { 116, 101, 120, 116, 117, 114, 101, 115, 47, 105, 99, 111, 110, 46, 112, 110, 103 }, .hasVideo = true }
|
|
||||||
[ENGINE ]: module started >>>> platform <<<<
|
|
||||||
[ENGINE ]: allocated size: 4035286 (3.848 MiB)
|
|
||||||
[ENGINE ]: peak allocated size size: 4035414 (3.848 MiB) (76 peak allocations)
|
|
||||||
[ENGINE ]: module started >>>> assets <<<<
|
|
||||||
[ENGINE ]: sgpu device created, using shader format: .spv
|
|
||||||
[ENGINE ]: using renderer... scientist
|
|
||||||
[ENGINE ]: creating shader meshes.vert => _shaders/spv/meshes.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 1, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: creating shader lit_mesh.frag => _shaders/spv/lit_mesh.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 4, .num_storage_textures = 0, .num_storage_buffers = 1, .num_uniform_buffers = 1 }
|
|
||||||
[GRAPHICS ]: swapchain format: gpu.GPUTextureFormat.textureformatB8g8r8a8Unorm
|
|
||||||
[ENGINE ]: creating shader postProc.vert => _shaders/spv/postProc.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 0 }
|
|
||||||
[ENGINE ]: creating shader postProc.frag => _shaders/spv/postProc.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 3, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 0 }
|
|
||||||
[GRAPHICS ]: hdr texture format format: gpu.GPUTextureFormat.textureformatR16g16b16a16Float
|
|
||||||
[GRAPHICS ]: mesh pool created 4000k vertices, 16000k indices
|
|
||||||
[ENGINE ]: asset loader for asset type (Mesh) registered
|
|
||||||
[ENGINE ]: Texture List Added
|
|
||||||
[ENGINE ]: asset loader for asset type (Texture) registered
|
|
||||||
[ENGINE ]: creating blocky sampler
|
|
||||||
[ENGINE ]: loading asset t_default (Texture) [embedded:texture_sample.png]
|
|
||||||
[ENGINE ]: loading texture t_default
|
|
||||||
[ENGINE ]: creating mipmap level 9
|
|
||||||
[ENGINE ]: loading asset m_default_cube (Mesh) [embedded:primitive_box.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:primitive_box.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:primitive_box.obj] vertex count vertices=24 indices=36
|
|
||||||
[ENGINE ]: [DebugDrawSystem] starting up...
|
|
||||||
[ENGINE ]: loading asset m_debug_box (Mesh) [embedded:debug_box.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:debug_box.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:debug_box.obj] vertex count vertices=24 indices=36
|
|
||||||
[ENGINE ]: loading asset m_debug_line (Mesh) [embedded:debug_line.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:debug_line.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:debug_line.obj] vertex count vertices=2 indices=3
|
|
||||||
[ENGINE ]: loading asset m_debug_sphere (Mesh) [embedded:debug_sphere.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:debug_sphere.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:debug_sphere.obj] vertex count vertices=240 indices=336
|
|
||||||
[ENGINE ]: [DebugDrawSystem] registering to renderer...
|
|
||||||
[ENGINE ]: creating shader debug.vert => _shaders/spv/debug.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 1, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: creating shader debug.frag => _shaders/spv/debug.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 0 }
|
|
||||||
[ENGINE ]: creating shader meshes.vert => _shaders/spv/meshes.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 1, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: creating shader depthOnly.frag => _shaders/spv/depthOnly.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 0 }
|
|
||||||
[ENGINE ]: loading asset m_skybox (Mesh) [embedded:skybox_mesh.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:skybox_mesh.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:skybox_mesh.obj] vertex count vertices=24 indices=36
|
|
||||||
[ENGINE ]: creating shader skybox.vert => _shaders/spv/skybox.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: creating shader skybox.frag => _shaders/spv/skybox.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 1, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: loading asset m_plane (Mesh) [embedded:plane.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:plane.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:plane.obj] vertex count vertices=4 indices=6
|
|
||||||
[ENGINE ]: loading asset m_screenPlane (Mesh) [embedded:screenPlane.obj]
|
|
||||||
[ENGINE ]: loading mesh asset embedded:screenPlane.obj [obj]
|
|
||||||
[GRAPHICS ]: [embedded:screenPlane.obj] vertex count vertices=4 indices=6
|
|
||||||
[ENGINE ]: creating ssao pipeline
|
|
||||||
[ENGINE ]: creating shader postProc.vert => _shaders/spv/postProc.vert.spv gpu.GPUShaderStage.shaderstageVertex args: shaderTypes.ShaderLoadArgs{ .num_samplers = 0, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 0 }
|
|
||||||
[ENGINE ]: creating shader ssao.frag => _shaders/spv/ssao.frag.spv gpu.GPUShaderStage.shaderstageFragment args: shaderTypes.ShaderLoadArgs{ .num_samplers = 3, .num_storage_textures = 0, .num_storage_buffers = 0, .num_uniform_buffers = 1 }
|
|
||||||
[ENGINE ]: defining component_MeshComponent
|
|
||||||
[ENGINE ]: Component container created meshes.MeshComponent @16e88766338
|
|
||||||
[ENGINE ]: creating lua metatable Mesh
|
|
||||||
[ENGINE ]: defining component_CameraComponent
|
|
||||||
[ENGINE ]: Component container created camera.CameraComponent @16ed3fef308
|
|
||||||
[ENGINE ]: creating lua metatable Camera
|
|
||||||
[ENGINE ]: module started >>>> rend <<<<
|
|
||||||
[GRAPHICS ]: imgui startup
|
|
||||||
[ENGINE ]: module started >>>> imgui <<<<
|
|
||||||
[ENGINE ]: UI module started
|
|
||||||
[ENGINE ]: [Fontcache] loading font cache for default font
|
|
||||||
[ENGINE ]: [Fontcache] loading font cache for monospace font
|
|
||||||
[ENGINE ]: [Fontcache] loading font cache for bitmap font
|
|
||||||
[GRAPHICS ]: imgui startup
|
|
||||||
[ENGINE ]: module started >>>> ui <<<<
|
|
||||||
[ENGINE ]: creating Game context
|
|
||||||
[ENGINE ]: calling gEngine.run
|
|
||||||
[ENGINE ]: engine loop started
|
|
||||||
[ENGINE ]: program ready
|
|
||||||
[ENGINE ]: uploading mesh => m_default_cube
|
|
||||||
[GRAPHICS ]: uploading 24 vertices and 36 indices
|
|
||||||
[ENGINE ]: install mesh by name 16
|
|
||||||
[ENGINE ]: uploading mesh => m_debug_box
|
|
||||||
[GRAPHICS ]: uploading 24 vertices and 36 indices
|
|
||||||
[ENGINE ]: install mesh by name 20
|
|
||||||
[ENGINE ]: uploading mesh => m_debug_line
|
|
||||||
[GRAPHICS ]: uploading 2 vertices and 3 indices
|
|
||||||
[ENGINE ]: install mesh by name 21
|
|
||||||
[ENGINE ]: uploading mesh => m_debug_sphere
|
|
||||||
[GRAPHICS ]: uploading 240 vertices and 336 indices
|
|
||||||
[ENGINE ]: install mesh by name 22
|
|
||||||
[ENGINE ]: uploading mesh => m_skybox
|
|
||||||
[GRAPHICS ]: uploading 24 vertices and 36 indices
|
|
||||||
[ENGINE ]: install mesh by name 30
|
|
||||||
[ENGINE ]: uploading mesh => m_plane
|
|
||||||
[GRAPHICS ]: uploading 4 vertices and 6 indices
|
|
||||||
[ENGINE ]: install mesh by name 37
|
|
||||||
[ENGINE ]: uploading mesh => m_screenPlane
|
|
||||||
[GRAPHICS ]: uploading 4 vertices and 6 indices
|
|
||||||
[ENGINE ]: install mesh by name 38
|
|
||||||
[ENGINE ]: Processing exit signals
|
|
||||||
[ENGINE ]: checking everything is ready to exit
|
|
||||||
[ENGINE ]: checking everything is ready to exit engineObject.InterfaceRef2(engineObject.EngineObjectVTable){ .ptr = anyopaque@16ed18a2458, .vtable = engineObject.EngineObjectVTable{ .typeName = { 119, 105, 110, 100, 111, 119, 105, 110, 103, 46, 80, 108, 97, 116, 102, 111, 114, 109, 73, 110, 115, 116, 97, 110, 99, 101 }, .typeSize = 112, .typeAlign = 8, .singletonName = { 112, 108, 97, 116, 102, 111, 114, 109, 46, 73, 110, 115, 116, 97, 110, 99, 101 }, .init_func = fn (mem.Allocator) error{OutOfMemory,UnknownStatePanic,BadInit,UnknownError}!*anyopaque@7ff7f0769030, .tick_func = null, .engineDraw_func = null, .preTick_func = null, .deinit_func = fn (*anyopaque) void@7ff7f0769290, .postInit_func = null, .processEvents = null, .exitSignal_func = fn (*anyopaque) error{OutOfMemory,UnknownStatePanic,BadInit,UnknownError}!void@7ff7f0769170, .readyToExit_func = fn (*anyopaque) bool@7ff7f07691f0, .prepare_func = null, .fieldListHash = null, .fieldList = null, .slackSize = null } }
|
|
||||||
[ENGINE ]: exiting
|
|
||||||
[ENGINE ]: module shutting down >>>> ui <<<<
|
|
||||||
[ENGINE ]: module shutting down >>>> imgui <<<<
|
|
||||||
[ENGINE ]: module shutting down >>>> rend <<<<
|
|
||||||
[ENGINE ]: undefining component meshes.MeshComponent
|
|
||||||
[ENGINE ]: undefining component camera.CameraComponent
|
|
||||||
[ENGINE ]: module shutting down >>>> assets <<<<
|
|
||||||
[ENGINE ]: module shutting down >>>> platform <<<<
|
|
||||||
[ENGINE ]: module shutting down >>>> core <<<<
|
|
||||||
[ENGINE ]: allocated size: 3064738 (2.923 MiB)
|
|
||||||
[ENGINE ]: peak allocated size size: 9418782 (8.982 MiB) (190 peak allocations)
|
|
||||||
[ENGINE ]: undefining component scene.Scene
|
|
||||||
Loading…
Reference in New Issue