From 96f80b1a331d5e2e18fec57d8d6c5e0eac22e459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Sat, 18 Sep 2021 14:36:51 +0700 Subject: Reorganize textures --- src/main.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.zig') 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()) { -- cgit v1.2.3