summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index 5c4e1c2..e6eea7b 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -24,6 +24,11 @@ const gf = @import("gfz");
 const gl = @import("zgl");
 const legacy = @cImport(@cInclude("Game.h"));
 
+comptime {
+    // Work around lazy compilation.
+    @export(@import("misc.zig").loadTexture, .{ .name = "loadTexture" });
+}
+
 var game: *legacy.Game = undefined;
 
 fn resizeWindow(window: ?*gf.Window.Impl,
@@ -75,7 +80,6 @@ pub fn main() !void {
     defer context.deinit() catch unreachable;
     try al.useContext(context);
 
-    _ = @import("misc.zig").loadTexture("Font.png"); // work around laziness
     legacy.initGame(game);
     defer legacy.closeGame(game);
     while (!try window.shouldClose()) {