examples/gkurve: add atlas text rendering
This commit is contained in:
parent
027939e8ef
commit
8fa9ab2f58
3 changed files with 164 additions and 20 deletions
|
|
@ -3,6 +3,7 @@ const builtin = @import("builtin");
|
|||
pub const gpu = @import("gpu/build.zig");
|
||||
const gpu_dawn = @import("gpu-dawn/build.zig");
|
||||
pub const glfw = @import("glfw/build.zig");
|
||||
const freetype = @import("freetype/build.zig");
|
||||
const Pkg = std.build.Pkg;
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
|
|
@ -38,7 +39,7 @@ pub fn build(b: *std.build.Builder) void {
|
|||
.{ .name = "instanced-cube", .packages = &[_]Pkg{Packages.zmath} },
|
||||
.{ .name = "advanced-gen-texture-light", .packages = &[_]Pkg{Packages.zmath} },
|
||||
.{ .name = "fractal-cube", .packages = &[_]Pkg{Packages.zmath} },
|
||||
.{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg } },
|
||||
.{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg, freetype.pkg } },
|
||||
.{ .name = "textured-cube", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg } },
|
||||
}) |example| {
|
||||
// FIXME: this is workaround for a problem that some examples (having the std_platform_only=true field) as
|
||||
|
|
@ -59,6 +60,11 @@ pub fn build(b: *std.build.Builder) void {
|
|||
},
|
||||
);
|
||||
example_app.setBuildMode(mode);
|
||||
inline for (example.packages) |p| {
|
||||
if (std.mem.eql(u8, p.name, freetype.pkg.name))
|
||||
freetype.link(example_app.b, example_app.step, .{});
|
||||
}
|
||||
|
||||
example_app.link(options);
|
||||
example_app.install();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue