examples/custom-renderer: correct packed struct -> extern struct
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8bd822c35d
commit
a7a6ecdd45
2 changed files with 4 additions and 5 deletions
|
|
@ -33,9 +33,8 @@ pub const global_events = .{
|
|||
.tick = .{ .handler = tick },
|
||||
};
|
||||
|
||||
// TODO(important): this shouldn't be a packed struct, it should be extern.
|
||||
const UniformBufferObject = packed struct {
|
||||
offset: Vec3.Vector,
|
||||
const UniformBufferObject = extern struct {
|
||||
offset: Vec3,
|
||||
scale: f32,
|
||||
};
|
||||
|
||||
|
|
@ -146,7 +145,7 @@ fn tick(
|
|||
_ = id;
|
||||
|
||||
const ubo = UniformBufferObject{
|
||||
.offset = position.v,
|
||||
.offset = position,
|
||||
.scale = scale,
|
||||
};
|
||||
encoder.writeBuffer(renderer.state().uniform_buffer, uniform_offset * num_entities, &[_]UniformBufferObject{ubo});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue