use reftable instead and update interface
This commit is contained in:
parent
e88f9dd392
commit
32a5db1371
|
@ -1,10 +1,10 @@
|
||||||
const vk = @import("vulkan");
|
const vk = @import("vulkan");
|
||||||
const UUID = @import("../common/uuid.zig").UUID;
|
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 Vec2i = @import("../math/vec.zig").Vec2i;
|
||||||
|
|
||||||
const TTable = Table(UUID, Texture);
|
const TTable = RefTable(UUID, Texture);
|
||||||
var s_table: TTable = undefined;
|
var s_table: TTable = undefined;
|
||||||
|
|
||||||
pub fn init() void {
|
pub fn init() void {
|
||||||
|
@ -51,7 +51,7 @@ pub const Texture = packed struct {
|
||||||
slot: Id,
|
slot: Id,
|
||||||
|
|
||||||
pub fn get(id: Id) ?*const Self {
|
pub fn get(id: Id) ?*const Self {
|
||||||
return s_table.get(id);
|
return s_table.getPtr(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn isCurrent(id: Id) bool {
|
pub fn isCurrent(id: Id) bool {
|
||||||
|
|
Loading…
Reference in New Issue