Skip to content

Commit

Permalink
sokol_fetch support & new example
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jun 2, 2024
1 parent 8d589cb commit 112acee
Show file tree
Hide file tree
Showing 5 changed files with 3,333 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ pub fn buildLibSokol(b: *Build, options: LibSokolOptions) !*CompileStep {
csrc_root ++ "sokol_gl.c",
csrc_root ++ "sokol_debugtext.c",
csrc_root ++ "sokol_shape.c",
csrc_root ++ "sokol_fetch.c",
csrc_root ++ "sokol_glue.c",
};
for (csources) |csrc| {
Expand Down Expand Up @@ -235,15 +236,16 @@ pub fn build(b: *Build) !void {
"mrt",
"saudio",
"sgl_context",
"droptest",
"sgl_points",
"debugtext",
"user_data", // Need GC for user data [associative array]
};

inline for (examples) |example| {
if (std.mem.eql(u8, example, "imgui"))
if (!opt_with_sokol_imgui or target.result.isWasm())
break;
if (std.mem.eql(u8, example, "imgui") or std.mem.eql(u8, example, "droptest"))
if (!opt_with_sokol_imgui)
@panic("Need ImGui library!!");
const ldc = try ldcBuildStep(b, .{
.name = example,
.artifact = lib_sokol,
Expand Down
Loading

0 comments on commit 112acee

Please sign in to comment.