Fantasizing about C API and plugins

This commit is contained in:
2026-01-16 20:28:08 +01:00
parent 133994d2ef
commit 33a0b241ef
5 changed files with 232 additions and 9 deletions

View File

@@ -141,7 +141,7 @@ pub fn deinit(self: *Textures, engine: *Engine, allocator: std.mem.Allocator) vo
/// Get the ID of a texture given its filename (as a string) and usage. Returns
/// `null` if such texture hasn't been loaded. When the filename is `null`,
/// returns an empty texture ID appropriate for given usage.
pub fn get(self: *const Textures, maybe_filename: []const u8, usage: Texture.Usage) ?Id {
pub fn get(self: *const Textures, maybe_filename: ?[]const u8, usage: Texture.Usage) ?Id {
if (maybe_filename) |filename| {
return self.map.get(.{
// If the atom doesn't exist, then the texture cannot possibly exist.