Fantasizing about C API and plugins
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user