all: update ECS Mod(.module_tag) -> Mod(ModuleType)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-12-16 22:56:46 -07:00
parent 8ff30c931f
commit 260802f777
4 changed files with 28 additions and 25 deletions

View file

@ -15,6 +15,7 @@ pub const Engine = struct {
encoder: *gpu.CommandEncoder,
pub const name = .engine;
pub const Mod = World.Mod(@This());
pub const local = struct {
pub fn init(world: *World) !void {
@ -33,7 +34,7 @@ pub const Engine = struct {
pub fn deinit(
world: *World,
engine: *World.Mod(.engine),
engine: *Mod,
) !void {
// TODO: this triggers a device loss error, which we should handle correctly
// engine.state.device.release();
@ -51,7 +52,7 @@ pub const Engine = struct {
}
pub fn beginPass(
engine: *World.Mod(.engine),
engine: *Mod,
clear_color: gpu.Color,
) !void {
const back_buffer_view = core.swap_chain.getCurrentTextureView().?;
@ -72,7 +73,7 @@ pub const Engine = struct {
}
pub fn endPass(
engine: *World.Mod(.engine),
engine: *Mod,
) !void {
// End this pass
engine.state.pass.end();