use reftable instead and update interface

This commit is contained in:
Vivianne 2022-07-26 23:36:09 -07:00
parent e88f9dd392
commit 32a5db1371

View file

@ -1,10 +1,10 @@
const vk = @import("vulkan");
const UUID = @import("../common/uuid.zig").UUID;
const Table = @import("../containers/table.zig").Table;
const RefTable = @import("../containers/table.zig").RefTable;
const Vec2i = @import("../math/vec.zig").Vec2i;
const TTable = Table(UUID, Texture);
const TTable = RefTable(UUID, Texture);
var s_table: TTable = undefined;
pub fn init() void {
@ -51,7 +51,7 @@ pub const Texture = packed struct {
slot: Id,
pub fn get(id: Id) ?*const Self {
return s_table.get(id);
return s_table.getPtr(id);
}
pub fn isCurrent(id: Id) bool {