{examples,shaderexp}: make const App public
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
72ea652dca
commit
167f2d3a4f
9 changed files with 9 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ const Vec = zm.Vec;
|
||||||
const Mat = zm.Mat;
|
const Mat = zm.Mat;
|
||||||
const Quat = zm.Quat;
|
const Quat = zm.Quat;
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
queue: gpu.Queue,
|
queue: gpu.Queue,
|
||||||
cube: Cube,
|
cube: Cube,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ particle_bind_groups: [2]gpu.BindGroup,
|
||||||
sim_param_buffer: gpu.Buffer,
|
sim_param_buffer: gpu.Buffer,
|
||||||
frame_counter: usize,
|
frame_counter: usize,
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
const num_particle = 1500;
|
const num_particle = 1500;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const zm = @import("zmath");
|
||||||
const Vertex = @import("cube_mesh.zig").Vertex;
|
const Vertex = @import("cube_mesh.zig").Vertex;
|
||||||
const vertices = @import("cube_mesh.zig").vertices;
|
const vertices = @import("cube_mesh.zig").vertices;
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
const UniformBufferObject = struct {
|
const UniformBufferObject = struct {
|
||||||
mat: zm.Mat,
|
mat: zm.Mat,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ vertex_buffer: gpu.Buffer,
|
||||||
uniform_buffer: gpu.Buffer,
|
uniform_buffer: gpu.Buffer,
|
||||||
bind_group: gpu.BindGroup,
|
bind_group: gpu.BindGroup,
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
pub fn init(app: *App, core: *mach.Core) !void {
|
pub fn init(app: *App, core: *mach.Core) !void {
|
||||||
timer = try mach.Timer.start();
|
timer = try mach.Timer.start();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const zm = @import("zmath");
|
||||||
const Vertex = @import("cube_mesh.zig").Vertex;
|
const Vertex = @import("cube_mesh.zig").Vertex;
|
||||||
const vertices = @import("cube_mesh.zig").vertices;
|
const vertices = @import("cube_mesh.zig").vertices;
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
const UniformBufferObject = struct {
|
const UniformBufferObject = struct {
|
||||||
mat: zm.Mat,
|
mat: zm.Mat,
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ bind_group: gpu.BindGroup,
|
||||||
depth_texture: ?gpu.Texture,
|
depth_texture: ?gpu.Texture,
|
||||||
depth_texture_view: gpu.TextureView,
|
depth_texture_view: gpu.TextureView,
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
pub fn init(app: *App, core: *mach.Core) !void {
|
pub fn init(app: *App, core: *mach.Core) !void {
|
||||||
timer = try mach.Timer.start();
|
timer = try mach.Timer.start();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ const std = @import("std");
|
||||||
const mach = @import("mach");
|
const mach = @import("mach");
|
||||||
const gpu = @import("gpu");
|
const gpu = @import("gpu");
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
pipeline: gpu.RenderPipeline,
|
pipeline: gpu.RenderPipeline,
|
||||||
queue: gpu.Queue,
|
queue: gpu.Queue,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ uniform_buffer: gpu.Buffer,
|
||||||
bind_group1: gpu.BindGroup,
|
bind_group1: gpu.BindGroup,
|
||||||
bind_group2: gpu.BindGroup,
|
bind_group2: gpu.BindGroup,
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
pub fn init(app: *App, core: *mach.Core) !void {
|
pub fn init(app: *App, core: *mach.Core) !void {
|
||||||
timer = try mach.Timer.start();
|
timer = try mach.Timer.start();
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ const mach = @import("mach");
|
||||||
const gpu = @import("gpu");
|
const gpu = @import("gpu");
|
||||||
const glfw = @import("glfw");
|
const glfw = @import("glfw");
|
||||||
|
|
||||||
const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
const Vertex = struct {
|
const Vertex = struct {
|
||||||
pos: @Vector(4, f32),
|
pos: @Vector(4, f32),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue